Closed17

AWS Fargate環境下にSysdigを導入したい

たかくにたかくに

Serverless Agentの構成要素について

たかくにたかくに

Serverless Agentはさらに2つのエージェントを指していることがわかった。
https://docs.sysdig.com/en/docs/installation/serverless-agents/aws-fargate-serverless-agents/

  • The Sysdig serverless orchestrator agent
    • 各VPCに設置された収集ポイント
    • ワークロードエージェントからデータを収集しSysdigに転送
    • ランタイムポリシーとルールをSysdigバックエンドからワークロードエージェントへ同期
  • The Sysdig serverless workload agent
    • 各タスクにインストール
    • オーケストレーターエージェントと通信するためのエージェント

※図のLambdaはSysdig Agentのパッチ適用

たかくにたかくに

Serverless Agentの前提条件

たかくにたかくに

ドキュメントは以下の通り

On AWS Side
A custom Terraform/CloudFormation template containing the Fargate task definitions that you want to instrument through the Sysdig Serverless Agent
Two VPC subnets in different availability zones that can connect with the internet via a NAT gateway or an internet gateway

たかくにたかくに

On Sysdig Side
Sysdig Secure up and running
The endpoint of the Sysdig Collector for your region
From the Sysdig Secure UI, retrieve the following:
Access Key to install the agent and push the data to the Sysdig platform
Secure API Token to configure the Sysdig provider.

たかくにたかくに

デプロイ

たかくにたかくに

Sysdig recommends using the Terraform deployment method to instrument your Fargate workloads.

たかくにたかくに

VPCにデプロイ

agent.tf
module "fargate-orchestrator-agent" {
  source  = "sysdiglabs/fargate-orchestrator-agent/aws"
  version = "0.1.1"

  vpc_id           = var.vpc_id
  subnets          = [var.subnet_a_id, var.subnet_b_id]

  access_key       = var.access_key

  collector_host   = var.collector_host
  collector_port   = var.collector_port

  name             = "sysdig-orchestrator"
  agent_image      = "quay.io/sysdig/orchestrator-agent:latest"

  # True if the VPC uses an InternetGateway, false otherwise
  assign_public_ip = true

  tags = {
    description    = "Sysdig Serverless Agent Orchestrator"
  }
}
たかくにたかくに
orchestrator_agent.tf
data "aws_vpc" "default" {
  filter {
    name = "is-default"
    values = [ "true" ]
  }
}

data "aws_subnet" "default_a" {
  vpc_id = data.aws_vpc.default.id
  availability_zone = "${data.aws_region.current.name}a"
}

data "aws_subnet" "default_c" {
  vpc_id = data.aws_vpc.default.id
  availability_zone = "${data.aws_region.current.name}c"
}

module "fargate-orchestrator-agent" {
  source  = "sysdiglabs/fargate-orchestrator-agent/aws"
  version = "0.2.0"

  vpc_id           = data.aws_vpc.default.id
  subnets          = [data.aws_subnet.default_a.id, data.aws_subnet.default_c.id]

  access_key       = var.sysdig_access_key # Sysdig access key

  collector_host   = "collector.sysdigcloud.com" # Sysdig collector host (default:"collector.sysdigcloud.com")
  collector_port   = "6443" # Sysdig collector port (default:"6443")

  name             = "sysdig-orchestrator" # Identifier for module resources
  agent_image      = "quay.io/sysdig/orchestrator-agent:latest" # Orchestrator agent image

  # True if the VPC uses an InternetGateway, false otherwise
  assign_public_ip = true # Provisions a public IP for the service. Required when using an Internet Gateway for egress.

  tags = {
    description    = "Sysdig Serverless Agent Orchestrator"
  }
}
このスクラップは2022/11/02にクローズされました