Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • git@github.com:ntnusky/profile.git
    • This puppet module installs and configures all the non-openstack-bits of our infrastructure.
  • git@github.com:ntnusky/ntnuopenstack.git
    • This puppet module installs and configures the openstack-bits of our infrastructure profiles in our installation
  • git@github.com:ntnusky/role.git
    • This puppet module defines which profiles a certain role contains. For instance it defines that our compute nodes needs nova and neutron compute, in addition to some baseconfigIt basicly ties several profiles to a host.
  • git@github.com:ntnusky/r10k.git
    • This repository defines which puppet modules (and versions of these) should be downloaded in which puppet environments.

...

No modifications should be done directly to production (the ntnuit stackit and skyhigh environment). All changes should be done to a testing environment, and when they are tested they might be merged into master. If a suitable testing environment does not exist it can simply be created by creating a new branch in the r10k repository.

...

To deploy the new environment on the puppetmaster puppetmasters you would use r10k:

Code Block
titleDeploy new environment
 root@manager.skylow:~# r10k deploy environment newEnvironment -pv
INFO     -> Deploying environment /etc/puppet/environments/newEnvironment
   ...
INFO     -> Deploying module /etc/puppet/environments/newEnvironment/modules/role
INFO     -> Deploying module /etc/puppet/environments/newEnvironment/modules/profile
   ...
INFO     -> Removing unmanaged path /etc/puppet/environments/production

Have a node follow the new environment (without an ENC):

Which environment a certain host uses in puppet is defined in /etc/puppet/puppet.conf in each host. This file is managed by puppet, so to change the environment you need to update the node-specific hiera file (/etc/puppet/hieradata/nodes/fqdn.yaml) to include the following key:

  • profile::puppet::environment: 'newEnvironment'

After a puppet run the node is configured to follow the new environment, so the next puppet-run at that point will be run using the new environmentshould use shiftleader.

Having a node follow the new environment (with an ENC):

If an ENC is used for puppet (iex. ForemanShiftLeader) the environment is set by the ENC. In this case the value in /etc/puppet/puppet.conf is overridden by the ENC at each puppet run, and the procedure to change environment without an ENC will not work. The value in /etc/puppet/puppet.conf needs to be a valid puppet environment however.

To change the active environment in Foreman Shiftleader you would select the host in the GUI and change it in the drop-down box for "environment".

...

Make changes, deploy to test, and test them

 Make changes in your local repository, commit the changes, perform a git pull, resolve conflicts and perform a git push. When changes are pushed you can run r10k to deploy these changes to your puppet environment. Then test that puppet runs fine, and that your changes are what you expect.

Merge changes into master

...

When you are happy about your changes in your branch, and you would like to merge the changes into the master branch the recommended procedure is:

  1. Create a pullrequest in the github GUI where your changes are described. Add Eigil Obrestad and Lars Erik Pedersen to the list over reviewers.
  2. Wait for the pullrequest to be merged into master, and a tag to be created.
  3. Make the r10k repo start following the new tag instead of the branch in role/profile repos.
  4. Test that the new r10k config works
  5. Merge the stable r10k config to r10k master.

Deploy new release to production

 

 

networking.yaml :

...

Whenever there are an upgrade window in the production environment, the procedure is simple.

  • Merge the master branch of r10k to the production branch
  • Deploy with Shiftleader.
  • Wait for puppet, or run it manually
  • Enjoy your newly updated openstack installation.