Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
21 changes: 7 additions & 14 deletions .env
Original file line number Diff line number Diff line change
@@ -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
VSAC_API_KEY = changeMe
WHITELIST = http://localhost, http://localhost:3005
6 changes: 3 additions & 3 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -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)
This project includes software developed at
Asymmetrik, a BlueHalo Company (https://bluehalo.com)
92 changes: 54 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Binary file removed prototype-images/layout.png
Binary file not shown.
Binary file removed setup-images/ClosingLaunchChromeTask.png
Binary file not shown.