AWS Systems Manager Distributor
3 minute read
You can automate deployment of the Edge Delta agent 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
- Create an agent configuration
- Create a role for Systems Manager
- Create an EC2 instance Configured with the Role
- Create a parameter for the API key
- Create a systems manager document
- Run the systems manager command
Create an agent configuration
Select the Kubernetes template option while following these steps:
- In the Edge Delta App, click Data Pipeline, and then click Agent Configs.
- Click Create Configuration.
- Select the appropriate template.
- Specify a tag to identify the agent and environment.
- Click Create Configuration.
- Optionally, modify and test the agent configuration then click Save Edits or Done.
The agent table is updated with a new agent configuration with the agent tag you specified.
Take note of the agent API key.
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 API key
In the AWS systems manager parameter store, create a parameter for the Edge Delta API key that was provided when you created the agent configuration:
Name: ed-api-key-for-ssm
Type: SecureString
Value: <Your agent API key>
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 Edgedelta 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:
- Click Run Command - Run Command
- Click Owner - Owned by me and select the document you created.
- Select your EC2 instance or tags.
- Click Run.
You can SSH into the EC2 machine check that the agent service is running and creating logs.
$ cd /var/log/edgedelta
$ vi edgedelta.log