Kitchen-docker questions


#1
  1. RHEL and Oracle Linux are two platforms that we use and would like to
    add to our regular set of tests. Looking at the docker repos, I see many
    RHEL images, but none seem to be official. I also couldn’t get Oracle Linux
    working by specifying the following in my .kitchen.yml:
 - name: oraclelinux-5
   driver_config:
     image: oraclelinux:5
     platform: rhel

This pulled down the image ok, but then tried to use the RHEL mirrors in
yum, which needless to say failed. Anyone who has examples for OL and RHEL
5 and 6 would be greatly appreciated.
2. I’m getting an error on my Debian containers like so: “W: Failed to
fetch
http://http.debian.net/debian/dists/squeeze-lts/main/binary-amd64/Packages.gz
Hash Sum mismatch” It seems like the best/easiest way to work around this
issue would be to actually point the containers at our local Debian mirrors
(which would be preferable anyways to preserve bandwidth when running these
tests). Is there a good way to specify what URLs to use in the sources.list
file before docker tries to apt-get update the container?

Thanks for any help.


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS


#2

On Apr 20, 2015, at 2:55 PM, Morgan Blackthorne stormerider@gmail.com wrote:

• RHEL and Oracle Linux are two platforms that we use and would like to add to our regular set of tests. Looking at the docker repos, I see many RHEL images, but none seem to be official. I also couldn’t get Oracle Linux working by specifying the following in my .kitchen.yml:

  • name: oraclelinux-5
    driver_config:
    image: oraclelinux:5
    platform: rhel

This pulled down the image ok, but then tried to use the RHEL mirrors in yum, which needless to say failed. Anyone who has examples for OL and RHEL 5 and 6 would be greatly appreciated.

I use the standard Hub images for CentOS 6.5 and 7 without incident.

• I’m getting an error on my Debian containers like so: “W: Failed to fetch http://http.debian.net/debian/dists/squeeze-lts/main/binary-amd64/Packages.gz
Hash Sum mismatch”

It seems like the best/easiest way to work around this issue would be to actually point the containers at our local Debian mirrors (which would be preferable anyways to preserve bandwidth when running these tests). Is there a good way to specify what URLs to use in the sources.list file before docker tries to apt-get update the container?

This would be entirely up to the image overall, but you can specify an array of commands to add to the Dockerfile so “echo whatever >> /etc/apt/sources.list” is an option that should work regardless.

–Noah


#3

So we actually have a wide range of distributions and versions at
Rosetta… CentOS, RHEL, Oracle Linux, Debian, Ubuntu. And each of the
various RH derivatives have their own differences that we’d like testing to
verify against. (A lot of them handle LDAP differently, or have different
names for certain packages.) Right now I’ve got testing working great
against:

  • name: ubuntu-14.04
  • name: ubuntu-12.04
  • name: ubuntu-10.04
  • name: centos-6.5
  • name: centos-5.10

But I’m looking to expand that to cover all the various cases the code
actually accounts for. And we actually do some specific user customizations
only on the Oracle nodes, beyond the LDAP stuff, so that really needs to be
one of the platforms we verify with.

If I use a config like so:

  • name: oraclelinux-5
    driver:
    provision_command: yum update -y
    image: oraclelinux:5
    platform: rhel

The provision_command fires after the initial setup commands, so that
doesn’t help me try to update the yum repos before I try to run “Step 2 :
RUN yum install -y sudo openssh-server openssh-clients which curl”. I
imagine that this would present a similar issue with the Debian nodes
trying to rewrite sources.list before apt-get is called.

It seems like I probably need to pull these images, modify them, and
publish them on our local repository. However, I’m not seeing any
documentation about how to use kitchen-docker with a local repo vs the main
Docker registry.

Thanks!


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Mon, Apr 20, 2015 at 3:22 PM, Noah Kantrowitz noah@coderanger.net
wrote:

On Apr 20, 2015, at 2:55 PM, Morgan Blackthorne stormerider@gmail.com
wrote:

  • RHEL and Oracle Linux are two platforms that we use and would

like to add to our regular set of tests. Looking at the docker repos, I see
many RHEL images, but none seem to be official. I also couldn’t get Oracle
Linux working by specifying the following in my .kitchen.yml:

  • name: oraclelinux-5
    driver_config:
    image: oraclelinux:5
    platform: rhel

This pulled down the image ok, but then tried to use the RHEL mirrors in
yum, which needless to say failed. Anyone who has examples for OL and RHEL
5 and 6 would be greatly appreciated.

I use the standard Hub images for CentOS 6.5 and 7 without incident.

  • I'm getting an error on my Debian containers like so: "W: Failed

to fetch
http://http.debian.net/debian/dists/squeeze-lts/main/binary-amd64/Packages.gz

Hash Sum mismatch"

It seems like the best/easiest way to work around this issue would be to
actually point the containers at our local Debian mirrors (which would be
preferable anyways to preserve bandwidth when running these tests). Is
there a good way to specify what URLs to use in the sources.list file
before docker tries to apt-get update the container?

This would be entirely up to the image overall, but you can specify an
array of commands to add to the Dockerfile so “echo whatever >>
/etc/apt/sources.list” is an option that should work regardless.

–Noah


#4

On Apr 20, 2015, at 4:12 PM, Morgan Blackthorne stormerider@gmail.com wrote:

So we actually have a wide range of distributions and versions at Rosetta… CentOS, RHEL, Oracle Linux, Debian, Ubuntu. And each of the various RH derivatives have their own differences that we’d like testing to verify against. (A lot of them handle LDAP differently, or have different names for certain packages.) Right now I’ve got testing working great against:

  • name: ubuntu-14.04
  • name: ubuntu-12.04
  • name: ubuntu-10.04
  • name: centos-6.5
  • name: centos-5.10

But I’m looking to expand that to cover all the various cases the code actually accounts for. And we actually do some specific user customizations only on the Oracle nodes, beyond the LDAP stuff, so that really needs to be one of the platforms we verify with.

If I use a config like so:

  • name: oraclelinux-5
    driver:
    provision_command: yum update -y
    image: oraclelinux:5
    platform: rhel

The provision_command fires after the initial setup commands, so that doesn’t help me try to update the yum repos before I try to run “Step 2 : RUN yum install -y sudo openssh-server openssh-clients which curl”. I imagine that this would present a similar issue with the Debian nodes trying to rewrite sources.list before apt-get is called.

It seems like I probably need to pull these images, modify them, and publish them on our local repository. However, I’m not seeing any documentation about how to use kitchen-docker with a local repo vs the main Docker registry.

You can also specify a template for your own Dockerfile and do whatever you need to in that.

–Noah


#5

Is there a way to see what the current Dockerfiles being generated look
like, so that I can copy them to test/Dockerfile- before
customizing them?


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Mon, Apr 20, 2015 at 4:27 PM, Noah Kantrowitz noah@coderanger.net
wrote:

On Apr 20, 2015, at 4:12 PM, Morgan Blackthorne stormerider@gmail.com
wrote:

So we actually have a wide range of distributions and versions at
Rosetta… CentOS, RHEL, Oracle Linux, Debian, Ubuntu. And each of the
various RH derivatives have their own differences that we’d like testing to
verify against. (A lot of them handle LDAP differently, or have different
names for certain packages.) Right now I’ve got testing working great
against:

  • name: ubuntu-14.04
  • name: ubuntu-12.04
  • name: ubuntu-10.04
  • name: centos-6.5
  • name: centos-5.10

But I’m looking to expand that to cover all the various cases the code
actually accounts for. And we actually do some specific user customizations
only on the Oracle nodes, beyond the LDAP stuff, so that really needs to be
one of the platforms we verify with.

If I use a config like so:

  • name: oraclelinux-5
    driver:
    provision_command: yum update -y
    image: oraclelinux:5
    platform: rhel

The provision_command fires after the initial setup commands, so that
doesn’t help me try to update the yum repos before I try to run “Step 2 :
RUN yum install -y sudo openssh-server openssh-clients which curl”. I
imagine that this would present a similar issue with the Debian nodes
trying to rewrite sources.list before apt-get is called.

It seems like I probably need to pull these images, modify them, and
publish them on our local repository. However, I’m not seeing any
documentation about how to use kitchen-docker with a local repo vs the main
Docker registry.

You can also specify a template for your own Dockerfile and do whatever
you need to in that.

–Noah


#6

https://github.com/poise/poise-boiler/blob/5a64d04aa8a3c689bfdca65f991aede9a56a4ba3/lib/poise_boiler/kitchen/dockerfile.erb#L1-L31 is the effective default, but kitchen-docker doesn’t use a template internally so you can’t see it directly.

–Noah

