-
Notifications
You must be signed in to change notification settings - Fork 64
Add auto deployments feature #348
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit implements core logic for auto deployment feature, which allows deployer executions to launch deployments that will wait and automatically start after the transfer execution is completed. This is done by launching a separate greenthread for each deployer execution.
Exposes the auto deployment feature as `auto_deploy` option in the transfer execution body.
Adds default deployment options to transfers, which will be used for auto-deployments.
Adds ability to transfer schedules to start a deployer execution
Adds new execution status for deployments that wait for deployers' completion.
Adds executable service entry for the deployer manager, which will manage the lifecycle and automation of the deployments launched by deployer executions, using the `auto_deploy` transfer execution option.
The auto deployments feature required creation of deployments without executions, making it unsafe to presume the deployment will have an execution at any time. This patch fixes this by checking that the deployment has an execution, before trying to access it for operations like deployment deletion or cancellation.
d272c4c to
f8e536f
Compare
Logs exception details in case an exception occurs in `_check_deployer_status`. It also logs the message as `ERROR` severity.
This patch makes sure that only auto deployments are started in `PENDING` state. All manually launched deployments should start with `UNEXECUTED` status, as the deployment execution gets created right after. This will disallow the deployer manager to pick up manual deployments.
f8e536f to
3baa47d
Compare
Fixes the `shutdown_instances` keyword argument name.
Fixes an issue where a transfer execution schedule with `auto_deploy` enabled will create a deployment with user and project ID missing from the request context. This patch applies the transfer user and project IDs to the deployment, in case they are missing from the request context.
Adds logic to validate manually launched deployments before creating the deployment, while also validating auto deployments' inputs before creating the deployment execution.
f7192e1 to
6d2a0eb
Compare
…ution When a schedule with `auto_deploy` enabled triggers the transfer and pending deployment using a user trust that's registered in the schedule information. After a deployment finishes, the trust_id is always deleted, making it impossible for the user to delete an auto_deploy-enabled transfer schedule. This patch makes sure that a transfer schedule can be deleted, even though its trust_id fails to delete.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The new
auto_deployexecution option will be used to kick off pending deployments, which will start running when the transfer execution finishes successfully. These automatic deployments are managed by a new service, calledcoriolis-deployer-manager, which picks up pending deployments and manages their lifecycle.Default deployment options have also been added to the transfer information, like "clone_disks", and "skip_os_morphing", in order for the pending deployments to be able to launch right after the execution starts, using these default options.