DRAFT - Using Stash in the enterprise
このページでは...
... Stash の使用に関するベストプラクティスを紹介します。
Stash を評価される方は...
... we suggest that you begin with Getting started, instead of this page.
以下も参照して下さい...
... Bitbucket Enterprise Resources for a comparison of Stash and Stash Data Center, our clustered Stash solution.
Atlassian Stash is the Git code management solution for enterprise teams. It allows everyone in your organisation to easily collaborate on your Git repositories, while providing enterprise-grade support for:
- ユーザー認証
- リポジトリのセキュリティ
- 既存のデータベースと開発環境を統合します。
Atlassian offers two deployment options for Stash, to provide enterprise scaling and infrastructure flexibility, and to give administrators control over how Stash fits into their environment:
Stash サーバー
多くの組織では、Stash サーバーの単一インスタンスにて優れたパフォーマンスを提供します。本番環境で Stash サーバーを設定する際のベストプラクティスについては、引き続きこのページをお読みください。
Stash Data Center
For larger enterprises that require HA and greater performance at scale, Bitbucket Data Center resources uses a cluster of Stash nodes to provide Active/Active failover, and is the deployment option of choice.
後から Stash Server の単一インスタンスを Stash Data Center へ容易にアップグレードできます。
このページの内容
Stash をホストするためのプラットフォーム要件
Stash は Windows、Linux および Mac システム上で実行できますが、エンタープライズ用には Linux のみを推奨し、サポートしています。この推奨は、Stash を使用した当社独自のテストや経験に基づいています。
See the Supported platforms page for details of the supported versions of Java, external databases, web browsers and Git.
See Installing Stash Data Center for detailed information about Stash Data Center requirements.
Stash に関するパフォーマンスの考慮事項
一般的に、Stash は非常に安定性が高く、メモリ消費量が低い製品です。Git ホスト操作 (特に複製) 以外、スケーラビリティの制限はありません。当社ではこれが製品のスケーラビリティの制限であると把握しています。制限は、システムのコアの数に比例します。
例えば、内部 Stash インスタンスから収集されたデータは、およそ 50 名の開発者のチーム、関連する連続統合インフラストラクチャを示し、 30 の同時複製操作のピーク並行処理と 2の同時複製操作の手段が表示されます。同様の使用パターンを持つ顧客では、 1000 名のユーザーを 40 コア、RAM のサポート量のマシン上でサポート可能であろうと控えめに予測します。40より大きいピーク並行処理が予測されますが、Stash はサーバーの過負荷を防ぐため、受信リクエストをキューに入れるよう設計されています。
Stash Server – see Stash production server data for data from the Stash production instance we run internally at Atlassian.
Stash Data Center – see Bitbucket Data Center Performance for the results of our performance testing for clusters of different sizes.
Stash を使用した高可用性
Stash が開発ワークフローの重要な部分の場合、Stash の可用性を最大限に引き延ばすことは重要な課題項目となります。
Stash Server – see High availability for Stash for the background information you need to set up Stash Server in a highly available configuration.
Stash Data Center – see Failover for Bitbucket Data Center for information about how Stash Data Center provides HA and almost instant failover.
スケーラビリティ
Stash はエンタープライズの拡張およびインフラの柔軟性を考慮して構築されており、管理者は Stash を環境に適合させる方法の制御が可能です。
- 多くの組織では、Stash サーバーの単一インスタンスにて優れたパフォーマンスを提供します。本番環境で Stash サーバーを設定する際のベストプラクティスについては、引き続きこのページをお読みください。
- For larger enterprises that require HA and greater performance at scale, Stash Data Center uses a cluster of Stash nodes and is the deployment option of choice.
後から Stash Server の単一インスタンスを Stash Data Center へ容易にアップグレードできます。
Stash Server – see Scaling Stash for information about how you can tune your Stash server to grow with your organisation's needs. See also Scaling Stash for Continuous Integration performance for information specific to Stash performance when CI tools poll Stash for changes.
Stash Data Center – see Adding cluster nodes to Stash Data Center for information about how you can rapidly provision extra capacity without downtime.
Stash のプロビジョニング
Stash をプロビジョニングするときの考えられるアプローチ:
- Running the Stash installer in either console or unattended mode
- Docker container image for Stash (currently only supported for evaluations)
- Stash のレシピ
- Puppet/Vagrant の方法
本番環境で Stash Server を設定する
Stash を本番環境またはエンタープライズ環境でセットアップするときは、以下の項目の設定を強く推奨します:
Stash を専用ユーザーとして実行する
- For production environments Stash should be run from a dedicated user account with restricted privileges. See Running Stash with a dedicated user.
Stash をサービスとしてインストールする
外部データベースを使用する
- For production environments Stash should use an external database, rather than the embedded database. Set up your external DBMS (for example MySQL) before starting Stash for the first time. This allows you to connect Stash to that DBMS using the Setup Wizard that launches when you first run Stash. See Connecting Stash to an external database.
既存のユーザーディレクトリへ接続する
- Connect Stash to your existing user directory (for example Active Directory). See External user directories.
Stash ホームディレクトリを保護する
- For production environments the Stash home directory should be secured against unauthorised access. See Stash home directory.
Stash を HTTPS で保護する
- Access to Stash should be secured using HTTP over SSL, especially if your data is sensitive and Stash is exposed to the internet. See Securing Stash with HTTPS.
Git リポジトリへの SSH アクセスを有効にする
- Enable SSH access for your Stash users to Git repositories in Stash so that they can add their own SSH keys to Stash, and then use those SSH keys to secure Git operations between their computer and the Stash server. See Enabling SSH access to Git repositories in Stash.
Stash へのコンテキストパスを変更する
- If you are running Stash behind a proxy, or you have another Atlassian application (or any Java web application), available at the same hostname and context path as Stash, then you should set a unique context path for Stash. See Moving Stash to a different context path.
本番環境で Stash を管理する
Stash のアップグレード
- For production environments we recommend that you test the Stash upgrade on a QA server before deploying to production. See the Stash upgrade guide.
バックアップとリカバリ
- We highly recommend that you establish a data recovery plan that is aligned with your company's policies. See Data recovery and backups for information about tools and backup strategies for Stash.
ログ
- Stash server logs can be found in
. Logs for the bundled Tomcat webserver can be found in<Stash home directory>/log. See Stash debug logging.<Stash installation directory>/log - Stash displays recent audit events for each repository and project (only visible to Stash admins and system admins), and also creates full audit log files that can be found in the
<Stash home directory>/audit/logsdirectory. Note that Stash has an upper limit to the number of log files it maintains, and deletes the oldest file when a new file is created – we recommend an automated backup of log files. See Audit logging in Stash.