Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging new source code before running "deploy" command #56

Closed
aramalipoor opened this issue Aug 23, 2015 · 0 comments
Closed

Staging new source code before running "deploy" command #56

aramalipoor opened this issue Aug 23, 2015 · 0 comments
Milestone

Comments

@aramalipoor
Copy link
Contributor

When user issues a deploy command it would be great if Farmer would run a staging process before deploying on the already running production container so that we can have a fail-safe deployment on boxes.

So the deploy process would be as follows:

  1. User runs farmer-cli deploy boxname1 -p tags/2.0 on a box currently on tags/0.1 pathspec.
  2. Farmer clones boxname1 container completely as is in production.
  3. Checks out tags/2.0 source code on cloned box.
  4. Runs deploy script defined in .farmer.yml.
  5. Runs status script defined in .farmer.yml and depending on status script exit code it determines if the deploy was successfully done with no errors.
    • If status script returned 0 exit code box will be updated to the new deployed container.
    • If status script returned a different exit code it leaves production box as is, and shows the error to the user.

Below is a sample .farmer.yml with status script:

image: myorg/myapp:tag
ports:
  - 80/tcp
scripts:
  create: "devops/production/bin/install"
  deploy: "devops/production/bin/update"
  status: "devops/production/bin/status"
@aramalipoor aramalipoor added this to the v0.2 milestone Aug 23, 2015
@aramalipoor aramalipoor mentioned this issue Aug 23, 2015
5 tasks
@aramalipoor aramalipoor changed the title [RFC] Staging new source code before running "deploy" command Staging new source code before running "deploy" command Sep 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant