Jump to: navigation, search

Difference between revisions of "OpenstackChefStablebranchCreateNotes"

m (Steps to create stable/ branch)
(Update instructions for stable branch)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
 
Awesome! We've decided as a group to create the next stable branch. Here are some steps to remind you on how to do it.
 
Awesome! We've decided as a group to create the next stable branch. Here are some steps to remind you on how to do it.
  
# Go to [https://review.openstack.org/#/admin/projects/openstack/cookbook-openstack-compute,branches each repo] as a core member and create the branch with the SHA you want.
+
# Go to [https://review.openstack.org/#/admin/projects/openstack/cookbook-openstack-compute,branches each repo] as a core member and create the branch with the SHA you want, usually you will just branch from master.
# To get Gerrit to report to the #openstack-chef channel create the "stable/<release>" via [https://github.com/openstack-infra/project-config openstack-infra/project-config] project under: gerritbot/channels.yaml. Something [https://review.openstack.org/#/c/156262/ like this] is an example. You may be required to remove an old branch too, keep this in mind.
 
# Wait for the Patch to be merged by Infra
 
 
# Changes for each cookbook and repo, create a bug to tie all the following branch work together
 
# Changes for each cookbook and repo, create a bug to tie all the following branch work together
 
## update.gitreview to ref defaultbranch=stable/<release>
 
## update.gitreview to ref defaultbranch=stable/<release>
 
## update Berksfile to ref branch: 'stable/<release>'
 
## update Berksfile to ref branch: 'stable/<release>'
## update bootstrap.sh to replace master with branch name (master ->  stable/kilo)
 
 
## see https://github.com/openstack/cookbook-openstack-identity/commit/3a99613b89fb28d21def8cbeaa63e40da32768f5 for example
 
## see https://github.com/openstack/cookbook-openstack-identity/commit/3a99613b89fb28d21def8cbeaa63e40da32768f5 for example
 
# Create a review with the above and put it up against the stable/<release> branch.
 
# Create a review with the above and put it up against the stable/<release> branch.
Line 18: Line 15:
 
# first pull all the cookbooks into one folder and then try to run these commands one by one from the root folder (they are intentionally separated, since they will create some changes that you do not want to push)
 
# first pull all the cookbooks into one folder and then try to run these commands one by one from the root folder (they are intentionally separated, since they will create some changes that you do not want to push)
 
# check your sed version and make sure you have at least v 4.2.1 (if you are on OS X you have to install gnu-sed via Homebrew since the one installed does work in mysterious ways)  
 
# check your sed version and make sure you have at least v 4.2.1 (if you are on OS X you have to install gnu-sed via Homebrew since the one installed does work in mysterious ways)  
  #!/bin/bash
+
   
 
  for i in $(ls | grep cookbook); do
 
  for i in $(ls | grep cookbook); do
 
   cd $i
 
   cd $i
 
   git checkout stable/<release>
 
   git checkout stable/<release>
   sed -i '/github/a\ \ branch: stable\/<release>' Berksfile
+
   sed -i '/opendev/a\ \ branch: stable\/<release>' Berksfile
   sed -i 's/github.*$/&,/' Berksfile
+
   sed -i 's/opendev.*$/&,/' Berksfile
   sed -i 's/master/stable\/<release>/' bootstrap.sh
+
   echo 'defaultbranch=stable/rocky' >> .gitreview
 
   berks install
 
   berks install
 
   sed -i '/Berksfile\.lock/d' .gitignore
 
   sed -i '/Berksfile\.lock/d' .gitignore
Line 30: Line 27:
 
   cd ..
 
   cd ..
 
  done
 
  done
 +
 
  # the next one is important, since there are changes that are wrong and should
 
  # the next one is important, since there are changes that are wrong and should
 
  # be corrected manually (like adding the branch: stable/liberty for a non
 
  # be corrected manually (like adding the branch: stable/liberty for a non
 
  # openstack cookbook)
 
  # openstack cookbook)
 
  for i in $(ls | grep cookbook); do cd $i; git diff; cd .. ; done
 
  for i in $(ls | grep cookbook); do cd $i; git diff; cd .. ; done
 +
 
  # after you checked all your changes, you can go ahead, commit it and push it
 
  # after you checked all your changes, you can go ahead, commit it and push it
 
  # up for review
 
  # up for review
Line 53: Line 52:
 
## update common bootstrap with newer level of ChefDK
 
## update common bootstrap with newer level of ChefDK
 
## create rubocop TODO file to outline that work to be done (rubocop --auto-gen-config and add "inherit_from: .rubocop_todo.yml" in your .rubocop.yml)
 
