Giter Club home page Giter Club logo

filewave's Introduction

FileWave & AutoPkg

These recipes allow FileWave admins to import applications as filesets or pkgs into FileWave, ready for deployment to test machines.

Our aim was to avoid replicating existing recipes as much as possible, as such most of the recipes will use a parent recipe that is already part of the standard autopkg repo.

Pre-requisites

The following is required in order to use these recipes:

  1. On the machine that runs autopkg you must have a copy of FileWave Admin 10.0 or greater installed.
  2. AutoPkg 0.5.0 or greater.

The FileWave autopkg recipes rely on having access to the FileWave Admin Command Line features which are part of the FileWave Admin application.

You can confirm that you have the right version by running the FileWave Admin Command Line from the Terminal, for example:

$ /Applications/FileWave/FileWave\ Admin.app/Contents/MacOS/FileWave\ Admin -v
10.0.0
$

Configuration

The recipes and processors need to know where the FileWave Server is located, as well as which user / password to use when logging in and uploading packages.

To do this, the following autopkg (defaults command) variables can be used:

  1. FW_SERVER_HOST - defaults to 'localhost', can be hostname or IP address
  2. FW_SERVER_PORT - defaults to 20016
  3. FW_ADMIN_USER - defaults to 'fwadmin', its the name of the account that will be used to connect
  4. FW_ADMIN_PASSWORD - defaults to 'filewave', its the password of the FW_ADMIN_USER account

For example:

defaults write com.github.autopkg FW_SERVER_HOST 10.3.4.5

Security

By default the recipes will assume you have a pristine FileWave installation which means you have a single FileWave administrator account called 'fwadmin' and the password is 'password'. These are good defaults to ensure a quick start in testing situations - but in production you really really want to change this.

For security reasons - we strongly recommend creating another user for use with AutoPkg.

If you insist on using the fwadmin user - you will see annoying warnings indicating that you are making use of the super-user account.

FW_ADMIN_USER Permissions

FileWave is multi-user capable.

Take advantage of this and create a user called 'autopkg' and give this user the following rights (optionally provide update model rights if you want to make use of the --updateModel feature of the Admin CLI):

  • Modify Clients/Groups
  • Modify Filesets
  • Modify Associations
  • Modify Imaging Associations
  • [optional] Update Model

Then on the machine running autopkg, set the FW_ADMIN_USER value:

defaults write com.github.autopkg FW_ADMIN_USER autopkg

Validation of the setup

In order to quickly validate whether or not your setup is working you can run a dummy recipe that will invoke the FileWave command line tools to print out relevant version information.

This simple test proves that the autopkg scripts and FileWave magic sauce are working well together.

