Jenkins Mac Os X Download

Jul 07, 2015. Jenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software. Jenkins download and deployment 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.

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.

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

3.1 Important Note ! :

Don’t run “manually”

java -jar /usr/local/opt/jenkins/libexec/jenkins.war

as stated by brew after the install.

Jenkins

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.

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.

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 ;)

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)

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

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

go there

in GLobal Properties

name: OSX_KEYCHAIN_LOCATION
value: /Volumes/DEPLOY_IMAGES/DEPLOYMENT_STAGE/jenkins/Library/Keychains/login.keychain

name: OSX_KEYCHAIN_PASSWORD
value: jenkins

Note:
  • 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)

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

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.

Finnaly got it to work with a simple brew update jenkins !

Quick tip:

  • 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.

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

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
  • Status:Open(View Workflow)
  • Resolution: Unresolved
  • Labels:
  • Environment:

When having a custom tool defined to download and install
http://nodejs.org/dist/v0.10.22/node-v0.10.22-darwin-x64.tar.gz
, it somehow fails to untar that correctly, not placing all the files in the correct subfolder, thus fails node to run correctly.

When replacing the download job with a shell-part that does this manually, it works just fine.

This might be a problem with the jvm/libraries outside custom tools on OS X, but i didn't manage to figure out where or what it calls, so i decided to report it here for reference.

is blocking

JENKINS-31215cmake installation on osx: missing files & strange layout

  • Open
Hide
Oleg Nenashev added a comment - - edited

Hello,

'Extract tar.gz' Installer is not a part of custom-tools plugin. It is located in Jenkins core and stored as an extension. Please specify versions of JVM and Jenkins core. Have you tried to unpack the referenced archive on other platforms?

BR, Oleg Nenashev

Show
Oleg Nenashev added a comment - - edited Hello, 'Extract tar.gz' Installer is not a part of custom-tools plugin. It is located in Jenkins core and stored as an extension. Please specify versions of JVM and Jenkins core. Have you tried to unpack the referenced archive on other platforms? BR, Oleg Nenashev
Hide
Anton Lundin added a comment -

Master is running jenkins 1.540, Ubuntu 12.04
java -version
java version '1.7.0_25'
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Mac OS X 10.8 slave:
java -version
java version '1.6.0_65'
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

Show
Anton Lundin added a comment - Master is running jenkins 1.540, Ubuntu 12.04 java -version java version '1.7.0_25' OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) Mac OS X 10.8 slave: java -version java version '1.6.0_65' Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
Hide
Anton Lundin added a comment -

And Yes, unpacking that archive on a linux slave running the exact same setup as the master above, it works just fine.

Show
Anton Lundin added a comment - And Yes, unpacking that archive on a linux slave running the exact same setup as the master above, it works just fine.
Hide
Oleg Nenashev added a comment -

Removed the assignment. I have no OS X to test the issue.

BTW, it is definitely located inside the core

Show
Oleg Nenashev added a comment - Removed the assignment. I have no OS X to test the issue. BTW, it is definitely located inside the core
Hide
Daniel Beck added a comment -

I confirm the issue in 1.564. While the file downloads and extracts, the output looks nothing like when I extract it manually.

Show
Daniel Beck added a comment - I confirm the issue in 1.564. While the file downloads and extracts, the output looks nothing like when I extract it manually.
Hide
mistafunk added a comment - - edited

i confirm the issue in 1.609.3 on OSX 10.10.5. FWIW, the tar.gz in question contains symlinks: http://www.cmake.org/files/v3.3/cmake-3.3.2-Darwin-x86_64.tar.gz

the problem occurred in the cmakebuilder plugin.

Show
mistafunk added a comment - - edited i confirm the issue in 1.609.3 on OSX 10.10.5. FWIW, the tar.gz in question contains symlinks: http://www.cmake.org/files/v3.3/cmake-3.3.2-Darwin-x86_64.tar.gz the problem occurred in the cmakebuilder plugin.
Hide
Martin Weber added a comment -

Unpacking of the OS X tar.gz works on Linux for
Jenkins 1.580.3/openjdk-1.6.0 and Jenkins 1.580.3/openjdk-1.7.0

Mac Os Download

Tested while trying to resolve JENKINS-31215, which is blocked by this.
Could this be a problem with the JRE on OS X?

Mac Os X Download

Show
Martin Weber added a comment - Unpacking of the OS X tar.gz works on Linux for Jenkins 1.580.3/openjdk-1.6.0 and Jenkins 1.580.3/openjdk-1.7.0 Tested while trying to resolve JENKINS-31215 , which is blocked by this. Could this be a problem with the JRE on OS X?

Download Mac Os X Iso

  • Assignee:
    Unassigned
    Reporter:
    Anton Lundin
  • Votes:
    1Vote for this issue
    Watchers:
    5Start watching this issue

Apple Mac Os X Download

  • Created:
    Updated: