aws-codedeploy-agent: CodeDeploy agent is not supporting ruby v3.0.1
When I tried to install codedeploy agent on my server:
$ bundle install
Fetching gem metadata from http://rubygems.org/...........
Resolving dependencies...
Bundler found conflicting requirements for the Ruby version:
In Gemfile:
Ruby
aws_codedeploy_agent was resolved to 1.3.2, which depends on
Ruby (~> 2.0)
Ruby (~> 2.0), which is required by gem 'aws_codedeploy_agent', is not
available in the local ruby installation
$ ruby -v
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
We are using Rails v6 and Ruby v3.0.1.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 29
- Comments: 54 (11 by maintainers)
Commits related to this issue
- Use a component for Codedeploy Installing codedeploy on 22.04 is painful because of ruby versions. This component is lifted from here: https://github.com/aws/aws-codedeploy-agent/issues/301#issuecomm... — committed to DemocracyClub/dc_image_builder by GeoWill 2 years ago
- Use a component for Codedeploy Installing codedeploy on 22.04 is painful because of ruby versions. This component is lifted from here: https://github.com/aws/aws-codedeploy-agent/issues/301#issuecomm... — committed to DemocracyClub/dc_image_builder by GeoWill 2 years ago
- Use a component for Codedeploy Installing codedeploy on 22.04 is painful because of ruby versions. This component is lifted from here: https://github.com/aws/aws-codedeploy-agent/issues/301#issuecomm... — committed to DemocracyClub/dc_image_builder by GeoWill 2 years ago
Expanding on the answer above, here is a full script. Massive thank you to @alexekorn. This script essentially replaces all the intructions in the official documentation (Install the CodeDeploy agent for Ubuntu Server).
You should see this when installation has been successfully completed:
Working on Ubuntu 22.04 (ami-09d56f8956ab235b3) deployed on a
t3.nanoinstance in N. Virginia.I’ve verified a successful installation and deployment, using a similar process to 20.04’s required installation, where you repackage the .deb to require ruby3.0 instead of 2.x:
You will also need to install
ruby-webrickvia apt/yum/etc, since it is no longer included by default in Ruby 3.And afterward, voila:
(It sure feels like CodeDeploy is abandoned/deprecated. Or, if not, it’s been the biggest issue for our Ubuntu upgrades the last two times. Given this experience, I’ll be looking for a less janky way to deploy.)
EDITED to add information about webrick, now that I’ve verified a successful deployment.
It’s “funny” that every two years I end up in this issue tracker because the Codedeploy agent is apparently an unloved child to AWS. Release of 18.04: broken (#158), Release of 20.04: broken (#264), Release of 22.04: broken (this issue).
I really can’t wrap my head around how such a fundamental* piece of software can be such a trash fire for years when released by a multi-billion dollar company. This repo once again hasn’t seen a commit for 10 months now 😦
Sorry for all the negativity in most of my comments in this repo, but it’s really frustrating when you have to work with this every day and run into the same walls every Ubuntu release 😦
* Or am I one of the last 5 persons on earth that aren’t using containers and still rely on Codedeploy?
Thanks @moosthuizen42
For anyone who doesn’t know how to do anything like me, here’s the noob steps:
Enter the following command:
touch install-code-deploy-ubuntu22-ec2.shEnter the following command:
cat > install-code-deploy-ubuntu22-ec2.shPaste the following:
Press
ctrl + dEnter the following command:
chmod u+x install-code-deploy-ubuntu22-ec2.shEnter the following command:
./install-code-deploy-ubuntu22-ec2.shEnter the following command:
sudo service codedeploy-agent statusThe next version of the agent will support Ruby 3. We’re sorry for the delay in this support.
On Mon, Feb 20, 2023 at 4:26 PM Richard Hurt @.***> wrote:
Target is to begin shipping in early March and complete all commercial regions by mid March.
CodeDeploy cannot be installed with Systems Manager on AL2022 for the same reason. It’s a blocker.
@e200 just wanted to let you know that CodeDeploy Agent 1.6.0 is available in all commercial regions now including eu-south-2
I promise it won’t be that long. We’re spinning up tests now for 3.1 and 3.2. 1.5.1 will have that support with good regression tests going forward.
Great to see it after only 27 months for ruby 3 and 11 months for Jammy! Thanks! ❤️
That’s great news! Any thoughts on when the next version might appear? I don’t even really need any new features or bug fixes, just adding Ruby 3.x support would be enough. 😁
Just an FYI on this thread that Ruby 2.7 is end-of-life in just over 2 months: https://endoflife.date/ruby
Agent 1.4 will be out soon. The version of the agent following that will support Ruby 3. This may need a major version bump to agent 2.0 as it will not support Ruby 2. The team will also look into including our own version of isolated Ruby.
The agent is anything but abandoned. We now have a dedicated team just focused on it and host deployments.
On Sun, May 15, 2022 at 7:08 PM Alex Korn @.***> wrote:
@ring-pete Just published it. Here is a link to the release: https://github.com/aws/aws-codedeploy-agent/releases/tag/1.6.0
Confirmed. 1.5 rollout is imminent and will add support for Ruby 3.0 along with Ubuntu 22.04 LTS support. Release notes and official docs coming soon.
few weeks for ruby 3.0, few months for 3.1 and few years for 3.2 🤦
I have it on good authority that codedeploy agent version 1.5 is in QA and will be released within a few weeks.
Any status update on an official fix? June sure was a long time ago, and Ruby 2.7 is EOL in a month.
CodeDeploy should really embed its own Ruby, like Chef does.
I’m trying to use the codedeploy agent with Ubuntu 22.04, but there seems to be no way to achieve that.
The codedeploy package checks for ruby 2.x:
Dependency is not satisfiable: ruby2.0|ruby2.1|ruby2.2|ruby2.3|ruby2.4|ruby2.5|ruby2.6|ruby2.7I can’t install ruby 2.7, because it is not compatible with OpenSSL 3.0
So there is no way to use codedeploy on Ubuntu 22.04 atm, except maybe package my own codedeploy package…
as predicted, no 3.1 and 3.2 support
FYI: as mentioned in #349 1.5.0 is live. Installation instructions are linked in the announcement.
This article is apropos - https://www.lastweekinaws.com/blog/AWS-is-Asleep-at-the-Lambda-Wheel/
CodeDeploy: one of the worst products within AWS. If you need an update, they take years. Minor mod on the script above to isolate version and ease the task on upgrades:
@alexekorn Thank you so much ! I’ve been struggling with this for one day.
@mpdude that is my recent experience, yes. once installed properly works as expected.
We should look into this
On Tue, May 3, 2022 at 12:40 PM Omri Gabay @.***> wrote:
So the agent STILL doesn’t support Ruby 3?