The Jenkins project produces two release lines: Stable (LTS) and regular (Weekly).Depending on your organization's needs, one may be preferred over the other.See the links below for more information and recommendations about the release lines.
Stable (LTS)
Homebrew Installer Jenkins can be installed using the Homebrew package manager. Homebrew formula: jenkins-lts This is a package supported by a third party which may be not as frequently updated as packages supported by the Jenkins project directly. Sample commands: Install the latest LTS version: brew install jenkins-lts Install a specific LTS version: brew install jenkins. Press the download button Now you can see a bunch of OS for which you can download Jenkins. You can either download Jenkins according to the OS or just download the war file which is a generic file and shown in the below steps. This will install the Jenkins through Java but you should have Java installed for this.
Long-Term Support (LTS) release baselines are chosen every 12 weeks from the stream of regular releases.Every 4 weeks we release stable releases which include bug and security fix backports.Learn more…
Changelog|Upgrade Guide|Past Releases
Regular releases (Weekly)
This release line delivers bug fixes and new features rapidly to users and plugin developers who need them.It is generally delivered on a weekly cadence.Learn more…
Changelog|Past Releases
Downloading Jenkins
Jenkins is distributed as WAR files, native packages, installers, and Docker images.Follow these installation steps:
- Before downloading, please take a moment to review theHardware and Software requirementssection of the User Handbook.
- Select one of the packages below and follow the download instructions.
- Once a Jenkins package has been downloaded, proceed to theInstalling Jenkinssection of the User Handbook.
- You may also want to verify the package you downloaded.Learn more about verifying Jenkins downloads.
Download Jenkins2.249.1LTS for:
Download Jenkins2.259for:
NOTE: Packages with thegear icon are maintained by third parties.Such packages may be not as frequently updated as packages supported by the Jenkins project directly.Deploying Jenkins in public cloud
Many public cloud vendors provide their own Jenkins installation guides and packages.The guides provide instructions to deploy, maintain, and upgrade on the specific public cloud.Such guides may be used to quickly deploy Jenkins and, in many cases,to get an instance preconfigured to be used within the public cloud(e.g. bundled plugins, integrations with public cloud services, etc.).
Jenkins quickstarts, tutorials, samples, and resources for Azure
Images forAmazon Web Services,Azure,andGoogle Cloud
Jenkins Os X – 3nd install
this time no jenkins group => using munki
1 Create jenkins Home Dir & log dirs
1.1 Create the jenkins folder + the Home folder
1.2 Apply ownership
1.3 Create log folder
1.4 Apply ownership
1.5 create symlinks for some command line tools (optional)
Home dir symlink creation
Jenkins has its user dir at /Users/Shared/Jenkins. Some command line tools assumes that home dir is at /Users/jenkins. You have to make symlink:
Note: finally Doing so seems to help to get correct paths.
also note I changed jenkins home jenkins.war to reflect actual path. see 5.1! I did both actions together so not sure wich one or if both did the trick.
also note I changed jenkins home jenkins.war to reflect actual path. see 5.1! I did both actions together so not sure wich one or if both did the trick.
Obviously giving the correct path seems logic to me ;)
2 Create jenkins User & Group
- used system Prefs
- Edit user to be in group jenkins
- Edit user to have NFSHomedir in /Volumes/DEPLOY_IMAGES/DEPLOYMENT_STAGE/jenkins
3 jenkins install via brew
Mac Os X Download Dmg
3.1 Important Note ! :
Mac Os Download
Don’t run “manually”
java -jar /usr/local/opt/jenkins/libexec/jenkins.war
as stated by brew after the install.
It has messed things up for me.
I noticed than if I launched it as my current user, it creates a .jenkins folder inside the current user (the one than runs the java jar).
AND it then configure user.home varaible with the user and not jenkins.
AND it then configure user.home varaible with the user and not jenkins.
I would not try either as logged in as jenkins user.
Tried it too, it made the .jenkins folder inside the jenkins home dir.
We don’t want that as we edited plist and .sh scripts with variables.
Tried it too, it made the .jenkins folder inside the jenkins home dir.
We don’t want that as we edited plist and .sh scripts with variables.
Note : I may be wrong as .jenkins seems to be needed anyway. and it’s been recreated in my home dir ?
3.2 Important Note bis :
Concerning the LaunchAgent from brew. Just leave it, and follow on, as other have done work before and we can use that instead as it is more suited.
4 jenkins Setting-Up Defaults
With sudo
Will create the plist preferences file:
/Library/Preferences/org.jenkins-ci
5 jenkins App support script
/Library/Application Support/jenkins/jenkins-runner.sh
5.1 Note :
On Line 15-16 Path /Applications/jenkins/jenkins.war is wrong.
change
to
6 jenkins launchAgent
Copy the file
Apply root ownership and chmod 644
/Library/LaunchAgents/org.jenkins-ci.plist
Finally let’s launch this:
WARNING be sure to be the jenkins user at any time you need to start and stop – no being so made errors on errors after updates or with java launched by me and notjenkins ????
didn’t get why – took me hours to figure out what was braking, notwhat but why. Please note also that I don’t know shit about java at all. Well I know that I worked on the National French Launch of Java back in the days I was working in an agency ;)
didn’t get why – took me hours to figure out what was braking, notwhat but why. Please note also that I don’t know shit about java at all. Well I know that I worked on the National French Launch of Java back in the days I was working in an agency ;)
Go to http://127.0.0.1:8080
Success
launchd is ok
Note : you WANT to make a backup of the full jenkins directory (or not)
https://browngrey.weebly.com/download-boom-online-for-mac.html. I use CarbonCopyCloner: easy GUI, fast cloning.
7 Setup Security once on the homepage
Setting up Security
7.1 step1 Security Realm
Security Realm
Choosed to UNIX user/group db (aka system)
- Delegate to servlet container
- Jenkins’s own user database
- LDAP
- Unix user/group database
change only this then apply and test if you can login !
If ok, then we can go on and change Authorization
If ok, then we can go on and change Authorization
Later on we’ll try to add LDAP support
- Ok Success for me I now have the log in menu.
- logged as jenkins ok
7.1 step2 Authorization
Authorization
Choosed: Logged-in users can do anything
- Anyone can do anything
- Legacy mode
- Logged-in users can do anything
- Matrix-based security
- Project-based Matrix Authorization Strategy
Ok Success for me I now have the log in menu
8 Configure from within the webapp
from
in GLobal Properties
name: OSX_KEYCHAIN_LOCATION
value: /Volumes/DEPLOY_IMAGES/DEPLOYMENT_STAGE/jenkins/Library/Keychains/login.keychain
value: /Volumes/DEPLOY_IMAGES/DEPLOYMENT_STAGE/jenkins/Library/Keychains/login.keychain
Download Mac Os X Iso
name: OSX_KEYCHAIN_PASSWORD
value: jenkins
value: jenkins
Note:
Apple Mac Os X Download
- For now no keychain exists yet.
- We could use the security commandline to create one, I’ll deal later with this in case we (an app) need it.
9 jenkins ssh-keygen
I want jenkins to be able to do commits with git
(not done yet)
(not done yet)
so let’s prepare the work
- Create .ssh dir
- Create the file known_hosts
- Create id_rsa (and then add the public key to your gitlab)
let’s go
check we’re in jenkins home
Note:
I copied my own known_hosts to get things faster.
10 Start and stop jenkins
with launchctl (launchd)
Do it as jenkins user
to stop Replay media catcher download mac.
or you might want to unload
to start again
(if you unloaded)
or start
from web interface:
Success
jenkins is ok
Note : you WANT to make a backup of the full jenkins directory (or not)
I use CarbonCopyCloner: easy GUI, fast cloning.
11 jenkins Updates
*nix/Mac Auto-Upgrade With Container
If you run Jenkins with java -jar jenkins.war, Jenkins will be able to update itself from the Manage Jenkins page. This is the simplest way to do automatic upgrades.
If you run Jenkins with java -jar jenkins.war, Jenkins will be able to update itself from the Manage Jenkins page. This is the simplest way to do automatic upgrades.
Finnaly got it to work with a simple
brew update jenkins
!Quick tip:
Mac Os X Download
- unload jenkins (from jenkins user!)
- brew update
- brew switch
- load jenkins
- go back to webapp, let jenkins works and restart
- you (should be) good to go!
• we need to stop jenkins with launchctl
• do the switch (or install? or upgrade then switch)
• reboot — no need to reboot when properly configured :)
• start jenkins again
12 reimport olders jobs
I screwed my first and second setups, (and finally it was good on my third attempt, see 3.1)
- go back to webapp
- > Manage Jenkins > Reload Configuration from Disk
Tada ! All my jobs are here.
Importing old jobs is successfull.
Now let’s see if they are still working as I did not add environment variables for autopkg (will see if needed in a minute)
Had Failures as I said (permissions pb on autopkg and/or munki repo)
from my experience, Autopkg Cache and recipes must be owned by jenkins. if owned by “me” even with munki group it’s a no go.
from my experience, Autopkg Cache and recipes must be owned by jenkins. if owned by “me” even with munki group it’s a no go.
So I add my user to the munki group. maybe will add some ACLS if needed to get reed of that annoying stuff.
a. /Library/AutoPkgs -> jenkins:munki
Permissions ok (jenkins:munki), so not that.
b. munkirepo -> myaccount:munki
Check the munki repo premissions (I deleted jenkins user lots of time and changed UID sometimes too)
Failure again with jenkins User
c. autopkg from jenkinsuser
Failure from within jenkins user, success from current user (me). Seems to be Autopkg config problems .
Assuming you are in jenkins homedir
move to Autopkg in ~homedir.
OR you could just configure from jenkins user (RTFM)
now run the “jenkins command” manually in the terminal.
No errors, all is fine now.
note the result just indicate ther is no new updates
See this post for autopkg command syntax
http://oemden.com/?p=203
http://oemden.com/?p=203
Next, I’ll have to get git working with gitlab.
Some usefull links
That helped me out in my quest
Product and graphic designer turned to be a Mac SysAdmin.
Posted in Admin, Deploy, Mac Tagged with: 10.7, 10.8, autopkg, deployment, jenkins, Mac Os X, Mac Os X Server, management, munki