Upgrade Bitbucket Data Center

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

This page contains instructions for upgrading an existing Bitbucket cluster.

If you are not running Bitbucket in a cluster, follow the instructions in Bitbucket Server upgrade guide.

現在有効なソフトウェア メンテナンスがある場合、新しいバージョンへのアップグレードは無料で行えます。詳細については、「ライセンスの FAQ」を参照してください。

アップグレードを計画する

1. アップグレード パスを決定する

Check the Supported platforms page to determine if your environment meets the minimum requirements to run the latest version of Bitbucket. Also read the End of support announcements for Bitbucket Server

アップグレードにおいて必須となるパスはないため、Bitbucket Server (または Stash) の過去の任意のバージョンから最新バージョンに更新できます。

Bitbucket 6 はメジャー アップグレードです

Be sure to read the Bitbucket Server 6.0 release notes, take a full backup, and test your upgrade in a non-production environment before upgrading your production site.

Bitbucket 6 よりも古いバージョンからアップグレードすると、ユーザーがインストールしたすべてのアプリが起動時に無効化されます

Be sure to update your own apps and check the Atlassian Marketplace to ensure 3rd-party apps are compatible with Bitbucket Server 6 before upgrading.

2. アップグレード前の確認を完了する

  1. Check the Version specific upgrade notes for the version you plan to upgrade to (and any in between).

  2. Go to Administration > Support Tools, then review the Log analyzer for any issues that may need to be resolved.

  3. 利用しているアプリに、アップグレード先として計画しているバージョンとの互換性があるかどうかを確認します。

    1. Go to Administration > Manage apps > Bitbucket update check.

    2. Choose the version you plan to upgrade to then click Check.

3. Bitbucket をテスト環境でアップグレードする

  1. 現在の本番環境のステージング コピーを作成します。

  2. 以下の手順に従って、テスト環境をアップグレードします。

  3. 本番環境のアップグレード前に、すべてのサポート対象外のアプリ、カスタマイズ、およびプロキシ構成 (可能な場合) をテストします。

Upgrade Bitbucket Data Center

1. Back up your data

  1. 使用するバックアップ戦略を決定します。 

    Bitbucket で使用できるさまざまなバックアップ戦略の概要...

    Bitbucket Data Center (バージョン 4.8 以降) のインスタンスの場合、ゼロ ダウンタイム バックアップまたは DIY バックアップを使用するか、すべてのノードの停止中に共有ホーム ディレクトリ (NFS 上) とデータベースのスナップショットを作成できます。 

    詳細情報と、効果的なバックアップ戦略を作成するためのガイダンスについては、「データ リカバリとバックアップ」をご参照ください。

  2. Back up the following directories:

    • Installation directory on every node

    • Local home directory on every node

    • 共有ホーム ディレクトリ

    • External database


2. カスタマイズ設定を移行する

Bitbucket 5.0 changed where custom server configurations are kept. Previously, Tomcat container customizations were made in the server.xml file, located in either the <Bitbucket home directory>/shared directory (from 3.8 to 4.14), or in <Stash installation directory>/conf (for 3.7 and earlier). 

  1. First, determine if you've made customizations to your server.xml file. You would have made these changes if you modified the portcontext path, or the Proxying and securing Bitbucket Server, or if you are running Bitbucket Server behind a proxy and modified the Connector element.

  2. Migrate changes in the bitbucket.properties file in your existing Bitbucket home directory. The bitbucket.properites file uses a slightly different syntax, so it is not merely a copy and paste procedure.
    Read the page Migrate customizations from server.xml to bitbucket.properties and follow the instructions to migrate your customizations. 

    For custom configurations in Bitbucket Data Center...

    Bitbucket Data Center instances on version 3.8 or later, the single server.xml file in the <Bitbucket home directory>/shared directory replaces all the copies of server.xml located in the <Bitbucket installation directory>/conf directories of the cluster nodes using previous versions of Bitbucket Server (or Stash).

3. クラスタの停止

You must stop all the nodes in the cluster before upgrading. For more info, see Starting and stopping Bitbucket.

アップグレードがすべてのノードで完了するまでは、ロードバランサーの設定を Confluence からトラフィックをリダイレクトするようにしておくことをお勧めします。

4. Download Bitbucket

Download the appropriate file for your operating system - https://www.atlassian.com/software/bitbucket/download-archives.

5.1 つ目のノードをアップグレードする

1 つ目のノードをアップグレードするには:

  1. ディレクトリ(新しいインストールディレクトリ。既存のインストール ディレクトリとは異なる必要があります)にファイルを抽出(解凍)する

  2. Update the value of BITBUCKET_HOME in the <install-directory>/bin/set-bitbucket-home.sh (or set-bitbucket-home.bat on Windows) file so the new Bitbucket Server installation points to your existing Bitbucket Server home directory (if you use a BITBUCKET_HOME environment variable to specify the home directory location, no change is required).

  3. Copy the database driver from your existing Bitbucket installation directory to the new one.

  4. Copy any other immediately required customizations from the old version to the new one (for example if you are not running Bitbucket on the default ports or if you manage users externally, you'll need to update / copy the relevant files)

  5. Start Bitbucket, and confirm that everything works as expected.

If you haven’t reapplied all customization from the old version, you should do it now, so you copy them along with the whole installation directory to remaining nodes.

6. Copy Bitbucket to remaining nodes

The next step is to replicate your upgraded Bitbucket directories to other nodes in the cluster.  

  1. Stop Bitbucket on the first node.

  2. Copy the installation directory and local home directory from the first node to the next node. 
    If the path to the local home directory is different on this node, edit the /bin/set-bitbucket-home.sh (or set-bitbucket-home.bat on Windows) to point to the correct location. 

  3. Start Bitbucket, and confirm that everything works as expected.

  4. Stop Bitbucket on this node before continuing with the next node. 

残りの各ノードに対し、同様のプロセスを繰り返します。 

7. Start Bitbucket and check cluster connectivity 

Once all nodes have been upgraded you can start Bitbucket Data Center on each node, one at a time (starting up multiple nodes simultaneously can lead to serious failures).

The Cluster monitoring console (AdministrationSettings > Clustering) includes information about the active cluster nodes. When the cluster is running properly, you should be able to see the details of each node. 

Last modified on Mar 2, 2020

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.