Puppet_Editing - ACCESS-NRI/accessdev-Trac-archive GitHub Wiki
Editing Puppet
Everything we do to configure Accessdev is version-controlled using Git. There is a central puppet repository at NCI that is used to configure the system, as well as people's individual repositories that are used for testing.
You can create your own copy of the repository by running
$ git clone [email protected]:/p/access.dev/puppet
(replace abc123
with your NCI username)
Plenty of Git tutorials exist for how to edit repositories, the basics are
- Add a new file to the repo with
git add FILE
- Commit any changes with
git commit -a
- Revert any uncommitted changes with
git checkout -- .
Testing
You can check the syntax of a Puppet module by running puppet-lint
on your files. The Puppet Blog has some information on how to set this up.
To boot an instance you will need to be a member of the 'access.dev' group at NCI. Make sure your local machine has a SSH agent with a config that looks like:
# ~/.ssh/config
# ...
Host cloudlogin
HostName cloudlogin.nci.org.au
UserName <<NCI username>>
ForwardAgent Yes
ForwardX11Trusted true
Once this is done run:
ssh cloudlogin
# Setup your agent's SSH key on the cloud (only need to do this once)
nova keypair-add --pub-key $(ssh-add -L) agent-key
git clone repos.nci.org.au:/p/access.dev/puppet accessdev-puppet
cd accessdev-puppet
./boot.sh --key 'agent-key'
This creates a virtual machine named like "$USER-accessdev-test" & runs puppet on it. Check on the machine's status by running
nova console-log $USER-accessdev-test
when it's ready there will be a login message.