Archive

Archive for the ‘JSSImporter’ Category

Using the Jamf Pro API to mass-delete obsolete packages and scripts

April 16, 2021 2 comments

If you’re using AutoPkg and tools like jamf-upload or JSSImporter to automate the uploading of packages and scripts to your Jamf Pro server, it may be necessary to periodically delete a large number of now-obsolete installer packages or scripts from your server. To help with this, I’ve written a couple of scripts to help automate the deletion process by using a list of Jamf IDs and the API to perform the following tasks:

  1. Delete the relevant installer packages or scripts.
  2. Generate a report of which packages or scripts were deleted.

For more details, please see below the jump.

Read more…

Setting up AutoPkg, AutoPkgr and JSSImporter on an Amazon Web Services macOS EC2 instance

December 20, 2020 1 comment

One of the outcomes of the recent Amazon Web Service’s Insight conference was AWS’s announcement that, as of November 30th, macOS EC2 instances were going to be available as on-demand instances or as part of one of AWS’s reduced cost plans for those who needed them long-term.

There are a few differences about AWS’s macOS offerings, as opposed to their Linux and Windows offerings. macOS EC2 instances are set up to run on actual Apple hardware, as opposed to being completely virtualized. This means that there are the following dependencies to be aware of:

  1. macOS EC2 instances must run on dedicated hosts (AWS has stated these are Mac Minis)
  2. One macOS EC2 instance can be provisioned per dedicated host.

AWS has also stipulated that that dedicated hosts for macOS EC2 instances have a minimum billing duration of 24 hours. That means that even if your dedicated host was only up and running for one hour, you will be billed as if it was running for 24 hours.

For now, only certain AWS regions have EC2 Mac instances available. As of December 20th, 2020, macOS EC2 instances are available in the following AWS Regions:

  • US-East-1 (Northern Virginia)
  • US-East-2 (Ohio)
  • US-West-2 (Oregon)
  • EU-West-1 (Ireland)
  • AP-Southeast-1 (Singapore)

The macOS EC2 instances at this time support two versions of macOS:

macOS Big Sur is not yet supported as of December 20th, 2020, but AWS has stated that Big Sur support will be coming shortly.

By default, macOS EC2 instances will include the following pre-installed software:

For folks looking to build services or do continuous integration testing on macOS, it’s clear that AWS went to considerable lengths to have macOS EC2 instances be as fully-featured as their other EC2 offerings. Amazon has also either made it possible to install the tools you need or just went ahead and installed them for you. They’ve also included drivers for their faster networking options and made it possible to manage and monitor Mac EC2 instances using AWS’s tools just like their Linux and Windows EC2 instances.

That said, all of this comes with a price tag. Here’s how it works out (all figures expressed in US dollars):

mac1 Dedicated Hosts (on-demand pricing):

$1.083/hour (currently with a 24 hour minimum charge, after which billing is by the second.)
$25.99/day
$181.93/week
$9493.58/year

Now, you can sign up for an AWS Savings Plan and save some money by paying up-front for one year or three years. Paying for three years, all cash up front is the cheapest option currently available:

$0.764/hour
$18.33/day
$128.31/week
$6697.22/year

Now some folks are going to look at that and have a heart attack, while others are going to shrug because the money involved amounts to a rounding error on their existing AWS bill. I’m mainly going through this to point out that hosting Mac services on AWS is going to come with costs. None of AWS’s existing Mac offerings are part of AWS’s Free Tier.

OK, so we’ve discussed a lot of the background but let’s get to the point: How do you set up AutoPkg to run in the AWS cloud? For more details, please see below the jump.

Read more…

Phantom groups, MySQL queries and Jamf Pro 10.7

September 19, 2018 2 comments

On September 13th, Jamf released a new KBase article for Jamf Pro customers who hosted Jamf Pro themselves instead of hosting in Jamf Cloud:

On-Prem Jamf Pro Customers Upgrading to 10.7.0: https://www.jamf.com/jamf-nation/articles/552/on-prem-jamf-pro-customers-upgrading-to-10-7-0

In the KBase article, Jamf provides a couple of MySQL commands to run:

select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where criteria not in (select computer_group_name from computer_groups) and search_field="Computer Group";
select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where binary criteria not in (select binary computer_group_name from computer_groups) and search_field="Computer Group";

If either query returned data, the KBase directs you to contact Jamf Support. This was my output:

[computername username]# mysql -u root -p
Password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2452003
Server version: 5.7.22-log MySQL Community Server (GPL)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use jamfsoftware
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where criteria not in (select computer_group_name from computer_groups) and search_field="Computer Group";
+——————-+———-+——————+
| computer_group_id | criteria | criteria_display |
+——————-+———-+——————+
| 152 | Testing | Testing |
| 179 | Testing | Testing |
| 181 | Testing | Testing |
| 147 | Testing | Testing |
| 149 | Testing | Testing |
| 150 | Testing | Testing |
| 161 | Testing | Testing |
| 162 | Testing | Testing |
| 146 | Testing | Testing |
| 180 | Testing | Testing |
| 148 | Testing | Testing |
| 151 | Testing | Testing |
| 153 | Testing | Testing |
| 224 | Testing | Testing |
| 154 | Testing | Testing |
| 155 | Testing | Testing |
| 156 | Testing | Testing |
| 157 | Testing | Testing |
| 158 | Testing | Testing |
| 159 | Testing | Testing |
| 182 | Testing | Testing |
| 160 | Testing | Testing |
+——————-+———-+——————+
22 rows in set (0.01 sec)
mysql> select computer_group_id,criteria,criteria_display from smart_computer_group_criteria where binary criteria not in (select binary computer_group_name from computer_groups) and search_field="Computer Group";
+——————-+———-+——————+
| computer_group_id | criteria | criteria_display |
+——————-+———-+——————+
| 152 | Testing | Testing |
| 179 | Testing | Testing |
| 181 | Testing | Testing |
| 147 | Testing | Testing |
| 149 | Testing | Testing |
| 150 | Testing | Testing |
| 161 | Testing | Testing |
| 162 | Testing | Testing |
| 146 | Testing | Testing |
| 180 | Testing | Testing |
| 148 | Testing | Testing |
| 151 | Testing | Testing |
| 153 | Testing | Testing |
| 224 | Testing | Testing |
| 154 | Testing | Testing |
| 155 | Testing | Testing |
| 156 | Testing | Testing |
| 157 | Testing | Testing |
| 158 | Testing | Testing |
| 159 | Testing | Testing |
| 182 | Testing | Testing |
| 160 | Testing | Testing |
+——————-+———-+——————+
22 rows in set (0.02 sec)
mysql>

view raw
gistfile1.txt
hosted with ❤ by GitHub

What had happened? For more details, please see below the jump.

Read more…

Categories: AutoPkg, Jamf Pro, JSSImporter

Automating AutoPkg and JSSImporter setup

July 13, 2018 1 comment

As part of building my autopkg-conductor solution for automating AutoPkg runs, I also wanted to automate the setup of AutoPkg and JSSImporter. My colleague Graham Pugh has written a setup script for his environment, which I was able to adapt and extend for my own needs. For more details, please see below the jump.

Read more…

%d bloggers like this: