Skip to content

Expose a cli command to restart ec2 instances#6915

Merged
AmitPhulera merged 13 commits into
masterfrom
ap/ec2-restart-cmd
Jul 1, 2026
Merged

Expose a cli command to restart ec2 instances#6915
AmitPhulera merged 13 commits into
masterfrom
ap/ec2-restart-cmd

Conversation

@AmitPhulera

Copy link
Copy Markdown
Contributor

Building on top of #6905, we are exposing a cli which will help us to do restarts of ec2 instances.

The PR creates a role, a playbook and a cli for ec2_instance_state command.

The role would be used later in the playbooks where we would be issuing start and stop commands to the instances.

The playbook was required to expose the role for the CLI.

Environments Affected

All

@AmitPhulera AmitPhulera requested review from gherceg and millerdev June 15, 2026 11:23
Comment thread src/commcare_cloud/commands/ec2_instance_state.py Outdated
Comment thread src/commcare_cloud/commands/ec2_instance_state.py Outdated
Comment thread src/commcare_cloud/commands/ec2_instance_state.py Outdated
Comment thread src/commcare_cloud/commands/ec2_instance_state.py
Comment thread src/commcare_cloud/commands/ec2_instance_state.py Outdated
Comment thread docs/source/reference/1-commcare-cloud/commands.md Outdated
ran manage-commcare-cloud make-docs > docs/source/reference/1-commcare-cloud/commands.md again
since we have terraform to manage other ec2 functionality so we don't expect a scope creep for this command, so this should be fine to be called ec2
let user know the implications of stop and stop_and_start and guide them to pass the option. This would eventually be removed when graceful stop would be implemented
@AmitPhulera

Copy link
Copy Markdown
Contributor Author

@gherceg The comments have been addressed and this is ready for review again.

@AmitPhulera AmitPhulera merged commit 9fb8a54 into master Jul 1, 2026
8 checks passed
@AmitPhulera AmitPhulera deleted the ap/ec2-restart-cmd branch July 1, 2026 02:12
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.

2 participants