Configuring Bitbucket Data Center to work with Amazon Aurora
These instructions will help you connect Bitbucket Data Center to an existing Amazon Aurora PostgreSQL database.
Amazon Aurora is only supported on a Data Center license
Bitbucket Data Center supports the use of a single-writer, PostgreSQL-compatible Amazon Aurora clustered database. A typical production-grade cluster includes one or more readers in a different availability zone. If the writer fails, Amazon Aurora will automatically promote one of the readers to take its place. For more information, see Amazon Aurora Features: PostgreSQL-Compatible Edition.
The overall process for using a PostgreSQL-compatible Amazon Aurora database with an existing Bitbucket deployment is:
- Deploy Amazon Aurora (preferably, through the Modular Architecture for Amazon Aurora PostgreSQL Quick Start).
- Configure PostgreSQL on the Amazon Aurora database.
- Connect your Bitbucket deployment to the Amazon Aurora database.
See Supported platforms for the versions and configurations of Amazon Aurora supported by Bitbucket Data Center.
Backups (for migrations)
If you are migrating Bitbucket Data Center data from the HSQL internal database, back up the Set the home directory.
If you are migrating Bitbucket Data Center data from another external database, back up that database by following the instructions provided by the database vendor before proceeding with these instructions.
See Data recovery and backups.
1. Deploy Amazon Aurora
The AWS Quick Start template as a method of deployment is no longer supported by Atlassian. You can still use the template, but we won't maintain or update it.
We recommend deploying your Data Center products on a Kubernetes cluster using our Helm charts for a more efficient and robust infrastructure and operational setup. Learn more about deploying on Kubernetes.
AWS now recommends switching launch configurations, which our AWS Quick Start template uses, to launch templates. We won’t do this switch, however, as we’ve ended our support for the AWS Quick Start template. This means you're no longer able to create launch configurations using this template.
Bitbucket Data Center specifically supports the use of an Amazon Aurora cluster with the following configuration:
It must have only one writer, replicating to one or more readers.
Your PostgreSQL engine must be version 9.6 or higher.
See Supported platforms for more details.
AWS documentation
Modular Architecture for Amazon Aurora PostgreSQL: a Quick Start that guides you through the deployment of a PostgreSQL-compatible Aurora Database cluster. This cluster has one writer and two readers, preferably in different availability zones.
Upgrading the PostgreSQL DB Engine for Amazon RDS: shows you how upgrade your database engine to a supported version before migrating it to Amazon Aurora.
Migrating Data to Amazon Aurora PostgreSQL: contains instructions for migrating from Amazon RDS to a PostgreSQL-compatibleAmazon Aurora cluster.
Best Practices with Amazon Aurora PostgreSQL: contains additional information about best practices and options for migrating data to a PostgreSQL-compatible Amazon Aurora cluster.
Amazon also offers an AWS Database Migration Service to facilitate a managed migration. This service offers minimal downtime, and supports migrations to Aurora from a wide variety of source databases.
When migrating from a non-clustered PostgreSQL database into an Amazon Aurora database, we recommend you use pg_dump
and pg_restore
. For more information, see Backup and Restore (from the PostgreSQL documentation).
2. Connect Bitbucket to the Amazon Aurora database
You can now connect Bitbucket to the PostgreSQL database, when you either:
- Run the Setup Wizard (at install time)
- Want to migrate Bitbucket to PostgreSQL (either from the embedded HSQL database or from another external database)
When running the Setup Wizard at install time
- Select External at the 'Database' step.
- Select PostgreSQL for Database Type.
- Complete the form. See the table below for details.
- Click Next, and follow the instructions in the Setup Wizard.
When migrating to Amazon Aurora
- In the Bitbucket administration area, click Database (under 'Settings').
- Click Migrate database.
- Select PostgreSQL for Database Type.
- Complete the form. See the table below for details.
- Click Start Migration.
Hostname
The hostname or IP address of your Amazon Aurora database.
Port
The TCP port with which Bitbucket can connect to the database server.
Database name
The name of your Amazon Aurora database.
Database username
The username that Bitbucket should use to access the database.
Database password
The password that Bitbucket should use to access the database.