...
22. Scroll down to “Global Pipeline Libraries” section and click Add. Provide the values as below
Name | Value |
---|---|
Library Name | deploy-conf |
Default version | Tag name of the jenkins shared library. This should be same version of the release you are going to build and deploy. For example, if you decide to use tags release-1.14.0 as your base, jenkins shared library tag will be release-1.14.0-shared-lib. When you upgrade to tags release-1.15.0, this value should get changed to release-1.15.0-shared-lib |
Retrieval method | Modern SCM |
Source Code Management | Git |
Project Repository | https://github.com/project-sunbird/sunbird-devops.git |
23. Click on Save and go to Manage Jenkins -> Configure global security
24. Choose the “Markup Formatter” as “Safe HTML”
25. Go to Manage Jenkins -> Manager Nodes -> Click master -> Click Configure -> Provide labels as “build-slave”
26. Set the number of executors to a number like 15 if your system configuration is 16 GB RAM and 4 core CPU. Adjust this number accordingly based on your system configuration
27. Restart jenkins by running sudo service jenkins restart
28. Switch back to the terminal session on Jenkins server
...
30. Copy the contents of the key you used to connect to VM into ops_ssh_key file
31. Create a new ssh key on your local machine or any server. We will use this for a user named deployer (or any name you like)
32. ssh-keygen -f deployer_ssh_key (passphrase should be empty)
33. Copy the contents of the deployer_ssh_key into /var/lib/jenkins/secrets/deployer_ssh_key
34. If your github private repo consists of ansible encrypted files, then enter the decryption password in /var/lib/jenkins/secrets/vault-pass. If there are no encrypted files, then enter some random value like 12345 into the vault-pass file. This file cannot be empty.
35. Restart Jenkins server
36. Follow the next set of steps to create inventory, secrets and ansible hosts in the private repo.