Bitbucket Server の自動セットアップ
このページでは Bitbucket Server のセットアップ ウィザードを、ブラウザで手動操作を行うことなく、自動的に完了する方法について説明します。Bitbucket Server を手動でセットアップするときにセットアップ ウィザードが支援するタスクの概要については、「利用を開始する」を参照してください。
たとえば、Bitbucket Data Center のプロビジョニングを自動化するときにこれを構成できます。この場合、Puppet や Vagrant などのプロビジョニング ツールは自身で設定する必要があります。
Bitbucket Server のプロビジョニングの「インストールおよび起動」フェーズも自動化できます。コンソールおよび無人モードでインストーラーを実行する方法については、「Bitbucket Server インストーラーを実行する」を参照してください。
1. Bitbucket Server のライセンスを取得する
新しい Bitbucket Server ライセンスは、次のいずれかの方法で取得できます。
- My.Atlassian.com アカウントにログインする。
- Bitbucket Data Center ライセンスが必要な場合はアトラシアンに問い合わせる。
Bitbucket Server のライセンスを取得済みのインスタンスがすでにある場合、Bitbucket Server の管理領域でライセンスを確認できます。
2. 構成プロパティを設定する
After installing Bitbucket Server, but before you start Bitbucket Server 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 Bitbucket Server config properties for information about the properties file.
Add these properties to the bitbucket.properties
file:
プロパティ | 説明 |
---|---|
setup.displayName=displayName | Bitbucket Server アプリケーションの表示名。 |
setup.baseUrl= https://bitbucket.yourcompany.com
| ベース URL。 |
setup.license=AAAB... | Bitbucket Server ライセンス。 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 を指定します。詳細は、「ミラーのセットアップ」を参照してください。 |
Bitbucket Server が外部データベースに接続できるよう、JDBC プロパティを指定する必要があります。
プロパティ ファイルで次の必須プロパティのいずれかが提供されていない場合、Bitbucket Server を起動するとセットアップ ウィザードが対象の画面で起動され、それらのプロパティの名前を入力できます。
3. Bitbucket Server を開始する
Bitbucket Server を通常どおり開始します。「Bitbucket Server の起動および停止」をご参照ください。
Bitbucket Server reads the bitbucket.properties
file and applies the setup properties automatically.
ブラウザで Bitbucket Server を開くと、ウェルカム ページが表示されます。
トラブルシューティング
セットアップ ウィザードがブラウザで起動する
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 with the table in Step 2 above. Alternatively, the set up 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 Server の起動に失敗し、"Could not acquire change log lock." エラーが表示される
If Bitbucket Server is forced to quit while modifying the config.properties file, you may not be able to restart Bitbucket Server, and atlassian-bitbucket.log
contains the above error.
この解決方法については次のナレッジベース記事を参照してください: 「Bitbucket Server が起動しない - Could not acquire change log lock」