Skip to content

Make changes on historicals

Archived (pre-2022)

Preserved for reference only -- likely outdated. View original | Last updated: November 2021

  1. Update chef with new changes (parameters in config files for instance)
  2. Go to folder with policyfile, update it and push to chef server
ddenyshchenko LTMY-0129-DEBE:~/wd/github/fyber/devops/aws-infrastructure-code
> cd chef-ng/policyfiles/production/eu-west-1/druid_cluster_1/druid/
chef update && chef push production_eu-west-1 Policyfile.lock.json
  1. Bake new image with changes
ddenyshchenko LTMY-0129-DEBE:~/wd/github/fyber/devops/aws-infrastructure-code
> ./scripts/packer/packer_chef_zero.sh -p druid_cluster_1 -c druid --update-chef yes --skip-packer no

This script will create new ami and update in consul kv: Consul - Edit 4. Apply terraform, it will take new ami from consul and update spot.io elastigroups without rolling instances

AWS_PROFILE=sso-ofw-prd bundle exec rake "terraform:plan_and_apply[imply_cluster_1,production-eu-west-1]"
  1. To apply changes on existing instances without rolling them up, use any tool to run chef-client on them
    For example with ansible
ansible all -i `dig +short druid-historical-production-1.service.core-production-1.consul | tr '\n' ','` -o -b -m shell -a 'chef-client'