Skip to content

DevOps: Updating Ruby version

Camille Villa edited this page Oct 31, 2024 · 2 revisions

Part 1 - Test application level changes locally

In local development:

  • Install the desired Ruby version with your Ruby version manager (rvm, rbenv, etc.)
  • Update the ruby version at the top of the Gemfile and run bundle install . Resolve any clashing dependencies. Confirm the Ruby version has changed in .ruby-version and Gemfile.lock
  • Update the Ruby version in CI config file
  • Run the tests to confirm there are no other breaking changes

Part 2 - Push new Ruby image to AWS ECR

  • Create a PR adding a Dockerfile for the new Ruby version in agilesix/Dockerfiles and get review
  • Follow instructions (DevOps: Update VA AWS ECR image ) to build new and tag Ruby image and push to VAEC ECR.

Part 3 - Confirm the new image works in DEV

On the ec2 server, change the Dockerfile image name and the Gemfile Ruby version:

cd diffusion-marketplace
vi Dockerfile 
vi Gemfile

sudo docker-compose build app 
sudo docker system prune -f

Restart the app:

./scripts/start_appcontainer.sh

Part 4 - Merge PR and Finish deployment

Update the PR with the following and merge into master after code review:

  • Update the image version in the Dockerfile
  • Change Ruby version in README
  • Update image version in Jenkins deploy scripts - both on the server and in the scripts/jenkins folder

Deploy to each environment and test using the normal deploy workflow.

Part 5 - Update secondary Jenkins scripts

  • Review all Jenkins tasks and update them to use the appropriate CONTAINER_ID.

Part 6 - Update remaining documentation

Clone this wiki locally