Skip to content

Commit

Permalink
Add notes on deployment (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangshun authored Jun 21, 2017
1 parent bbab803 commit e970f96
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ If your company is exploring a modern JavaScript stack as well, you may find thi
- [Package Management](#package-management---yarn)
- [Continuous Integration](#continuous-integration)
- [Hosting](#hosting---amazon-s3)
- [Deployment](#deployment)

Certain topics can be skipped if you have prior experience in them.

Expand Down Expand Up @@ -400,6 +401,8 @@ A good practice for serving static content is to use caching and putting them on

An example of a web app that we host on S3 is [Hub](https://hub.grab.com/).

Other than hosting the website, we also use S3 to host the build `.tar` files generated from each successful Travis build.

#### Study Links

- [Amazon S3 Homepage](https://aws.amazon.com/s3/)
Expand All @@ -410,6 +413,25 @@ An example of a web app that we host on S3 is [Hub](https://hub.grab.com/).
- [Google Cloud Platform](https://cloud.google.com/storage/docs/hosting-static-website)
- [Now](https://zeit.co/now)

## Deployment

The last step in shipping the product to our users is deployment. We use [Ansible Tower](https://www.ansible.com/tower) which is a powerful automation software that enables us to deploy our builds easily.

As mentioned earlier, all our commits, upon successful build, are being uploaded to a central S3 bucket for builds. We follow semver for our releases and have commands to automatically generate release notes for the latest release. When it is time to release, we run a command to tag the latest commit and push to our code hosting environment. Travis will run the CI steps on that tagged commit and upload a tar file (such as `1.0.1.tar`) with the version to our S3 bucket for builds.

On Tower, we simply have to specify the name of the `.tar` we want to deploy to our hosting bucket, and Tower does the following:

1. Download the desired `.tar` file from our builds S3 bucket.
1. Extracts the contents and swap in the configuration file for specified environment.
1. Upload the contents to the hosting bucket.
1. Post a notification to Slack to inform about the successful deployment.

This whole process is done under 30 seconds and using Tower has made deployments and rollbacks easy. If we realize that a faulty deployment has occurred, we can simply find the previous stable tag and deploy it.

#### Study Links

- [Ansible Tower Homepage](https://www.ansible.com/tower)

### The Journey has Just Begun

Congratulations on making it this far! Front end development today is [hard](https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f), but it is also more interesting than before. What we have covered so far will help any new engineer to Grab's web team to get up to speed with our technologies pretty quickly. There are many more things to be learnt, but building up a solid foundation in the essentials will aid in learning the rest of the technologies. This helpful [front end web developer roadmap](https://github.com/kamranahmedse/developer-roadmap#-front-end-roadmap) shows the alternative technologies available for each aspect.
Expand Down

0 comments on commit e970f96

Please sign in to comment.