Update README file with detail packer instructions
[infra/tools.git] / infra / jenkins / slave-setup / cloud-infra / README.md
1 ## Description
2 The packer file and corresponding script in this folder are used
3 for building OpenStack images to be used for Cloud Infra jobs on
4 Nordix Jenkins.
5
6 The packer file is specific to City Cloud Frankfurt region since
7 it contains the Frankfurt region endpoint and UUID of the network
8 created there. For other regions or clouds, a similar file needs
9 to be created. The actual script that is executed by packer on
10 provisioned temporary instances should work on any Ubuntu1804
11 regardless of cloud and region.
12
13 ## Steps To Run
14  1. Source OpenStack RC file `source <openstack-rc-file.sh>` that points to **"cicd"** project in Frankfurt region. This will set up environment variables used by packer e.g. OS_USERNAME, OS_PASSWORD and OS_AUTH_URL.
15  2. Run `packer build <packerfile.json>`
16
17 This will build `cloud-infra-base-ubuntu1804` private image on the **"cicd"** project in Frankfurt region.
18 ## Note
19 ### Image public key handling
20 A final note is that the file authorized_keys.packer is used for
21 injecting user keys into image during cloud-init phase for ssh
22 access to the slaves for troubleshooting. If you want to have
23 access to the slaves, please add your ssh public key in it.