This post is just a note of all the procedures required to get Harbormaster and Drydock working for automatic builds.
Setting up Almanac
First add a new Network in Almanac. Then add a Almanac Device choosing the Network you have just added. Specify the address and SSH port of the CI build machine in Device Interface section.
Now go to Almanac Services to add a new service. Add a binding using the name of the device you have just added.
After setting them up, you can go to next section to setup Drydock.
Setting up Drydock
Note in order to do automated builds you must at least have two Drydock Blueprints.
In this step you have to first Create a Credential to access the build machine.
Go to Passphrase Application and choose Create Credential. Choose SSH Key Pair (Generated). Specify the Username to be the one you will use on the build machine. Click Save to have it saved.
Then choose the generated credential and choose Show Public Key.
Copy and paste the Public Key to the
<build_user>/.ssh/authorized_keys file in the build machine. Do not forget to change the file permissions of
authorized_keys to 600 using
chmod 600 authorized_keys or the host may refuse to connect.
/var/drydock directory in the build machine with
<build_user> as the owner.
Create a Blueprint in Drydock with type Almanac Hosts. Specify Almanac Services and Credentials with the one you have just created.
The final Blueprint look like this:
We also have to create a Blueprint with type Working Copy to make Drydock pull the repository off to the building machine. Create a Blueprint with type Working Copy and use the Almanac Service Blueprint above in the Use Blueprints section. Limit is the maximum number of working copies. I usually choose 6 considering to the performance of my build machine.
As the Drydock is now good to go, we will jump to next section configuring Harbormaster.
Setting up Harbormaster
Add a new build plan to Harbormaster is rather fully documented here. Just remember that the Output Artifact's name (
work here, but you can choose whatever you like) should be the same for Input Artifacts to make it able to use the resource! Of course you can have multiple Lease working Copy section and have multiple artifacts with different names :)
Please leave some comments if you have any questions below.