diff --git a/.env b/.env index 2fecc8d5..c80dcf6a 100644 --- a/.env +++ b/.env @@ -1,19 +1,12 @@ -# Development URLS - -MONGO_URL = mongodb://rems-user:pass@127.0.0.1:27017 -MONGO_DB_NAME = remsadmin -WHITELIST = http://localhost, http://localhost:3005 +AUTH_SERVER_URI = http://localhost:8090 +HTTPS_CERT_PATH = server.cert +HTTPS_KEY_PATH = server.key LOGGING_LEVEL = debug +MONGO_DB_NAME = remsadmin +MONGO_URL = mongodb://rems-user:pass@127.0.0.1:27017 PORT = 8090 RESOURCE_SERVER = http://localhost:8090 -AUTH_SERVER_URI = http://localhost:8090 -VSAC_API_KEY = changeMe SMART_ENDPOINT = http://localhost:4040/launch -HTTPS_KEY_PATH = server.key -HTTPS_CERT_PATH = server.cert USE_HTTPS = false - -# To Override start command: -# REACT_APP_REMS_HOOKS_PATH=http://example.com PORT=6000 npm start -# Note: .env values can only be accessed by react app starting with 'REACT_APP_' -# Note: .env key and value will always be string. Non-string type must be parsed or cast \ No newline at end of file +VSAC_API_KEY = changeMe +WHITELIST = http://localhost, http://localhost:3005 diff --git a/NOTICE.md b/NOTICE.md index 22e6f9c7..ee959a64 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1,5 +1,5 @@ REMS Administrator -Copyright 2022 The MITRE Corporation +Copyright 2023 The MITRE Corporation -This project includes software developed at -Asymmetrik, a BlueHalo Company (https://bluehalo.com) \ No newline at end of file +This project includes software developed at +Asymmetrik, a BlueHalo Company (https://bluehalo.com) diff --git a/README.md b/README.md index 8cd996d3..c3d138df 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,91 @@ # rems-admin ## Running only the REMS server project locally -1. Clone the REMS repositories from Github: + +1. Clone the REMS repositories from GitHub: ```bash - git clone https://github.com/mcode/rems-admin.git rems-admin + git clone https://github.com/mcode/rems-admin.git rems-admin ``` -2. Run dockerRunner.sh script +2. Run dockerRunner.sh script ```bash npm run start ``` ### How To Override Defaults -The .env file contains the default URI paths, these can be overwritten from the start command as follows: - `MONGO_URL=http://example.com SERVER_PORT=6000 npm start` - -Following are a list of modifiable paths: - -| URI Name | Default | -| ----------- | ----------- | -| MONGO_URL | `mongodb://rems-user:pass@127.0.0.1:27017` | -| MONGO_DB_NAME | `remsadmin` | -| WHITELIST | `http://localhost, http://localhost:3005` | -| LOGGING_LEVEL | `debug` | -| PORT | `8090` | -| RESOURCE_SERVER | `http://localhost:8090` | -| AUTH_SERVER_URI | `http://localhost:8090` | -| VSAC_API_KEY | `changeMe` | -| SMART_ENDPOINT | `http://localhost:3005/launch` | -| HTTPS_KEY_PATH | `server.key` | -| HTTPS_CERT_PATH | `server.cert` | -| USE_HTTPS | `false`| - -## Running the Mongo DB instance -1. On the first run use the following command to create a docker mongo instance: - ```bash - docker run --name rems_local_pims_remsadmin_mongo --expose 27017 -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME='rems-admin-pims-root' -e MONGO_INITDB_ROOT_PASSWORD='rems-admin-pims-password' -v rems_local_pims_remsadmin_mongo:/data/db -v "$(pwd)"/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js mongo - ``` - To stop the running container, simply use ctrl + c +The .env file contains the default URI paths, which can be overwritten from the start command as follows: +a) `REACT_APP_LAUNCH_URL=http://example.com PORT=6000 npm start` or b) by specifying the environment variables and desired values in a `.env.local`. + +> **Bug**: Do note that the `SMART_ENDPOINT` environment variable cannot be overwritten in a `.env.local`, it must be done in the `.env`. + +Following are a list of modifiable paths: + +| URI Name | Default | +| --------------- | ------------------------------------------ | +| AUTH_SERVER_URI | `http://localhost:8090` | +| HTTPS_CERT_PATH | `server.cert` | +| HTTPS_KEY_PATH | `server.key` | +| LOGGING_LEVEL | `debug` | +| MONGO_DB_NAME | `remsadmin` | +| MONGO_URL | `mongodb://rems-user:pass@127.0.0.1:27017` | +| PORT | `8090` | +| RESOURCE_SERVER | `http://localhost:8090` | +| SMART_ENDPOINT | `http://localhost:4040/launch` | +| USE_HTTPS | `false` | +| VSAC_API_KEY | `changeMe` | +| WHITELIST | `http://localhost, http://localhost:3005` | + +## Running the Mongo DB instance + +1. On the first run use the following command to create a Docker MongoDB instance: + + ```bash + docker run --name rems_local_pims_remsadmin_mongo --expose 27017 -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME='rems-admin-pims-root' -e MONGO_INITDB_ROOT_PASSWORD='rems-admin-pims-password' -v rems_local_pims_remsadmin_mongo:/data/db -v "$(pwd)"/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js mongo + ``` + + To stop the running container, simply use Ctrl + C. + +2. On subsequent runs use the following command to start the existing mongo container: + ```bash + docker start rems_local_pims_remsadmin_mongo + ``` + To stop the running container, simply run the below command + ```bash + docker stop rems_local_pims_remsadmin_mongo + ``` -2. On subsequent runs use the following command to start the existing mongo container: - ```bash - docker start rems_local_pims_remsadmin_mongo - ``` - To stop the running container, simply run the below command - ```bash - docker stop rems_local_pims_remsadmin_mongo - ``` # REMS Administrator + NOTE: The REMS Administrator is a work in progress. -## Running the REMS Adminstrator +## Running the REMS Administrator #### Initialization + After cloning the repository, the submodules must be initialized. To do this you can run: ``` git submodule update --init ``` + #### Setup + ``` npm install ``` + #### Run Tests + ``` npm test ``` + #### Run Application + ``` npm start ``` + Application will be running on port 8090. To reach the CDS Services discovery information: diff --git a/prototype-images/layout.png b/prototype-images/layout.png deleted file mode 100644 index 1d39a5c1..00000000 Binary files a/prototype-images/layout.png and /dev/null differ diff --git a/setup-images/ClosingLaunchChromeTask.png b/setup-images/ClosingLaunchChromeTask.png deleted file mode 100644 index ce0cb60b..00000000 Binary files a/setup-images/ClosingLaunchChromeTask.png and /dev/null differ