Skip to content

Instantly share code, notes, and snippets.

@odyssey4me
Last active November 7, 2016 14:59
Show Gist options
  • Save odyssey4me/860e05e985e1cedeb6adccb209c6b055 to your computer and use it in GitHub Desktop.
Save odyssey4me/860e05e985e1cedeb6adccb209c6b055 to your computer and use it in GitHub Desktop.
OpenStack-Ansible Release Procedure (Nov 4 2016)
### Note that you can't copy-paste this whole thing.
### Each line break is a plce where manual input is required, or
### bash will not retain anything else copied and execute it.
#
###master sha update
#
cd ~/code/openstack-ansible
git checkout master
git reset --hard origin/master
git pull
git branch -D sha-update
git checkout -b sha-update
for repo_file in $(ls -1 playbooks/defaults/repo_packages/*.yml | grep -v calico); do
./scripts/sources-branch-updater.sh -s ${repo_file} -b master
done
git add --all
git commit -a -m "Update all SHAs for Ocata $(date +%Y-%m-%d)" \
-m "This patch updates all the roles to the latest available SHA's,
updates all the OpenStack Service SHA's and also updates the
appropriate python requirements pins."
git review
#
###newton release & sha update
#
cd ~/code/openstack-ansible
git checkout master
git reset --hard origin/master
git pull
git checkout origin/stable/newton
current_hash=$(git rev-parse HEAD)
current_version=$(awk '/openstack_release:/ {print $2}' playbooks/inventory/group_vars/all.yml)
../release-yaml-file-prep.py -f ansible-role-requirements.yml -v "${current_version}" | awk "/projects:/{print; print \" - repo: openstack/openstack-ansible\n hash: ${current_hash}\"; next}1" | sed '/^releases:/d' | sed '/^\s*$/d' >> ~/code/releases/deliverables/newton/openstack-ansible.yaml
cd ~/code/releases
git checkout master
git reset --hard origin/master
git pull
git branch -D openstack-ansible
git checkout -b openstack-ansible
git commit -a -m "Release OpenStack-Ansible Newton/${current_version}"
git review
release_changeid=$(git log HEAD^..HEAD | awk '/Change-Id/ {print $2}')
cd ~/code/openstack-ansible
git branch -D sha-update
git checkout -b sha-update
./scripts/sources-branch-updater.sh -b stable/newton -o stable/newton
./scripts/sources-branch-updater.sh -s playbooks/defaults/repo_packages/gnocchi.yml -b stable/3.0 -o stable/newton
new_version=$(awk '/openstack_release/ {print $2}' playbooks/inventory/group_vars/all.yml | head -n 1)
git add --all
git commit -a -m "Update all SHAs for ${new_version}" \
-m "This patch updates all the roles to the latest available stable
SHA's, copies the release notes from the updated roles into the
integrated repo, updates all the OpenStack Service SHA's, and
updates the appropriate python requirements pins.
Depends-On: ${release_changeid}"
git review
#
###mitaka release & sha update
#
git-repo-update
cd ~/code/openstack-ansible
git checkout master
git reset --hard origin/master
git pull
git checkout origin/stable/mitaka
current_hash=$(git rev-parse HEAD)
current_version=$(awk '/openstack_release/ {print $2}' playbooks/inventory/group_vars/all.yml)
../release-yaml-file-prep.py -f ansible-role-requirements.yml -v "${current_version}" | awk "/projects:/{print; print \" - repo: openstack/openstack-ansible\n hash: ${current_hash}\"; next}1" | sed '/^releases:/d' | sed '/^\s*$/d' >> ~/code/releases/deliverables/_independent/openstack-ansible.yaml
cd ~/code/releases
git checkout master
git reset --hard origin/master
git pull
git branch -D openstack-ansible
git checkout -b openstack-ansible
git commit -a -m "Release OpenStack-Ansible Mitaka/${current_version}"
git review
release_changeid=$(git log HEAD^..HEAD | awk '/Change-Id/ {print $2}')
cd ~/code/openstack-ansible
git branch -D sha-update
git checkout -b sha-update
./scripts/sources-branch-updater.sh -b stable/mitaka -o stable/mitaka
new_version=$(awk '/openstack_release/ {print $2}' playbooks/inventory/group_vars/all.yml)
git add --all
git commit -a -m "Update all SHAs for ${new_version}" \
-m "This patch updates all the roles to the latest available stable
SHA's, copies the release notes from the updated roles into the
integrated repo, updates all the OpenStack Service SHA's, and
updates the appropriate python requirements pins.
Depends-On: ${release_changeid}"
git review
#
###liberty release & sha update
#
cd ~/code/openstack-ansible
git checkout master
git reset --hard origin/master
git pull
git checkout origin/liberty
current_hash=$(git rev-parse HEAD)
current_version=$(awk '/openstack_release/ {print $2}' playbooks/inventory/group_vars/all.yml)
../release-yaml-file-prep.py -f ansible-role-requirements.yml -v "${current_version}" | awk "/projects:/{print; print \" - repo: openstack/openstack-ansible\n hash: ${current_hash}\"; next}1" | sed '/^releases:/d' | sed '/^\s*$/d' >> ~/code/releases/deliverables/_independent/openstack-ansible.yaml
cd ~/code/releases
git commit -a -m "Release OpenStack-Ansible Liberty/${current_version}" -m "To remind reviewers, The Liberty and Mitaka releases
for OpenStack-Ansible are both tagged 'independent'
and not cycle releases. The same file must therefore
be changed to facilitate the release.
This patch is on top of the Mitaka release patch and
will therefore fail the CI verification of tags until
the Mitaka release patch has merged."
git review
release_changeid=$(git log HEAD^..HEAD | awk '/Change-Id/ {print $2}')
cd ~/code/openstack-ansible
git branch -D sha-update
git checkout -b sha-update
./scripts/sources-branch-updater.sh -b stable/liberty
# remove any changes to keepalived/sshd versions
# due to bugs in the requirements repo, remove the requirements SHA modification
new_version=$(awk '/openstack_release/ {print $2}' playbooks/inventory/group_vars/all.yml)
git add --all
git commit -a -m "Update all SHAs for ${new_version}" \
-m "This patch includes updates of any changed paste, policy and rootwrap
configurations. It also includes updates to the pip, wheel and
setuptools pins. Finally, it also updates the required roles and
copies any release notes from those roles.
Depends-On: ${release_changeid}"
git review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment