0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

datadogのデプロイメントの追跡をversionタグで実施する

Last updated at Posted at 2023-11-15

datadogマニュアル

コンフィグレーション章の通り作業を実施
https://docs.datadoghq.com/ja/getting_started/tagging/unified_service_tagging/?tab=ecs#%E3%82%B3%E3%83%B3%E3%83%95%E3%82%A3%E3%82%AE%E3%83%A5%E3%83%AC%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3-1

完全なコンフィギュレーションで設定するが、環境変数に設定してればdocekr labelはなくても表示できた。

変更点

  • ./docker/php/www.conf
env[DD_ENV] = $DD_ENV
env[DD_SERVICE] = $DD_SERVICE
env[DD_VERSION] = $DD_VERSION
env[DD_PROFILING_ENABLED] = true
  • task difinition
    • DD_VERSIONはgithub ationsの中で設定
省略
        {
            "name": "php",
            "image": "imagename",
            "cpu": 0,
            "portMappings": [],
            "essential": true,
            "environment": [
                {
                    "name": "DD_ENV",
                    "value": "dev"
                },
                {
                    "name": "DD_SERVICE",
                    "value": "datadog-test"
                },
            ],
            "mountPoints": [],
            "volumesFrom": [],
            "secrets": [],
            "dockerLabels": {},
省略

課題

  • DD_VERSIONをデプロイの都度更新するにはどうすればいいか
    • aws-actions/amazon-ecs-render-task-definition@v1 で解決
    - name: datadog
      uses: aws-actions/amazon-ecs-render-task-definition@v1
      id: render-datadog-container
      with:
        task-definition:task-definition.json
        container-name: datadog
        image: datadog/agent:latest
        environment-variables: |
          DD_VERSION=${{ github.sha }}
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?