Posted on 10-19-2015 09:21 AM
Like many, I wanted my very own enrollment screen like the one IBM showed at the JNUC. I threw something together that works very similarly. This is a native app written in swift. I did try and make it easily editable for anyone to use and customize without knowing how to code. Here's the repo...I'll be updating and adding things as time goes on and cleaning it up.
You'll need to supply a html based page with your site specific information and then specify where 4 different packages land in the installation so the progress bar can display accurate information.
Posted on 10-19-2015 10:28 AM
Looking very nice!
I'm just downloaded and giving it a play with now.
Posted on 10-19-2015 11:48 AM
Greatly appreciated! Playing with it now.
Posted on 10-19-2015 11:56 AM
Posted on 10-19-2015 01:56 PM
Can you provide some screenshots or a video or anything to help those of us who didn't see it when IBM showed it off? I'm not sure what I'm looking at here.
(Edit) Compiled and ran it. Here's the type of screen. I'm guessing this is intended for DEP setups?
Posted on 10-19-2015 02:32 PM
Ya IBM had their app running at full screen after DEP enrollment completed. It had the progress bar and some other information for the end user, such as how to get support.
Posted on 10-19-2015 02:38 PM
@McAwesome Yea...they used it for self-enrollment since all the user would get is a new Mac and a post-it with a URL. An app like this would pop up after enrollment and explain to the user what was being installed, who to contact, ect. They also said they liked it because you could tell when the build was complete internally. When they post the video of the season I'm sure you'll see it, I haven't seen any slides of the app since the presentation. The goal really is to make the html portion really nice, get key information across, and give the user and idea when the mac is completely ready.
Posted on 10-19-2015 02:50 PM
Poking through and thinking a bit, it may be better to use a pre-defined array of policy names rather than go with the package. Once you see the "Executing Policy _", drop _ from the array and update the progress bar a bit. This would help keep it up to date a bit longer as policy names change less frequently than package names(i.e. "prestage-Chrome" vs "Chrome-45.6.21.blah"). It'd add a lot of hoops to jump through since you can't ensure multiple policies will always run in a certain order unless you daisy chained them through events or something. Still, it's a lot of up front work for fewer changes down the line.
I could also see just using a count for "Inventory will be updated when al queued actions in Self Service are complete" if you know how many policies will be executed on DEP enrollment. So instead of having four separate things to update it, increase the bar by 1/X where X=(number of policies to be run). That would require just updating one number rather than package names or the like. I'm not as well versed in the JSS API, but I feel like there's a way to return all the policies that happen on enrollment complete. If so, you could potentially automate that number gathering as step one of the enrollment stuff. That way you don't ever have to update things manually.
Posted on 10-19-2015 02:57 PM
I love those ideas. I was obviously mad hacking this together in a few days...but I think you're on to something with the policy count. I can definitely ask the API for a policy count. I'll be giving that a try for sure.
Posted on 10-19-2015 03:32 PM
I love this. This one one of the things I was most interested from the talk. What is you way to scope this with file vault? We have a custom trigger that calls a bunch of policies and I was wondering how we would get the progress correctly and get it to kick off. Thanks in advance.
Posted on 10-19-2015 04:22 PM
@martel I would try kicking off the FV process immediately after enrollment and then start with the policies after the reboot. Maybe through smart groups? Since the polices fire alphabetically you could make this install first and launch with a post flight scripts. I'm just riffing...everyone's environment is different so these custom things are hard to mold to everything.
Posted on 10-19-2015 04:28 PM
Would it be possible to get some instructions on how to set this up?
I've opened it up in xCode and tried to compile and run but the application has a blank screen and hangs, with errors in xCode
I've not touched xCode for any kind of app development before so I am completely unsure as to where I am meant to be looking to get this working.
How is the app meant to launch after DEP enrollment?
An enrollment complete trigger that installs the app and then runs it, with a custom trigger to start downloading the other apps?
Posted on 10-19-2015 04:41 PM
@Simmo I know that the app will likely crash if the jamf.log is not present on the machine...so there is still some error handling to add to the app on that front. If you could, just submit the error as an issue on the github repo. That would help me the most.
The app could be launched anytime you want to communicate to your client really. In the IBM demo, they showed their app after user enrollment. If I remember correctly...it launched after the FileVault restart.
To launch the app, I would recommend packaging it up in composer and using a post-flight script to launch it. All the progress bar here is doing is watching the jamf.log for progress. The JSS is still doing all the real work.
I will work on getting better instructions together for compiling. I would like to eventually have it where it comes pre-compiled and the html and other necessary data stand outside the app and easily edited.
Posted on 10-19-2015 04:50 PM
@jtratta Sounds good, I'll submit the error I see.
The machine I am running it on does not have a jamf.log, so that is the likely cause of that.
I'll play around a bit, as this could be very beneficial to us coming in the start of the school year with several hundred new devices coming in and we're making the move to using DEP and no imaging.
Appreciate your work.
Posted on 10-20-2015 12:02 AM
I'll submit this on GitHub too but I think using the System Font would be a better default than using Arial etc.
Posted on 10-20-2015 07:48 AM
Another thing to consider would be having this app actually create the triggers. Napkin mathing it here, but it could first check for policies with a known custom trigger(ProgressScreen). Once it has a count of how many policies it will run, it could create that trigger event
sudo jamf policy -trigger ProgressScreen
This may actually be a bit more accurate than just counting ones that have trigger_enrollment_complete=true due to the ProgressScreen app itself triggering the policies.
I'd code it up, but unfortunately Swift may as well be German for me at this point. Still learning the ropes of it.
Posted on 10-22-2015 10:22 AM
I really like this and am interested on using this for our new devices next year as well. I do not use the API nor do I know how to code so, any guidance is much appreciated. Thanks for developing this!
Posted on 10-22-2015 11:52 AM
I am wondering if you could just scope the progress bar to the jamf logs? We have a setup where we have a custom trigger the calls all of our imaging policies. I opened up xcode and played around a bit but am having trouble scoping to the larger numbers of policies that we kick off for the progress bar. Would love for the screen to be completed when filevault is done encrypting. Any ideas?
Posted on 10-22-2015 12:22 PM
@martel The app (currently) only follows the jamf log. The trick is determining a duration once the screen pops up. My first pass at this was to take an average time (one that you would determine in your own testing) and use that to smooth out the progress bar. The waypoints are there to lend accuracy and help the app adjust the progress bar to what's actually happening. Hopefully that makes sense..and answers your question?
It's the only way I've come up with the doesn't need some sort of special credentials to run.
Do you mean the ENTIRE encryption process...or just the kickoff after the first reboot? If you're talking about having the screen come up after the user is added into Filevault; I'm sure there is a way to scope to a smart group that is looking for FV policy completion.
@lcopeland I'm trying to make the app as easily customizable as possible. Right now, if you can create a HTML page in a WSIWIG and replace what's in there you'd nearly be there. You'll just need to edit a few values in the actual code.
I will work on getting easier documentation to follow so it's more obvious on how to get this running for any environment.
Posted on 10-22-2015 12:23 PM
A question for the group then: If I were to include a generic HTML page what should that be? I can't imagine what that would even be.
Posted on 10-22-2015 12:45 PM
@jtratta I'd just make that generic page have some fields for each place to replace. So do a side bar that has the IT department name, phone number, address, etc but with obvious dummy text. The rest is pretty much whatever.
Posted on 10-22-2015 02:45 PM
But could you get it to show the progress of the full disk encryption? It is currently working for us by showing us the logs. We don't have a progress bar though.
What I am thinking in regards to Filevault its to make a separate app that looks to the filevault progress? I have no Idea how to do that.
Posted on 10-23-2015 03:33 PM
I'm working on a template for this that I can make available. Right now it's just a static page you can edit, but I plan to add a slider for customized content.
Posted on 10-28-2015 02:18 PM
Very cool and great idea. After seeing @rdwhitt customization, I decided to mess around with it a little for our own environment.
I wasn't able to attend JNUC, but I just saw the IBM presentation on Keynote, and also implemented the completion screen after enrollment (obviously stole heavily from IBM's):
I am noticing that the app in our environment isn't quitting itself, so I'm trying to work on that next.
Posted on 10-28-2015 02:20 PM
I still can't get the progress bar to load...
Posted on 10-28-2015 02:27 PM
Posted on 10-28-2015 02:30 PM
@martel Are you not seeing the progress bar at all, or is it just not progressing? Make sure to edit the ViewController.swift file in Xcode and set your package waypoints.
Posted on 10-28-2015 02:32 PM
how would I set the waypoints if the packages change based on version numbers?
Posted on 10-28-2015 03:16 PM
Right now if you have specified a pkg as a waypoint, and the name of the pkg changes because of an update, then you would need to update the waypoint name in the app. Like @McAwesome mentioned, it would be nice if this looked at something else since package names can change frequently.
Just thinking out loud here...I wonder if having four empty packages install would work...call them something like stage1.pkg, stage2.pkg, etc....You could then have as many policies run in-between as needed and you wouldn't need to worry about changing the waypoint names.
Posted on 10-28-2015 04:58 PM
@martel I have found that the progress bar will not appear on anything except El Cap.
@mvdbent, there isn't any custom code. I just modified the location of the progress bar on the storyboard to fit my webpage.
@rdwhitt, I was thinking about this earlier too. I think what I might implement, since I'm trying to teach myself Swift anyway, is to have the app grab information off of a server for the package stages. This way I can just update the plist on a server when filenames change and will never have to keep recreating the app.
Posted on 10-29-2015 07:59 AM
@jphillips You can change the deployment target in Xcode if you want to deploy to 10.10 as well. You can see in this image under Deployment info where you can set the Deployment Target.
You can easily compile to at least 10.9. If you do so, Xcode will throw an error and suggest adding code to the viewDidLoad method. Click the red "!" and it will take you to the offending code seen in the images below. This should then work in 10.9. (*Disclaimer: I have not yet tested this on target machines)
Posted on 10-29-2015 08:23 AM
@jtratta I had already changed the target deployment to 10,10, but the bar still didn't show for some reason. I have not tried taking it to 10.9, though.
Posted on 10-29-2015 08:32 AM
@jphillips I just did a test in a 10.9 VM. Sadly...it does not work at all. I'll have to work on some backwards compatibility.
Posted on 10-29-2015 08:40 AM
10.10 not showing the progress bar might be my problem too.
Posted on 10-29-2015 05:18 PM
Posted on 10-29-2015 10:33 PM
This is nice.
However as suggested by others, being able to run a single custom trigger is very helpful. I'd also make the case for having it run over the login window too, as i'm sure others would want such functionality.
Posted on 10-30-2015 08:30 AM
This is really really great! Works like a charm.
Does any have any advise for customizing the web page? Which app to use (preferably something graphical)? Totally out of my element on that part of it. :(
Posted on 10-30-2015 08:48 AM
@hkabik I used Abobe Muse to throw something together. To implement your own html, just replace everything in the html folder in Xcode. There are quite a few html WYSIWYG's out there...it would just be a matter of finding the one you like best.
Posted on 10-30-2015 01:22 PM
After you've made the page as you want it... how do you insert the progress bar where you want it?
Ah nm, these are questions for google... I'll go try to get my learn on.
Posted on 12-03-2015 07:59 AM
I was wondering what you would consider best practise for
1. deploying the progress screen app to the client machine? 2. executing it?
3. making policies affect the progress bar?
4 making the application quit in a nice way, not like exit 0?
Very greatefull for any and all ideas.