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

Amazon linux #144

Merged
merged 2 commits into from
May 7, 2014
Merged

Amazon linux #144

merged 2 commits into from
May 7, 2014

Conversation

cheesefactory
Copy link
Contributor

  • Adds support for Amazon Linux

* 'amazon' included in array for RHEL types when determining init and install type
@tduffield
Copy link
Contributor

So I took a look at your code and it looks good. I'm currently working on writing some tests for it but I did notice that when trying to pull down the docker-test-image, docker on amazon threw an error about our storage driver, specifically:

[root@ip-10-122-165-142 ec2-user]# docker pull docker-test-image
Pulling repository docker-test-image
83599e29c455: Error pulling image (latest) from docker-test-image, Driver devicemapper failed to create image rootfs 83599e29c455eb719f77d799bc7c51521b9551972f5a850d7ad265bc1b5292f6: hash 83599e29c455eb719f77d799bc7c51521b9551972f5a850d7a2014/05/02 16:23:07 Could not find repository on any of the indexed registries.

The issue is that the docker-test-image was created with AUFS while Docker running on Amazon Linux is using devicemapper. There are two/three potential solutions: 1) ignore the problem and pull down an image built with devicemapper; 2) install aufs as part of the recipe or 3) print a computability message in the Chef Log warning about potential rootfs incompatibilities. My personal preference is a combination of 1 and 3 and the one I am going with in my solution since having a way to detect whether or not we are running on aufs or devicemapper automatically would be a huge win.

@jayofdoom
Copy link
Contributor

That should /not/ be a problem. Docker containers are intended to be agnostic of what driver they're used with. They aren't even stickied to what docker version created them.

@tduffield
Copy link
Contributor

@jayofdoom That would be the sane thing. Regardless, there is still an issue with the installation and it has to do with the storage driver. If its not AUFS vs devicemapper then its something else. :/

[root@ip-10-122-165-142 ec2-user]# docker pull busybox
Pulling repository busybox
2d8e5b282c81: Error pulling image (latest) from busybox, Driver devicemapper failed to create image rootfs 511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158: mkdir /var/lib/docker/devicemapper/mnt/511136ea3c5a64f264b78b5433614aec563103b4d4702f3ba7d4d2698e22c158/rootfs: input/output error 2f3ba7d4d2698e22c158/rootfs: input/output error
2014/05/02 16:42:14 Could not find repository on any of the indexed registries.

@tduffield
Copy link
Contributor

I think I found the issue. On Amazon we should not be using the 'docker-io' package from yum-EPEL. If we use the package that comes from AWS' repo it works. Testing now.

@cheesefactory
Copy link
Contributor Author

Doh! Thanks @tduffield

@cheesefactory
Copy link
Contributor Author

@tduffield How are you testing the addition of Amazon Linux? I wanted to add an entry to kitchen.yml but I couldn't find a Vagrant box for the OS..

@tduffield
Copy link
Contributor

@cheesefactory I'm using the vagrant-ec2 plugin and launching boxes in EC2.

@tduffield
Copy link
Contributor

@cheesefactory sorry, i meant kitchen-ec2

@bflad
Copy link
Contributor

bflad commented May 4, 2014

Please let me know if either of you can get the non-EPEL installation worked out so we can merge in the Amazon support. I'll hold off from doing anything here until then. Thanks!

@bflad
Copy link
Contributor

bflad commented May 7, 2014

I'll go ahead and merge to finish this up for release in 0.35.0.

bflad added a commit that referenced this pull request May 7, 2014
@bflad bflad merged commit b03c9c5 into sous-chefs:master May 7, 2014
@tduffield
Copy link
Contributor

This really shouldn't have been merged - the EPEL version doesn't work on Amazon Linux :/

@cheesefactory
Copy link
Contributor Author

Tend to agree.... Also - in the most recent release of Amazon Linux I believe docker will be installed by default (to support their Beanstalk Docker stuff).

I'm not sure what sort of implication (if any) that has on managing docker installs via this cookbook. Thoughts?

Also, sorry I've been a bit absent in this PR..

@tduffield
Copy link
Contributor

There shouldn't be an implication since Chef will only install Docker if it
is not already installed. As long as we use the amazon repo it should all
work out.

On Wed, May 7, 2014 at 9:39 AM, David John notifications@github.com wrote:

Tend to agree.... Also - in the most recent release of Amazon Linux I
believe docker will be installed by default (to support their Beanstalk
Docker stuff).

I'm not sure what sort of implication (if any) that has on managing docker
installs via this cookbook. Thoughts?


Reply to this email directly or view it on GitHubhttps://github.com//pull/144#issuecomment-42435175
.

@bflad
Copy link
Contributor

bflad commented May 7, 2014

Sorry for the confusion. I merged this in and fixed it locally. I just need
to push up the changes I made last night.

Brian Flad
Sent from mobile
On May 7, 2014 7:53 AM, "Tom Duffield" notifications@github.com wrote:

There shouldn't be an implication since Chef will only install Docker if
it
is not already installed. As long as we use the amazon repo it should all
work out.

On Wed, May 7, 2014 at 9:39 AM, David John notifications@github.com
wrote:

Tend to agree.... Also - in the most recent release of Amazon Linux I
believe docker will be installed by default (to support their Beanstalk
Docker stuff).

I'm not sure what sort of implication (if any) that has on managing
docker
installs via this cookbook. Thoughts?


Reply to this email directly or view it on GitHub<
https://github.com/bflad/chef-docker/pull/144#issuecomment-42435175>
.


Reply to this email directly or view it on GitHubhttps://github.com//pull/144#issuecomment-42437096
.

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

Successfully merging this pull request may close these issues.

None yet

4 participants