Get information about Origami components, services, and repositories
Switch branches/tags
143.0.0+6148c46 142.0.0+324beb5 141.0.0+56792a6 140.0.0+65fcb8a 139.0.0+40eff66 138.0.0+aa2a95c 137.0.0+773f173 135.0.0+650c6ab 134.0.0+93cd583 133.0.0+daa4f2d 132.0.0+4989d24 130.0.0+77ca8b9 129.0.0+e75a38d 128.0.0+147c55f 127.0.0+707b70d 126.0.0+1ba71f6 125.0.0+c906d1a 124.0.0+087d9f9 123.0.0+103d50d 122.0.0+4d36990 121.0.0+f76900d 120.0.0+5cd39a7 119.0.0+988780a 118.0.0+1250924 117.0.0+7e8089f 116.0.0+d60fa9d 114.0.0+75a7444 113.0.0+acf7f77 111.0.0+47fe912 110.0.0+41cd161 109.0.0+dbeaccc 99.0.0+9857474 98.0.0+263702b 98.0.0+5500c6e 97.0.0+76d4d60 97.0.0+5b46485 96.0.0+9252655 96.0.0+469cba2 96.0.0+f4b4f3f 95.0.0+cd4634b 94.0.0+e3082e9 94.0.0+b1ad255 93.0.0+9243125 93.0.0+91cb2e6 93.0.0+bfc48a5 92.0.0+d7eb14f 92.0.0+b052caf 92.0.0+a275578 91.0.0+4f3ec2f 91.0.0+2e7004d 90.0.0+8067646 90.0.0+517d793 89.0.0+9974ae0 89.0.0+6443fd1 88.0.0+8214fd1 88.0.0+eb117b3 88.0.0+d950c7b 87.0.0+511367d 87.0.0+bb15e21 86.0.0+4ddd417 86.0.0+3c3b4f6 85.0.0+7a8bebb 84.0.0+3cc9116 83.0.0+8a9b2d1 82.0.0+36be38a 81.0.0+157f6f6 79.0.0+d7f1cbd 78.0.0+ba4b7c6 76.0.0+38825dd 75.0.0+73c39a9 74.0.0+10ad714 73.0.0+dd40ce2 72.0.0+a8d140d 70.0.0+a7c5e5a 69.0.0+1d72331 68.0.0+8a5ee9c 67.0.0+44c255e 66.0.0+007376e 65.0.0+59cf588 64.0.0+e84d95b 63.0.0+5444e88 62.0.0+c569ec5 61.0.0+0f9f83b 60.0.0+cc65e94 59.0.0+22baf5f 58.0.0+4842bee 57.0.0+90b8660 56.0.0+e7c9835 55.0.0+1268abc 54.0.0+e63eede 53.0.0+7da9e6e 52.0.0+81f4f09 51.0.0+ac8eed1 50.0.0+33c77c6 49.0.0+450b0a5 48.0.0+6835e60 47.0.0+29f9d26 46.0.0+cf1b16e 45.0.0+0047749 44.0.0+1c0b666
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
operational-documentation
src
test
views
.eslintignore
.eslintrc.js
.gitignore
.snyk
Makefile
Procfile
README.md
about.json
app.json
bower.json
circle.yml
index.js
origami.json
package-lock.json
package.json

README.md

Origami Registry UI

Get information about Origami components, services, and repositories.

Build status MIT licensed

Table Of Contents

Requirements

Running Origami Registry UI requires Node.js 10.x and npm.

Running Locally

Before we can run the application, we'll need to install dependencies:

npm install

In order to bundle the JS and CSS that the application will be using locally, we will then need to run:

make build

Run the application in development mode with:

make run-dev

Now you can access the app over HTTP on port 8080: http://localhost:8080/

Configuration

We configure Origami Registry UI using environment variables. In development, configurations are set in a .env file. In production, these are set through Heroku config. Further documentation on the available options can be found in the Origami Service documentation.

Required everywhere

  • NODE_ENV: The environment to run the application in. One of production, development (default), or test (for use in automated tests).
  • PORT: The port to run the application on.
  • REPO_DATA_API_KEY: The Repo Data API key to use when authenticating with that service.
  • REPO_DATA_API_SECRET: The Repo Data API secret to use when authenticating with that service.
  • CODEDOCS_ENDPOINT: The Origami Codedocs endpoint.
  • CODEDOCS_API_KEY: The Origami Codedocs API key used to authenticate.

Required in Heroku

  • CMDB_API_KEY: The CMDB API key to use when updating health checks and the application runbook (TODO not implemented yet)
  • FASTLY_PURGE_API_KEY: A Fastly API key which is used to purge URLs (when somebody POSTs to the /purge endpoint) (TODO not implemented yet)
  • GRAPHITE_API_KEY: The FT's internal Graphite API key.
  • PURGE_API_KEY: The API key to require when somebody POSTs to the /purge endpoint. This should be a non-memorable string, for example a UUID (TODO not implemented yet)
  • REGION: The region the application is running in. One of QA, EU, or US
  • RELEASE_LOG_API_KEY: The change request API key to use when creating and closing release logs
  • RELEASE_LOG_ENVIRONMENT: The Salesforce environment to include in release logs. One of Test or Production
  • SENTRY_DSN: The Sentry URL to send error information to.

Required locally

  • GRAFANA_API_KEY: The API key to use when using Grafana push/pull

Headers

The service can also be configured by sending HTTP headers, these would normally be set in your CDN config:

  • FT-Origami-Service-Base-Path: The base path for the service, this gets prepended to all paths in the HTML and ensures that redirects work when the CDN rewrites URLs.

Operational Documentation

TODO everything in this section is a lie until we make the operational-documentation folder

The source documentation for the runbook and healthcheck endpoints (EU/US) are stored in the operational-documentation folder. These files are pushed to CMDB upon every promotion to production. You can push them to CMDB manually by running the following command:

make cmdb-update

Testing

The tests are split into unit tests and integration tests. To run tests on your machine you'll need to install Node.js and run make install. Then you can run the following commands:

make test              # run all the tests
make test-unit         # run the unit tests
make test-integration  # run the integration tests

You can run the unit tests with coverage reporting, which expects 90% coverage or more:

make test-unit-coverage verify-coverage

The code will also need to pass linting on CI, you can run the linter locally with:

make verify

We run the tests and linter on CI, you can view results on CircleCI. make test and make lint must pass before we merge a pull request.

Deployment

The production (EU/US) and QA applications run on Heroku. We deploy continuously to QA via CircleCI, you should never need to deploy to QA manually. We use a Heroku pipeline to promote QA deployments to production.

You can promote either through the Heroku interface, or by running the following command locally:

make promote

Monitoring

Trouble-Shooting

We've outlined some common issues that can occur in the running of the Origami Registry UI:

What do I do if memory usage is high?

For now, restart the Heroku dynos:

heroku restart --app origami-registry-ui-eu
heroku restart --app origami-registry-ui-us

If this doesn't help, then a temporary measure could be to add more dynos to the production applications, or switch the existing ones to higher performance dynos.

What if I need to deploy manually?

If you really need to deploy manually, you should only do so to QA (production deploys should always be a promotion). Use the following command to deploy to QA manually:

make deploy

License

The Financial Times has published this software under the MIT license.