Ansible Roles for installing AeroGear Digger
|License:||Apache License, Version 2.0|
|Mailing lists:||aerogear-users (subscribe)|
|IRC:||#aerogear channel in the freenode network.|
Ansible 2.2.0 or higher.
Running Digger on existing OpenShift instance
Stand up an OpenShift cluster from origin master, installing the standard image streams to the OpenShift namespace:
oc cluster up
Notes on log-in setup for the playbook
If you are running the playbook locally (i.e. using ansible_connection=local) but pointing at a remote master node then login_url must be set when running the playbook.
If you are running the playbook remotely (i.e. while in an ssh session) then login_url does not need to be set as the default address for oc login is https://localhost:8443.
Using insecure connections
If you wish to use an insecure connection you can pass the skip_tls environment variable which will bypass the certificate check when logging in to openshift.
To pass it with the ansible-playbook, it should look like:
Using self signed certs
In the case of oc cluster up self signed certs are used. Pass the following variable when running the playbook (or set it in your inventory file) in this case.
Overriding public and private keys for Jenkins
If you want to override the public and private keys used for Jenkins cli calls, pass the following variables (defaults to ~/.ssh/id_rsa.pub & ~/.ssh/id_rsa).
'-e jenkins_public_key_path' '-e jenkins_private_key_path'
Adding ssh public key to Jenkins configuration automatically
If you want ansible playbook to deal with adding ssh public key to Jenkins configuration page for you, you can enable it by specifying following environment variable
If you're using Jenkins with OAuth, you must specify OAuth token:
otherwise the password from Jenkins DeploymentConfig will be used
SSH Public Keys in user's configuration page, so it is advised to use this option only if there is no public key already set.
Following configuration details are also replaced by the default values:
"Full Name": "Jenkins Admin",
Execute the playbook:
Example command line to execute aerogear digger ansible install
ansible-playbook -i <your-inventories-file> sample-build-playbook.yml
The playbook executes the following steps for you:
- Creates a Project in OpenShift
- Checks that java is installed
- Installs Jenkins
- Configures Jenkins
- Installs AndroidSDK to a PV
- Configures an OSX node (optional)
- Installs Nagios and triggers checks
- Prints out urls and credentials.
Running Digger on OpenShift dedicated
- Persistent volumes x 3 - Default sizes 40Gib, 10Gib, 1GiB
- OpenShift command line client installed locally
- Java installed locally
- An existing SSH Key Pair locally. Public key will need to be uploaded to the Jenkins server
- SSH access to a macOS server outside the OpenShift cluster if required
- Set all host groups variables except for
A subset of the roles in this repository should be run using the
deploy tag in
Execute the following:
ansible-playbook -i <your-inventories-file> sample-build-playbook.yml --tags=deploy,provision-osx
If you do not have an external macOS node setup, run the following:
ansible-playbook -i <your-inventories-file> sample-build-playbook.yml --tags=deploy