8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ElasticBeanstalk with Docker でのmackerel-agentのauto-retirement

Last updated at Posted at 2016-04-13

TL;DR

  • auto-retirmentの設定が有効になるbase platform は 64bit Amazon Linux 2015.09 v2.0.8 running Multi-container Docker 1.9.1 (Generic)
  • instance terminate時に mackerel-agentのdocker processに対して終了シグナルが投げられるようになった
  • ここであげた問題点が解決された
  • mackerel-agentのversionは 0.30.0
  • docker imageのtag 0.30.0-2
eb_base_platform.jpg

Dockerrun.aws.json

Dockerrun.aws.json
{
  "AWSEBDockerrunVersion": 2,
  "containerDefinitions": [
~~snip~~
    {
      "name": "mackerel-agent",
      "image": "mackerel/mackerel-agent",
      "memory": 512,
      "links": [
        "app-server",
        "nginx-proxy"
      ],
      "essential": true,
      "environment": [
        {"name": "apikey",  "value": "API_KEY"},
        {"name": "include", "value": "/etc/mackerel-agent/conf.d/*"},
        {"name": "auto_retirement",  "value": "true"},
        {"name": "enable_docker_plugin",  "value": "true"}
      ],
~snip~
    }
  ],
~snip~

}
  • docker-plugin は environmentで設定できるようになったので追加
version auto-retirment run
64bit Amazon Linux 2016.03 v2.1.0 running Multi-container Docker 1.9.1 (Generic) ? x
64bit Amazon Linux 2015.09 v2.0.8 running Multi-container Docker 1.9.1 (Generic) o o
64bit Amazon Linux 2015.03 v1.4.6 running Multi-container Docker 1.6.2 (Generic) x o
64bit Amazon Linux 2015.03 v1.4.1 running Multi-container Docker 1.6.0 (Generic) x o
64bit Amazon Linux 2015.03 v1.4.0 running Multi-container Docker 1.6.0 (Generic) x o

注意

  • 最新のbase platformである 64bit Amazon Linux 2016.03 v2.1.0 running Multi-container Docker 1.9.1 (Generic) は mackerel-agentが起動できない
    • /startup.sh: line 23: 8 Trace/breakpoint trap /usr/local/bin/mackerel-agent $opts というログを吐いて死んでいる

追記 (2016/06/28)

  • 64bit Amazon Linux 2016.03 v2.1.3 running Multi-container Docker 1.11.1 (Generic)mackerel-agent:0.31.2 の組み合わせは起動できるようになった (以下の対応によるもの)
    • server側のdocker が1.11.1になったこと
    • mackerel-agentがAmazonLinux2016.03対応済みのものになったこと
version auto-retirment run mackerel-agent
64bit Amazon Linux 2016.03 v2.1.3 running Multi-container Docker 1.11.1 (Generic) o o 0.31.2 (centos:7, docker1.11.2)
8
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?