Changes between Version 4 and Version 5 of how-to/puppet


Ignore:
Timestamp:
Mar 8, 2011, 11:08:07 AM (11 years ago)
Author:
Jamie McClelland
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • how-to/puppet

    v4 v5  
     1[[PageOutline]]
    12= Puppet =
    23
     
    56== administering puppet ==
    67
    7 puppet can be intimidating.  If you want to help with the administration, here's instructions to get started:
     8puppet can be intimidating.  If you want to help with the administration, here's instructions to get started.
    89
    9 === setting up a development environment ===
     10=== checking out the code ===
    1011
    11 Get the configuration:
     12For read-only access (available to the public):
    1213
    1314{{{
    1415git clone git://git.mayfirst.org/mfpl/puppet
     16}}}
     17
     18For write access (MFPL admins only):
     19
     20{{{
     21git clone gitosis@git.mayfirst.org:mfpl/puppet
     22}}}
     23
     24Then...
     25
     26{{{
    1527cd puppet
    1628git submodule init
    1729git submodule update
    1830}}}
     31
     32To get the most recent code after you've already checked out the repository:
     33
     34{{{
     35git remote update
     36# to review changes:
     37git diff origin/master
     38git merge origin/master
     39# to pull in any updates to the submodules
     40git submodule update
     41}}}
     42
     43=== setting up a development environment ===
    1944
    2045And as the superuser, install the tools:
     
    107132}}}
    108133
     134If you want, you can edit the .git/config file in each submodule, adding the following line under your mfpl-write stanza:
     135
     136{{{
     137push = +HEAD:master
     138}}}
     139
     140Then, you only need to type:
     141
     142{{{{
     143git push mfpl-write
     144}}}
     145
     146After you have made changes to a module (for example the mayfirst module), you need to add it with:
     147
     148{{{
     149git add modules/mayfirst
     150}}}
     151
     152Be sure ''not'' to include the trailing slash (thanks [https://we.riseup.net/riseup+tech/puppet-git-submodules Riseup for that and other tips on git submodules]).
     153
     154=== Pulling in changes to the master repo ===
     155
     156May First/People Link's Puppet Master server is on `rustin.mayfirst.org` which is aliased to puppetmaster.mayfirst.org.
     157
     158As root on rustin:
     159
     160{{{
     161cd /etc/puppet
     162git remote update
     163}}}
     164
     165Next, check the last commit to make sure it matches the last commit you made (and want live):
     166
     167On your local machine:
     168
     169{{{
     170git log -n1
     171}}}
     172
     173Compared with, on rustin:
     174
     175{{{
     176git log -n1 mfpl/master
     177}}}
     178
     179If they match, then rebase (we rebase to ensure that our local changes to files on rustin are not merged):
     180
     181{{{
     182git rebase mfpl/master
     183}}}
     184
     185And lastly, restart puppetmaster:
     186
     187{{{
     188/etc/init.d/puppetmaster restart
     189}}}
     190
     191Now, if puppet is running as a daemon on the nodes, the changes will eventually propagate. If you are running puppet manually on a node, you can test manually with:
     192
     193{{{
     194puppet agent --verbose --no-daemonize --onetime
     195}}}