This repository contains scripts to merge two ROM-databases together.
DO NOT RUN THIS AROUND MIDNIGHT
cd deployer
bundle exec cap -f Capfile.roqua demo-production maintenance:xoff
bundle exec cap -f Capfile.roqua demo-production delayed_job:stop
ssh deploy@prod-rom-util1
echo "off" > /var/www/production.demo.roqua.nl/current/config/cron_state
ssh deploy@prod-rom-util1
cd rom-database-merger
git pull
SOURCE="r_demo_produc" TARGET="r_rom_produc" INCREMENT=10000000 bundle exec ruby merge.rb
knife data bag edit roqua production
Add action: 'delete'
to the klant section, so it will be removed from Apache configs on prod-rom-web*
:
"demo": {
"action": "delete",
....
"lb": {.......}
},
Copy that klant's lb
section to the lb
section from the rom klant:
"lb": {
"demo": {
"pem": "****",
"lb_ip": "97",
"dns": [
"production.demo.roqua.nl",
"www-production.demo.roqua.nl",
"epd-production.demo.roqua.nl",
"admin-production.demo.roqua.nl",
"api-production.demo.roqua.nl",
"test.demo.roqua.nl",
"login-production.demo.roqua.nl",
"demo.rom.roqua-production.nl"
]
}
}
Run chef on all servers. This should remove the old listener, and add the dns to the new one. Should be working automatically.
ssh prod-rom-web1
sudo mv /var/www/production.demo.roqua.nl /var/www/production.demo.roqua.nl.disabled
sudo chef-client
ssh prod-rom-web2
sudo mv /var/www/production.demo.roqua.nl /var/www/production.demo.roqua.nl.disabled
sudo chef-client
ssh prod-rom-web3
sudo mv /var/www/production.demo.roqua.nl /var/www/production.demo.roqua.nl.disabled
sudo chef-client
ssh prod-rom-util1
sudo mv /var/www/production.demo.roqua.nl /var/www/production.demo.roqua.nl.disabled
sudo chef-client
cd deployer
git rm apps/roqua/demo-production.rb
git commit -m 'Remove demo-production (merged to rom)'
git push
Open the Scout DelayedJob plugin template. Decrement the alert limits to match the newly decreased number of applications running.