- A personal Github account
- A personal Codeship account
- A personal Heroku account
- A Rails development environment
- rbenv or rvm
- Rails gem globally installed
- A command line interface
- Setting up CI/CD with a Rails Github repo, Codeship CI/CD, and Heroku hosting
- Configure a single (staging) environment
- Configure a secondary (prod) environment if time allows
- Encounter some errors to replicate a more realistic pipeline creation :)
- Create a new rails app
rails new devops-day --database=postgresql --T
- https://guides.rubyonrails.org/command_line.html#rails-new
- Create Github repo (while waiting for rails to init)
- Add remote origin
- Add a landing page
- Controller file and action
touch app/controllers/pages_controller.rb
- Create template
mkdir app/views/pages && touch app/views/pages/index.html.erb
- add text
- Configure root route
root to: 'pages#index'
- Controller file and action
- Create Heroku app
- Create Codeship project
- Install the github app if not added yet
- Follow provided link or: https://github.com/apps/cloudbees/installations/new?state=codeship
- Give codeship permission to read your repos
- Follow link or: gettings/installations -> repository access
- Select Basic Codeship project
- Install the github app if not added yet
- Set up CD pipeline on Codeship
- Set up deployment Test Setup Commands
- custom or dropdown
- Common Errors: ruby version is not on heroku, bundler version, deadlock, etc
- Setup Deployment steps
- heroku access key
- Add Rails configuration for RSpec
- (Optional) Add Rails configuration for Rubocop
- Set up CI pipeline on Codeship
- Set up test steps
- Add codeship badge to github repo
- Set up Production environment
- Configure production branch
- Create Heroku app (app-name-production)
- Create production CI/CD pipeline