In this lesson, we're going to learn how to use auto packager to automatically download and import
software into our monkey repo.
So to do this, we're going to need to have a couple of prerequisite programs installed and we're going
to go ahead and need auto package, get in monkey tools.
Now, auto packager is essentially a graphical user interface for the auto package command line tool.
And what auto packager is designed to do is to download software and search for the latest versions
of software on a regular basis.
And if a new version of software is found, it will download and import that into monkey as well.
Now, auto packager can be used for things other than just monkey, and we'll get to that in a moment.
So on our Monkey Admon machine, you could see that we have Firefox version sixty six and we know from
another lesson that there is a newer version of that out.
So let's go ahead and subscribe to Firefox and auto packager.
So it downloads the latest version and it will continue to automatically download the latest versions
as they come out.
So to do that, we need to go to the reposing recipe's tab and we're going to go ahead and search for
a recipe and we're going to search for Firefox.
Now, a recipe is essentially a script that describes how Firefox should be downloaded.
And so let's go through the search results until we can find Firefox.
And since we're going to use monkey, we want to find something that says Firefox monkey.
Now, let's go ahead and add the repo.
And so now we're subscribed to this Rupo, and if we scroll through all the Repos, you'll see that
one, we'll have a check on it.
There it is.
And so that's the repo that we're described to.
And inside this repo are recipes for all these applications.
So let's go ahead and filter for Firefox.
And you can see that there's a handful of recipes, and so these are typical extensions for a recipe.
And so basically how it works is if we subscribe to Firefox download, it will download Firefox from
the vendor site and we'll end up with a DMG file.
If we do Firefox install it will download and install Firefox.
Firefox Monkey will download and import Firefox into Monkey and Firefox.
That package will download the DMG from the website and convert it to a package file.
So since we're going to be working with Monkey, let's go ahead and check Firefox Dot Monkey.
Now, like I said, you can set auto packager to run on a schedule and you can have it run as often
as you want, and any time that auto package runs, if it finds a later version of the software that
you're subscribed to, it will go ahead and run the appropriate recipes, which will download it and
store it or imported into monkey.
Now, there's also a notification tab and you can have a notification sent to you by email or some other
method.
On this tab, we can do some configure options for auto packager, and the main one that you're going
to want to be concerned with is configuring monkey tools.
If you're going to be running monkey recipes, then auto package needs to know where your monkey repo
is so it can import the software into monkey.
OK, so now let's go ahead and run the recipe and.
What's happening now is, is that Firefox is being downloaded from the Firefox website and then it will
import the disk image that it downloads into Monkey and then it'll run the Make Catalog's Command on
its own.
So when you do a refresh and monkey admin, you'll see the packages available in Monkey.
OK, so with that finish, let's go ahead to monkey admin and reload.
And as you can see, we now have Firefox sixty six dot zero three and our monkey repo.
Now let's go ahead and double click on it and you can see that it has unattended installed check, which
is not something we want to check in our environment now if we want to change that.
So when auto package or import something into monkey, if we want it to be unchecked, we can set something
that's called an override.
And we'll talk more about the override in a moment.
All right.
So let's go ahead and hit, OK?
And let's go ahead and remove Firefox.
Sixty six of three from monkey, and that's going to delete the package in the package info.
Now, let's go ahead and hit, save and reload.
And let's go ahead to the override that I mentioned to make an override.
What we're going to do is we're going to click on Firefox, Stop Monkey and click, create, override.
And then when it asks for a name, I just typically put DOT over.
All right.
So what we're going to do is uncheck monkey and click monkey override, which means that this is the
recipe that's going to run.
Now, what we have the ability to do is we can override some settings that were in the original recipe.
So let's go ahead and open it, and so what we can see here is we have a local and are in our local
and hyphen us for English us.
If you want auto packager to download Firefox in a different language, you can override that value
here.
Likewise, when we imported things into monkey with monkey import, it asked us if we wanted to put
things in a repo subfolder well.
This recipe is putting Firefox in a subfolder called Apps Firefox, and it's going to name the package
Firefox and Monkey and it's going to use the latest release.
It's also going to import it into our testing catalogue.
Now, here's a description and the display name in here, we see we have unintended and still true.
So let's go ahead and change that to false.
And let's go ahead and save the file.
And now let's run the recipe again.
OK, so now that that's done, let's go back to Monkey Adnen and hit reload.
And let's go ahead and look at our Firefox's sixty six of three in this time, you can see it says unattended
install unchecked.
So let's go ahead and fill out her category and fill out our developer.
So now we can go ahead and save it and deploy this to our testing machines.
And don't forget to save.
All right, so monkey is obviously a very convenient tool, but it doesn't come without its own set
of risks if we think about what's happening, auto packages, downloading software from the Internet,
importing it into our management server, and we're making it available for all of our clients to download
and install with route access automatically.
So there is a system in place to address this, and it's called trust verification.
And so I'm going to go over briefly how it works.
But when you decide whether or not you want to use auto package in your production environment, you
really need to go to the auto packager page and read up entirely on trust verification.
There is more to it than what I'm going to discuss.
So when we created the override, we also created trust with this recipe.
So what does that mean exactly?
So if we go to take a look at this, you can see that there is something called a parent recipe.
And the parent recipe is.
Is monkey that Firefox?
All right, well, this is Monkey Firefox, it's what we made the overwrite from now.
We wanted the override so we could put in our own values for language and some of the other variables.
Now, the parent recipe for this one is the recipe that actually downloads.
And so you can see this one doesn't actually have a parent recipe.
So this is the parent and we're trusting that this recipe works well.
Now, this download recipe works with what's known as a download processor.
And if we go to Folder's in integration and open up the repo and we go inside or repo and into the Mozilla
repo, we can see that there's a file called Mozilla.
You are our provider.
And if we go ahead and we open that up.
Then.
What we can see is this is basically the smarts of how it knows exactly what to download.
So over here you can see the base you URL is downloads, dot, Mozilla, dot org.
So we know that that's a legitimate site.
So if you read through everything and you trust it, then basically there would be no harm in using
this recipe.
Now, like I said, when we created this override, we basically said that we trust this recipe.
OK, so we've trusted it and now we can use it and it'll download and install Firefox.
But what happens if something changes?
Well, if something changes, then we're going to get a notification and we're going to have to re-establish
trust.
Now, to re-establish trust, you need to use a command line tool built into auto package.
There is no way to do this from auto packager itself.
Now, like I said before, you go ahead and use auto packager, make sure you read up on everything
about trust info and become comfortable with the procedure and always test the packages and testing
before you put them in production.