Continuous Delivery with Golang and Docker
Sony Japan continuously deploys microservices built with Go and Docker in minutes.
Shipping high-quality software has been key to Sony's success for decades. Now more than ever, with the ubiquity of Wi-Fi and mobile internet in a dizzying array of devices, and with dozens of cloud services to manage, it's vital that Sony developers can build, test, and deploy business-critical applications quickly and reliably.
There are a number of different teams within Sony that depend on CircleCI for CI and CD, but this will be a deep-dive on one project developed at Sony Japan that provides shared services such as authentication and user management for a variety of web applications, such as PlayMemories, the cross-platform, cloud-based photo sharing service. The project is called Next Generation Core, or NG-Core for short, and it is made up of Docker-based microservices written in Go.
“Our old deployment process involved a spreadsheet of instructions and people to run them and took days. The new process has been fully automated from the start with CircleCI and Docker and takes only ~20 minutes.”
Deputy General Manager at Sony
The Challenge Prior to CircleCI
While the new NG-Core team, led by Yoshiyuki Mineo, started the project from scratch using some very modern tools, older projects in the organization had used a very different software development process. They were million-line Java monoliths that could take up to 4 days to deploy to production app servers based on instructions written in a spreadsheet and handed off to an operations team.
The NG-Core services are written in Go, packaged into Docker containers, pushed to Docker Hub, then deployed to AWS Elastic Beanstalk. In detail, the process looks like this:
- The developer commits and pushes to GitHub
- CircleCI receives a hook from GitHub, triggering a build
- CircleCI pulls down the latest code, compiles the Go binaries, and creates a deployable image with
- Unit and integration tests are run, including some tests that use the final Docker image
- The Docker image is pushed to Docker Hub, and a new deployment is triggered on Elastic Beanstalk
- A final live system test is run after the deployment
Applications deployed "the old way" went through a slow, manual process that involved lots of precarious, in-place manipulation of production resources, taking days to go from a developer to production. Now, with CircleCI and Docker, deployment of the NG-Core services is fully automated, takes an immutable infrastructure approach, and can take a git push into production in about 20 minutes. This means more frequent deployments and greater velocity for the team.