Comments (46)
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.
from aws-codedeploy-agent.
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]
from aws-codedeploy-agent.
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.
from aws-codedeploy-agent.
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
from aws-codedeploy-agent.
Any news here?
from aws-codedeploy-agent.
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.
from aws-codedeploy-agent.
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
from aws-codedeploy-agent.
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.
from aws-codedeploy-agent.
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
from aws-codedeploy-agent.
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
from aws-codedeploy-agent.
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..
from aws-codedeploy-agent.
@ambareesha How many more weeks is this likely to take? No offense, but this is pretty awful.
from aws-codedeploy-agent.
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
from aws-codedeploy-agent.
@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.
from aws-codedeploy-agent.
👍 we really need an update to this.
from aws-codedeploy-agent.
+1
from aws-codedeploy-agent.
+1
from aws-codedeploy-agent.
+1
from aws-codedeploy-agent.
+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.
from aws-codedeploy-agent.
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
from aws-codedeploy-agent.
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 :)
from aws-codedeploy-agent.
The commit cfbebaf by @feverLu last night fixes the installer, but not the deb package that it downloads. We're partway there.
from aws-codedeploy-agent.
@timurb this won't work on ubuntu since the deb package requires ruby2.0 to be installed.
from aws-codedeploy-agent.
@n1tr0g is that really dependency or simple checking for /usr/bin/ruby2.0
done in postinst script?
in CentOS that's postinst script
from aws-codedeploy-agent.
@timurb it's a package dependency in Ubuntu ....
from aws-codedeploy-agent.
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?
from aws-codedeploy-agent.
+1
from aws-codedeploy-agent.
After Ruby 2.0 installation, codedeploy agent still can't be installed on Debian 8 (Jessie).
+1
from aws-codedeploy-agent.
Everybody should talk to his TAM and request an update.
from aws-codedeploy-agent.
+1
from aws-codedeploy-agent.
RE TAM, good idea. I just sent a note.
from aws-codedeploy-agent.
TAM?
On 18 Jul 2016 21:22, "9sparkfuls" [email protected] 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
.
from aws-codedeploy-agent.
sudo add-apt-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.0
from aws-codedeploy-agent.
@feverLu any updates here? CodeDeploy Agent installs are still failing on 16.04 instances because of the hard requirement on ruby2.0.
from aws-codedeploy-agent.
@arojeff oh ok, so they have a PPA for 16.04 now? That must have changed recently: #61 (comment)
from aws-codedeploy-agent.
@mhart - Yes, that worked for me!
from aws-codedeploy-agent.
@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.
from aws-codedeploy-agent.
@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.
from aws-codedeploy-agent.
following @klatu201 's workaround and then continuing with AWS' docs works
from aws-codedeploy-agent.
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
from aws-codedeploy-agent.
+1
from aws-codedeploy-agent.
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.
from aws-codedeploy-agent.
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!
from aws-codedeploy-agent.
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
from aws-codedeploy-agent.
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
from aws-codedeploy-agent.
sc-pulsion@, we have uploaded the latest agent to eu-west-2
from aws-codedeploy-agent.
Related Issues (20)
- Debian package depends on ruby version < 3.1, even though 3.1 and 3.2 is supported HOT 5
- Windows Deployment Group logs should be in the log folder
- Code deploy falling very frequently HOT 1
- CodeDeplot Access denied when calling "codedeploy-commands.eu-central-1.amazonaws.com:443" HOT 1
- [Feature Request] Debian (12 Bookworm) support HOT 1
- [problem] CodeDeploy Agent systemd service bash-completion error
- [Error] AL2023 - max_revisions - Error deleting directories HOT 3
- CodeDeploy 'Downloading failed bundle.zip from s3 bucket' at "DownloadBundle" step HOT 1
- Service is running but with errors HOT 1
- Codedeploy failing randomly at Install not finding appspec.yml
- Switch to use s3 multipart download when fetching artifacts
- DownloadBundle deployment lifecycle events for troubleshooting UnknownError: execution expired HOT 1
- Failed deployment DownloadBundle events with error "No such file or directory - getcwd" HOT 1
- Add the CodeDeploy agent to the PATH HOT 1
- CodeDeploy agent support for RHEL 9 HOT 1
- Announcement: Releasing Agent 1.7.0 to all regions
- [Feature request] Deployments to ASG Warm pool instances using CodeDeploy lifecycle hooks HOT 1
- [feature] allow codeploy agent service with manual start on windows
- [Issue] : cron job not running as expected after CodeDeploy changes the code in EC2 using CodePipeline
- Install fails using SSM AWS-ConfigureAWSPackage on ARM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-codedeploy-agent.