Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-4214) Add additional installation parameters during upgrade #204

Conversation

glennsarti
Copy link
Contributor

Previously it was not possible to pass additional installation parameters during
an upgrade process. In the case of MSI files this could be sensitive passwords
or other public MSI properties. In the case of package resources, additional
options could not be added to the package resource.

This commit adds a parameter called install_options which mirrors the
install_options parameter from the package resource and then passes this down
so that it is invoked on installation (either by a package resource or in the
batch file to install the MSI)

@puppetcla
Copy link

CLA signed by all contributors.

Copy link
Contributor

@MikaelSmith MikaelSmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit messages seem a bit messed up.

{:install_options => ['OPTION1=value1','OPTION2=value2'],})
}

it { is_expected.to compile.with_all_deps }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't seem to be working right.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still a work in progress. Running spec test on Windows is difficult for this module.

@glennsarti glennsarti force-pushed the ticket/master/MODULES-4214-add-install-params branch from b8883fb to dd906b9 Compare January 10, 2017 00:54
@glennsarti
Copy link
Contributor Author

Rebased all the bad commit messages. Still need to update the Readme

@glennsarti glennsarti force-pushed the ticket/master/MODULES-4214-add-install-params branch from dd906b9 to d65162a Compare January 11, 2017 00:07
@glennsarti glennsarti changed the title {WIP}(MODULES-4214) Add additional installation parameters during upgrade (MODULES-4214) Add additional installation parameters during upgrade Jan 11, 2017
@MikaelSmith
Copy link
Contributor

Is this finished? Didn't realize it'd been updated.

README.markdown Outdated
@@ -151,6 +151,14 @@ The directory the puppet agent should be installed to. This is only applicable f
install_dir => 'D:\Program Files\Puppet Labs'
```

##### `install_options`

An array of additional options to pass when installing a package. These options are package-specific, and should be documented by the software vendor. One commonly implemented option is `INSTALLDIR` Each option in the array can either be a string or a hash, where each key and value pair are interpreted in a provider specific way. Each option will automatically be quoted when passed to the install command. With Windows packages, note that file paths in an install option must use backslashes. (Since install options are passed directly to the installation command, forward slashes won't be automatically converted like they are in `file` resources.) Note also that backslashes in double-quoted strings _must_ be escaped and backslashes in single-quoted strings _can_ be escaped.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we control the package, shouldn't we just point to where these options are defined (rather than say they "documented by the software vendor")?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops. Copy-pasta fail from the package provider

@glennsarti glennsarti force-pushed the ticket/master/MODULES-4214-add-install-params branch from d65162a to 975343d Compare February 3, 2017 23:51
@glennsarti
Copy link
Contributor Author

@MikaelSmith Documentation updated.

@@ -35,6 +35,18 @@
# The directory the puppet agent should be installed to. This is only applicable for
# windows operating systems. This only applies when upgrading the agent to a new
# version; it will not cause re-installation of the same version to a new location.
# [install_options]
# An array of additional options to pass when installing a package. These
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice pickup. Thanks. Fixed.

Previously it was not possible to pass additional installation parameters during
an upgrade process.  In the case of MSI files this could be sensitive passwords
or other public MSI properties.  In the case of package resources, additional
options could not be added to the package resource.

This commit adds a parameter called `install_options` which mirrors the
`install_options` parameter from the package resource and then passes this down
so that it is invoked on installation (either by a package resource or in the
batch file to install the MSI)
@glennsarti glennsarti force-pushed the ticket/master/MODULES-4214-add-install-params branch from 975343d to 458a747 Compare February 4, 2017 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants