AWS Systems Manager Distributor

Automate Edge Delta deployment using AWS System Manager Distributor (SMD).

You can automate deployment of the Edge Delta Fleet to your cloud and on-premises servers using AWS System Manager Distributor (SMD). AWS SMD packages and publishes software to enable deployment across multiple instances.

Process Overview

  1. Create a Fleet configuration
  2. Create a role for Systems Manager
  3. Create an EC2 instance Configured with the Role
  4. Create a parameter for the Pipeline ID
  5. Create a systems manager document
  6. Run the systems manager command

Create a Fleet configuration

Select the Kubernetes template option while following these steps:

  1. Click Pipelines.
  2. Click New Fleet.
  3. Select Edge Fleet and click Continue.
  4. Select the appropriate template and click Continue.
  5. Specify a name to identify the Fleet.
  6. Click Generate Config.
  7. Execute the installation commands, they include the unique ID for the Fleet.
  8. Expand the namespaces and select the input sources you want to monitor.
  9. Select the Destination Outputs you want to send processed data to, such as the Edge Delta Observability Platform.
  10. Click Continue.
  11. Click View Dashboard.

Take note of the Pipeline ID.

Create a Role for Systems Manager

Open the AWS IAM console and create an Identity and Access Management role for Systems Manager that will allow it to manage your EC2 instances. It requires the AmazonEC2RoleforSSM permission. Copy the role name for the next step. You can follow the instrutions here.

  • Service: EC2
  • Permission: AmazonEC2RoleforSSM

Create an EC2 instance Configured with the Role

Open the EC2 Console and create an EC2 instance. Configure it with an IAM instance profile, specifying the role you created in the previous step. You can follow the instrutions here.

Create a Parameter for the Pipeline ID

In the AWS systems manager parameter store, create a parameter for the Edge Delta Pipeline ID that was provided when you created the Pipeline configuration:

Name: ed-api-key-for-ssm
Type: SecureString
Value: <Your Pipeline ID>

Create a Systems Manager Document

Create a Systems Manager Document that takes the ED-API-KEY from the parameter store.

{
  "schemaVersion": "2.2",
  "description": "Installs Edge Delta agent",
  "mainSteps": [
    {
      "action": "aws:runShellScript",
      "name": "install_edgedelta",
      "precondition": {
        "StringEquals": [
          "platformType",
          "Linux"
        ]
      },
      "inputs": {
        "runCommand": [
          "sudo ED_API_KEY=$(aws --region us-west-2 ssm get-parameters --names ed-api-key-for-ssm --with-decryption --query Parameters[].Value --output text) \\",
          "ED_ENV_VARS=\"ED_API_ENDPOINT=https://api-onprem.aws-staging.edgedelta.com/\" \\",
          "bash -c \"$(curl -L https://release.edgedelta.com/release/install.sh)\""
        ],
        "timeoutSeconds": "3600"
      }
    }
  ]
}

Run the Systems Manager command

Once you have created a parameter store entry and an SMD document that uses it, you run the document on your EC2 instance:

  1. Click Run Command - Run Command
  2. Click Owner - Owned by me and select the document you created.
  3. Select your EC2 instance or tags.
  4. Click Run.

You can SSH into the EC2 machine check that the Fleet service is running and creating logs.

$ cd /var/log/edgedelta
$ vi edgedelta.log