Skip to content

Add AWSO v2.x to v3.0.0 migration script and design doc - #289

Open
Apoorvkudesia-sumologic wants to merge 1 commit into
non_sam_finalfrom
AWSO-MigrationScript
Open

Add AWSO v2.x to v3.0.0 migration script and design doc#289
Apoorvkudesia-sumologic wants to merge 1 commit into
non_sam_finalfrom
AWSO-MigrationScript

Conversation

@Apoorvkudesia-sumologic

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new end-to-end migration workflow for AWS Observability (AWSO) stacks from v2.12–v2.15 to v3.0.0, including an automation script and a supporting design document to guide operators through the validated migration path.

Changes:

  • Introduces MigrateToV300.sh, a phased migration script covering validation, parameter mapping, v2 stack deletion, Sumo FER/metric-rule cleanup, v3 deploy, and post-deploy roleARN patching.
  • Adds a detailed design document describing the phases, decisions, and operational guidance for migration and resume/patch-only modes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.

File Description
cloudformation-sumologic-aws-observability/scripts/MigrateToV300.sh New migration automation script implementing the v2.x → v3.0.0 workflow (validate/capture/map/confirm/protect/delete/cleanup/deploy/verify/patch/report).
cloudformation-sumologic-aws-observability/AWSO v3.0.0 - Migration Script Design.md Design and operational documentation for the script phases, flags, and validated run notes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +784 to +786
phase_fer_cleanup() {
log_phase "Phase 7: FER Cleanup"

Comment on lines +906 to +908
phase_metric_rules_cleanup() {
log_phase "Phase 8: Metric Rules Cleanup"

log_warn "FER quota too low to rename and keep old FERs."
log_warn "Remaining slots: ${remaining}. v3.0.0 needs: ${AWSO_FER_COUNT}."
log_warn ""
log_warn "The following AWSO FERs must be manually deleted or renamed before deploying v3.0.0:"
Comment on lines +1184 to +1200
# Validate required args
local missing=""
[[ -z "$DEPLOYMENT" ]] && missing="$missing -d DEPLOYMENT"
[[ -z "$ACCESS_ID" ]] && missing="$missing -i ACCESS_ID"
[[ -z "$ACCESS_KEY" ]] && missing="$missing -k ACCESS_KEY"
[[ -z "$ORG_ID" ]] && missing="$missing -o ORG_ID"
[[ -z "$REGION" ]] && missing="$missing -r REGION"

if [[ "$PATCH_ROLES_ONLY" == true ]]; then
[[ -z "$NEW_STACK_NAME" ]] && missing="$missing -n NEW_STACK_NAME"
elif [[ "$RESUME" == false ]]; then
[[ -z "$STACK_NAME" ]] && missing="$missing -s STACK_NAME"
else
[[ -z "$RESUME_PARAMS_FILE" ]] && missing="$missing --params-file PATH"
[[ -z "$NEW_STACK_NAME" ]] && missing="$missing -n NEW_STACK_NAME"
fi

Comment on lines +1079 to +1086
local stale_ids
stale_ids=$( echo "$sources_json" | jq -r --arg new_arn "$new_role_arn" '
.sources[]
| select(
.thirdPartyRef.resources != null and
(.thirdPartyRef.resources[].authentication.roleARN? // "" | . != "" and . != $new_arn)
)
| .id' )
Comment on lines +1244 to +1246
local resume_version
resume_version=$( jq -r '.[] | select(.ParameterKey=="Section1aSumoLogicDeployment") | .ParameterValue' "$RESUME_PARAMS_FILE" )
[[ -z "$SOURCE_VERSION" ]] && SOURCE_VERSION="(from params file)"
-r REGION AWS region (e.g. us-east-1, us-west-2)

Required (resume run):
--resume Resume from Phase 7 (cleanup + deploy), skipping phases 1-6
Comment on lines +135 to +141
Optional:
-v SOURCE_VERSION Source version: 2.15, 2.14, 2.13, 2.12 (auto-detected if omitted)
-n NEW_STACK_NAME v3.0.0 stack name (defaults to STACK_NAME)
-p AWS_PROFILE AWS CLI profile (default: default)
--install-apps YES|NO Install Sumo Logic apps (default: Yes)
--dry-run Show mapped parameters without making any changes
-h, --help Show this help
2. Fetches all existing FERs (paginated)
3. Identifies 17 AWSO FERs by exact name match
4. If quota allows (≥17 free slots): renames each to `v215_backup_<name>` and disables
5. If quota is tight: same operation (rename frees the original name for v3.0.0 to recreate)

| Flag | Purpose | Default | When to use |
|------|---------|---------|-------------|
| `-n NEW_STACK_NAME` | Name for the new v3.0.0 stack | Same as source with version suffix | When you want the new stack to have a different name than the old one |
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