Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Ruby 2.0 is unmaintained - also cannot install on Ubuntu LTS #61

Closed
mhart opened this issue May 3, 2016 · 46 comments
Closed

Ruby 2.0 is unmaintained - also cannot install on Ubuntu LTS #61

mhart opened this issue May 3, 2016 · 46 comments
Assignees

Comments

@mhart
Copy link

mhart commented May 3, 2016

The specific requirement for "ruby2.0" means that CodeDeploy cannot be installed on Ubuntu 16.04 LTS.

Considering that maintenance for Ruby 2.0 ended in February 2016, CodeDeploy is now relying on an unmaintained version. It was advised well over a year ago to move all Ruby 2.0 projects to a newer version.

This also means that the CodeDeploy install instructions no longer work for Ubuntu as they say they should.

How should users who are on Ubuntu LTS install the CodeDeploy agent?

Is CodeDeploy still going to be maintained going forward? (Ruby 2.0 is over three years old now!)

@mhart
Copy link
Author

mhart commented May 3, 2016

Btw, I've tried manually compiling Ruby 2.0, using rvm, all to no avail – the CodeDeploy agent install script insists on a "ruby2.0" package being available and will not accept the manually installed version

@Raniz85
Copy link

Raniz85 commented May 11, 2016

You can work around this by installing Ruby 2.0 from the Brightbox Ruby NG PPA

Right now they don't have a PPA for 16.04 so you'll have to add the PPA for 15.10 but that ruby package currently installs without issue on 16.04.

sudo mkdir -p /etc/apt/sources.list.d
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
cat <<EOF | sudo tee /etc/apt/sources.list.d/brightbox-ubuntu-ruby-ng-wily.list
deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu wily main
EOF
sudo apt-get update
sudo apt-get install ruby2.0
ubuntu@ip-10-0-100-238:~$ uname -a
Linux ip-10-0-100-238 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ip-10-0-100-238:~$ cat /etc/issue
Ubuntu 16.04 LTS \n \l

ubuntu@ip-10-0-100-238:~$ sudo mkdir -p /etc/apt/sources.list.d
ubuntu@ip-10-0-100-238:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6
Executing: /tmp/tmp.JcqFJKRTKy/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv-keys
C3173AA6
gpg: requesting key C3173AA6 from hkp server keyserver.ubuntu.com
gpg: key C3173AA6: public key "Launchpad PPA for Brightbox" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
ubuntu@ip-10-0-100-238:~$ cat <<EOF | sudo tee /etc/apt/sources.list.d/brightbox-ubuntu-ruby-ng-wily.list
> deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu wily main
> EOF
deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu wily main
ubuntu@ip-10-0-100-238:~$ sudo apt-get update
Hit:1 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease [94.5 kB]
Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease                                                                    
Hit:4 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease                                                      
Get:5 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu wily InRelease [15.4 kB]                   
Get:6 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu wily/main amd64 Packages [3,764 B]
Get:7 http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu wily/main Translation-en [1,764 B]
Fetched 115 kB in 0s (304 kB/s)  
Reading package lists... Done
ubuntu@ip-10-0-100-238:~$ sudo apt-get install ruby2.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libruby2.0
The following NEW packages will be installed:
  libruby2.0 ruby2.0
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/2,882 kB of archives.
After this operation, 13.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package ruby2.0.
(Reading database ... 53602 files and directories currently installed.)
Preparing to unpack .../ruby2.0_2.0.0.648-2bbox1~wily2_amd64.deb ...
Unpacking ruby2.0 (2.0.0.648-2bbox1~wily2) ...
Selecting previously unselected package libruby2.0:amd64.
Preparing to unpack .../libruby2.0_2.0.0.648-2bbox1~wily2_amd64.deb ...
Unpacking libruby2.0:amd64 (2.0.0.648-2bbox1~wily2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libruby2.0:amd64 (2.0.0.648-2bbox1~wily2) ...
Setting up ruby2.0 (2.0.0.648-2bbox1~wily2) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
ubuntu@ip-10-0-100-238:~$ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux-gnu]

@mhart
Copy link
Author

mhart commented May 11, 2016

@Raniz85 great, thanks for the instructions on how to do this – these should definitely be added to the official documentation

I was using brightbox earlier on 15.10, but had issues adding the repo on 16.04 – glad it works by adding it manually

In any case, if AWS have any investment in CodeDeploy going forward they should definitely move off ruby2.0. I'd really like to see an official comment on this.

@pdalinis
Copy link

👍 we really need an update to this.

@vasanthperiyasamy
Copy link

+1

2 similar comments
@mhriemers
Copy link

+1

@ken-sheppard
Copy link

+1

@dgolja
Copy link

dgolja commented May 24, 2016

+1 :) My workaround for this was to create an fake package named ruby2.0 which only includes a symoblic link to the current ruby. Works like a charm and no need to have another ruby environment.

@tsloughter
Copy link

Is it the case that it actually works fine on ruby 2.3? There is a PR that has been open for 11 days that simply changes what version the agent checks for: #62

@feverLu
Copy link
Contributor

feverLu commented Jun 1, 2016

We are actually actively working on relaxing the hard dependency on ruby2.0 now. Next release of the host agent should work with ruby versions >= 2.0

@dgolja
Copy link

dgolja commented Jun 2, 2016

I couldn't find any technical reason why this agent shouldn't work on ruby 2.3, except for the hardcoded version in the scripts :)

@bdashrad
Copy link

bdashrad commented Jun 2, 2016

The commit cfbebaf by @feverLu last night fixes the installer, but not the deb package that it downloads. We're partway there.

@bdashrad
Copy link

bdashrad commented Jun 7, 2016

I forked this and am now building a deb package with fpm for our use until the official version supports ruby > 2.0.

https://github.com/bdashrad/aws-codedeploy-agent

It runs on xenial fine, the only actual change to the code is changing #!/usr/bin/ruby2.0 to #!/usr/bin/ruby in bin/codedeploy-agent.

bdashrad@e95f63c

@timurb
Copy link

timurb commented Jun 8, 2016

On Redhat/CentOS you just read the banner which is displayed on installation failure and do something like sudo ln -s /usr/bin/ruby /usr/bin/ruby2.0 before installing the package.

This worked for me perfectly.
I've used:

  • CentOS 7
  • self-built Ruby 2.2 (installed somewhere to /opt)
  • CodeDeploy RPM package from aws-codedeploy-us-east-1 S3 bucket

@dgolja
Copy link

dgolja commented Jun 8, 2016

@timurb this won't work on ubuntu since the deb package requires ruby2.0 to be installed.

@timurb
Copy link

timurb commented Jun 8, 2016

@n1tr0g is that really dependency or simple checking for /usr/bin/ruby2.0 done in postinst script?

in CentOS that's postinst script

@dgolja
Copy link

dgolja commented Jun 8, 2016

@timurb it's a package dependency in Ubuntu ....

@runningman84
Copy link

Any news here?

@tsloughter
Copy link

Yea, it has been a month since the last update. Is there any news on when the latest ubuntu lts will be supported and the unmaintained version of ruby will not longer be required?

@nhumphreys
Copy link

+1

@stevenjack
Copy link

Had a nice few hours messing around with this, ended up using @Raniz85 solution..

Might have been worth thinking about writing the agent in something a bit more portable like go..

@emirb
Copy link

emirb commented Jul 13, 2016

After Ruby 2.0 installation, codedeploy agent still can't be installed on Debian 8 (Jessie).

+1

@runningman84
Copy link

Everybody should talk to his TAM and request an update.

@vikash
Copy link

vikash commented Jul 18, 2016

+1

@ken-sheppard
Copy link

RE TAM, good idea. I just sent a note.

@emirb
Copy link

emirb commented Jul 18, 2016

TAM?

On 18 Jul 2016 21:22, "9sparkfuls" notifications@github.com wrote:

