Update Override Variables
Where to find these?
These variables are located in different files in the provisioners/ansible/extra_vars folder. The file to change will depend on the environment you are provisioning.
Check/Update Waiting time for jenkins restarts
To override the time it waits (in seconds) for Jenkins to start please edit the respective file in the provisioners/ansible/extra_vars folder
startup_delay_s: 50
Set Git Credentials
Update the git name and email to the credentials specific to your Jenkins setup
Settings:
- enable_configure: This enables the configuration of this plugin. When
false
will skip the configuration - email: This is the email of the Jenkins git user, will be used when the ci makes commits to git repositories
- name: This is the full name of the Jenkins git user, will be used when the ci makes commits to git repositories
eg.
git:
enable_configure: true
email: 'noreply@gmail.com'
name: 'Jenkins CI'
Set Rally Variables to Preconfigure Plugin
Settings:
- enable_configure: This enables the configuration of this plugin. When
false
will skip the configuration - server: This is rally's website address
- email: Email (username) registered with rally
- jenkins_machine: This is the domain name and port of the Jenkins server
eg.
rally:
enable_configure: true
server: "rally1.rallydev.com"
email: ""
jenkins_machine: "localhost:8080"
Please note that this step does not fully configure the rally plugin. You will have to navigate to configure system when Jenkins goes live and enter the password for the rally user/email
Edit GitHub Security Settings
To setup Jenkins security please edit the respective file in the provisioners/ansible/extra_vars folder with the necessary variables
Settings:
- enable_security: This flag tells the playbook to enable security for the Jenkins instance. If false, the playbook will skip enabling security.
- jenkins_admins: This is a list of github usernames that will have admin rights in the Jenkins instance
- github_orgNames: This is a list of organisations that will have access to the Jenkins instance, including non-admin users. If omitted then only admins will have access.
- github_clientId: This is a github application Client ID
- github_clientSecret: This is a github application Client Secret
To get the information from github:
- Create a GitHub Application that will provide the clientid and clientsecret.
- Set Authorization Callback URL: http://{jenkins-server}:{port}/securityRealm/finishLogin
eg.
security:
enable_security: true,
jenkins_admins: "admin1,admin2", #comma delimited list eg. "admin1,admin2"
github_orgNames: "medullan", #comma delimited list eg. "medullan,google"
github_clientId: "532534253fw3245",
github_clientSecret: "32refwdfs324rewf343q4rwqr32qr"
Things to Note:
If there are raw xml config files that you want to be copied to Jenkins. Then simply adding them to the provisioners/ansible/files/jenkins/config directory will get them to Jenkins for pre-configuration.
Configure Jenkins Memory
Configure the heap size Jenkins will be assigned on startup.
- enable_configure: This flag tells the playbook to enable security for the Jenkins instance. If false, the playbook will skip enabling security.
- maxPermSize: Assign the MaxPermSize that jenkins will be assigned ("-XX:MaxPermSize=512m")
- memory: sets the heap size assigned to jenkins ('-Xmx1024m')
eg.
jenkins_opts:
enable_configure: true,
maxPermSize: 512, # cannot be less than 512
memory: 1024 # cannot be less than 256
Install global npm packages
- global_packages: This is a space delimited list of npm packges eg. 'bower grunt-cli'
eg.
npm: # bower, grunt-cli and istanbul are installed by default
global_packages: "doxx npm-check-updates" # global_packages is a space delimited list eg. 'bower grunt-cli'