Posted on 01-06-2014 06:00 AM
Hey folks, I'm announcing the release of my add-on to the autopkg project which integrates it with the JSS. Please see my post over on the 318Inc blog, http://www.318.com/2014/01/introducing-jssimporter-for-autopkg/, for more information, and let me know what you think if you get a chance to test it. Thanks, Allister
Posted on 01-06-2014 01:53 PM
Between AutoDMG, AutoPKG, Automater, and (of course) Autobots, we can only expect this to come shortly...
"Effective 2014, PSUMacAdmins will now be known as PSUAutoAdmins!"
Looks good. Will test. Already pulling custom CrashPlan EA reports via JSS API service account so this should be pretty auto-drop and go.
Posted on 01-06-2014 04:03 PM
http://osx.michaellynn.org/freenode-osx-server/freenode-osx-server_2014-01-06.html
Direct link to image: http://donmontalvo.com/jamf/jamfnation/auto-dmg-announcement.png
external image link
@gregneagle][/url, I'm gonna guess that folks will. ;)
Good work, mister @Banks][/url!
Don
Posted on 01-07-2014 01:54 PM
@Banks][/url Great work with this. I just tested it with three recipes and it worked like a charm. :-)
First impression:
1. Since it's a Self Service policy, would be nice to have an icon associated with it, instead of the default open box icon.
Would the smart group be more useful if it was used as an "Exclusion" scope? So, it would exclude all computers that already have that application and version. And leave the the "Target" scope empty so that it doesn't "go live" until an admin adds the "All Users" group or whatever
I don't love that it creates a category based on the name of the app. I guess that can fixed with a Recipe-Override.
I guess that's all i have for now. Thanks again!
Posted on 01-07-2014 04:00 PM
Thanks for the feedback! Here's some initial responses:
1. I would be surprised if the icon art you're asking to set is able to be uploaded, even if we were able to derive it automatically from the installer bundle. If you know how to set an icon without uploading it, that would probably go in the XML we're POSTing, here: https://github.com/arubdesu/jss-autopkg-addon/blob/master/JSSImporter.py#L347
I don't think I have an easy or short-term solution for that, perhaps JAMF peeps can comment regarding how feasible they perceive that to be
Oh, you mean like make the smart group work, in comparison to what I'm doing now? :)
I'm really hoping there can be some consensus on how to best fit the common case, and make it overridable. I've started the conversation here: https://github.com/arubdesu/jssRecipes/issues/1
You could, except I didn't code it in an overridable state as of yet - you'd always have to set a category wether you wanted one or not, even though the code can handle if that is missing in the recipe. Just for everyones benefit, you can mass-generate your own recipes and leave that key/value pair out with this script that dumps a fresh set of recipes in /tmp, you can modify the templated recipe (somewhat) easily by removing line 28 and 29:
https://gist.github.com/arubdesu/7f9630f9a19b27e0db8c#file-jssrecipegenerator-py-L28
Posted on 01-08-2014 10:15 AM
Getting the following errors in my testing:
Terminal:
Error in com.github.autopkg.jss.Thunderbird: Processor: JSSImporter: Error: Error parsing XML from checkItem results.
Logs:
1/8/14 1:11:14.000 PM kernel[0]: hfs: summary table not allowed on FS with block size of 2048
1/8/14 1:11:14.000 PM kernel[0]: hfs: could not initialize summary table for Thunderbird
Setup: Test 8.7.3 JSS, SMB DP, full R/W API access account, AutoPKG/JSSImporter setup via steps posted.
Confirmed standard pkg/DMG/download recipes are processing to local cache folder as expected.
Still wet behind the ears with AutoPKG, anything obvious to check here?
EDIT: newbie ?: is JSSImporter assuming Casper 9.x API?
Posted on 01-08-2014 10:50 AM
Hey @clifhirtle, pardon me I wasn't as explicit about this as I should have been, Version 8.x of the JSS API does not work to create smart groups. That's not the error being raised, and obviously my error-checking isn't as helpful as it should be. For your own edifimication, you could re-run the processor with the -v or -vv flags to tell which step it's having the issue on. (That output is a bit noisy if you do, I can certainly look into it if you wanted to post that to gist.github.com or pastebin.)
The only two instances in which that code runs is checking the criteria used in a smart group(specifically the pkg id) or policy(specifically both the associated group and pkg), so when the smart group isn't created correctly that very well can fail. If you manually created the smart group you should be able to keep that association on 8.x.
If you instead want to target pre-existing groups(static or otherwise) for your policy, you'd need a recipe that takes advantage of that. Currently it's commented out in all recipes, but you can 1. expand and customize lines 34 and 53 and 2. regenerate the whole lot of recipes with this script:
https://gist.github.com/arubdesu/7f9630f9a19b27e0db8c#file-jssrecipegenerator-py-L34
Let me know how you want to address this. Thanks, Allister
Posted on 01-08-2014 12:39 PM
Thanks @Banks! I'll rebake the recipes @ 375 on static groups and see what tastey pastries pop out of the Casper oven. In meantime, here's the double-v output, though not much here more than what we had before so suspect the trip up's with policy creation as you mention:
It may be worth mentioning that many Casper admins I've spoken with have not yet updated to v9.x due to major DB schema changes that prevent proper DB updates/imports, not to mention some features (like central logging) that were stripped from 9.x and many of us rely on. Unclear if JAMF's released migration stats, but for some of us it may be a while still till we move up to 9.x (and the newer API calls).
Posted on 01-08-2014 06:36 PM
SadTrombone.com, that looks like the python on the system in question can't convert the value returned from the API when you ask for all categories into a string... which potentially could be a local problem, but could also be an issue with either your JSS or the API user(unlikely, but I'm not ruling anything out yet.) What happens when you run this: ```
curl -kv -u svc_apiwrite:MyPass https://jss.myorg.com:8443/JSSResource/categories -X GET > /tmp/validreturngoesHerePlease.xml
```
Posted on 01-09-2014 12:18 PM
Installed APKG-JSSI (more letters please) this AM on a fresh system and got similar logs kicked back.
Through an unrelated JAMF support call we upgraded same JSS to 9.2.2. I can revert/retest back to 8.7.3 in a couple days, but this VMs gone la vida 9.x through Friday. Re-ran tests. Same JSS (now upgraded) + same local APKG-JSSI instance appears to be working now.
Here's the results from CURL query above this AM (JSS 8.7.3):
http://pastebin.com/EdxWrjGj
Here's results from CURL query above this PM (JSS 9.2.2)
http://pastebin.com/v0ZSEWNL
JSS 9.2.2 Thunderbird VV Bake Off Log (new):
http://pastebin.com/FbeaF8iG
JSS 8.7.3 Thunderbird VV Bake Off Log (from last post):
http://pastebin.com/uC7ptWAh
Posted on 01-10-2014 03:01 PM
Update: working now on 8.7.3, via tweaking API write user access privs.
One thing: VV output suggests the importer is adding a smart group, while actual action taken is adding a static group.
{'Output': {'jss_category_added': False,
'jss_policy_added': True,
'jss_policy_updated': False,
'jss_repo_changed': True,
'jss_smartgroup_added': True,
'jss_smartgroup_updated': False,
'jss_staticgroup_added': False,
'jss_staticgroup_updated': False}}
Overall incredible work. This tool is amazing to see in action.
Posted on 01-10-2014 05:26 PM
Awesome, I'm glad it wasn't something I've overlooked on the 8.x end, but please do realize, even if it makes the smart group, I am pretty sure it wouldn't properly set the criteria. Also, I'm not using Appname-dot-app as the conditional "Application Title -> is -> Thunderbird"(for example,) as reported here:
https://github.com/arubdesu/jssRecipes/issues/1
so that may require tweaking as well. Thanks for following up!
Posted on 01-16-2014 06:53 AM
How is the pkg files being uploaded to the JSS/JDS? I got a ton of errors
This package is a PKG or an MPKG, and the index.bom file is not found. Attempting to open the package as a flat package...
Posted on 01-17-2014 02:51 PM
@jwojda we're only dealing with flat pkgs - no dmgs, nothing bundle-style, and it's being copied to an older-style locally mounted distribution point which gets served to clients via AFP/SMB. I'm not sure what you're getting errors from in specific, is that Casper admin? We're hoping to avoid interaction with Composer and CA altogether.
Posted on 01-22-2014 01:44 PM
is any one actively working on JSS related Recipes?
Posted on 01-24-2014 04:22 AM
just been trying it out and im very impressed :) One thing missing is the Firefox ESR jss recipe.
Ive tried looking on how to make a recipe but i must be missing something because i can find instructions.
Posted on 01-24-2014 05:18 AM
You should be able to create Firefox ESRs using the existing Firefox recipe and specifying the release you want. I have a post showing how to do this with the Firefox.pkg AutoPKG recipe:
Posted on 01-24-2014 05:20 AM
Hey tkimpton, thanks for giving it a whirl! Here's the official guidance on recipe writing in the meantime:
https://github.com/autopkg/autopkg/wiki/Recipe-Writing-Guidelines
I'll post something JSS-add-on-specific soon.
Your note about the Firefox ESR support being missing is what overrides accomplish, as described here:
https://github.com/autopkg/autopkg/wiki/Recipe-Overrides
The Firefox.jss recipe is the one that should be overridden to produce that result, I just gave it a shot to make sure it works.
FYI, If you've already imported Firefox and want both, you may want to give the ESR one a distinct category/group and/or policy name(s), although just deleting the non-ESR version's group/policy/pkg may cut the mustard as well(otherwise the add-on will think there's a more recent version and malfunction when calling the API.)
Posted on 01-24-2014 06:20 AM
Thanks guys its working now.
I was reading this too literally and thats why it wasn't working "For example, we can change RELEASE to latest-esr" here https://github.com/autopkg/autopkg/wiki/Recipe-Overrides instead of under the RELEASE key change it from latest to latest-esr.
Posted on 02-05-2014 02:13 PM
Just got this setup, and it works great. We will be upgrading our production JSS to 9 on Friday. Looking forward to using this with JSS 9
Posted on 02-17-2014 01:05 PM
Works great with Smart Groups in JSS 9. Want to start contributing to recipes, but have not had time to get back to this.
Just wanted to bump this to see if anyone else is still utilizing this.
Posted on 03-18-2014 11:30 AM
Just wanted to bump this discussion. I really want to get autopkg going on JSS to handle some of those more frequently updated apps like Google Chrome, Firefox, Flash, Java, etc.
Thank you @Banks][/url for taking this on. So I'll just list some of my issues with the current implementation of JSS recipes.
Posted on 03-23-2014 09:30 AM
@denmoff Hey Mr. Moffett, I updated the code and bumped the release version (download here:https://github.com/arubdesu/jss-autopkg-addon/releases/tag/0.0.2) which includes the proper way to omit things you don't want to set through the official override process(instead of hard-coded in a recipe.) If you're still having issues with overrides please let me see as much of the debug output as you can safely share through whatever channel you'd like to reach out to me to do so. I also fixed the logic error you pointed out with the missing '.app', which is unfortunately hard-coded into one of the template xml's being shoved into the JSS via API. I'll ask the experts how to best abstract those templates out into supporting files for future reference so it doesn't balloon the code and you can modify it as you see fit for things like what scoping is used. Thanks to everyone else expressing interest, it keeps me going!
Posted on 06-25-2014 06:56 AM
This looks great, this combined with patchoo could save us many man hours here!
Any way to get it working with JDS?
Posted on 06-25-2014 07:32 AM
Posted on 06-25-2014 07:33 AM
@clifhirtle yeah thats it
Posted on 06-25-2014 09:23 PM
I haven't said it here... so I will. Love it! When I have some time I will (attempt to) hack something to make it pop out patchoo ready smart groups and policies.
Posted on 06-25-2014 09:24 PM
TheScriptFormallyKnownAsJunkie
Like that too... next version may just be called a symbol :)
Posted on 07-22-2014 08:33 PM
@loceee][/url
So I've been playing with Patchoo! and the JSSImporter for AutoPkg recently and they are both awesome!
What would be really awesome is to get the JSSImporter to work with Patchoo!
I've had a bit of a play around with editing the JSSImporter.py file.
What i've got so far is up on my GitHub here
https://github.com/hunty1/jss-autopkg-addon/blob/master/JSSImporter.py
Essentially this now creates the correct smart group criteria and required policy for Patchoo to do its thing.
Its not setup very nice and was just a quick way draft to see how hard it would be to do. Im no python scripter by any means but Im going to try to do a bit more work to make it play nice with dev and production categories so that automatically downloaded packages don't go straight out to production and instead go to a dev group and then have to be enabled before they actually go out to them.
Posted on 07-22-2014 10:03 PM
Excited to try it out! I just haven't had any capacity to look at this, so thanks heaps! Having the new pkgs land in dev will be totally bad ass!
Posted on 07-22-2014 11:17 PM
Boom bad ass status achieved. Was a lot easier than I thought it would be.
https://github.com/hunty1/jss-autopkg-addon/blob/master/JSSImporter.py
Posted on 07-23-2014 06:26 PM
So I just setup Jenkins with this now as well. Oh my gosh.
EDIT
Ahhh.. Ok slight issue.
Running the recipe (Firefox.jss) once works great, creates everything as it should. But running it a second time, it fails when it tries to check if the smart group is created in the JSS.
It seems to be to do with the name of the smart group in the recipe now not matching what I have changed it to in the JSSImporter.
The recipe is saying to use a smart group name of LessThanMostRecent_%NAME%
but the JSSImporter is creating update%PROD_NAME%-%version%
I've created an override for the recipe, and changed the smart group name to update%NAME%-31.0 this runs fine.
So how would I go about getting the version variable into the recipe? is this possible?
Posted on 07-24-2014 09:01 PM
For those following along at home.
The version variable is defined by a processor which runs after the recipe, so can't be evaluated in the recipe.
Solution - lets not try to create the name of the smart group in the recipe. instead lets create the smart group name variable in the JSSImporter which is able to evaluate the version variable.
I'm just not sure how to do that yet