Source repo for Docker's Documentation
Go to file
Misty Stanley-Jones 9b50ee3943 Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.github Initial import of https://github.com/docker/dhe-engine 2016-09-28 14:25:04 -07:00
apidocs Moved docker-trusted-registry imported docs to apidocs and docker-trusted-registry subdirectories 2016-09-28 14:29:59 -07:00
client Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
container_configs Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
cs-engine Moved cs-engine docs to the cs-engine subdirectory 2016-09-28 14:19:05 -07:00
docker-hub Move docker-hub docs to docker-hub subdirectory 2016-09-28 14:37:27 -07:00
docker-trusted-registry Moved docker-trusted-registry imported docs to apidocs and docker-trusted-registry subdirectories 2016-09-28 14:29:59 -07:00
docs Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
server Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
src Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
tools Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
ucp Moved imported orca docs into ucp directory 2016-09-28 14:35:02 -07:00
.arcconfig Imitial import of https://github.com/docker/hub2-demo 2016-09-28 14:36:23 -07:00
.babelrc Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.dockercfg.template Imitial import of https://github.com/docker/hub2-demo 2016-09-28 14:36:23 -07:00
.dockerignore Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.drone.yml Initial commit -f https://github.com/docker/orca 2016-09-28 14:33:25 -07:00
.editorconfig Imitial import of https://github.com/docker/hub2-demo 2016-09-28 14:36:23 -07:00
.eslintignore Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.flowconfig Imitial import of https://github.com/docker/hub2-demo 2016-09-28 14:36:23 -07:00
.gitattributes Imitial import of https://github.com/docker/hub2-demo 2016-09-28 14:36:23 -07:00
.gitignore Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.gitmodules Initial import of https://github.com/docker/dhe-engine 2016-09-28 14:25:04 -07:00
.htmllintrc Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.mailmap Initial import of https://github.com/docker/cs-docker 2016-09-28 14:17:14 -07:00
.npmrc Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
.stylelintrc Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
Dockerfile Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
Jenkinsfile Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
README.md Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
circle.yml Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
mocha.js Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
npm-shrinkwrap.json Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
package.json Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00
webpack.config.js Initial commit -f https://github.com/docker/mercury-ui 2016-09-28 14:39:20 -07:00

README.md

Mercury

Circle CI codecov.io

Develop

In order to test user actions you will need to provide JWT authentication. Add your JWT to your environment variables keyed by DOCKERSTORE_TOKEN If you have CSRF token, key it in your environment variables by DOCKERSTORE_CSRF

npm install
npm run start

Dockerize

docker build -t docker/mercury-ui .
docker run -p 3000:3000 docker/mercury-ui

Deploy to staging & production

Setup

  1. Ensure access to Staging and Production VPNs
  2. Docker Infra adds your developer certificates to the store & hub aws teams.
  3. Install pip: instructions here
  4. Install hub-boss (globally for now):
git clone https://github.com/docker/saas-mega
cd saas-mega/tools/hub-boss
sudo pip install -r requirements.txt
sudo pip install -e .
  1. Follow the Pass Runbook to install pass, gpg-agent and pinentry.

  2. Set up Store TLS certificates to access the staging & production Docker Daemons (see docs)

mkdir -p ~/.docker/certs
cd ~/.docker/certs

# Get ca cert & key from pass
pass show dev/teams/store/docker/store-ca-cert.pem > ca.pem
pass show dev/teams/store/docker/store-ca-key.pem > ca-key.pem

# Generate a client private key
openssl genrsa -out key.pem 4096

# Generate client CSR
openssl req -subj '/CN=client' -new -key key.pem -out client.csr

# Sign the public key
echo extendedKeyUsage = clientAuth > extfile.cnf
openssl x509 -req -days 365 -sha256 -in client.csr -CA ca.pem -CAkey ca-key.pem -CAcreateserial -out cert.pem -extfile extfile.cnf

# Fix permissions
chmod -v 0400 key.pem
chmod -v 0444 ca.pem cert.pem

# cleanup
rm ca-key.pem
rm extfile.cnf
rm client.csr
rm ca.srl

Deploying to Staging

  1. Bump the app version:
git checkout master
git pull
npm version major  # commits change with new major version in package.json, creates new git tag e.g. <v6.0.0>
git push origin master # push bump version commit
git push origin --tags # pushes newly created git tag
  1. Wait for the new version to build on DockerHub (e.g. 6.0.0)
  2. Connect to the Staging VPN
  3. Deploy: ./tools/scripts/deploy_stage.sh <old version> <new version> # e.g: 5.0.0 6.0.0

Deploying to Production

  1. Connect to Production VPN
  2. Alert the team that you're doing a production deploy
  3. Deploy to production: ./tools/scripts/deploy_prod.sh <old version> <new version>

Rolling-Back

  1. Notify team you're doing a UI roll-back:
  2. ./tools/scripts/deploy_prod.sh <current version> <previous stable version>