## create rubocop TODO file to outline that work to be done (rubocop --auto-gen-config and add "inherit_from: .rubocop_todo.yml" in your .rubocop.yml)
## update code with refs to old openstack release  (i.e. "juno" -> "kilo"  (Common release and yum attributes, ...)
+
## update code with refs to old openstack release  (i.e. "ocata" -> "pike"  (Common release and yum attributes, ...)
 
## update all code looking for deprecation's that can now be removed
 
## update all code looking for deprecation's that can now be removed
 
## update any package dependencies that have changed for each component
 
## update any package dependencies that have changed for each component
Line 61: Line 60:
 
In order to pass gates, these need to be done in the following order:
 
In order to pass gates, these need to be done in the following order:
 
# Common, Identity, Ops-Database and Ops-Messaging  
 
# Common, Identity, Ops-Database and Ops-Messaging  
# BareMetal, Image, BlockStorage, Image, Network, Database, Data-Processing, Dashboard, Object-Storage  
+
# Image, BlockStorage, Network, Dashboard, Object-Storage  
# Compute, Orchestration, Telemetry, Integration-Test, Client
+
# Compute, Orchestration, Telemetry, Integration-Test
 
# Repo  
 
# Repo  
  
  
 
back to main page: https://wiki.openstack.org/wiki/Chef/GettingStarted
 
back to main page: https://wiki.openstack.org/wiki/Chef/GettingStarted

Latest revision as of 12:48, 10 December 2019

Steps to create stable/<release> branch

Awesome! We've decided as a group to create the next stable branch. Here are some steps to remind you on how to do it.

  1. Go to each repo as a core member and create the branch with the SHA you want, usually you will just branch from master.
  2. Changes for each cookbook and repo, create a bug to tie all the following branch work together
    1. update.gitreview to ref defaultbranch=stable/<release>
    2. update Berksfile to ref branch: 'stable/<release>'
    3. see https://github.com/openstack/cookbook-openstack-identity/commit/3a99613b89fb28d21def8cbeaa63e40da32768f5 for example
  3. Create a review with the above and put it up against the stable/<release> branch.
  4. Get it merged in and you should be good


If you think doing this manually for all the cookbooks sucks, these commands might help you automating it (please CHECK the git diff before you actually push something)

  1. first pull all the cookbooks into one folder and then try to run these commands one by one from the root folder (they are intentionally separated, since they will create some changes that you do not want to push)
  2. check your sed version and make sure you have at least v 4.2.1 (if you are on OS X you have to install gnu-sed via Homebrew since the one installed does work in mysterious ways)
for i in $(ls | grep cookbook); do
  cd $i
  git checkout stable/<release>
  sed -i '/opendev/a\ \ branch: stable\/<release>' Berksfile
  sed -i 's/opendev.*$/&,/' Berksfile
  echo 'defaultbranch=stable/rocky' >> .gitreview
  berks install
  sed -i '/Berksfile\.lock/d' .gitignore
  git add Berksfile.lock
  cd ..
done

# the next one is important, since there are changes that are wrong and should
# be corrected manually (like adding the branch: stable/liberty for a non
# openstack cookbook)
for i in $(ls | grep cookbook); do cd $i; git diff; cd .. ; done

# after you checked all your changes, you can go ahead, commit it and push it
# up for review
for i in $(ls | grep cookbook); do
  cd $i
  git commit -am 'stable/<release> release patch'
  git review
  cd ..
done

Steps for new master branch

Now we have a new master, need to get it in sync with matching base openstack release.

  1. Possible infra changes for changes to the gates we want for this release
  2. Decide on new levels of tools (ChefDK, rubocop, foodcritic), we have always be trying to move forward with these
  3. Changes for each cookbook and repo.
    1. update metadata with new version level
    2. update common bootstrap with newer level of ChefDK
    3. create rubocop TODO file to outline that work to be done (rubocop --auto-gen-config and add "inherit_from: .rubocop_todo.yml" in your .rubocop.yml)
    4. update code with refs to old openstack release (i.e. "ocata" -> "pike" (Common release and yum attributes, ...)
    5. update all code looking for deprecation's that can now be removed
    6. update any package dependencies that have changed for each component
    7. update all spec test platforms to targeted levels we want for this release


In order to pass gates, these need to be done in the following order:

  1. Common, Identity, Ops-Database and Ops-Messaging
  2. Image, BlockStorage, Network, Dashboard, Object-Storage
  3. Compute, Orchestration, Telemetry, Integration-Test
  4. Repo


back to main page: https://wiki.openstack.org/wiki/Chef/GettingStarted