RE TAM, good idea. I just sent a note.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#61 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADQREcVu5PrsleU2XsB7Zh7zKTpo7Cdaks5qW9JagaJpZM4IWW9L
.

@cwarden
Copy link

cwarden commented Jul 21, 2016

Installing a fake version of the ruby2.0 package allows the codedeploy agent to be installed on Debian 8:

# apt-get -y install ruby python-pip wget equivs gdebi-core
# cd /tmp
# cat > ruby2.0 <<EOF
Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: ruby2.0-dummy
Provides: ruby2.0
EOF
# equivs-build ruby2.0
# dpkg -i ruby2.0-dummy_1.0_all.deb
# ln -nsf /usr/bin/ruby2.1 /usr/bin/ruby2.0
# wget https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/install
# ruby ./install deb

@arojeff
Copy link

arojeff commented Aug 24, 2016

sudo add-apt-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.0

@abh1nav
Copy link

abh1nav commented Aug 31, 2016

@feverLu any updates here? CodeDeploy Agent installs are still failing on 16.04 instances because of the hard requirement on ruby2.0.

@mhart
Copy link
Author

mhart commented Aug 31, 2016

@arojeff oh ok, so they have a PPA for 16.04 now? That must have changed recently: #61 (comment)

@arojeff
Copy link

arojeff commented Aug 31, 2016

@mhart - Yes, that worked for me!

@ghost
Copy link

ghost commented Sep 2, 2016

Kinda stunned that here it is September and AWS still hasn't fixed this and we have to work around it. C'mon Amazon get your shit in gear.

@ambareesha
Copy link
Contributor

Folks, we are working on fixing the Ruby 2.0 dependency issue. We released agent version 1.0.1.1011 which was the first step to fixing the problem, but we had to roll it back due to some issues we discovered. We are trying to address the issues and test the agent thoroughly before the next release, which should roll out in a couple of weeks.

@TheBenMay
Copy link

TheBenMay commented Sep 26, 2016

@arojeff This has worked for the Ubuntu 16.04 Marketplace AMI and the new AMI in the quick launch. I still much rather have a supported version of Ruby though. @ambareesha Please keep us up to date.

@klatu201
Copy link

klatu201 commented Oct 4, 2016

Come on AWS, fix this....
I had this issue with the vanilla vagrant ubuntu box - hashicorp/precise64

Workaround:
sudo apt-get install software-properties-common python-software-properties
sudo add-apt-repository ppa:brightbox/ruby-ng-experimental
sudo apt-get update
sudo apt-get install ruby2.0

@apenney
Copy link

apenney commented Oct 11, 2016

@ambareesha How many more weeks is this likely to take? No offense, but this is pretty awful.

@ambareesha
Copy link
Contributor

@apenney, we are in the process of rolling out the first set of changes this week (a couple of big regions done and some more to go). This set of changes will upgrade the preinstalled agent to using Ruby2.x. Once that goes through, we will release the updated installers. I'm expecting it to be a few more weeks before you can install on Ruby2.x. Thanks for your patience!

In the meantime, have you tried @klatu201's workaround? That should unblock you for the moment.

@gtangquri
Copy link

following @klatu201 's workaround and then continuing with AWS' docs works

@ambareesha
Copy link
Contributor

We have released host agent version 1.1037 which gets us halfway through the Ruby2.x migration process. The current agent invokes the latest version of ruby installed on the system.

Next steps:
Update the ruby dependency in the rpm and deb installers. The install script will also be updated.
We are actively working on rolling out these changes.

@whtevn
Copy link

whtevn commented Nov 2, 2016

in the meantime, is there any way to just give us a flag that will run the right interpreter. I have RVM installed with ruby 2.0 available. If I could just point this script at that, I would not need to make a dummy ruby 2.0 package on my production machine just to install this logging agent.

It's also worth noting that ubuntu 16.04 is now the free tier eligible ubuntu image, as opposed to a short time ago when it was 14.04

@octaviandavid
Copy link

+1

@ambareesha
Copy link
Contributor

