Balaji Vajjala's Blog

A DevOps Blog from Trenches

06

  • 6.2 Script a deployment
    • Learning Objectives
    • Modify Capistrano script.

6.2 Script a deployment

Learning Objectives

By the end of this lesson you will be able to:

  • Write a deployment script in Capistrano.

Modify Capistrano script.

  1. From the root directory of your AWSCLI instance change directory to devopsinthecloud.
  2. Open the file as shown below.

    “` $ sudo vim deploy.rb

    “`

  3. A list of some of the deploy tasks is provided below.

    “` deploy:setup deploy:deploy deploy:bundle_install deploy:db_migrate deploy:restart

    “`

  4. Capify is run in the jenkins.template

  5. You can also find these files by going to https://github.com/stelligent/devopsinthecloud/blob/master/deployment/config/deploy.rb.
  6. Review the Deployment Jenkins job.
  7. Make a modification to the contents of the file and save it.
  8. Add the file in Git

    “` $ git add .

    “`

  9. Commit the file to Git

    “` $ git commit -m “Modified deployment script”

    “`

  10. Push it to the Git master.

    “` $ git push

    “`