Difference between revisions of "Puppet setup"

From Software Heritage Wiki
Jump to: navigation, search
(Multiple repository setup: link to readme.md)
(Install redirection to the puppet page in main docs site)
(Tag: New redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
== Multiple repository setup ==
+
#REDIRECT [[swhdocs:sysadm/puppet/reference-setup.html]]
 
 
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.
 
 
 
<pre>
 
$ git clone ssh://git@forge.softwareheritage.org/diffusion/SENV/puppet-environment.git
 
</pre>
 
 
 
Then, use that configuration to clone all the repositories :
 
 
 
<pre>
 
$ cd puppet-environment
 
$ readlink -f .mrconfig >> ~/.mrtrust
 
$ mr up
 
</pre>
 
 
 
(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 [https://forge.softwareheritage.org/diffusion/SENV/browse/master/README.md the README.md file in the puppet-environment repository].
 
 
 
== Deploy work-flow ==
 
 
 
=== Semi-automated ===
 
 
 
# you@localhost$ # ''hack on puppet Git repo''
 
# you@localhost$ <tt>rake validate</tt>
 
# you@localhost$ <tt>git commit</tt>
 
# you@localhost$ <tt>git push</tt>
 
# you@localhost$ <tt>cd [https://forge.softwareheritage.org/diffusion/SENV/ puppet-environment]</tt>
 
# you@localhost$ <tt>bin/deploy-on machine1 machine2...</tt>
 
 
 
Remember to pass <tt>--apt</tt> to <tt>bin/deploy-on</tt> if freshly uploaded Software Heritage packages are to be deployed.
 
Also, <tt>bin/deploy-on --help</tt> is your friend.
 
 
 
=== Manual ===
 
 
 
# you@localhost$ # ''hack on puppet Git repo''
 
# you@localhost$ <tt>rake validate</tt>
 
# you@localhost$ <tt>git commit</tt>
 
# you@localhost$ <tt>git push</tt>
 
# you@pergamon$ <tt>sudo swh-puppet-master-deploy</tt>
 
# you@machine$ <tt>sudo apt-get update</tt>  # ''if a new or updated version of a [[Debian packaging|Debian package]] needs deploying''
 
# you@machine$ <tt>sudo swh-puppet-test</tt>  # ''to test/review changes''
 
# you@machine$ <tt>sudo swh-puppet-apply</tt>  # ''to apply
 
 
 
 
 
[[Category:System administration]]
 

Latest revision as of 10:41, 27 October 2021