Thank you all for your patience.
We released the host agent version 1.1045 a couple of weeks ago which works with ruby2.3 on Ubuntu 16. We hope this resolves your issue. Please let us know if you still face any problems.

@mhart
Copy link
Author

mhart commented Nov 26, 2016

Confirmed that the steps outlined in the docs now work for Ubuntu 16.04 (in us-east-1, on ami-40d28157): http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-run-agent-install.html#how-to-run-agent-install-ubuntu

The description of the messages from service isn't correct though. After install, the message looks like this:

$ sudo service codedeploy-agent status
● codedeploy-agent.service - LSB: AWS CodeDeploy Host Agent
   Loaded: loaded (/etc/init.d/codedeploy-agent; bad; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

Then after sudo service codedeploy-agent start, the message looks like this:

$ sudo service codedeploy-agent status
● codedeploy-agent.service - LSB: AWS CodeDeploy Host Agent
   Loaded: loaded (/etc/init.d/codedeploy-agent; bad; vendor preset: enabled)
   Active: active (exited) since Sat 2016-11-26 16:16:28 UTC; 20s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 9082 ExecStart=/etc/init.d/codedeploy-agent start (code=exited, status=0/SUCCESS)

Nov 26 16:16:28 ip-172-31-30-252 systemd[1]: Starting LSB: AWS CodeDeploy Host Agent...
Nov 26 16:16:28 ip-172-31-30-252 codedeploy-agent[9082]: Starting codedeploy-agent:
Nov 26 16:16:28 ip-172-31-30-252 systemd[1]: Started LSB: AWS CodeDeploy Host Agent.

Anyway, closing this for now – if others have problems getting this running, probably best to open separate issues – the main concern has been addressed. Thanks all!

@mhart mhart closed this as completed Nov 26, 2016
@martinb3
Copy link

It seems that the documentation still states 16.04 isn't supported; it would be good to update that as well, if someone can: http://docs.aws.amazon.com/codedeploy/latest/userguide/host-cleanup.html#how-to-run-agent-supported-oses

@sc-pulsion
Copy link

Hi I am seeing this issue on eu-west-2. It looks like the agent deb file is not up to date (1.0-1.1011.1). Can you also update that region please?

I, [2016-12-22T10:54:50.804562 #28973]  INFO -- : Starting Ruby version check.
I, [2016-12-22T10:54:50.804725 #28973]  INFO -- : Starting update check.
I, [2016-12-22T10:54:50.804825 #28973]  INFO -- : Attempting to automatically detect supported package manager type for system...
I, [2016-12-22T10:54:50.809638 #28973]  INFO -- : Checking AWS_REGION environment variable for region information...
I, [2016-12-22T10:54:50.809740 #28973]  INFO -- : Checking EC2 metadata service for region information...
dpkg-query: package 'codedeploy-agent' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
I, [2016-12-22T10:54:50.837469 #28973]  INFO -- : Running version No running version
I, [2016-12-22T10:54:50.837598 #28973]  INFO -- : Downloading version file from bucket aws-codedeploy-eu-west-2 and key latest/VERSION...
I, [2016-12-22T10:54:50.856689 #28973]  INFO -- : Downloading version file from bucket aws-codedeploy-eu-west-2 and key latest/VERSION...
I, [2016-12-22T10:54:50.873736 #28973]  INFO -- : Downloading package from bucket aws-codedeploy-eu-west-2 and key releases/codedeploy-agent_1.0-1.1011.1_all.deb...
I, [2016-12-22T10:54:50.924725 #28973]  INFO -- : Executing `/usr/bin/gdebi -n -o Dpkg::Options::=--force-confdef -o Dkpg::Options::=--force-confold /tmp/codedeploy-agent_1.0-1.1011.1_all.tmp-20161222-28973-1xhue2p.deb`...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
This package is uninstallable
Dependency is not satisfiable: ruby2.0

@ambareesha
Copy link
Contributor

sc-pulsion@, we have uploaded the latest agent to eu-west-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests