-
Notifications
You must be signed in to change notification settings - Fork 372
Upgrading release versions
santhosh-optit edited this page Feb 21, 2018
·
5 revisions
Prerequisite
- Release Notes
- Changelog
- Backup Database schema and data, if it's being changed
- Stop relevant services
- Uninstall the applications if required
- Install the applications if required
- Restore the Database schema and data
e.g. upgrade.sh
#!/bin/bash
# Taking the backup and uninstalling deprecated apps
ansible-playbook -i upgrade_scripts/inventory/hosts upgrade.yml --tags backup, uninstall
# Provisioning & Deploying release-version, only apps that changed
ansible-playbook -i inventory/hosts provision.yml --tags mysql, nginx
# Restoring previous data
ansible-playbook -i upgrade_scripts/inventory/hosts upgrade.yml --tags restore
folder structure
╰─$ tree upgrade_scripts
upgrade_scripts
├── inventory
│ └── hosts
├── roles
│ ├── mysql_backup
│ │ ├── defaults
│ │ │ └── main.yml
│ │ ├── files
│ │ ├── handlers
│ │ │ └── main.yml
│ │ ├── meta
│ │ │ └── main.yml
│ │ ├── README.md
│ │ ├── tasks
│ │ │ └── main.yml
│ │ ├── templates
│ │ ├── tests
│ │ │ ├── inventory
│ │ │ └── test.yml
│ │ └── vars
│ │ └── main.yml
│ └── mysql_restore
│ ├── defaults
│ │ └── main.yml
│ ├── files
│ ├── handlers
│ │ └── main.yml
│ ├── meta
│ │ └── main.yml
│ ├── README.md
│ ├── tasks
│ │ └── main.yml
│ ├── templates
│ ├── tests
│ │ ├── inventory
│ │ └── test.yml
│ └── vars
│ └── main.yml
└── upgrade.yml