Skip to content

CodeDeploy Agent install fails on Ubuntu 20.10 (and likely others) #277

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
shabino opened this issue Feb 1, 2021 · 16 comments · Fixed by #283
Closed

CodeDeploy Agent install fails on Ubuntu 20.10 (and likely others) #277

shabino opened this issue Feb 1, 2021 · 16 comments · Fixed by #283
Labels

Comments

@shabino
Copy link

shabino commented Feb 1, 2021

In the deb package, DEBIAN/conffiles contains the line:

etc/codedeploy-agent/conf/codedeployagent.yml

Note that this is a relative path.

It seems that new versions of dpkg require absolute paths for specified conf files:

https://www.mail-archive.com/debian-dpkg-cvs@lists.debian.org/msg07446.html

Error I received:

Preparing to unpack .../codedeploy-agent_1.3.1-1880_all.deb ...
dpkg: error processing archive ./codedeploy-agent_1.3.1-1880_all.deb (--install):
conffile name 'etc/codedeploy-agent/conf/codedeployagent.yml' is not an absolute pathname

Workaround:

Extract the package, add a leading forward slash in DEBIAN/conffiles, repackage, and manually install.

wget https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/releases/codedeploy-agent_1.3.1-1880_all.deb
mkdir extracted
dpkg-deb -R codedeploy-agent_1.3.1-1880_all.deb ./extracted
<edit DEBIAN/conffiles to add the forward slash>
dpkg-deb -b extracted fixed.deb
sudo /usr/bin/gdebi -n -o Dpkg::Options::=--force-confdef -o Dkpg::Options::=--force-confold ./fixed.deb
@philstrong
Copy link
Contributor

yikes, this isn't good. Adding to this week's grooming. Targeting next release of the agent.

@chrisdibble
Copy link
Contributor

chrisdibble commented Mar 11, 2021

@shabino are you attempting to install the latest version of codedeploy-agent using the offical steps at https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html? There is a specific workaround listed for 20.04. I was not able to reproduce this on 20.04 using the official installation steps.

Disregard: was able to reproduce on 20.10.

@rromanchuk
Copy link

Screen Shot 2021-05-12 at 11 12 08 PM

Btw, this documentation is brutallllllllllll. After a few hours i got here when I finally sudo tail -fn500 /var/log/amazon/ssm/amazon-ssm-agent.log

For the lazy and tired

sudo apt install gdebi -y
wget https://aws-codedeploy-us-east-1.s3.us-east-1.amazonaws.com/releases/codedeploy-agent_1.3.1-1880_all.deb
mkdir extracted
dpkg-deb -R codedeploy-agent_1.3.1-1880_all.deb ./extracted
echo "/etc/codedeploy-agent/conf/codedeployagent.yml" > extracted/DEBIAN/conffiles
dpkg-deb -b extracted fixed.deb
sudo /usr/bin/gdebi -n -o Dpkg::Options::=--force-confdef -o Dkpg::Options::=--force-confold ./fixed.deb

@rromanchuk
Copy link

My failure was related to arch, but the manual method above seemed to work.

"documentStatus": "Failed",
  "documentTraceOutput": "",
  "runtimeStatus": {
    "configurePackage": {
      "status": "Failed",
      "code": 1,
      "name": "aws:configurePackage",
      "output": "\n----------ERROR-------\nfailed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64\nfailed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64\nfailed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64\nfailed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64\n",
      "startDateTime": "2021-05-13T06:04:32.801Z",
      "endDateTime": "2021-05-13T06:04:39.885Z",
      "outputS3BucketName": "",
      "outputS3KeyPrefix": "",
      "stepName": "",
      "standardOutput": "",
      "standardError": "failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64\nfailed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64\nfailed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64\nfailed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64\n"
    },

@philstrong
Copy link
Contributor

philstrong commented May 13, 2021 via email

@rromanchuk
Copy link

failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64

Running AWS-ConfigureAWSPackage with AWSCodeDeployAgent

Code deploy agent is already installed and running, not sure why state manager is failing, i'm not specifying a version or anything.

I'm not running that exotic of environment. Is there some technical reason why aws software is the only publisher i cant install with apt? I need to be able to deploy your software faster than it takes to deploy my own, thats gotta be the base case here.

@rromanchuk
Copy link

I'd love to contribute to this project, but really de-motivated by current pinned ruby version which i'm sure is a cross platform arch limitation.

I'm already running in a ruby env, so really easy for me to fork, bump, and just test on staging in my bundler environment

@philstrong
Copy link
Contributor

philstrong commented Sep 1, 2021 via email

@rromanchuk
Copy link

@philstrong It's more of a problem i have with SSM. I moved from ansible over ssh to ansible over SSM, and the most fragile part of provisioning is always always aws related software (CLI tools, CodeDeploy, SSM agent itself (now at least supports snap, CloudWatch, X-ray, etc) because it requires me to handcraft bash scripts. These documents are used to provision instances during scaling events, from any previous created AMI

i didn't even realize this project ruby until after i posted earlier. looked at the actual install docs for ubuntu and realized its just setting up the ruby env, which i can support/manage form source very quickly, without needing the runtime form apt packages, which ironically, is the one thing i do not let apt manage for me.

It's probably pinned because thats the easiest way to get running (bundler, rubygems, ruby runtime) as they are the latest published from apt. I just assumed the binaries were some compiled java/c/typed, didn't realize they were just #!/usr/bin/env ruby executables

Anyways, i'm going to migrate/fix any deprecations/warnings, fix any broken param passing, then ship it within my own binstubs for testing. Doesn't solve the distribution problem, but at least i can send a PR with the chores/busy work done, and give it some solid testing in production environments.

@rromanchuk
Copy link

ps. i deploy our rails app with CodeDeploy, i love it. I couldn't find any examples in the wild back when i made the migration, so maybe i could share my deploy for others. No bastion hosts, no ssh, tear down/launch at will and will be put into service when it's ready to start takings requests. Goodbye capistrano!

@its4net
Copy link

its4net commented Sep 1, 2021

Attempting to install Code Deploy agent 1.3.2 using SSM and still getting the error.
failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64

Appears that this was not fixed in the 1.3.2 release.

@its4net
Copy link

its4net commented Sep 1, 2021

I was able to successfully install using the docs at https://docs.aws.amazon.com/codedeploy/latest/userguide/codedeploy-agent-operations-install-ubuntu.html, however it would be better to be able to use SSM to do the install. Especially since using SSM is the recommended way to install.

@DaveTSG
Copy link

DaveTSG commented Sep 11, 2021

Yep, also not working on a Raspberry Pi 4 running Ubuntu 20.04 Server LTS. Steps at the link its4net provided work perfectly, though.

When I tried to install it through SSM, the stderr.txt saved to S3 contents were as follows:

failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64
failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64
failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64
failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64

@venkivijay
Copy link

Facing the same when installing AWSCodeDeployAgent using SSM AWS-ConfigureAWSPackage on Graviton instances.
failed to find platform: no manifest found for platform: ubuntu, version 22.04, architecture arm64

@anthonybouton
Copy link

Yep, also not working on a Raspberry Pi 4 running Ubuntu 20.04 Server LTS. Steps at the link its4net provided work perfectly, though.

When I tried to install it through SSM, the stderr.txt saved to S3 contents were as follows:

failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64 failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64 failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64 failed to find platform: no manifest found for platform: ubuntu, version 20.04, architecture arm64

Not sure if my reply is of any added value, but having the exact same issue

@jacobhjkim
Copy link

I'm also facing the same issue installing CodeDeploy Agent on arm64 ec2 instances.

failed to find platform: no manifest found for platform: ubuntu, version 22.04, architecture arm64
failed to find platform: no manifest found for platform: ubuntu, version 22.04, architecture arm64
failed to find platform: no manifest found for platform: ubuntu, version 22.04, architecture arm64
failed to find platform: no manifest found for platform: ubuntu, version 22.04, architecture arm64

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants