Skip to content

Commit

Permalink
added prepare command
Browse files Browse the repository at this point in the history
Signed-off-by: kappassov <abayk0708@gmail.com>
  • Loading branch information
kappassov committed Mar 19, 2023
1 parent c9211b9 commit ea40110
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions DEVELOPER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ If it's the only version of node installed, it will automatically be set to the
$ npm i -g corepack
```

```bash
$ corepack prepare yarn@<version> --activate
```

(See the [Yarn installation documentation](https://yarnpkg.com/getting-started/install) for more information.)

### Fork and clone OpenSearch Dashboards
Expand Down Expand Up @@ -111,6 +115,7 @@ $ yarn osd clean
OpenSearch Dashboards requires a running version of OpenSearch to connect to. In a separate terminal you can run the latest snapshot built using:

_(Linux, Windows, Darwin (MacOS) only - for others, you'll need to [set up using Docker](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/docs/docker-dev/docker-dev-setup-manual.md) or [run OpenSearch from a tarball](#alternative---run-opensearch-from-tarball) instead)_

```bash
$ yarn opensearch snapshot
```
Expand Down Expand Up @@ -185,6 +190,7 @@ By default, the snapshot command will run [a minimal distribution of OpenSearch]
If you would like to run OpenSearch with a particular plugin installed on the cluster snapshot, pass the `--P` flag after `yarn opensearch snapshot`. You can use the flag multiple times to install multiple plugins. The argument value can be a URL to the plugin's zip file, maven coordinates of the plugin, or a local zip file path (use `file://` followed by the absolute or relative path, in that case). For example:

_(Linux, Windows, Darwin (MacOS) only - for others, you'll need to [run OpenSearch from a tarball](#alternative---run-opensearch-from-tarball) instead)_

```bash
$ yarn opensearch snapshot --P https://repo1.maven.org/maven2/org/opensearch/plugin/opensearch-test-plugin/2.4.0.0/opensearch-test-plugin-2.4.0.0.zip
```
Expand Down Expand Up @@ -227,15 +233,15 @@ This method can also be used to develop against the [full distribution of OpenSe

### Configure OpenSearch Dashboards for security

*This step is only mandatory if you have the [`security` plugin](https://github.com/opensearch-project/security) installed on your OpenSearch cluster with https/authentication enabled.*
_This step is only mandatory if you have the [`security` plugin](https://github.com/opensearch-project/security) installed on your OpenSearch cluster with https/authentication enabled._

Once the bootstrap of OpenSearch Dashboards is finished, you need to apply some
changes to the default [`opensearch_dashboards.yml`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/config/opensearch_dashboards.yml#L25-L72) in order to connect to OpenSearch.

```yml
opensearch.hosts: ["https://localhost:9200"]
opensearch.username: "admin" # Default username on the docker image
opensearch.password: "admin" # Default password on the docker image
opensearch.hosts: ['https://localhost:9200']
opensearch.username: 'admin' # Default username on the docker image
opensearch.password: 'admin' # Default password on the docker image
opensearch.ssl.verificationMode: none
```
Expand All @@ -258,10 +264,11 @@ yarn build-platform --darwin
You could pass one or multiple flags. If you don't pass any flag, `yarn build-platform` will build an artifact based on your local environment.

Currently, the supported flags for this script are:
* `darwin` (builds Darwin x64)
* `linux` (builds Linux x64)
* `linux-arm` (builds Linux ARM64).
* `windows` (builds Windows x64)

- `darwin` (builds Darwin x64)
- `linux` (builds Linux x64)
- `linux-arm` (builds Linux ARM64).
- `windows` (builds Windows x64)

If you would like to build only a DEB x64 artifact, run the following:

Expand Down Expand Up @@ -334,9 +341,7 @@ This part contains developer guide rules around general (framework agnostic) HTM
Use camel case for the values of attributes such as `id` and `data-test-subj` selectors.

```html
<button id="veryImportantButton" data-test-subj="clickMeButton">
Click me
</button>
<button id="veryImportantButton" data-test-subj="clickMeButton">Click me</button>
```

The only exception is in cases where you're dynamically creating the value, and you need to use
Expand Down Expand Up @@ -432,10 +437,8 @@ import './component.scss';
// All other imports below the SASS import

export const Component = () => {
return (
<div className="plgComponent" />
);
}
return <div className="plgComponent" />;
};
```
```scss
Expand All @@ -446,7 +449,6 @@ export const Component = () => {
Do not use the underscore `_` SASS file naming pattern when importing directly into a javascript file.
### TypeScript/JavaScript
The following developer guide rules apply for working with TypeScript/JavaScript files.
Expand Down

0 comments on commit ea40110

Please sign in to comment.