Skip to content

Instantly share code, notes, and snippets.

@josh-padnick
Last active April 10, 2017 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josh-padnick/ff31bd862162b3783d52e787de9db1d9 to your computer and use it in GitHub Desktop.
Save josh-padnick/ff31bd862162b3783d52e787de9db1d9 to your computer and use it in GitHub Desktop.
Workflow for Tesla

To deploy a change to an app to stage, in the current workflow, you'd do the following:

  1. Accept our previous github invitation for user l85m at https://github.com/gruntwork-io
  2. git clone https://github.com/gruntwork-io/sample-app-tesla && cd sample-app-tesla
  3. docker-compose up
  4. Open http://localhost:3000 to see the app.
  5. Make whatever changes you want and refresh your browser. A good file to change is app/index.html.
  6. git commit -am "some commit message"
  7. git push
  8. Normally, this would kick off a build in Jenkins which would automatically push a new Docker image to ECR and then auto-deploy to stage or prod. But because we haven't configured Jenkins yet, you would manually deploy as follows:
    1. Login your local environment to ECR: aws ecr get-login --region us-east-1
    2. cd sample-app-tesla
    3. Build the new Docker image: docker build -t sample-app-tesla .
    4. Tag it: docker tag sample-app-tesla:latest 427672229586.dkr.ecr.us-east-1.amazonaws.com/sample-app-tesla:latest
    5. Push it to Amazon ECR: docker push 427672229586.dkr.ecr.us-east-1.amazonaws.com/sample-app-tesla:latest
    6. Change this value in terraform.tfvars to the new docker image tag value (e.g. latest).
    7. From this directory, run terraform apply.
    8. Amazon ECS will auto-deploy to http://stage.gruntwork-tesla.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment