Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 3.6 KB

Deployment-Upgrade_Parallel.md

File metadata and controls

66 lines (45 loc) · 3.6 KB

Deploying a Parallel, Upgraded Jenkins Service - Master Node

Purpose

This document is intended to walk the automation-user through the process of deploying a paralle, upgraded deployment of an existing Jenkis service using templates included in this project.

Dependencies

Because a parallel-deployment is essentially the same as for a wholly-new deployment, The following dependencies are the same as those for a brand-new deployment:

  • Access to an AWS account
  • An IAM user or role with (at least) enough permissions to:
    • Create EC2 network security groups
    • Create S3 buckets
    • Create classic Elastic LoadBalancers (ELBs)
    • Create IAM instance-roles and policies
    • Create RDS databases
    • Create EFS shares (Optional: only required if deploying to an EFS-supporting region and choosing to use EFS for persistent storage)
    • Create CloudWatch Logs log-groups (Optional: only required if deploying to a region that supports the use of the CloudWatch Logs service and wishing to take advantage of same)
    • Create new DNS records in Route53 (Optional: only required if deploying to a region that supports Route53 and use of Route53 DNS service is desired)
  • Access to a computer that has a modern git client
  • Access to a computer that has Python installed (and is pip-enabled)
  • Access to a computer that has a modern web browser
  • Access to a computer that has the AWS CLI installed or installable (e.g., pip install awscli)
  • Ability to configure the AWS CLI to use the previously-described IAM user or role
  • Availability of a known-good, recent backup of the to-be-replaced Jenkins service.

Automation Elements

See section-contents in brand-new deployment

Cloud-Level Automation

See section-contents in brand-new deployment

Directly-Used Templates

See section-contents in brand-new deployment

Indirectly-Used Templates

See section-contents in brand-new deployment

Instance-Level Automation

See section-contents in brand-new deployment

Deployment/Workflow

The "upgrade" process follows a generic workflow of:

  1. Deploy new "infrastructure" stack-set — See Wholly-New Jenkins Service's Cloud Provisioning section.
  2. Deploy new ELB stack — See Wholly-New Jenkins Service's Cloud Provisioning section.
  3. Duplicate backup-data from prior Jenkins service's backup-bucket to the new backup-bucket (created in first step) — see method-description (below)
  4. Deploy new EC2 stack — See Wholly-New Jenkins Service's Instance Provisioning section.

Bucket-to-Bucket Data-Copy

It will be necessary to execute a third-party copy of data from the source bucket to the destination bucket. This is most-easily done using the AWS CLI — it is assumed that the CLI has permissions to both the source and destination buckets. (see notes in the dependencies section about "Access to a computer...").

  1. Determine the name of the source bucket and path to most-recent backup file
  2. Determine the name of the destination bucket
  3. Execute a bucket to bucket copy operation similar to:
    aws s3 cp s3://<SOURCE_BUCKET>/Backups/sync/<LATEST_SYNC_FILE>.tar s3://<DESTINATION_BUCKET>/Backups/sync/