Migrating a Quick Start deployment to a different S3 bucket

Still need help?

The Atlassian Community is here for you.

Ask the community

This Knowledge Base article was written specifically for Atlassian Data Center applications. The contents of this article do not apply to Server installations or the Atlassian Cloud platform.

Purpose

Normally, when you deploy Bitbucket Data Center using our AWS Quick Start, we recommend that you:

  1. Create your own S3 bucket.

  2. Clone the Quick Start templates and edit them to use this bucket.

  3. Upload your clone of the Quick Start templates your S3 bucket.

  4. Update your deployment to use that bucket’s templates.

If you deployed directly from the original AWS Quick Start, changes to the Quick Start templates will automatically propagate to your deployment. These updates sometimes involve adding or removing parameters from the templates. This could introduce unexpected (and possibly breaking) changes to your deployment.

Solution

Your deployment needs to be based on templates stored on your own S3 bucket. This will quarantine your deployment from unexpected changes to the AWS Quick Starts. 

Option 1: Re-deploy from templates in your own S3 bucket (for nested database stacks)

We introduced nested stacks to the AWS Quick Start for Bitbucket on  . If you used the AWS Quick Start after this date, then your deployment uses nested database stacks.

If this is the case, then you’ll have to re-deploy from scratch. When you do, you’ll need to use templates from your own S3 bucket. See Deploying the Quick Start from your own S3 bucket (recommended) for instructions.

Option 2: Re-base your existing deployment on separate templates (for non-nested database stacks)

If your deployment doesn’t use nested stacks, then you can re-base your deployment to new templates from a different S3 bucket. This involves the following steps:

  1. Create your own S3 bucket.

  2. Download the templates used by your deployment.

  3. Recreate the original AWS Quick Start’s directory structure on your S3 bucket.

  4. Update your deployment to use the templates from your bucket.

Click here for detailed instructions

The following procedure will involve the use of the AWS Command Line Interface. This tool will allow you to create an S3 bucket and upload content to it. Refer to Amazon’s instructions on setting it up.

You can also perform these steps through the AWS Management Console.

Step 1: Create your own S3 bucket

If you don’t have one already, you can create an S3 bucket in your region via the AWS CLI:

aws s3 mb s3://<bucket-name> --region <AWS_REGION>

Alternatively, you can also create an S3 bucket through the AWS Management Console.

Step 2: Download the templates used by your deployment

AWS Quick Start deployments are typically composed of two stacks: the Atlassian Standard Infrastructure (ASI) and your product stack (in this case, Bitbucket Data Center).

  1. In the AWS Management Console, go to CloudFormation > Stacks.

  2. Find the Stack Name of both stacks – both won’t have the NESTED tag on them.

  3. Download their templates via the AWS CLI:

    aws cloudformation get-template --stack-name <StackName> --region <AWS_REGION

Refer to Retrieving a Template for more details.

Step 3: Recreate the original AWS Quick Start’s directory structure on your S3 bucket

Now that you’ve downloaded the templates you need, edit and upload them to your new S3 bucket:

  1. In the templates you downloaded, the QSS3BucketName default value is set to aws-quickstart. Replace this default with the name of the bucket you created earlier.

  2. Recreate the original AWS Quick Start on your S3 bucket. Do this by copying the original Quick Start’s directory structure and uploading the ASI and product stack templates accordingly:

    quickstart-atlassian-bitbucket
    ├─ submodules 
    │  └─ quickstart-atlassian-services 
    │    └─ templates 
    │     └── <ASI stack template>
    └─ templates 
       └── <Product stack template>
  3. Set the templates to be Public. This will allow your stack to access them later.

Refer to the following pages for more details:

Step 4: Update your deployment to use the templates from your bucket

We strongly recommend you test this in a staging environment before updating your production deployment.


  1. Open the Stack Details of your deployment’s primary stack. This is the stack without the NESTED tag on it.

  2. Click the Update Stack button.

  3. In the Specify an Amazon S3 template URL field, paste in the Object URL of the Quick Start template you’ll be using. Click Next.

  4. In the next screen, go to the AWS Quick Start configuration section. Verify that the Quick Start S3 Bucket Name field matches the S3 bucket you created earlier.

  5. Click Next. This will update your deployment to now point to your clone of the Quick Start templates.

Description Migrating a Quick Start deployment to a different S3 bucket
Product Bitbucket
Platform Data Center
Last modified on Oct 17, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.