On Apr 20, 2015, at 4:50 PM, Morgan Blackthorne stormerider@gmail.com wrote:

Is there a way to see what the current Dockerfiles being generated look like, so that I can copy them to test/Dockerfile- before customizing them?


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Mon, Apr 20, 2015 at 4:27 PM, Noah Kantrowitz noah@coderanger.net wrote:

On Apr 20, 2015, at 4:12 PM, Morgan Blackthorne stormerider@gmail.com wrote:

So we actually have a wide range of distributions and versions at Rosetta… CentOS, RHEL, Oracle Linux, Debian, Ubuntu. And each of the various RH derivatives have their own differences that we’d like testing to verify against. (A lot of them handle LDAP differently, or have different names for certain packages.) Right now I’ve got testing working great against:

  • name: ubuntu-14.04
  • name: ubuntu-12.04
  • name: ubuntu-10.04
  • name: centos-6.5
  • name: centos-5.10

But I’m looking to expand that to cover all the various cases the code actually accounts for. And we actually do some specific user customizations only on the Oracle nodes, beyond the LDAP stuff, so that really needs to be one of the platforms we verify with.

If I use a config like so:

  • name: oraclelinux-5
    driver:
    provision_command: yum update -y
    image: oraclelinux:5
    platform: rhel

The provision_command fires after the initial setup commands, so that doesn’t help me try to update the yum repos before I try to run “Step 2 : RUN yum install -y sudo openssh-server openssh-clients which curl”. I imagine that this would present a similar issue with the Debian nodes trying to rewrite sources.list before apt-get is called.

It seems like I probably need to pull these images, modify them, and publish them on our local repository. However, I’m not seeing any documentation about how to use kitchen-docker with a local repo vs the main Docker registry.

You can also specify a template for your own Dockerfile and do whatever you need to in that.

–Noah


#7

Perfect, thanks. I assume I can’t use the ERB setup when passing a
Dockerfile to kitchen-docker, but have to use a regular template instead?


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Mon, Apr 20, 2015 at 4:59 PM, Noah Kantrowitz noah@coderanger.net
wrote:

https://github.com/poise/poise-boiler/blob/5a64d04aa8a3c689bfdca65f991aede9a56a4ba3/lib/poise_boiler/kitchen/dockerfile.erb#L1-L31
is the effective default, but kitchen-docker doesn’t use a template
internally so you can’t see it directly.

–Noah

On Apr 20, 2015, at 4:50 PM, Morgan Blackthorne stormerider@gmail.com
wrote:

Is there a way to see what the current Dockerfiles being generated look
like, so that I can copy them to test/Dockerfile- before
customizing them?


~~ StormeRider ~~

“Every world needs its heroes […] They inspire us to be better than we
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… http://bit.ly/Ps3uSS

On Mon, Apr 20, 2015 at 4:27 PM, Noah Kantrowitz noah@coderanger.net
wrote:

On Apr 20, 2015, at 4:12 PM, Morgan Blackthorne stormerider@gmail.com
wrote:

So we actually have a wide range of distributions and versions at
Rosetta… CentOS, RHEL, Oracle Linux, Debian, Ubuntu. And each of the
various RH derivatives have their own differences that we’d like testing to
verify against. (A lot of them handle LDAP differently, or have different
names for certain packages.) Right now I’ve got testing working great
against:

  • name: ubuntu-14.04
  • name: ubuntu-12.04
  • name: ubuntu-10.04
  • name: centos-6.5
  • name: centos-5.10

But I’m looking to expand that to cover all the various cases the code
actually accounts for. And we actually do some specific user customizations
only on the Oracle nodes, beyond the LDAP stuff, so that really needs to be
one of the platforms we verify with.

If I use a config like so:

  • name: oraclelinux-5
    driver:
    provision_command: yum update -y
    image: oraclelinux:5
    platform: rhel

The provision_command fires after the initial setup commands, so that
doesn’t help me try to update the yum repos before I try to run “Step 2 :
RUN yum install -y sudo openssh-server openssh-clients which curl”. I
imagine that this would present a similar issue with the Debian nodes
trying to rewrite sources.list before apt-get is called.

It seems like I probably need to pull these images, modify them, and
publish them on our local repository. However, I’m not seeing any
documentation about how to use kitchen-docker with a local repo vs the main
Docker registry.

You can also specify a template for your own Dockerfile and do whatever
you need to in that.

–Noah