-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add backup/restore plans #339
Conversation
https://tickets.puppetlabs.com/browse/PE-35454?jql=text%20~%20%22puppet%20backup%20cert%22%20ORDER%20BY%20created%20DESC is now resolved so this could be tested when we have resource |
Would like to leverage backup/restore for few pieces:
Trying to work out the steps if that can be done as:
After flipping stacks from old -> new we can do another task to rsync the remaining client certs from old CA to new (with incremented serial this should avoid any overlap (Thanks @Sharpie)). |
@@ -5,42 +5,33 @@ on: | |||
workflow_dispatch: | |||
inputs: | |||
image: | |||
description: 'GCP image for test cluster' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is all the quoting changed? I think the change isn't related to adding the backup/restore plan. If it's required it should be done in another PR, to reduce the diff here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bastelfreak The integration testing is actually part of this PR since that is needed to make backup/restore releasable.
The quoting change is an unfortunate side-effect of auto-formatting I'm afraid... We will work on synchronizing auto-formatting rules since this is annoying, thanks for catching this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now this was merged with the quote changes. Now the style in the repo is very inconsistent and the diff in this PR is unnecessary big.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistency was inevitable from this change, and will be synchronised in a separate PR.
…platform and removing comma in custom restore
Regenerated reference doc Added spaces to params in spec file Changed commit reference to version for node_manager
This looks like it should work with the `pull_request` event
* Update backup_restore.md * fix typo * Update documentation/backup_restore.md * Update backup_restore.md Integrating the extra note (added to SOLARCH 1160 branch) that was causing the conflict into my changes. * Update backup_restore.md * [ITHELP-87329] Update test-backup-restore.yaml (#446) This looks like it should work with the `pull_request` event --------- Co-authored-by: Ben Ford <[email protected]>
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }} | ||
SSH_PASS: ${{ secrets.SSH_PASS }} | ||
|
||
# - name: Download artifacts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was that committed if it isn't used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could have been moved to another branch until migration was picked up, but wasn't doing any harm for the time being.
@@ -35,7 +35,7 @@ group :development do | |||
gem "rubocop-performance", '= 1.16.0', require: false | |||
gem "rubocop-rspec", '= 2.19.0', require: false | |||
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] | |||
gem "bolt", '>= 3.10.0', require: false | |||
gem "bolt", '>= 3.27.2', require: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is bolt updated? Do old versions not work anymore with PEADM? That's not documented in the backup_restore.md nor the README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We felt that it was good to increment the version to keep it within the last couple of years. Not that is wont work anymore, but just difficult for us to sign off support for every version.
@@ -0,0 +1,9 @@ | |||
# This Puppetfile is managed by Bolt. Do not edit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was The Puppetfile committed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I'd mentioned elsewhere, this was for the intention of improving instructions for installation and usage.
@@ -0,0 +1,9 @@ | |||
--- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this file added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the Puppetfile
@@ -0,0 +1,12 @@ | |||
function peadm::migration_opts_default () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
none of the new functions are documented :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are relatively simple functions for just holding an object, and didn't feel they needed documented.
Peadm::Recovery_opts $backup = {}, | ||
|
||
# Where to put the backup folder | ||
String $output_directory = '/tmp', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are relative paths okay, or should this be Stdlib::Absolutepath? WHen relative paths are okay, this should at least be String[1]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good idea, and I'll change to this
|
||
## shutdown services | ||
run_command(@("CMD"/L), $primary_target) | ||
systemctl stop pe-console-services pe-nginx pxp-agent pe-puppetserver \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to stop all services? Because PE provides more. The dead Jira also had a feature request for PE to provide a pe.target that would allow us to reliable stop all services.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is stopping all the services that we require for the time being.
@@ -0,0 +1,91 @@ | |||
plan peadm::util::init_db_server( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
puppet-strings documentation is missing :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should maybe be private. I will update documentation for this.
|
||
# Install PE. We need to pass "y" through stdin since the flag -y requires pe.conf to be present. | ||
cd $INSTALLER | ||
echo 'y' | ./puppet-enterprise-installer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing newline is missing
Summary
Adding backup/restore functionality
Checklist
Changes include test coverage?
Have you updated the documentation?