How to enable Agent dependency caching in Bamboo Data Center
プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。
このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。
*Fisheye および Crucible は除く
要約
This article explains how to configure your reverse proxy to cache content for your Bamboo Agents, enhancing performance and reducing the load on your Bamboo server.
環境
- Bamboo Data Center
- Bamboo Agents (Remote, Ephemeral)
- Reverse Proxy or Load Balancer with content caching
診断
Bamboo Data Center supports proxy functionality for caching Agent dependencies. This feature can reduce Agents' startup time by enabling content caching on your reverse proxy. Once you activate this on the proxy side, Bamboo will confirm the change by displaying information in the agent log file.
You'll see the following INFO
message in the <BAMBOO_AGENT_HOME>/atlassian-bamboo-agent.log file when content caching is enabled:
INFO [WrapperSimpleAppMain] [ClasspathBuilder] Content caching is enabled for high performance bootstrap.
In case content caching is disabled, you'll see the following WARN
message:
WARN [WrapperSimpleAppMain] [ClasspathBuilder] Content caching is not enabled. This can cause performance impact on servers with high-tier licenses.
The dependencies being discussed are the JAR files that the Agent must download from the server during startup. To speed up the Agent's startup time, it’s possible to cache plugin information at the proxy level. This means you won’t need to make any changes on the Bamboo side; all adjustments will be made at the reverse proxy level. Importantly, you don’t need to specify which items should be cached; Bamboo will handle that for you once content caching is enabled.
This should work with most reverse proxies that support content caching. In this article, you'll find instructions to enable agent dependency caching specifically for Apache HTTP Server and NGINX.
ソリューション
Testing Agent dependency caching
The following cURL command will help you test whether caching is successful even before starting up an agent. You don't need to have an agent installed for the purpose of this test.
$ curl -I --http1.1 http://<BAMBOO_BASE_URL>/agentServer/bootstrap/content-cache-test
You should see X-Cache-Status HIT. Similar to the following:
HTTP/1.1 200
Server: nginx
Date: Wed, 18 Dec 2024 06:35:18 GMT
Content-Type: text/plain;charset=UTF-8
Content-Length: 5002
Connection: keep-alive
Strict-Transport-Security: max-age=31536000
Referrer-Policy: no-referrer-when-downgrade
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-Seraph-LoginReason: AUTHENTICATED_FAILED
Last-Modified: Wed, 18 Dec 2024 06:25:22 GMT
Cache-Control: public, max-age=30
X-Cache-Status: HIT
This means the entity was fresh, and was served from cache. If you see MISS then the entity was fetched from the upstream server and was not served from cache.