Collaborative Operations Data Activation
Consolidating the context of missions, training, and testing into an easy to use platform to relive and revisit each moment. For more info, see https://wiki.jsc.nasa.gov/exploration/index.php/CODA.
Other CODA clock tools
- The clocksync app: https://coda.fit.nasa.gov/clocksync/index.html
- The clockcalc app: https://coda.fit.nasa.gov/clockcalc/clockcalc.html
CODA is deployed using GitLab CI/CD and FIT-provisioned VMs.
Branch | Environment | URL |
---|---|---|
prod |
production | https://coda.fit.nasa.gov |
int |
integration | https://coda-int.fit.nasa.gov |
any | development | Any EMSS dev server (see below) |
EMSS dev servers all have element names, and are:
- https://carbon-emss-dev.fit.nasa.gov
- https://gold-emss-dev.fit.nasa.gov
- https://iron-emss-dev.fit.nasa.gov
- https://neon-emss-dev.fit.nasa.gov
- https://oxygen-emss-dev.fit.nasa.gov
- NodeJS (see the Dockerfile for the version we're using).
- Docker Desktop (optional)
- Install JavaScript dependencies:
npm i
- Get the secret values from another CODA developer and paste them into a new file called
env.secret.ts
. - Create a
./.env
file by runningnpm run make-dotenv
in the terminal. - Get the required NOCA (NASA Operational Certification Authority) Cert. This is required so CODA will authenticate other NASA website's certs.
- Go to https://cset.nasa.gov/ascs/application/trust-anchor-management-ntam-for-linux/
- In section "Installation for Linux Desktop Use Cases (RHEL only)" (Linux variety is fine for all OSes) go to the "Manual Installation" section
- Download zip file
- Extract zip and put the
.pem
file into the CODA root directory named.env.local.cert.pem
- To my code reviewer: are we still using
coda-local.fit.nasa.gov
? If not, I can remove this next step
- Elevated privileges required: Change the hosts file to map
coda-local.fit.nasa.gov
to127.0.0.1
. This is necessary for the direct IO API calls to work, and may be required in the future for LaunchPad authentication. - (Required for Docker) Create a self-signed SSL certificate by doing
bash ./scripts/make-dev-ssl-cert.sh
- (Optional unless you're making a lot of map requests) Get a Mapbox API key https://account.mapbox.com/. Set it to the
VITE_PUBLIC_MAXBOX_KEY
value in the.env
file.
To start CODA locally for development, run the following
npm run docker:services
npm run dev
Then go to (http://coda-local.fit.nasa.gov:3000)
This command sets up a hot-reloading fullstack node server. If any changes are made to the client, they should appear automatically in the browser. If any changes are made to the server, the server should automatically restart.
Bonus: When run locally, the application is already setup to work with VS Code's debugger. Once the dev server is up and running, press F5 to attach to it (assuming the default keybindings haven't been changed in VS Code). Now breakpoints can be set and code execution can be inspected
Here's the documentation on how the debugger is setup.
To preview a production-like setup with a full docker environment, essentially identical to what would be deployed to one of our servers, run the following
npm run docker:preview
Then go to https://coda-local.fit.nasa.gov. Note the HTTPS not HTTP, since the Docker setup is behind an nginx proxy with a self-signed certificate. Also there is no port number specified, since this is over port 443.
You will likely need to accept the self-signed certificate warning.
The first time this is run, docker will have to npm install
all packages, even if there is a recent node_modules
from running npm install
locally. The packages on the Linux container may be OS-specific, so they cannot be shared with the host machine. They are cached (in ./.local/docker_node_modules
), so subsequent runs of npm run docker:dev
won't take as long.
To be sure that the Docker images are fully rebuilt after making changes to CODA, run npm run docker:preview:rebuild
. This is generally not required, however, and simply running npm run docker:preview
again will be sufficient to rebuild just what is necessary (not rebuild everything). To completely rebuild without using the cache, run npm run docker:preview:rebuild:nocache
CODA is written in JavaScript and TypeScript for the benefit of strong types and uses the following:
- React - for structuring the front-end components
- Vite - for serving the front-end
- Express - for serving the back end
- Redux and Redux toolkit - for managing global state
- All times are stored internally in UTC
- All durations are stored internally in seconds
XKCD understands our pain...
On the server, CODA interacts with external APIs, cleans data, caches responses, and exposes its own APIs to provide nicely formatted data to clients. CODA interacts with external APIs with the code in src/server/services
. Browser clients interact with CODA's APIs with the code in src/http-client/
.
For more information about the APIs CODA interfaces with: https://eegitlab.fit.nasa.gov/emss/coda/-/wikis/APIs