Quantcast
Channel: rtrouton – Der Flounder
Viewing all articles
Browse latest Browse all 764

Automating Jamf Infrastructure Manager setups on Red Hat Enterprise Linux

$
0
0

As part of a project, I needed to build an automated setup process for a Jamf Infrastructure Manager (JIM). Thanks to the help of some folks at Jamf, I have a process which runs non-interactively and which does the following on Red Hat Enterprise Linux 7.x:

  1. Installs the JIM software
  2. Enrolls the JIM with a Jamf Pro server

For more details, please see below the jump.

The key information I needed from Jamf was how to run an non-interactive enrollment of the JIM with a Jamf Pro server. This can be done with the following command:

/path/to/jamf-im enroll --hostname jim_hostname_goes_here --jss-url https://jamf.pro.server.here --password jamf_pro_account_password_goes_here --username jamf_pro_account_username_goes_here

This does require placing a password in the clear, so I recommend setting up an account on your Jamf Pro server which only has the required rights to enroll a JIM.

Once you’ve enrolled, you should be able to check /var/log/jamf-im.log and verify that enrollment has been successful. If it was successful, you should see log entries similar to what’s shown below:

You should also see the new JIM appear listed in your Jamf Pro server. To check this, use the following process:

1. Log into the Jamf Pro server using an admin account.
2. Go to Management: Server Infrastructure and select Infrastructure Managers.

Screen Shot 2018 06 22 at 10 16 30 PM

3. You should see the new JIM listed there.

Screen Shot 2018 06 22 at 10 14 29 PM

Screen Shot 2018 06 22 at 10 14 39 PM

 

To help automate the process, I’ve written a script for CentOS 7.x / RedHat Enterprise Linux 7.x which does the following:

  1. Checks to see if Java is installed and installs OpenJDK 8.x if it isn’t.
  2. Checks for the JIM installer at a defined location
  3. If the JIM installer is available, installs the JIM software.
  4. Verifies that the JIM software has been installed.
  5. Enrolls the JIM with a specified Jamf Pro server, using credentials provided in the script.

Pre-requisites

  • A JIM installer .rpm file for CentOS / RedHat Enterprise Linux stored in the location defined in the script.
  • Credentials for the specified Jamf Pro server

When successfully run, the output of the script should appear similar to that shown below:

Screen Shot 2018 06 22 at 9 26 25 PM

The script is available below, and also available on GitHub at the following address:

https://github.com/rtrouton/rtrouton_scripts/tree/master/rtrouton_scripts/Casper_Scripts/jamf_infrastructure_manager_automated_setup


Viewing all articles
Browse latest Browse all 764

Trending Articles