MichalGoly / QuizTool

Audience response system enabling lecturers to embed interactive quizzes in lecture slides and broadcast them to students in real time - MEAN - Socket.io - AWS - Angular - Express - Docker - docker-compose - CircleCI - Multicontainer Elasticbeanstalk - Selenium Grid
GNU General Public License v2.0
5 stars 1 forks source link

Setup Circle CI to automatically deploy to AWS #26

Closed MichalGoly closed 6 years ago

MichalGoly commented 6 years ago

I have manged to setup the Circle CI build agent, and deploy the app to the production environment running on AWS directly from my laptop setup with AWS-CLI support.

Circle CI build needs to be able to automatically deploy to the production environment when the master branch is built, and all tests (due to be added soon) pass.

Circle CI <--> AWS Elastic Beanstalk integration can be achieved by creating an AWS profile config file in the ~/.aws folder on the build machine provisioned by Circle CI. The awsebcli also has to be installed during build to make eb deploy call possible.

MichalGoly commented 6 years ago

https://discuss.circleci.com/t/how-to-setup-elastic-beanstalk-deployment/6154/4 https://gist.github.com/RobertoSchneiders/9e0e73e836a80d53a21e

MichalGoly commented 6 years ago

Build steps draft:

  1. Checkout code
  2. Install build dependencies
  3. Use docker-compose to build the app during the build
  4. Run tests using docker-compose

IF BUILD RUNNING ON master:

  1. Build (not sure if needed) and tag the client and server_node Docker images for the Amazon Container Registry purposes.
  2. Login to the Amazon Elastic Container Registry and push the front and back end images.
  3. Use eb deploy to deploy the new version of the app to production
MichalGoly commented 6 years ago

done