ONAP jenkins build server image defintion for Nordix
[infra/tools.git] / infra / jenkins / slave-setup / nordix-onap-jenkins-build-server / README.md
1 ## Description
2 Packer files to create OpenStack base image for ONAP jenkins slave build server.
3 Image is base on Ubuntu 18.04 OS with Java 8, Java 11 and Java 12 installed as ONAP projects has different Java build version requirements.
4
5 ## Steps To Run
6  1. Source OpenStack RC file `source <openstack-rc-file.sh>` that points to **"Default Project 34201"** in Karlskrona region as this is where the build servers for Nordix are located. This will set up environment variables used by packer e.g. OS_USERNAME, OS_PASSWORD and OS_AUTH_URL.
7  2. Run `packer build <packerfile.json>`
8
9
10 This will create the image specified (image_name) onto the OpenStack (identity_endpoint). Modify packer parameters as required and add packages to be installed into the shell script. For more info see [Packer docs](https://www.packer.io/docs/builders/openstack)
11 ## Note
12 ### Image public key handling
13 The public key for jenkins user will be injected by [OpenStack Cloud plugin](https://github.com/jenkinsci/openstack-cloud-plugin) and this key should be configured for the slave in Nordix Jenkins. There is also an option to inject they public key in the image using the file authorized_keys.packer. This file is used for injecting user keys into image during cloud-init phase for ssh access to the slaves for troubleshooting. If you want to have access to the slaves, please add your ssh public key in it.
14 ### Maven configuration handling
15 The mvn configuration file (settings.xml) is not part of the ONAP build server image. The mvn settings.xml will be provided as part of the ONAP java verify jobs: [verify-jobs.sh](https://gerrit.nordix.org/gitweb?p=infra/cicd.git;a=blob;f=jjb/onap/verify-jobs.sh;hb=HEAD). If commitid is not provided for the settings.xml, the latest master version is used as default for backward compatibility for existing ONAP jobs.