Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation and developer guide #199

Merged
merged 2 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions nightly-playground/DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!-- TOC -->

- [Developer Guide](#developer-guide)
- [Getting Started](#getting-started)
- [Deployment](#deployment)
- [Required context parameters](#required-context-parameters)
- [Sample command to set up multi-node cluster with security enabled](#sample-command-to-set-up-multi-node-cluster-with-security-enabled)

<!-- /TOC -->

## Developer Guide

This project is an extension of [opensearch-cluster-cdk](https://github.com/opensearch-project/opensearch-cluster-cdk) that deploys nightly built artifacts daily. The source code concentrates on taking care of regular deployments, permissions, access, etc. For more customization, please feel free to directly use [opensearch-cluster-cdk](https://github.com/opensearch-project/opensearch-cluster-cdk).

## Getting Started

- Requires [NPM](https://docs.npmjs.com/cli/v7/configuring-npm/install) to be installed
- Install project dependencies using `npm install` from this project directory
- Configure [aws credentials](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_prerequisites)

## Deployment

### Required context parameters

In order to deploy the stack the user needs to provide a set of required parameters listed below:

| Name | Requirement | Type | Description |
|-------------------------------|:------------|:------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| distVersion | Required | string | The OpenSearch distribution version (released/un-released) the user wants to deploy |
| distributionUrl | Required | string | OpenSearch tarball distribution URL plugin |
| dashboardsUrl | Required | string | OpenSearch-Dashboards tarball distribution URL version |
| adminPassword | Required | string | OpenSearch and OpenSearch-Dashboards admin password |
| dashboardPassword | Required | string | OpenSearch-Dashboards password for kibanaserver user |
| dashboardOpenIDClientSecret | Required | string | OpenSearch-Dashboards client secret for OpenID Connect |

### Sample command to set up multi-node cluster with security enabled

```
npm run cdk deploy "*" -- -c distVersion=2.3.0 -c distributionUrl=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.3.0/latest/linux/x64/tar/dist/opensearch/opensearch-2.3.0-linux-x64.tar.gz -c dashboardsUrl=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/2.3.0/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-2.3.0-linux-x64.tar.gz
```
38 changes: 17 additions & 21 deletions nightly-playground/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
# OpenSearch Nightly Playground
Get a glance of your work in action on a fully deployed distribution cluster for upcoming version. The purpose of this playground is to get early feedback on upcoming features and see it in action.
gaiksaya marked this conversation as resolved.
Show resolved Hide resolved
This cluster will deploy nightly build artifacts daily at 00:00 UTC (5PM PST).

This project is an extension of [opensearch-cluster-cdk](https://github.com/opensearch-project/opensearch-cluster-cdk) that deploys nightly built artifacts daily. The source code concentrates on taking care of regular deployments, permissions, access, etc. For more customization, please feel free to directly use [opensearch-cluster-cdk](https://github.com/opensearch-project/opensearch-cluster-cdk).
* **Where can I access it?**\
https://playground.nightly.opensearch.org/

## Getting Started
* **What commit was used to build this distribution?**\
gaiksaya marked this conversation as resolved.
Show resolved Hide resolved
Every user has the read-only access to the cluster. The entire distribution manifest of the deployed artifact is indexed in the cluster as a part of the automation. Simply go to the dev-tools and run the below query:
gaiksaya marked this conversation as resolved.
Show resolved Hide resolved
```
GET opensearch/_doc/1
GET opensearch-dashboards/_doc/1
```
This will give you components present in the deployed cluster along with the commit_id and the artifact location.

- Requires [NPM](https://docs.npmjs.com/cli/v7/configuring-npm/install) to be installed
- Install project dependencies using `npm install` from this project directory
- Configure [aws credentials](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_prerequisites)
* **Component missing from the cluster/distribution?**\
If a component is missing from the distribution, well because it failed to build and hence was not able to make the cut into the nightly distribution. Please go to the repository and search for build failure issues. Example: https://github.com/opensearch-project/security-analytics/issues/904
gaiksaya marked this conversation as resolved.
Show resolved Hide resolved

## Deployment
* **What if we need a more data indexed into these cluster?**\
gaiksaya marked this conversation as resolved.
Show resolved Hide resolved
Please feel free to raise an issue or pull request with the required data that you need in these clusters. The maintainers will review the data for security and sensitive data.
gaiksaya marked this conversation as resolved.
Show resolved Hide resolved

### Required context parameters

In order to deploy the stack the user needs to provide a set of required parameters listed below:

| Name | Requirement | Type | Description |
|-------------------------------|:------------|:------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| distVersion | Required | string | The OpenSearch distribution version (released/un-released) the user wants to deploy |
| distributionUrl | Required | string | OpenSearch tarball distribution URL plugin |
| dashboardsUrl | Required | string | OpenSearch-Dashboards tarball distribution URL version |

#### Sample command to set up multi-node cluster with security enabled

```
npm run cdk deploy "*" -- -c distVersion=2.3.0 -c distributionUrl=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.3.0/latest/linux/x64/tar/dist/opensearch/opensearch-2.3.0-linux-x64.tar.gz -c dashboardsUrl=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/2.3.0/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-2.3.0-linux-x64.tar.gz
```
* **What if we need more permissions to test different features on these clusters?**\
gaiksaya marked this conversation as resolved.
Show resolved Hide resolved
Please creat an GitHub issue requesting the right permissions required along with GitHub username.
gaiksaya marked this conversation as resolved.
Show resolved Hide resolved
Loading