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

(PE-14271) Wire beaker-pe for meep #5

Merged
merged 13 commits into from
May 26, 2016

Conversation

jpartlow
Copy link
Contributor

@jpartlow jpartlow commented May 11, 2016

This PR requires puppetlabs/beaker-answers#16.

This PR makes several changes to beaker-pe to allow it to handle either legacy or meep installers, and to work with a beaker-answers which has been modified to do the same. It includes some transitional code to handle current builds which have both legacy and meep installers in the tarball. This is toggled by the INSTALLER_TYPE environment variable.

This logic is isolated to the use_meep?() function.

There is some cleanup in the specs where these changes were colliding with some of the existing mocks.

TODO: need to fix up the Higgs install calls as well. Done

@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/4/

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/5/

@jpartlow
Copy link
Contributor Author

@kevpl I was expecting failures because this PR depends on a beaker-answers PR. But a quick look at the failed job is showing that it can't find the thin gem when setting up?

@jpartlow
Copy link
Contributor Author

We will merge this and puppetlabs/beaker-answers#16 once we've had some time to test CI with the puppetlabs/pe_acceptance_tests#908 changes.

@highb
Copy link
Contributor

highb commented May 26, 2016

@jpartlow Looks like this needs a rebase.

@jpartlow
Copy link
Contributor Author

ok

jpartlow added 13 commits May 26, 2016 13:00
Introduced chagnes to the do_install method, but specs were failing
because of the tight coupling between expectations and counts of command
execution.

The need to initialize metadata comes from the fact that the previous
PR #3 added step() calls, which reference the TestCase metadata attr.
Since we aren't using an actual TestCase instance, this had to be
initalized separately.
...from the existing code to generate answers and expand it to
generalize the installer settings and configuration file.  Passes
existing specs.  Will be further specialized to handle legacy/meep
cases.
Each change to do_install and supporting methods involving a
version_is_less call was requiring additional mocking simulating
version_is_less's behavior.  This is unnecessary given that hosts are
being set with a version, and actually masks behavior of the class.
Removing these specifically because it was causing churn when
introducing meep functionality.
For consistency, removed the rest of the version_is_less mocks.

In the three cases where this had an impact on the specs, replaced
them with a concrete version setting on the test host object.
The addition of a use_meep? query allows setting host options for either
legacy or meep installer.  This enables installer_cmd to invoke the
correct installer.
Based on changes pending in puppetlabs/beaker-answers#16, change the
generate_installer_conf_file_for() method to submit the expected :format
option temporarily.  This will go away when we cutover to meep and no
longer have to have both installer scripts operational in the same
build.

Fleshes out the specs that verify the method returns expected answer or
pe.conf data from BeakerAnswers, as written out via scp.
...for both legacy and meep installers.  The former prompts to continue
expecting 'Y' and the later prompts with options where '1' is intended
to kick off Higgs.

Also added spec coverage for these methods.
Sometimes during PE upgrades we need to be able to determine what
version we upgraded from, to know what behavior we expect from the
upgrade.  Prior to this change, that could only be determined by probing
into the original host.cfg yaml. This patch just sets it explicitly in
each host prior to overwriting the pe_ver with pe_upgrade_ver.
Because BeakerAnswers sets hiera host parameters from Host#hostname, so
the method needs to exist in our mocks.
Marked by static analysis; specs continue to pass after removal.
Based on this setting, BeakerAnswers can provide legacy bash default
values for database user parameters in the meep hiera config.  This is
necessary if we are upgrading from an older pe that beaker just
installed using the legacy script/answer defaults.

Also logs the actual answers/pe.conf file that was generated so we can
see what is going on.
Certificate is generated by meep.  Step is redundant and produces failed
puppet agent run and puppet cert sign in log.
@jpartlow jpartlow force-pushed the issue/master/pe-14271-wire-for-meep branch from 15c90db to 398882f Compare May 26, 2016 20:11
@jpartlow
Copy link
Contributor Author

Rebased

@jpartlow jpartlow changed the title DO NOT MERGE (PE-14271) Wire beaker-pe for meep (PE-14271) Wire beaker-pe for meep May 26, 2016
@highb
Copy link
Contributor

highb commented May 26, 2016

👍 this has been tested in integration CI

@highb highb merged commit 55aa098 into puppetlabs:master May 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants