Upgrade Bitbucket without downtime

お困りですか?

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

コミュニティに質問

To upgrade Bitbucket with no downtime, you'll need to perform a rolling upgrade. A rolling upgrade allows you to upgrade Bitbucket Data Center to a later bug fix version with no downtime. This involves upgrading nodes individually within a multi-node cluster. When you take a node offline to upgrade it, other active nodes keep your Bitbucket site available to users. This allows you to avoid downtime.

Bug fix upgrades only

Bitbucket only allows rolling upgrades for bug fix upgrades (for example, from Bitbucket 7.9.0 to 7.9.4). For platform upgrades (such as Bitbucket 7 to 8) or feature upgrades (such as 7.4 to 7.8), see Bitbucket Data Center upgrade guide instead.

Learn more about the different types of upgrades/versions    

Bitbucket Data Center features an upgrade mode that allows Bitbucket nodes with different bug fix versions to form a cluster. Upgrade mode lets you upgrade a node to a later bug fix version and then re-connect it to your cluster, letting you take another node offline to upgrade it.


このページの内容

はじめる前に

ローリング アップグレードの計画を開始する前に、いくつかの質問に答える必要があります。

Does my Bitbucket deployment support rolling upgrades?

You can only perform a rolling upgrade with no downtime on a multi-node Bitbucket cluster. Clustering is only supported on a Bitbucket Data Center license. In addition, a rolling upgrade involves enabling upgrade mode, which is only available in Bitbucket Data Center.

Learn more about multi-node clustering in Bitbucket

ローリング アップグレード中にユーザー リクエストをサポートするために十分なノードはありますか?

You need to take a node offline to upgrade it. During this time, other active nodes will take over the offline node’s workload. Make sure you have enough active nodes to handle user traffic at any given time. Whenever possible, add a node temporarily to your cluster to compensate for offline nodes.

ローリング アップグレードの準備

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

  1. アップグレード先として計画しているバージョン (およびその間のバージョン) のバージョンごとのアップグレード ノートを確認します。
  2.  > [サポート ツール] に移動し、解決が必要な問題がログ アナライザーにあるかどうかを確認します。
  3. 利用しているアプリに、アップグレード先として計画しているバージョンとの互換性があるかどうかを確認します。

    1.  > [アプリの管理] > [Bitbucket 更新の確認] に移動します。
    2. アップグレード先として計画しているバージョンを選択して [確認] を押します。

      互換性のないアプリがある場合

      If your users rely on particular apps, you may want to wait until they are compatible before upgrading Bitbucket. App vendors generally update their apps very soon after a major release.

      参考情報

      • Bitbucket Server 6 よりも古いバージョンからアップグレードすると、ユーザーがインストールしたすべてのアプリが自動的に無効になります。Bitbucket Server 6 との互換性の有無にかかわらず、アップグレードが正常に完了したらアプリを有効にする必要があります。
      • You can disable an app temporarily if it is not yet compatible. 

2.アップグレード期間中にアプリのインストールまたはアップグレードが実行されないようにします。

If you manage Bitbucket with a team of admins, schedule the rolling upgrade with them. Notify them to postpone any app installs or upgrades until after the rolling upgrade. Installing or upgrading apps during a rolling upgrade could result in unexpected errors.

3. Back up Bitbucket 

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

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

    Bitbucket Server (バージョン 4.8 以降) のインスタンスの場合、Bitbucket の実行中にゼロ ダウンタイム バックアップバックアップ クライアント (バージョン 2.7 以降)、または DIY バックアップ (バージョン 2.12 以降) を使用できます。Bitbucket を停止し、ホーム ディレクトリとデータベースを zip 圧縮して安全な場所に保存しておくこともできます。

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

    For Bitbucket mirrors, the home directory doesn't store any persistent state that can't be reconstructed from the primary Bitbucket instance, but you should still make sure you have a backup of at least the important configuration files such as SSL certificate, server.xml,  config/ssh-server-keys.pem,  bitbucket.properties file, and so on in a safe place. See  How do I back up my mirrors? for more information.


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

  2. Bitbucket ホーム ディレクトリ外部データベースのすべてのデータをバックアップします。

デプロイが AWS でホストされている場合、スナップショットを使用してサイトのバックアップを作成する、AWS のネイティブ バックアップ機能を使用することをおすすめします。詳しくは、「AWS バックアップ」を参照してください。 

4.ローリング アップグレードをテストするためのステージング環境のセットアップ

最初に、ステージングまたはテスト環境におけるローリング アップグレードの実行を強くお勧めします。 

  1. 現在の本番環境のステージング コピーを作成します。
  2. 以下の手順に従って、テスト環境をアップグレードします。
  3. 本番環境のアップグレード前に、すべてのサポート対象外のアプリ、カスタマイズ、およびプロキシ構成 (可能な場合) をテストします。

 ローリング アップグレードの実行

There are three methods for performing a rolling upgrade, depending on what orchestration tools your deployment uses:

Method説明 手順

手動アップグレード

A manual upgrade is suitable for deployments that feature minimal orchestration, particularly in node upgrades. If your deployment is based on our Azure templates, you'll also need to perform a manual upgrade.

AWS CloudFormation

If your deployment is defined by an AWS CloudFormation template (like our AWS Quick Start), then you can use the same template to orchestrate your upgrade. 

API 駆動

API コールを使用して、ローリング アップグレード プロセス全体をオーケストレーションできます。 
最終更新日 2021 年 9 月 30 日

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

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