Difference between revisions of "Puppet setup"

From Software Heritage Wiki
Jump to: navigation, search
m (1 revision: import public pages from the intranet wiki)
(Multiple repository setup: link to readme.md)
Line 21: Line 21:
 
All the swh-specific repositories are in ''swh-''-prefixed repositories. The other repositories come from other sources and have an ''upstream'' remote allowing updates (the ''origin'' remote is always on the swh git server).
 
All the swh-specific repositories are in ''swh-''-prefixed repositories. The other repositories come from other sources and have an ''upstream'' remote allowing updates (the ''origin'' remote is always on the swh git server).
  
Our puppet workflow is documented in the README.md file in the puppet-environment repository.
+
Our puppet workflow is documented in [https://forge.softwareheritage.org/diffusion/SENV/browse/master/README.md the README.md file in the puppet-environment repository].
  
 
== Deploy work-flow ==
 
== Deploy work-flow ==

Revision as of 14:16, 3 October 2017

Multiple repository setup

Our puppet environment is split into multiple repos (one repo per module), plus one "root" repository for multi-repository management.

First, clone the base repository, containing the configuration file for myrepos and a README file.

$ git clone ssh://git@forge.softwareheritage.org/diffusion/SENV/puppet-environment.git

Then, use that configuration to clone all the repositories :

$ cd puppet-environment
$ readlink -f .mrconfig >> ~/.mrtrust
$ mr up

(the mr command is in the myrepos Debian package).

All the swh-specific repositories are in swh--prefixed repositories. The other repositories come from other sources and have an upstream remote allowing updates (the origin remote is always on the swh git server).

Our puppet workflow is documented in the README.md file in the puppet-environment repository.

Deploy work-flow

Semi-automated

  1. you@localhost$ # hack on puppet Git repo
  2. you@localhost$ rake validate
  3. you@localhost$ git commit
  4. you@localhost$ git push
  5. you@localhost$ cd puppet-environment
  6. you@localhost$ bin/deploy-on machine1 machine2...

Remember to pass --apt to bin/deploy-on if freshly uploaded Software Heritage packages are to be deployed. Also, bin/deploy-on --help is your friend.

Manual

  1. you@localhost$ # hack on puppet Git repo
  2. you@localhost$ rake validate
  3. you@localhost$ git commit
  4. you@localhost$ git push
  5. you@pergamon$ sudo swh-puppet-master-deploy
  6. you@machine$ sudo apt-get update # if a new or updated version of a Debian package needs deploying
  7. you@machine$ sudo swh-puppet-test # to test/review changes
  8. you@machine$ sudo swh-puppet-apply # to apply