Migrating a Quick Start deployment to a different S3 bucket
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.
Normally, when you deploy Bitbucket Data Center using our AWS Quick Start, we recommend that you:
Create your own S3 bucket.
Clone the Quick Start templates and edit them to use this bucket.
Upload your clone of the Quick Start templates your S3 bucket.
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.
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:
Create your own S3 bucket.
Download the templates used by your deployment.
Recreate the original AWS Quick Start’s directory structure on your S3 bucket.
Update your deployment to use the templates from your bucket.
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).
In the AWS Management Console, go to CloudFormation > Stacks.
Find the Stack Name of both stacks – both won’t have the NESTED tag on them.
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:
In the templates you downloaded, the
QSS3BucketNamedefault value is set to
aws-quickstart. Replace this default with the name of the bucket you created earlier.
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>
Set the templates to be Public. This will allow your stack to access them later.
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.
Open the Stack Details of your deployment’s primary stack. This is the stack without the NESTED tag on it.
Click the Update Stack button.
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.
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.
Click Next. This will update your deployment to now point to your clone of the Quick Start templates.