aws / aws-codedeploy-agent

Host Agent for AWS CodeDeploy
https://aws.amazon.com/codedeploy
Apache License 2.0
329 stars 187 forks source link

Gdebi-Core #9

Closed vladgh closed 8 years ago

vladgh commented 9 years ago

The install scripts ensures gdebi on debian based system. However, this also installs a very large number of dependencies (105 MB). Wouldn't gdebi-core make more sense in a non-interactive environment? It's only 17.5 MB.

Ref: https://github.com/aws/aws-codedeploy-agent/blob/master/bin/install#L221

suryanarayanan commented 9 years ago

Hi,

Thanks for reporting this. We will look into this to check if gdebi-core is enough for agent deb installation.

Thanks, Surya.

vladgh commented 9 years ago

Currently I manually install gdebi-core before I run the installer script for codedeploy. This way, the installer sees the gdebi executable and does not install it again.

Pryz commented 9 years ago

Why do we need gdebi instead of apt-get ?

suryanarayanan commented 9 years ago

We need gdebi to install a local .deb. apt-get doesn't have anything equivalent to 'yum localinstall'.

vladgh commented 9 years ago

Well, you are sort of right. There is dpkg -i X.deb on Debian based systems, but gdebi has the advantage of installing the .deb file and fetch all other dependencies from apt repositories. However, in this case, the only dependency specified in the deb file is ruby2.0 which the bin/install script installs anyway before the deb. In my bootstrap scripts I use simply:

sudo apt-get -qy install ruby2.0
wget -qO /tmp/codedeploy-agent_all.deb https://aws-codedeploy-us-east-1.s3.amazonaws.com/latest/codedeploy-agent_all.deb
sudo dpkg -i /tmp/codedeploy-agent_all.deb
suryanarayanan commented 9 years ago

Sure. you can do that. But it is safer to leave the dependency resolution to a package management system/installation tool rather than doing it manually. For e.g, your bootstrap script would break if the set of installer dependencies change in future.

vladgh commented 9 years ago

Absolutely, I agree. But this is just a temporary fix for myself, because I don't see the point installing the entire X Window System (X.Org) infrastructure, on which gdebi is dependent. That's why I started this issue, the agent does not need gdebi but only gdebi-core which provides the required functionality, without the extras.

suryanarayanan commented 9 years ago

Replacing gdebi with gdebi-core is in our queue. The major part of that task is to make sure switching to gdebi-core does not break the agent installation in any of the supported versions of Ubuntu. I'll post an update once I merge that change into master. Thanks.

suryanarayanan commented 8 years ago

Fixed in commit https://github.com/aws/aws-codedeploy-agent/commit/4d72f02aa7a19e435db938671cd82ca015da013f