User-Data for GitHub Enterprise Server AMI - on AWS, not running. #58393
Unanswered
WhoMyYou
asked this question in
Enterprise
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Question
Body
Hello - Testing AMIs via AWS EC2, GitHub Enterprise images dont seem to run user-data as expected.
Tried this on a few different versions, but primary one we are utilize:
GitHub Enterprise Server 3.7.4
ami-0e5f663a9f33d284e
us-east-1
Image is Debian based - when attempting to attach user-data to an instance from the AMI to install the AWS-SSM-Agent [1], seems to fail on each run (by fail - it doesnt seem to run).
Cloud-Init-Output-workingDEB.txt
A few example user-data scripts: (ive also tried running it on 'each start' of the VM - no luck)
#!/bin/bash
apt-get update
apt-get install -y gpg wget
Import the Amazon SSM Agent GPG key
wget https://s3.amazonaws.com/amazon-ssm-us-east-1/latest/debian_arm64/amazon-ssm-agent.deb.sig
wget https://s3.amazonaws.com/amazon-ssm-us-east-1/latest/debian_arm64/amazon-ssm-agent.deb
gpg --import amazon-ssm-agent.deb.sig
Verify the authenticity of the package
gpg --verify amazon-ssm-agent.deb.sig amazon-ssm-agent.deb
Install the Amazon SSM Agent
dpkg -i amazon-ssm-agent.deb
apt-get install -f -y
Start the Amazon SSM Agent
systemctl enable amazon-ssm-agent
systemctl start amazon-ssm-agent
.#!/bin/bash
.# Install the required packages
apt-get update
apt-get install -y gpg wget
.# Import the Amazon SSM Agent GPG key
wget https://s3.amazonaws.com/amazon-ssm-us-east-1/latest/debian_amd64/amazon-ssm-agent.deb.sig
wget https://s3.amazonaws.com/amazon-ssm-us-east-1/latest/debian_amd64/amazon-ssm-agent.deb
gpg --import amazon-ssm-agent.deb.sig
.# Verify the authenticity of the package
gpg --verify amazon-ssm-agent.deb.sig amazon-ssm-agent.deb
.# Install the Amazon SSM Agent
dpkg -i amazon-ssm-agent.deb
apt-get install -f -y
.# Configure the Amazon SSM Agent
echo "server_endpoint: https://ssm.us-east-1.amazonaws.com/" >> /etc/amazon/ssm/amazon-ssm-agent.json
echo "region: us-east-1" >> /etc/amazon/ssm/amazon-ssm-agent.json
.# Start the Amazon SSM Agent
systemctl enable amazon-ssm-agent
systemctl start amazon-ssm-agent
Running any variation on the above on any Debian based image - shows success installing/setting up the AWS SSM Agent, but on each run of any GH Enterprise image - we do not see the agent install or present whatsoever.
Viewing Cloud-init logs, I can see a similar set up for both Debian and GH images, but we see no signs of the user data running.
I have an example output of GH cloud-init logs vs the Debian, but am not entirely sure why the GH image isnt executing as it should.
Would anyone have any insight on this? I went through the GH documentation for Enterprise Linux images, but not too much info is present.
[1]https://docs.aws.amazon.com/systems-manager/latest/userguide/agent-install-deb.html
cloud-init-GH.txt
cloud-init-output-GH.txt
Cloud-Init-Output-workingDEB.txt
Beta Was this translation helpful? Give feedback.
All reactions