For example (assuming that you've set the FW_ADMIN_USER to autopkg):

$ autopkg run FWTool.filewave
Path to Admin Tool: /Applications/FileWave/FileWave Admin.app/Contents/MacOS/FileWave Admin

Here are the results of installation validation:
Fw Admin Console Version  Fw Admin User  Fw Server Host  Fw Server Port  Fw Can List Filesets  Fw Message     
------------------------  -------------  --------------  --------------  --------------------  ----------     
10.0.0                    autopkg        localhost       20016           Yes                   VALIDATION OK  

Override Fileset Group

By default, the autopkg system will put newly created filesets into the root group.

You can override this behaviour in two ways:

  1. Specify a default group for all of the imports from autopkg
  2. Use autopkg's make-override verb to override the fw_fileset_group parameter value for a specific recipe.

The first option is a great choice if you want all of your imports to go into a single folder, and it carries the added advantage that you don't need to modify the recipes as long as the recipe DOES NOT specify the fw_fileset_group witin the Input section of the recipe.

If the recipe specifies an empty fw_fileset_group value in its Input section, this is redundant and can be removed.

Here's how to set the default Fileset group into which autopkg will place newly imported packages:

$ defaults write com.github.autopkg fw_fileset_group "My_New_Autopkg_Group"

The second way to override the default group is to create a recipe override. Recipe overrides are explained in the autopkg documentation in more detail. Lets follow an example of making an override for Adium.

Recipe overrides are created using the autopkg command line tool. The intention is to provide you a way to override the values in the input section of a recipe. Important: the input variable does not have to exist in the recipe in order for you to override it - and we'll use this trick to our advantage.

First, lets see what info we've got about the Adium recipe.

$ autopkg info Adium.filewave
Description:         Downloads latest version of Adium and imports into FileWave.
Identifier:          com.github.autopkg.filewave.Adium
Munki import recipe: False
Has check phase:     True
Builds package:      False
Recipe file path:    /Users/johnc/Library/AutoPkg/RecipeRepos/com.github.filewave/Adium/Adium.filewave.recipe
Parent recipe(s):    /Users/johnc/Library/AutoPkg/RecipeRepos/com.github.autopkg.recipes/Adium/Adium.download.recipe
Input values: 

BRANCH = release;
NAME = Adium;
"fw_app_bundle_id" = "com.github.autopkg.filewave.Adium";
"fw_destination_root" = "/Applications/%NAME%.app";

Note the Input values section, it shows us BRANCH, NAME and two filewave specific parameters. Notice the 'fw_fileset_group' parameter is NOT listed here.

Lets go ahead and create an override and then set the fw_fileset_group paramter to something.

$ autopkg make-override Evernote.filewave
Override file saved to /Users/johnc/Library/AutoPkg/RecipeOverrides/Adium.filewave.recipe

Now lets edit this XML file and make it look like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Identifier</key>
        <string>local.filewave.Adium</string>
        <key>Input</key>
        <dict>
                <key>BRANCH</key>
                <string>release</string>
                <key>NAME</key>
                <string>Adium</string>
                <key>fw_app_bundle_id</key>
                <string>com.github.autopkg.filewave.Adium</string>
                <key>fw_destination_root</key>
                <string>/Applications/%NAME%.app</string>
                <!-- added the fw_fileset_group -->
                <key>fw_fileset_group</key>
                <string>My New Group for Adium</string>
        </dict>
        <key>ParentRecipe</key>
        <string>com.github.autopkg.filewave.Adium</string>
</dict>
</plist>

Notice that we've added the fw_fileset_group and its associated value into the input variables dictionary. It isn't important that this key is not specified by the original recipe - the FileWaveImporter will still look for and find the value you specify.

That's it! Now when we run the autopkg recipe for Adium, the right group override is used.

$ autopkg run Adium.filewave
Processing Adium.filewave...

The following fileset was imported:
Fw Fileset Id  Fw Fileset Group        Fw Fileset Name   
-------------  ----------------        ---------------   
73533          My New Group for Adium  Adium - 1.5.10.2  

Happy Autopkging!

filewave's People

Contributors

homebysix avatar maarten-wijnants avatar pierrenicolasr avatar seansgm avatar stijnvanschoonbeek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

filewave's Issues

JSON error since update to 10.1.0...

Autopkgr is sending errors on every run:

No JSON object could be decoded.

If I run a recipe, this is what I get:

autopkg run AdobeFlashPlayer.filewave
Processing AdobeFlashPlayer.filewave...
No JSON object could be decoded
Failed.

The following recipes failed:
    AdobeFlashPlayer.filewave
        Error in com.github.autopkg.filewave.FlashPlayerNoRepackage: Processor: com.github.autopkg.filewave.FWTool/FileWaveImporter: Error: No JSON object could be decoded

The following packages were copied:
    Pkg Path                                                                                                                   
    --------                                                                                                                   
    /Users/server/Library/AutoPkg/Cache/com.github.autopkg.filewave.FlashPlayerNoRepackage/AdobeFlashPlayer-20.0.0.267.pkg

I am on the aforementioned version 10.1.0 on the admin and server, and I have tried the latest stable and release candidate builds of Autopkgr. This seems to have started with 10.1.0.

list of arguments for filewave importer

is there is list of allowed arguments available? for example: i would like to set additional properties of the filesets such as priority, verification settings, color, ignore permissions on existing folders and requirements - like below:

    <dict>
        <key>Arguments</key>
        <dict>
            <key>fw_app_bundle_id</key>
            <string>com.github.techonecentre.filewave.%NAME%</string>
            <key>fw_app_version</key>
            <string>%version%</string>
            <key>fw_destination_root</key>
            <string>/Applications/%NAME%.app</string>
            <key>fw_fileset_group</key>
            <string>AutoPkg_Updates</string>
            <key>fw_fileset_name</key>
            <string>%NAME% - %version%</string>
            <key>fw_import_source</key>
            <string>%RECIPE_CACHE_DIR%/%NAME%/Applications/%NAME%.app</string>
        </dict>
        <key>Processor</key>
        <string>com.github.autopkg.filewave.FWTool/FileWaveImporter</string>
    </dict>

I have more of a workflow issue

I've been using a mix of import recipes from here as well as ones that I have written. I'm coming from the Munki world where there is a common name key that tells Munki what is going on. With the FW imports, I'm getting filesets that are numbered based on each version, as well as new fileset IDs.

Since they are new filesets, I lose my associations and the clients don't get the update.

How do you work with this since I assume that you all use the recipes that you post here?

I know that I can import them to a group, and associate the fileset group to my clients but if I go that route, I lose the kiosk functionality or I will conversely need to manually update the kiosk.

Any feedback would be appreciated.

OracleJava8-1.8.131.11.pk created but not imported

macOS Sierra v10.12.4
AutoPkgr v1.4.2 (1375)
Git 2.2.1

I did a fresh install of Sierra on my computer this spring. I just realized autopkgr wasn't installed. I installed it and ran . I received a "validation OK" result.

I can't get the Java8.filewave to upload. The pkg is sitting in my autopkg Cache but never moves to Filewave. I believe my autopkgr is working because I successfully uploaded the newest Flash fileset today.

Do you have any ideas on how to proceed?

finder001

from an autopkgr email:
The following packages were copied:

/Volumes/Data HD Yosemite/Users/rarobertsonjl/Library/AutoPkg/Cache/local.filewave.Java8/OracleJava8-1.8.131.11.pkg
/Volumes/Data HD Yosemite/Users/rarobertsonjl/Library/AutoPkg/Cache/local.filewave.AdobeFlashPlayer/AdobeFlashPlayer-25.0.0.163.pkg

Filewave Recipes don't allow overriding the group in their current form

FileWave recipes don't allow you to override the group in their current form. This would allow us to change the group where the filesets get uploaded to into the server. It would be ideal for this to be allowed, so that recipes can use %fw_fileset_group% in the actual FWImporter arguments. (For Example: https://macadmins.slack.com/files/elliotjordan/F0MQX0G3G/evernote.xml)

The end result would be two fold:

  1. Change the group where a fileset is imported via an override
    a. Right click on a FileWave recipe, choose Create Override.
    b. Then edit the file as you would any recipe override, save.
    c. Set AutoPkgr to run the override, not its parent.
  2. FileWaveImporter tool should read the group from a defaults setting, so you could set it once and forget it.
    a. AutoPkgr could write that setting, based on a field in the UI.

Java8.filewave

I am being emailed this error message regarding the Java8 recipe:
Could not retrieve URL http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:04 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:06 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:07 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:08 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:10 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:11 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:12 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:13 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:14 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:15 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:16 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:17 --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- 0:00:18 --:--:-- 0curl: (56) Recv failure: Operation timed out A Python exception occurred during the execution of autopkg, see the system log for more details. [ERROR] 'ascii' codec can't encode character u'\u2019' in position 223: ordinal not in range(128)

Filewave error

I am receiving error messages when trying to configure autopkg. Here is all the information that I have.

lindegroup/autopkgr#512

I receive the following error message:
Error in com.github.autopkg.filewave.FlashPlayerNoRepackage: Processor: com.github.autopkg.filewave.FWTool/FileWaveImporter: Error: too many values to unpack

Some of my recipes do not update the model after they run.

Here is one that I have that does not update the model after it runs (either in Autopkgr or via Terminal and autopkg).

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Description</key>
	<string>Downloads the latest version of Ardunio for Mac and imports into Filewave.</string>
	<key>Identifier</key>
	<string>com.github.joncohen.filewave.arduino</string>
	<key>Input</key>
	<dict>
		<key>NAME</key>
		<string>Arduino</string>
        <key>fw_destination_root</key>
        <string>/Applications/%NAME%.app</string>
	</dict>
	<key>MinimumVersion</key>
	<string>0.2.0</string>
	<key>ParentRecipe</key>
	<string>com.github.jps3.download.Arduino</string>
	
<!--
Process based on the work from https://github.com/autopkg/peshay-recipes.git
-->

	<key>Process</key>
	<array>
		<dict>
			<key>Processor</key>
			<string>Unarchiver</string>
		</dict>
		<dict>
			<key>Arguments</key>
			<dict>
				<key>info_path</key>
				<string>%RECIPE_CACHE_DIR%/%NAME%/%NAME%.app</string>
				<key>plist_keys</key>
				<dict>
					<key>CFBundleIdentifier</key>
					<string>bundleid</string>
					<key>CFBundleName</key>
					<string>app_name</string>
					<key>CFBundleShortVersionString</key>
					<string>version</string>
				</dict>
			</dict>
			<key>Processor</key>
			<string>PlistReader</string>
		</dict>
		<dict>
			<key>Arguments</key>
			<dict>
				<key>fw_app_bundle_id</key>
				<string>%bundleid%</string>
				<key>fw_app_version</key>
				<string>%version%</string>
				<key>fw_destination_root</key>
				<string>%fw_destination_root%</string>
				<key>fw_fileset_name</key>
				<string>%NAME% - %version%</string>
				<key>fw_import_source</key>
				<string>%RECIPE_CACHE_DIR%/%NAME%/%app_name%.app</string>
				<key>fw_fileset_group</key>
				<string>Arduino</string>
			</dict>
			<key>Processor</key>
			<string>com.github.autopkg.filewave.FWTool/FileWaveImporter</string>
		</dict>
	</array>
</dict>
</plist>

I feel like I'm missing something but I'm not sure what.

Unexpected contents

Seeing the following on FW recipes.
Processor com.github.autopkg.filewave.FWTool/FileWaveImporter contents differ from expected. Path: /Users/ladmin/Library/AutoPkg/RecipeRepos/com.github.autopkg.filewave/FWTool/FileWaveImporter.py

Errors Adobe AIR and FlashPlayer with autopkg 1.4.2

We use autopkg for Adobe products with FileWave. We have started to recieve these errors this morning and cannot figure out what is causing them.

Any help would be appreciated.

MikeM.

The following failures occurred:

RECIPE
com.github.autopkg.filewave.FlashPlayerNoRepackage

MESSAGE
Error in com.github.autopkg.filewave.FlashPlayerNoRepackage: Processor: URLDownloader: Error: Curl failure: The requested URL returned error: 404 Not Found (exit code 22)

The following errors occurred:

WARNING: com.github.autopkg.filewave.AdobeAIR is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding... WARNING: com.github.autopkg.filewave.FlashPlayerNoRepackage is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding... Curl failure: The requested URL returned error: 404 Not Found (exit code 22)

Silverlight errors out

Using AutoPkgr 1.4 with AutoPkg 0.6.1, Git 2.2.1, and FileWaveImporter.

I have been successful with the OracleJava8 and AdobeFlashPlayer recipes the past two days. Silverlight, however, keeps erroring out. I have attached the log file because copying it into this message wasn't easily readable.

Can anyone offer insight into how I should proceed? Thanks.

Silverlight-AutoPkgr.log.zip

Use PlistReader to decrease burden on recipe creators

Here's a processor that could be added in order to prevent recipe creators from having to know/look up the bundle identifier of the app:

        <dict>
            <key>Processor</key>
            <string>PlistReader</string>
            <key>Arguments</key>
            <dict>
                <key>info_path</key>
                <string>%pathname%/%NAME%.app/Contents/Info.plist</string>
                <key>plist_keys</key>
                <dict>
                    <key>CFBundleIdentifier</key>
                    <string>fw_app_bundle_id</string>
                    <key>CFBundleShortVersionString</key>
                    <string>version</string>
                </dict>
            </dict>
        </dict>

That's for a dmg download like Adium. The following would be for a zip download like Evernote:


        <dict>
            <key>Processor</key>
            <string>PlistReader</string>
            <key>Arguments</key>
            <dict>
                <key>info_path</key>
                <string>%RECIPE_CACHE_DIR%/%NAME%/%NAME%.app/Contents/Info.plist</string>
                <key>plist_keys</key>
                <dict>
                    <key>CFBundleIdentifier</key>
                    <string>fw_app_bundle_id</string>
                    <key>CFBundleShortVersionString</key>
                    <string>version</string>
                </dict>
            </dict>
        </dict>

With that in place, you could skip the fw_app_bundle_id argument in the FileWaveImporter processor entirely.

Notice it also looks up the %version% but that's only useful if another upstream processor doesn't already provide the version number (e.g. SparkleUpdateInfoProvider usually does provide version).

Error: too many values to unpack

Hello,
We recently upgraded to FileWave 12.7.0 and have been getting consistent errors from AutoPkgr. I have confirmed that the user can still log into FW Admin. The command-line produces the same error.

sd95mdm1:Applications techsysadmin$ autopkg run FWTool.filewave
Processing FWTool.filewave...
WARNING: FWTool.filewave is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
Path to Admin Tool: /Applications/FileWave/FileWave Admin.app/Contents/MacOS/FileWave Admin
too many values to unpack
Failed.

The following recipes failed:
FWTool.filewave
Error in com.github.autopkg.filewave.FWTool: Processor: com.github.autopkg.filewave.FWTool/FWTool: Error: too many values to unpack

Nothing downloaded, packaged or imported.

Is there a problem with the FWTool, or something specific with our installation?

Error: LooseVersion instance has no attribute 'version'

The following errors come up when I'm running the AdobeAir.filewave, GoogleChrome.filewave, and the Java8.filewave recipes.

com.github.autopkg.filewave.AdobeAIR Error in com.github.autopkg.filewave.AdobeAIR: Processor: com.github.autopkg.filewave.FWTool/FileWaveImporter: Error: LooseVersion instance has no attribute 'version'

com.github.autopkg.filewave.google-chrome Error in com.github.autopkg.filewave.google-chrome: Processor: com.github.autopkg.filewave.FWTool/FileWaveImporter: Error: LooseVersion instance has no attribute 'version'

com.github.autopkg.filewave.OracleJava8 Error in com.github.autopkg.filewave.OracleJava8: Processor: com.github.autopkg.filewave.FWTool/FileWaveImporter: Error: LooseVersion instance has no attribute 'version'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.