Automated setup for Bitbucket
This page describes how the Bitbucket Data Center and Server Setup Wizard can be completed automatically, that is without the need for manual interaction in the browser. See Getting started for an outline of the tasks that the Setup Wizard assists with when setting up Bitbucket manually.
たとえば、Bitbucket Data Center のプロビジョニングを自動化するときにこれを構成できます。この場合、Puppet や Vagrant などのプロビジョニング ツールは自身で設定する必要があります。
Note that you can also automate the 'install and launch' phase of provisioning Bitbucket – see Running the Bitbucket Server installer for information about how to run the installer in the console and unattended modes.
1. Get a license for Bitbucket
You can get a new Bitbucket license by:
- Logging in to your my.Atlassian.com account.
- Contacting Atlassian.
If you already have a licensed instance of Bitbucket, you can find the license in the Bitbucket admin area.
2. 構成プロパティを設定する
After installing Bitbucket, but before you start Bitbucket for the first time, edit the bitbucket.properties
file to add the properties in the table below. Use the standard format for Java properties files.
Note that the bitbucket.properties
file is created automatically in the shared
folder of your Bitbucket home directory when you perform a database migration. Create the file yourself if it does not yet exist. See Configuration properties for information about the properties file.
Add these properties to the bitbucket.properties
file:
プロパティ | 説明 |
---|---|
setup.displayName=displayName | The display name for the Bitbucket application. |
setup.baseUrl= https://bitbucket.yourcompany.com
| ベース URL。 |
setup.license=AAAB... | The Bitbucket license. Use the |
setup.sysadmin.username=username | システム管理アカウントの資格情報。 |
setup.sysadmin.password=password | |
setup.sysadmin.displayName=John Doe | システム管理アカウントの表示名。 空のプロパティは無視されます。 |
setup.sysadmin.emailAddress=sysadmin@yourcompany.com | システム管理アカウントのメール アドレス。 |
jdbc.driver=org.postgresql.Driver
| JDBC 接続パラメーター。 ご利用の JDBC 接続に適切な値を使用します。 For Postgres, If no parameter is manually specified in the |
jdbc.url=jdbc:postgresql://localhost:5432/bitbucket | |
jdbc.user=bitbucket
| |
jdbc.password=bitbucket
| |
| (Smart Mirroring のみ) ミラーで、新しいミラーのミラーリング元となるプライマリ Bitbucket Data Center インスタンスのベース URL を指定します。詳細は、「ミラーのセットアップ」を参照してください。 |
You should specify the JDBC properties so that Bitbucket can connect to the external database.
If any of the following required properties are not provided in the properties file, when you start Bitbucket the Setup Wizard will launch at the appropriate screen so that you can enter values for those properties.
3. Start Bitbucket
Start Bitbucket as usual. See Start and stop Bitbucket.
Bitbucket reads the bitbucket.properties
file and applies the setup properties automatically.
When you now visit Bitbucket in the browser, you see the welcome page.
トラブルシューティング
セットアップ ウィザードがブラウザで起動する
The Setup Wizard will run if there are missing configuration properties, such as the license string, in the bitbucket.properties
file. Check the properties file and compare it with the table in Step 2 above. Alternatively, the setup can be completed using the web UI.
Write access for the config.properties
file
Once the automated setup process completes, the relevant properties in the bitbucket.properties
file are commented out. This requires that the system user has write permission on the properties file.
Bitbucket fails to start with a 'Could not acquire change log lock.' error
If Bitbucket is forced to quit while modifying the config.properties file, you may not be able to restart Bitbucket, and atlassian-bitbucket.log
contains the above error.
この解決方法については次のナレッジベース記事を参照してください: 「Bitbucket Server が起動しない - Could not acquire change log lock」