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

cc_puppet: support AIO installations and more #960

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

GabrielNagy
Copy link
Contributor

Proposed Commit Message

cc_puppet: support AIO installations and more

- update the puppet module to support AIO installations by setting
  `install_type` to `aio`
- make the install collection configurable through the `collection`
  parameter; by default the rolling `puppet` collection will be used,
  which installs the latest version)
- when `install_type` is `aio`, puppetlabs repos will be purged after
  installation; set `cleanup` to `False` to prevent this
- AIO installations are performed by downloading and executing a shell
  script; the URL for this script can be overridden using the
  `aio_install_url` parameter
- make it possible to run puppet agent after installation/configuration
  via the `exec` key
- by default, puppet agent will run with the `--test` argument; this can
  be overridden via the `exec_args` key

Additional Context

This was requested on a ticket in the Puppet JIRA: https://tickets.puppetlabs.com/browse/PUP-10926.
The plan is to sign the CLA as an organization, but I opened the PR early to get some review if possible.

Test Steps

Apart from unit tests, I used an Ubuntu 18.04 machine with QEMU to validate the module functionality; used the following to replace the puppet module and restart the VM:

virsh shutdown bionic
sleep 1
rm snapshot.img
qemu-img create -f qcow2 -b bionic-server-cloudimg-amd64.img snapshot.img
virt-copy-in -a snapshot.img ~/prepo/cloud-init/cloudinit/config/cc_puppet.py /usr/lib/python3/dist-packages/cloudinit/config
cloud-localds user-data.img user-data
virsh start bionic

Checklist:

  • My code follows the process laid out in the documentation
  • I have updated or added any unit tests accordingly
  • I have updated or added any documentation accordingly

@GabrielNagy GabrielNagy force-pushed the puppet-module-updates branch 4 times, most recently from 0ec6ace to eb21195 Compare August 4, 2021 09:17
@GabrielNagy
Copy link
Contributor Author

Update: Puppet Labs has signed the Canonical CLA as an organization

@GabrielNagy GabrielNagy force-pushed the puppet-module-updates branch 2 times, most recently from 92f3ea2 to 7bbd10c Compare August 9, 2021 14:13
@GabrielNagy
Copy link
Contributor Author

Hey @TheRealFalcon, it'd be great to get this reviewed/merged. We validated this internally and everything works as expected, let me know if there's anything else I can do to get the PR merged! Thanks! 😄

Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

Thanks for the submission. Overall this change is good. I left some comments inline, but most are fairly minor.

I noticed that the CLA has been signed on behalf of the company, but additionally any contributor needs to be added (alphabetically) to the CLA signers file. The full details are described in the last bullet point of the documentation. Currently you only need to add yourself, but feel free to add the other puppet contributors if you have them.

cloudinit/config/cc_puppet.py Outdated Show resolved Hide resolved
tests/unittests/test_handler/test_handler_puppet.py Outdated Show resolved Hide resolved
tests/unittests/test_handler/test_handler_puppet.py Outdated Show resolved Hide resolved
tests/unittests/test_handler/test_handler_puppet.py Outdated Show resolved Hide resolved
tests/unittests/test_handler/test_handler_puppet.py Outdated Show resolved Hide resolved
tests/unittests/test_handler/test_handler_puppet.py Outdated Show resolved Hide resolved
cloudinit/config/cc_puppet.py Outdated Show resolved Hide resolved
cloudinit/config/cc_puppet.py Outdated Show resolved Hide resolved
@GabrielNagy GabrielNagy force-pushed the puppet-module-updates branch 3 times, most recently from e29da06 to 7e8f661 Compare August 10, 2021 14:43
- update the puppet module to support AIO installations by setting
  `install_type` to `aio`
- make the install collection configurable through the `collection`
  parameter; by default the rolling `puppet` collection will be used,
  which installs the latest version)
- when `install_type` is `aio`, puppetlabs repos will be purged after
  installation; set `cleanup` to `False` to prevent this
- AIO installations are performed by downloading and executing a shell
  script; the URL for this script can be overridden using the
  `aio_install_url` parameter
- make it possible to run puppet agent after installation/configuration
  via the `exec` key
- by default, puppet agent will run with the `--test` argument; this can
  be overridden via the `exec_args` key
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheRealFalcon TheRealFalcon merged commit 9893dfc into canonical:main Aug 10, 2021
@GabrielNagy GabrielNagy deleted the puppet-module-updates branch August 10, 2021 15:14
TheRealFalcon pushed a commit to TheRealFalcon/cloud-init that referenced this pull request Aug 10, 2021
- update the puppet module to support AIO installations by setting
  `install_type` to `aio`
- make the install collection configurable through the `collection`
  parameter; by default the rolling `puppet` collection will be used,
  which installs the latest version)
- when `install_type` is `aio`, puppetlabs repos will be purged after
  installation; set `cleanup` to `False` to prevent this
- AIO installations are performed by downloading and executing a shell
  script; the URL for this script can be overridden using the
  `aio_install_url` parameter
- make it possible to run puppet agent after installation/configuration
  via the `exec` key
- by default, puppet agent will run with the `--test` argument; this can
  be overridden via the `exec_args` key
TheRealFalcon added a commit to TheRealFalcon/cloud-init that referenced this pull request Aug 12, 2021
Certain versions of python/httpretty don't work correctly using https
URIs. canonical#960 recently added httpretty tests using https. This commit
replaces the httpretty tests that were failing on https with mocks of
readurl instead.
blackboxsw pushed a commit that referenced this pull request Aug 13, 2021
* Replace broken httpretty tests with mock

Certain versions of python/httpretty don't work correctly using https
URIs. #960 recently added httpretty tests using https. This commit
replaces the httpretty tests that were failing on https with mocks of
readurl instead.
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.

None yet

4 participants