Introduction¶
Following this guide step by step you will be able to make a valuable contribution to the infrastructure within a few hours.
Contact the team¶
- irc.freenode.net#april-admin
- dachary vincentxavier theocrite aeris : I want to help :-)
If you prefer mail you can also:
- mail admins@april.org
- Subject: I want to help :-)
- I am a skilled <OpenStack, sympa, drupal, libvirt ...> system administrator.
Credentials¶
To be able to upload your contribution, you need to upload your ssh public key by creating a ticket
copy the URL of the ticket
and ping dachary vincentxavier theocrite aeris on irc.freenode.net#april-admin to activate it. They should run something like this on the redmine virtual machine:
user=johndoe name='John Doe' ssh_key='AAAAB3NzaC1yc2EAAA...' adduser --shell /usr/lib/git-core/git-shell --disabled-password --gecos "$name" --gid 1000 $user mkdir /home/$user/.ssh echo $ssh_key > /home/$user/.ssh/authorized_keys chown -R $user /home/$user
Pick something to work on¶
Browse the low hanging fruits and pick one that matches your skills. Optionally ask for confirmation that it only takes a few hours to fix on irc.freenode.net#april-admin.
Get the code¶
The infrastructure is deployed by a puppet master that can be checked out with
git clone ssh://*johndoe*@pavot.april.org:2232/srv/git/admins.git
assuming johndoe is the user name associated with the ssh public key you provided. The layout of the puppet master files is explained to help beginners figure it out
Commit and run integration tests¶
Make sure that each commit contains a reference to the ticket you are working on so that they show. For instance:
git commit -a -m 'Fix something refs #1405'
( the relevant part is refs #1405 and not just #1405 : the refs is mandatory) will display the change within the ticket as follows:
Once you've completed your work and implemented unit tests, commit and push with
git push
You can browse your change from the web using the redmine web interface to git
To run the integration tests go to irc.freenode.net#april-admin and trigger the build using the jenkins bot
!jenkins build puppetmaster
and watch it run on the jenkins web interface
Troubleshooting¶
When the test is stuck or fails, the virtual machines used to run it are available for debugging.
$ ssh -A *johndoe*@ci.april.org *johndoe*@april-ci:~$ source /etc/jenkins/openrc.sh *johndoe*@april-ci:~$ nova list +--------------------------------------+------------+-----------+---------------------------------------+ | ID | Name | Status | Networks | +--------------------------------------+------------+-----------+---------------------------------------+ | 2ffc1013-74d7-49a2-8b1b-70d2b476e296 | pavot | ACTIVE | novanetwork=10.145.9.9 | | b568b586-ad1a-4e62-9ae5-00c8f2cbb9bc | puppet | ACTIVE | novanetwork=10.145.9.7 | | be60aeb3-8d94-47df-9339-f5c0629c09b3 | nagios | ACTIVE | novanetwork=10.145.9.8 | +--------------------------------------+------------+-----------+---------------------------------------+ *johndoe*@april-ci:~$ ssh root@nagios *johndoe*@nagios:~# ( echo 'GET services' ; echo 'Filter: host_name = pavot.novalocal' ; echo 'Filter: check_command = check_ssh_port' ) | unixcat /var/lib/nagios3/rw/live
The puppet master is deployed in the puppet instance and can be modified in place for testing purposes. Note however that the repository and the virtual machines ( nagios, pavot etc. ) will be re-initialized and their content lost when the next integration test is launched.
Note that the -A in ssh -A johndoe@ci.april.org relates to ssh agent forwarding which is necessary for ssh root@nagios to work.
Abort the test¶
When the test is stuck, it can be aborted with:
!jenkins abort puppetmaster
Because of a bug in the reporting, the jenkins bot will claim the abort failed.
(03:13:52 PM) jenkins-april: couldn't abort puppetmaster. I don't know why this happened.
However the abort was successfull.
Closing the ticket¶
When the test is a success, report to irc.freenode.net#april-admin and ask dachary vincentxavier theocrite aeris to review, close and deploy the change.
FAQ¶
I forgot to include 'refs #1024' in the commit message or I referenced the wrong bug¶
This cannot be changed after you have pushed but a link to the commit (for instance 3660929f0a1fa441712c5825b712f8112f68da67 ) can be added to the ticket comments for future reference. It is not as pretty but it contains the relevant information.