The subject of this piece is how to configure jenkins&gitorous
I am using this on a Amazon EC2 with a Bitnami-stack
Either you go for 1 or for 2.
1: You need to set up your free AWS account at Amazon.
http://aws.amazon.com/
http://aws.amazon.com/ec2/
In the Management console: The AWS Management Console
I am running my instance ( Ubuntu + Bitnami ) in Ireland.
[ more to come on this subject ]
So my distribution of choice is Ubuntu ( as a server, as a client ).
But in this example, the server is in focus - no focus on the ubuntu-client.
2: or you don't use Amazon EC2, just install jenkins + gitorous on your Linux-dist of choice ( se 1,2 and 3 in the Prereqs ).
Prereqs :
The 'apps' that I will be dealing with regards to this mission is the following:
We have already set up these projects, not the subject of this piece.
- Jenkins , a CI-server
- With internat git-client, version 1.7.11.3
- Gitorous, A Version Control system
- Installed Maven 3, now - I am just using it as a build-tool
I have to ensure that the following is working:
I am able to check-out ( pull ) my project out on my Ubuntu-client from the CLI, I am able to do so as well from Netbeans 7.3 ( pointing to my private-key in my .ssh-directory).And it is working, I am able to check-out my project!
Problem:
Jenkins should retrieve the source code from my gitorous-project and automatically build it ( well, that is what Jenkins does, doh ) , the hurdle is the ssh 'public key authentication'.
The solution is not in a box, I have to fix some things first.
Jenkins is a software with many plugins:
I will go for the plugin ' publish-over-ssh '
Login to Jenkins:
- Go to 'Manage Jenkins'
- Choose 'Manage Plugin'
- Choose the tab 'Available'
- Check 'Publish Over SSH Plugin' ( ver 1.10 )
- press the button ' ~ without restart'
- See if you got the 'blue ball' and 'Success' label .
- if so -> you are on top of the world
- " Go back to the top page
(you can start using the installed plugins right away) " - Click 'Go back to the top page' ....
- You are at 'Manage Jenkins'
- Choose 'Configure System'
- Top of the page, you can find the 'home directory' ( using bitnami )
- JENKINS_HOME = /opt/bitnami/jenkins/apps/jenkins/jenkins_home
- Follow the Guide -> ' publish-over-ssh ' -> From configure
Go to 'your server' :
- Create a .ssh-directory in JENKINS_HOME if it does not exist
- on my server -> /opt/bitnami/jenkins/apps/jenkins/jenkins_home/.ssh
- SSH key-pair:
- >ssh-keygen -f jenkins_id_rsa -C '-some-mailadress-' -N '' -t rsa -q
or use some filename instead of 'jenkins_id_rsa' .
On my server ( pointing to the private key )
Path to key = /opt/bitnami/jenkins/apps/jenkins/jenkins_home/.ssh/jenkins_id_rsa
Key: paste in the private key ( see Guide above )
Inga kommentarer:
Nya kommentarer är inte tillåtna.