Skip to content

Commit

Permalink
Support AMI Pipelines (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethAmazon authored Feb 24, 2022
1 parent eb79017 commit 5c78993
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 36 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/integrationTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,47 +81,47 @@ jobs:
arrays: [
{ os: "ubuntu", package: "package-deb", username: "ubuntu",
installAgentCommand: "dpkg -i -E ./amazon-cloudwatch-agent.deb",
ami: "cloudwatch-agent-integration-test-ubuntu", caCertPath: "/etc/ssl/certs/ca-certificates.crt",
ami: "cloudwatch-agent-integration-test-ubuntu*", caCertPath: "/etc/ssl/certs/ca-certificates.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.deb" },
{ os: "al2", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-al2", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-al2*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" },
{ os: "rhel8", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-rhel8", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-rhel8-base*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" },
{ os: "rhel8-1", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-rhel8-1", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-rhel8-1*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" },
{ os: "rhel8-2", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-rhel8-2", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-rhel8-2*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" },
{ os: "rhel8-3", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-rhel8-3", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-rhel8-3*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" },
{ os: "rhel8-4", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-rhel8-4", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-rhel8-4*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" },
{ os: "ol8-1", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-ol8-1", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-ol8-1*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" },
{ os: "ol8-2", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-ol8-2", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-ol8-2*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" },
{ os: "o8-3", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-ol8-3", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-ol8-3*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" },
{ os: "ol8-4", package: "package-rpm", username: "ec2-user",
installAgentCommand: "rpm -U ./amazon-cloudwatch-agent.rpm",
ami: "cloudwatch-agent-integration-test-ol8-4", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
ami: "cloudwatch-agent-integration-test-ol8-4*", caCertPath: "/etc/ssl/certs/ca-bundle.crt",
arc: "amd64", binaryName: "amazon-cloudwatch-agent.rpm" }
]
steps:
Expand Down
5 changes: 2 additions & 3 deletions integration/terraform/ec2/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ Instance assumptions
4. openssl
5. git
6. make
7. rpm-build (on centos8 based os -rhel8 ol8-)
8. aws-cli
9. CloudWatchAgentServerRole is attached
7. aws-cli
8. CloudWatchAgentServerRole is attached
22 changes: 0 additions & 22 deletions integration/terraform/ec2/linux/centOS8-setup.sh

This file was deleted.

4 changes: 4 additions & 0 deletions integration/test/sanity/resources/verifyLinuxCtlScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ assertStatus() {

# init
step=0
aoc_user=$(cat /etc/passwd | grep aoc)
if [ "${aoc_user}" = "" ]; then
echo 'aoc:x:995:991:AOC Agent:/home/aoc:/sbin/nologin' | sudo tee -a /etc/passwd
fi
/usr/bin/amazon-cloudwatch-agent-ctl -a remove-config -c all -o all
/usr/bin/amazon-cloudwatch-agent-ctl -a stop

Expand Down

0 comments on commit 5c78993

Please sign in to comment.