- Node.js
- React
- Redux
- Testing: Karma, Mocha, Chai, Sinon
- Style: ESLint,
airbnb style guide
- Docker - for production release
- Kubernetes - for running the code in production on Google's container engine.
- Create a feature branch and a pull request
- Get the code reviewed
- Merge code into master
- CircleCI runs the CI process which includes
- Running tests
- Running the JS linter
- Building docker image
- Publishing docker image to Google's container registry
- Releasing the code to producing in a rolling fashion
- Clone the repo locally
- Install dependencies
$ npm install
- Run the app server
$ npm run dev
- Write tests and run tests before pushing
$ npm run test
- Ensure that you're following the coding guidelines
$ npm run lint
- Regurally check that you're running the latest dependencies
$ npm run deps
- Publish new image to the registry
$ ./deploy/publish.sh
- Run the rolling update command to release the code, the command takes an optional argument that lets you add a tag the Kubernetes controller's name. It's required if you're releasing code with the same git SHA1 hash.
$ ./deploy/rolling-update.sh [label]
-
Releasing code in a rolling update on Kubernetes might break the user experience. Consider the situation when a user sends a request to load a page and that page requests another resource. Kubernetes Replication Controller (RC) will use round robin to route the traffic, thus requesting a resource that is either no longer on the new docker image or hasn't made it to the new docker instance.
Potential Solution: Use version numbers in the url of the resource and distribute the assets on a CDN.