すべてのバージョン
Bamboo 5.13Bamboo 5.7.x
Bamboo 5.6.x
More...
Why should I use Amazon EBS with Elastic Bamboo?
Elastic agents are effectively stateless. This means that any externally-retrieved resources such as Maven artifacts, cached application servers, etc, will be downloaded again each time an elastic agent is started. The elastic agent will also perform a full checkout the first time a plan is built on the agent. If your builds have external dependencies and/or you are not performing clean builds each time, you may find that Amazon EBS will significantly improve your build times.
Additionally, EBS can be used as an easy mechanism for customising elastic agents, rather than changing the configuration of the elastic images (see Creating a Custom Elastic Image) that the agents are started from. For example, you could upload files and scripts to your EBS volume that would install PostgreSQL databases on elastic agents when are started from the related elastic instance.
On this page:
To create your first EBS snapshot,
createInitialVolume.sh <ボリュームのサイズ> を実行します。このスクリプトでは、EBS ボリューム (<ボリュームのサイズ> はそのボリュームの大きさ) を作成し、ボリュームをアタッチして、エラスティック インスタンスにマウントします。たとえば、createInitialVolume.sh 100 の場合は、100GB EBS ボリュームを作成し、それをエラスティック インスタンスに添付してマウントします。rewarmEbsSnapshot.sh — This script sets up the standard structure for Elastic Bamboo on the EBS volume. The directories and files for this standard volume structure are detailed in the Important EBS Directories and Files section below./mnt/bamboo-ebs folder or its subfolders, if you want them to be included in the snapshot. We recommend that you read Populating your EBS volume for guidelines on how to populate your EBS volume effectively.chown -R bamboo:bamboo <ファイル名> を実行すると、ファイルの所有者を設定できます。killall java コマンドを実行します。このコマンドでは、エージェント プロセスなど、インスタンス上のすべてのプロセスを強制終了するため、ボリュームをアンマウントしてスナップショットを作成できます。generateSnapshot.sh — This script unmounts and detaches the volume, before creating a snapshot based on the volume. The time taken to create the snapshot will vary depending on the amount of content that you have uploaded to the EBS volume. The Snapshot ID for the snapshot will be available in the logs for the elastic instance. See Accessing an Elastic Instance for instructions on how to access the logs for your elastic instance.Congratulations! You have created your first EBS snapshot!
EBS スナップショットの設定が終了したら、最後のステップは、スナップショットの詳細をエラスティック イメージ設定に追加することです。これにより、そのイメージから起動されるすべてのインスタンスに EBS ボリュームがアタッチされます。さまざまなスナップショットを別々のエラスティック イメージ設定に関連付けることができます。
To configure Elastic Bamboo to use an EBS snapshot,
現在 Elastic Bamboo で EBS を使用していて、スナップショットの更新が必要になった場合は、次の手順に従ってください。この手順は、新しい EBS スナップショットを作成する手順に似ています。
To update your EBS snapshot,
/mnt/bamboo-ebs folder or its subfolders, if you want them to be included in the snapshot.killall java を実行します。このコマンドでは、すべてのエージェント プロセスを強制終了し、マウントされたボリュームを使用していない状態にします。jps -vl を実行します。このコマンドでは、インスタンスで実行されているすべての Java プロセスのリストを表示します。実行中の Java プロセスは存在しないはずです。generateSnapshot.sh — This script unmounts and detaches the volume, before creating a snapshot based on the volume.慣例により、Bamboo では EBS デバイスは /dev/sdh でアタッチされます。これは /mnt/bamboo-ebs にマウントされます。標準構造のコンテンツは次のとおりです。
bin/customiseInstance.sh - This script is run on startup of an elastic instance. We recommend that you do not customise this script, as it is overwritten when rewarmEbsSnapshot.sh is run.bin/customise-extras.sh - This script is run on startup of an elastic instance as the root (as opposed to being run as the Bamboo user). This script is safe to customise, as it will never be overwritten. You can customise this script to automate processes such as setting up your database, move files to custom locations on the instance, etc.profile-extras.sh - このスクリプトは、(ルートとして実行されるのではなく) Bamboo ユーザーで実行されるプロファイルに追加されます。これは環境変数を設定するのに便利です。bamboo-agent/bamboo-agent.cfg.xml - この設定ファイルでは、ビルド作業ディレクトリを EBS ボリューム上のビルド作業ディレクトリを指すように変更します。bamboo-agent/build-dir - これはビルド作業ディレクトリです。maven/build.properties - このプロパティ ファイルは、エラスティック インスタンスの起動時に /home/bamboo にコピーされます。Maven 1 の既定のリポジトリは /mnt/bamboo-ebs/maven/.maven を指します。maven/settings.xml - この設定ファイルは、エラスティック インスタンスの起動時に /home/bamboo/.m2 にコピーされます。Maven 2 の既定のリポジトリは /mnt/bamboo-ebs/maven/.m2/repository を指します。tmp-extras - このディレクトリのコンテンツは、エラスティック インスタンスの起動時に /tmp にコピーされます。