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

CUMULUS-3987: ElasticSearch Full Removal - Dashboard Release Ticket #1172

Merged
merged 83 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
92603c9
Merge pull request #1145 from nasa/master to nasa/develop (#1146)
vindigo Sep 23, 2024
865213e
CUMULUS-3905: NPM Audit Fix (#1149)
jjmccoy Sep 25, 2024
d15c562
CUMULUS-3870: Security fix for Cypress Fixture (#1147)
jjmccoy Sep 27, 2024
4fa61a9
upgrade to React 18.3.1 including dependencies
Oct 1, 2024
5109e4d
updated changelog
Oct 1, 2024
5f061aa
fixed merge conflicts
Oct 2, 2024
4d607d6
update package-lock
Oct 3, 2024
942fb8a
Delete package-lock.json
vindigo Oct 3, 2024
da31b5a
Create package-lock.json
vindigo Oct 3, 2024
e592d94
init
Oct 17, 2024
03544d4
first commit v2 (#1153)
Nnaga1 Oct 18, 2024
1680e51
WIP footer unit test
Oct 18, 2024
9270522
updating footer tests to RTL
Nnaga1 Oct 21, 2024
d208aa1
header unit test
Oct 21, 2024
c95002e
Merge branch 'CUMULUS-3861' of https://github.com/nasa/cumulus-dashbo…
Nnaga1 Oct 21, 2024
07758d3
WIP header test
Oct 21, 2024
b6ea561
table tests converted to RTL
Nnaga1 Oct 22, 2024
1dbd478
Merge branch 'CUMULUS-3861' of https://github.com/nasa/cumulus-dashbo…
Nnaga1 Oct 22, 2024
a714ac5
ReingestGranules tests converted to RTL
Nnaga1 Oct 22, 2024
cec4a23
converting form tests to RTL
Nnaga1 Oct 23, 2024
00a06da
CUMULUS-3892: Update the home page metrics overview section (#1154)
Nnaga1 Oct 24, 2024
742ff04
finished main package, partially completed oauth, and added changes t…
Nnaga1 Oct 24, 2024
00285e8
CUMULUS-3748: Remove or fix call to /stats/aggregate for Reconciliati…
Nnaga1 Oct 24, 2024
6a3c67a
converting reconciliation-reports/oauth/collections from enzyme to RTL
Nnaga1 Oct 25, 2024
0c90e04
adjusting header
Nnaga1 Oct 25, 2024
1e60ef9
granule changes
Nnaga1 Oct 25, 2024
41c7967
granules/overview test changes
Nnaga1 Oct 28, 2024
bcf61a5
finished reconciliation-reports tests (with comment)
Nnaga1 Oct 28, 2024
f580cff
finished granules tests minus bulk-granule-modal.js
Nnaga1 Oct 28, 2024
7f46a70
WIP executions
Oct 30, 2024
ea9c321
WIP: execution events tests
Nov 5, 2024
b7269a6
CUMULUS-3861: Got the first test to pass using React.
BWex-NASA Nov 7, 2024
77d2243
WIP execution-events tests
Nov 8, 2024
c0ce6ae
Merge branch 'CUMULUS-3861' of https://github.com/nasa/cumulus-dashbo…
Nov 8, 2024
59930e4
Working on second test, got the first two asserts to work.
BWex-NASA Nov 8, 2024
2e27cd4
Merge branch 'CUMULUS-3861' of https://github.com/nasa/cumulus-dashbo…
Nov 8, 2024
93b10f0
Got all the asserts in the last test to work, with the exception of t…
BWex-NASA Nov 13, 2024
7ef1a4d
Merge branch 'CUMULUS-3861' of https://github.com/nasa/cumulus-dashbo…
Nov 13, 2024
551b20f
Split the test script file that contains two tests 'execution-events.…
BWex-NASA Nov 13, 2024
d58cf18
CUMULUS-3861: Dashboard: Replace Enzyme with React Testing Library(RTL)
BWex-NASA Nov 14, 2024
c4df037
Modified the test script to get the first assert to work.
BWex-NASA Nov 15, 2024
0c3f82c
Got the next assert working for 'dl'
BWex-NASA Nov 18, 2024
ab6fd08
Fixed all the remaining tests, and now the entire test script passes …
BWex-NASA Nov 19, 2024
088aebc
Got the first assert of the first test to pass and finally got the co…
BWex-NASA Nov 19, 2024
d2f2b3f
CUMULUS-3859:Update @cumulus packages and elasticsearch removal (#1155)
jennyhliu Nov 25, 2024
b0ce95e
Finally able to get all the asserts in the first test converted and p…
BWex-NASA Dec 4, 2024
426bc2e
Got all 16 assertions to pass and all three tests now pass. Script ha…
BWex-NASA Dec 4, 2024
ad4b1be
Fixed some formatting styles
BWex-NASA Dec 4, 2024
dfee6d2
upgrade from Enzyme to RTL
Dec 5, 2024
c65356e
change log update
Dec 5, 2024
88bb60f
resolving conflict
Dec 6, 2024
ce54dc2
resolving merge conflict in webpack.common.js
Dec 6, 2024
650f243
recovered package-lock.json
Dec 6, 2024
896ce3e
Merge branch 'develop' into CUMULUS-3861
vindigo Dec 6, 2024
be17578
merged CUMULUS-3861
Dec 11, 2024
289df22
Update CHANGELOG.md
vindigo Dec 11, 2024
fd70f88
Commented out the line below as it was giving us a compilation error …
BWex-NASA Dec 11, 2024
e800b2d
Merge branch 'rf/CUMULUS-3861' of https://github.com/nasa/cumulus-das…
BWex-NASA Dec 11, 2024
ce89bd2
Removed header comments and how to run comments from each converted t…
BWex-NASA Dec 11, 2024
0f914b2
Converted the condition.js test script even though we get a '✖ Couldn…
BWex-NASA Dec 11, 2024
920359c
Missed an import file.
BWex-NASA Dec 11, 2024
2eb0240
update package-lock to overwrite connected-react-router
Dec 13, 2024
b22aca8
Fixing the condition.js test file based on the CI failures.
BWex-NASA Dec 16, 2024
dce1e1a
Was able to finally run the condition.js test script. Converted the a…
BWex-NASA Dec 16, 2024
068aca1
I removed the two split out test scripts and converted them back to t…
BWex-NASA Dec 20, 2024
11abf1e
Removed the extra line item, as well as the listing of all the unit t…
BWex-NASA Dec 20, 2024
84b4fc9
Update CHANGELOG/consolidate headers
Jkovarik Dec 20, 2024
67f31c9
Remove unneeded file
Jkovarik Dec 20, 2024
a7bb592
Remove OOS/scaffolding script
Jkovarik Dec 20, 2024
df2f6a8
Move webpack dep to dev dependencies. Should consider removal
Jkovarik Dec 20, 2024
0a251b8
Update package.json with unneeded packages removed
Jkovarik Dec 20, 2024
50982e3
Partially Revert "Update package.json with unneeded packages removed"
Jkovarik Dec 20, 2024
53d3ef6
Merge pull request #1159 from nasa/jk/CUMULUS-3861-suggestions
Jkovarik Dec 20, 2024
5d3df84
Update CHANGELOG per PR suggestion
Jkovarik Dec 20, 2024
174a3ab
Minor changelog fix
Jkovarik Dec 20, 2024
0d9e6c3
Update dependencies
Jkovarik Dec 20, 2024
9f0dfed
Added line back in to changelog to address jennyhliu's concern.
BWex-NASA Dec 21, 2024
93cbcee
Merge pull request #1158 from nasa/rf/CUMULUS-3861
vindigo Dec 23, 2024
73937f7
Doug newman documentation fixes (#1163)
etcart Jan 10, 2025
a40b7b3
CUMULUS-3990: Upgrade localstack from 3.0.0 to 4.0.3 (#1164)
jennyhliu Jan 23, 2025
e2ec375
CUMULUS-3862 - Updated documentation to account for short term React …
BWex-NASA Feb 5, 2025
dba15d0
Version bump for next Cumulus API release-es phase2 (#1156)
jennyhliu Feb 19, 2025
26af255
CUMULUS-3987: ElasticSearch Full Removal - Dashboard Release Ticket …
Nnaga1 Feb 19, 2025
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
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"settings": {
"react": {
"pragma": "React",
"version": "16.10.2"
"version": "18.3.1"
}
}
}
48 changes: 47 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,51 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [v13.0.0] - 2024-02-19
This version of the dashboard requires Cumulus API >= v20.0.0

### Changed

- **CUMULUS-3862**
- Updated documentation to account for short term React upgrade version dependency issues that arise using npm.

- **GitHub Issue 1162**
- Added documentation for beginners starting from scratch.

- **CUMULUS-3861**
- Updated React 17 to React 18
- Removed test script references to Enzyme and replaced them with React compliant testing components

- **CUMULUS-3860/3870**
- Updated React and dependencies
- react 17.0.2 ⇒ 18.3.1
- **CUMULUS-3748**
- Removed reconciliationReports aggregate stats call from Granules Page
- **CUMULUS-3821**
- Removed fake-granuleid-refresh-connection/refreshCumulusDbConnection
- **CUMULUS-3859**
- Removed ElasticSearch from localAPI docker-compose files
- Updated the dashboard to use alpha version `@cumulus/api@19.2.0-alpha.1` and
`@cumulus/aws-client@19.2.0-alpha.1`
- Updated the integration tests to work with updated API
- Updated packages to address [CVE-2024-21538] (https://github.com/advisories/GHSA-3xgq-45jj-v275)
- **CUMULUS-3870**
- Remove launchpad security key information from cypress fixture for `valid-execution.json`
- Add placeholders for security information with `fakePassword` and `userName`
- **CUMULUS-3892**
- Updated Metrics Overview page executions and rules query to only get count from the past 24 hours
- **CUMULUS-3990**
- Upgraded localstack from 3.0.0 to 4.0.3
- **Cypress Upgrade**
- Upgraded cypress from 8.7.0 to 9.7.0 to work with updated @cumulus/api@20.0.0 and
@cumulus/aws-client@20.0.0 packages
- Updated localAPI docker-compose-cypress.yml to use cypress 9.7.0

### Fixed

- **CUMULUS-3905**
- Fixed npm audit issues with `body-parser` and `path-to-regexp`

## [v12.2.0] - 2024-09-04

This version of the dashboard requires Cumulus API >= v18.4.0
Expand Down Expand Up @@ -1400,7 +1445,8 @@ Fix for serving the dashboard through the Cumulus API.
### Added

- Versioning and changelog [CUMULUS-197] by @kkelly51
[Unreleased]: https://github.com/nasa/cumulus-dashboard/compare/v12.2.0...HEAD
[Unreleased]: https://github.com/nasa/cumulus-dashboard/compare/v13.0.0...HEAD
[v13.0.0]: https://github.com/nasa/cumulus-dashboard/compare/v12.2.0...v13.0.0
[v12.2.0]: https://github.com/nasa/cumulus-dashboard/compare/v12.1.0...v12.2.0
[v12.1.0]: https://github.com/nasa/cumulus-dashboard/compare/v12.0.2...v12.1.0
[v12.0.2]: https://github.com/nasa/cumulus-dashboard/compare/v12.0.1...v12.0.2
Expand Down
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ If you want to submit your own contributions, follow these steps:

* Fork the Cumulus Dashboard repo
* Create a new branch from the branch you'd like to contribute to
* Verify that everything is working before you write code. See ['Getting Started for beginners'](#getting-started-for-beginners) below.
* If an issue doesn't already exist, submit one (see above)
* [Create a pull request](https://help.github.com/articles/creating-a-pull-request/) from your fork into the target branch of the nasa/cumulus-dashboard repo
* Be sure to [mention the corresponding issue number](https://help.github.com/articles/closing-issues-using-keywords/) in the PR description, i.e. "Fixes Issue #10"
Expand Down Expand Up @@ -47,3 +48,54 @@ Improve contributing docs and consolidate them in the standard location https://
```

### For more information on Cumulus governance, see the [Cumulus Code Contribution Guidelines](https://docs.google.com/document/d/14J_DS6nyQ32BpeVjdR-YKfzHAzFB299tKghPGshXUTU/edit) and [the Cumulus Wiki](https://wiki.earthdata.nasa.gov/display/CUMULUS/Cumulus).

## Getting Started for Beginners

### Pre-requisites
- [Docker](https://www.docker.com/) a Docker daemon must be running on your local machine. Running Docker Desktop is a simple way to achieve this
- Node Version Manager ([NVM](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating))
- Node Package Manager ([NPM](https://github.com/npm/cli))

### Instructions
1. If you have not done so already, [fork this repo](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo).
2. [Clone your forked repo](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) to your local environment.
```bash
git clone https://github.com/<your github account name>/cumulus-dashboard.git
cd cumulus-dashboard
```
3. [Create a branch](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging) to develop your code in
4. Install the correct version fo Node.js for the Cumulus Dashboard and set the version for this project
```bash
nvm install v20.12.2
```
```bash
nvm use
```
5. Install the cumulus dashboard
For your first install,
```bash
npm ci --legacy-peer-deps
```
6. Run the unit tests for cumulus dashboard. Do not proceed to the subsequent steps until all these tests have passed.
```bash
npm test-unit-only
```
7. Start up the mock services Cumulus Dashboard needs to communicate with. Cumulus API, EDL/Launchpad. These services will be accessible from `localhost:5001`.
```bash
npm run start-localstack
```
```bash
npm run serve-api
```
8. In a seperate terminal, build and run the cumulus dashboard. This will start up a browser instance and load the application from localhost:3000. This can take a while.
```bash
APIROOT=http://localhost:5001 npm run build
```
```bash
APIROOT=http://localhost:5001 npm run serve
```
9. Run the integration tests. This will start up a cypress instance. Click on `run all specs`. This action will bring up a browser and execute the integration tests for Cumulus Dashboard. Do not proceed to the subsequent steps until all these tests have passed.
```bash
npm run cypress
```
You are now ready to start developing!
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ The basic steps to follow are:

This is a two step process, where you use [`npm link`](https://docs.npmjs.com/cli-commands/link.html) to prepare the @cumulus/api by running `npm link` in the `cumulus/packages/api` directory and then use it in the dashboard project by running `npm link @cumulus/api` in the dashboard root directory.

When you have done this, you need to make sure that you only use the LocalStack/Elasticsearch portion of the docker-compose containers, e.g. run `npm run start-localstack` and `npm run serve-api` in order to run the linked version of the @cumulus/api. Do all of your development locally including running unit and integration tests. When you are satisfied with the changes to the Cumulus core code (and when that is merged) you can do an alpha release of the code by building an alpha release of the package `npm version prerelease --preid=alpha` and then publishing to npm with a tag of `next`. `npm publish --tag next`. This will upload the contents of your `cumulus/packages/api` to npm with a version that looks like `1.18.1-alpha.0` and a tag of `next`.
When you have done this, you need to make sure that you only use the LocalStack portion of the docker-compose containers, e.g. run `npm run start-localstack` and `npm run serve-api` in order to run the linked version of the @cumulus/api. Do all of your development locally including running unit and integration tests. When you are satisfied with the changes to the Cumulus core code (and when that is merged) you can do an alpha release of the code by building an alpha release of the package `npm version prerelease --preid=alpha` and then publishing to npm with a tag of `next`. `npm publish --tag next`. This will upload the contents of your `cumulus/packages/api` to npm with a version that looks like `1.18.1-alpha.0` and a tag of `next`.

2. Update the dashboard to use the alpha package for CI.

Expand Down
103 changes: 61 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Setting the following environment variables can override the default values.
The dashboard source is available on github and can be cloned with git.

```bash
$ git clone https://github.com/nasa/cumulus-dashboard
git clone https://github.com/nasa/cumulus-dashboard
```
The cloned directory `./cumulus-dashboard` will be referred as the root directory of the project and commands that are referenced in this document, should start from that directory.

Expand All @@ -67,7 +67,7 @@ All values are optional except `APIROOT` which must point to the Cumulus API tha

Set the environment and build the dashboard with these commands:
```sh
$ source production.env && ./bin/build_dashboard_via_docker.sh
source production.env && ./bin/build_dashboard_via_docker.sh
```

This script uses Docker Compose to build and copy the compiled dashboard into the `./dist` directory. You can now deploy this directory to AWS behind [CloudFront](https://aws.amazon.com/cloudfront/). If you are in NGAP, follow the instructions for "Request Public or Protected Access to the APIs and Dashboard" on the earthdata wiki page [Using Cumulus with Private APIs](https://wiki.earthdata.nasa.gov/display/CUMULUS/Using+Cumulus+with+Private+APIs).
Expand All @@ -81,13 +81,13 @@ The script `./bin/build_dashboard_image.sh` will build a docker image containing

Example of building and running the project in Docker:
```bash
$ source production.env && ./bin/build_dashboard_image.sh cumulus-dashboard:production-1
source production.env && ./bin/build_dashboard_image.sh cumulus-dashboard:production-1
```

That command builds a Docker image with the name `cumulus-dashboard` and tag `production-1`. This image can be run in Docker to serve the Dashboard.

```bash
$ docker run --rm -it -p 3000:80 cumulus-dashboard:production-1
docker run --rm -it -p 3000:80 cumulus-dashboard:production-1
```
In this example, the dashboard would be available at `http://localhost:3000/` in any browser.

Expand All @@ -102,17 +102,20 @@ The dashboard uses node v20.12.2. To build/run the dashboard on your local machi
#### install requirements
We use npm for local package management. To install the requirements:
```bash
$ nvm use
$ npm ci
nvm use
```

Use `$ npm install` when package.json is updated.
When package.json is updated.

```bash
npm install connected-react-router@6.9.3 --legacy-peer-deps
```

To build a dashboard bundle<sup>[1](#bundlefootnote)</sup>:

```bash
$ nvm use
$ [SERVED_BY_CUMULUS_API=true] [DAAC_NAME=LPDAAC] [STAGE=production] [HIDE_PDR=false] [LABELS=daac] APIROOT=https://myapi.com npm run build
nvm use
[SERVED_BY_CUMULUS_API=true] [DAAC_NAME=LPDAAC] [STAGE=production] [HIDE_PDR=false] [LABELS=daac] APIROOT=https://myapi.com npm run build
```
**NOTE**: Only the `APIROOT` environment variable is required and any of the environment variables currently set are passed to the build.

Expand All @@ -132,10 +135,10 @@ It is possible to [serve the dashboard](https://nasa.github.io/cumulus-api/#serv
`cumulus-dashboard` versions are distributed using tags in GitHub. You can select specific version in the following manner:

```bash
$ git clone https://github.com/nasa/cumulus-dashboard
$ cd cumulus-dashboard
$ git fetch origin ${tagNumber}:refs/tags/${tagNumber}
$ git checkout ${tagNumber}
git clone https://github.com/nasa/cumulus-dashboard
cd cumulus-dashboard
git fetch origin ${tagNumber}:refs/tags/${tagNumber}
git checkout ${tagNumber}
```

Then follow the steps noted above to build the [dashboard locally](#build-the-dashboard) or [using Docker](#quick-start).
Expand All @@ -157,7 +160,7 @@ The dashboard should be available at `http://localhost:3000`
To run a built dashboard, first [build the dashboard](#build-the-dashboard), then run:

```bash
$ npm run serve:prod
npm run serve:prod
```
This runs a node http-server in front of whatever exists in the `./dist` directory. It's fast, but will not pick up any changes as you are working.

Expand All @@ -168,7 +171,7 @@ This runs a node http-server in front of whatever exists in the `./dist` directo
First, [build the dashboard](#build-the-dashboard). Then deploy the `./dist` folder, the dashboard bundle, to an AWS bucket.

```bash
$ aws s3 sync dist s3://my-bucket-to-be-used
aws s3 sync dist s3://my-bucket-to-be-used
```
If you are not in an NGAP environment, Look at the instructions for [Hosting a static website on Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html)
and [configuring a bucket as a static website](https://docs.aws.amazon.com/AmazonS3/latest/dev/HowDoIWebsiteConfiguration.html).
Expand All @@ -181,40 +184,50 @@ Otherwise, follow the instructions for building and deploying the dashboard for
### Unit Tests

```bash
$ npm run test
npm run test-unit-only
```

Command to run a single test script locally using Ava:

```bash
$ npx ava test/../../test-name.js
```

### Integration & Validation Tests

For the integration tests to work, you have to first run the localstack application, launch the localAPI and serve the dashboard first. Run the following commands in separate terminal sessions:

Run background localstack application.
Run background localstack application:
```bash
npm run start-localstack
```
Note: you can also stop the localstack application as follows:
```bash
$ npm run start-localstack
npm run stop-localstack
```

Serve the cumulus API (separate terminal)
```bash
$ npm run serve-api
npm run serve-api
```

Serve the dashboard web application (another terminal)
```bash
$ [HIDE_PDR=false ENABLE_RECOVERY=true APIROOT=http://localhost:5001] npm run serve
[HIDE_PDR=false ENABLE_RECOVERY=true APIROOT=http://localhost:5001] npm run serve
```

If you're just testing dashboard code, you can generally run all of the above commands as a single docker-compose stack.
```bash
$ npm run start-dashboard
npm run start-dashboard
```
This brings up LocalStack, Elasticsearch, the Cumulus localAPI, and the dashboard.
This brings up LocalStack, the Cumulus localAPI, and the dashboard.

Run the test suite (yet another terminal window)
```bash
$ npm run cypress
npm run cypress
```

When the cypress editor opens, click on `run all specs`.
When the cypress editor opens, click on `run X integration specs`. Where X is the current number of integration specs.


### Local API server
Expand All @@ -223,27 +236,31 @@ For **development** and **testing** purposes only, you can run a Cumulus API loc

*Important Note: These `docker compose` commands do not build distributable containers, but are a provided as testing conveniences. The docker-compose[-\*].yml files show that they work by linking your local directories into the container.*

In order to run the Cumulus API locally you must first [build the dashboard](#build-the-dashboard) and then run the containers that provide LocalStack and Elasticsearch services.
In order to run the Cumulus API locally you must first [build the dashboard](#build-the-dashboard) and then run the containers that provide LocalStack services.

These are started and stopped with the commands:
```bash
$ npm run start-localstack
$ npm run stop-localstack
npm run start-localstack
```
```bash
npm run stop-localstack
```

After these containers are running, you can start a cumulus API locally in a terminal window `npm run serve-api`, the dashboard in another window. `[HIDE_PDR=false ENABLE_RECOVERY=true APIROOT=http://localhost:5001] npm run serve` and finally cypress in a third window. `npm run cypress`.

Once the Docker app is running, If you would like to see sample data you can seed the database. This will load the same sample data into the application that is used during cypress testing.
```bash
$ npm run seed-database
npm run seed-database
```

If you prefer to stand up more of the stack in Docker containers, you can include the cumulus api in the docker-compose stack. To run the Cumulus API in a Docker container, (which still leaves running the dashboard and cypress up to you), just run the `cumulusapi` service.

The cumulusapi Docker service is started and stopped:
The cumulusapi Docker service is started and stopped using the following commands:
```bash
npm run start-localstack
```
```bash
$ npm run start-cumulusapi
$ npm run stop-cumulusapi
npm run stop-localstack
```

the start command, will exit successfully long before the stack is actually ready to run.
Expand All @@ -253,7 +270,6 @@ The output looks like this:
> docker compose -f ./localAPI/docker-compose.yml -f ./localAPI/docker-compose-serve-api.yml up -d

Creating localapi_shim_1 ... done
Creating localapi_elasticsearch_1 ... done
Creating localapi_localstack_1 ... done
Creating localapi_serve_api_1 ... done
```
Expand All @@ -272,12 +288,15 @@ Then you can run the dashboard locally (without Docker) `[HIDE_PDR=false APIROOT

The Docker compose stack also includes a command to let a developer start all development containers with a single command.

Bring up and down the entire stack (the localAPI and the dashboard) with:
Bring up the entire stack (the localAPI and the dashboard) with:
```bash
$ npm run start-dashboard
$ npm run stop-dashboard
npm run start-localstack
```
This runs everything, the backing Localstack and Elasticsearch containers, the local Cumulus API and dashboard. Edits to your code will be reflected in the running dashboard. You can run cypress tests still with `npm run cypress`. As a warning, this command takes a very long time to start up because the containers come up in a specific order and generally this should be reserved for use by Earthdata Bamboo or some other continuous integration service. But, if you are using it locally, **be sure to wait until all containers are fully up** before trying to visit the dashboard which is exposed at http://localhost:3000
Bring down the entire stack (the localAPI and the dashboard) with:
```bash
npm run stop-localstack
```
This runs everything, the backing Localstack container, the local Cumulus API and dashboard. Edits to your code will be reflected in the running dashboard. You can run cypress tests still with `npm run cypress`. As a warning, this command takes a very long time to start up because the containers come up in a specific order and generally this should be reserved for use by Earthdata Bamboo or some other continuous integration service. But, if you are using it locally, **be sure to wait until all containers are fully up** before trying to visit the dashboard which is exposed at http://localhost:3000
The stack is ready when the `view-docker-logs` task shows:
```bash
dashboard_1 | > NODE_ENV=production http-server dist -p 3000 --proxy http://localhost:3000?
Expand All @@ -295,7 +314,7 @@ dashboard_1 | Hit CTRL-C to stop the server

If something is not running correctly, or you're just interested, you can view the logs with a helper script, this will print out logs from each of the running docker containers.
```bash
$ npm run view-docker-logs
npm run view-docker-logs
```
This can be helpful in debugging problems with the docker application.

Expand All @@ -310,7 +329,7 @@ ERROR: for shim Cannot start service shim: driver failed programming external c

You can run all of the cypress tests locally that Earthdata Bamboo runs with a single command:
```bash
$ npm run e2e-tests
npm run e2e-tests
```
This stands up the entire stack as well as begins the e2e service that will run all cypress commands and report an exit code for their success or failure. This is primarily used for CI, but can be useful to developers.

Expand Down Expand Up @@ -374,10 +393,10 @@ Push a new release tag to Github. The tag should be in the format `v1.2.3`, wher
Create and push a new git tag:

```bash
$ git checkout master
$ git pull origin master
$ git tag -a v1.x.x -m "Release 1.x.x"
$ git push origin v1.x.x
git checkout master
git pull origin master
git tag -a v1.x.x -m "Release 1.x.x"
git push origin v1.x.x
```

### 11. Add the release to GitHub
Expand Down
Loading