-
Notifications
You must be signed in to change notification settings - Fork 86
Conversation
Not all the distros were executed due to typo Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
Use OS_VERSION provided by user configuration and not use host version. Also add retries before fail on a request. Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
lgtm. |
rootfs-builder/centos/Dockerfile
Outdated
@@ -1 +1,7 @@ | |||
FROM centos:7 | |||
|
|||
ADD https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz /tmp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine, but we're hard-coding more into these Dockerfile
's which is going to make them more difficult to maintain.
I'd rather we fix #31 first (maybe as one of the commits on this PR) to avoid this. These 2 chunks of code are identical too which lends weight to doing that as you could add something like:
FROM centos:@centos_version@
@centos_install_go@
And,
from euleros:@euleros_version@
# EulerOS is similar enough to CentOS to re-use this code.
@centos_install_go@
Lastly, there is the issue of the version of golang. The CI systems for the various code repos are using go 1.8.3
so we're in danger of repeating clearcontainers/packaging#257.
Could you create a top-level ./versions.txt
containing a go_version=
so that it's defined in a single location? It maybe be best to default to 1.8.3
for now and raise an issue to discuss go version support separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is a good point, let me add Dockerfile templates.
@jodh-intel please take a look now dockerfile generations is done rootfs. I will send a follow up PR for image-builder dockerfile. |
@@ -0,0 +1,6 @@ | |||
From fedora:27 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is a bit of a problem. If we leave it like this, it'll probably break at some future date.
We could add one extra variable to each config.sh
that specifies the version for that particular distro. For example, fedora/config.sh
would become something like:
FEDORA_OS_VERSION=27
OS_VERSION=${OS_VERSION:-${FEDORA_OS_VERSION}}
But we'd then need to do some rework to allow the clearlinux rootfs build to use $FEDORA_OS_VERSION
so that the clearlinux Dockerfile
could specify:
From @FEDORA_OS_VERSION@
But this all seems rather odd. Clear Linux is the only distro that currently requires a different distro to build its rootfs. So why can't we just build a clearlinux rootfs using... clearlinux:
From clearlinux:@OS_VERSION@
Where @OS_VERSION@
would probably be just "latest
"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue raised as #48.
rootfs-builder/centos/Dockerfile.am
Outdated
@@ -0,0 +1,4 @@ | |||
From centos:@OS_VERSION@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Can you rename these files Dockerfile.in
though (as the .am
extension implies they are in automake format).
3b41b8c
to
fd77114
Compare
dir="$1" | ||
|
||
readonly install_go=" | ||
ADD https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz /tmp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice to make the golang URL configurable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - similar to kata-containers/agent#112.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be handled by a follow-on PR though as it would be great to get this PR landed today. WDYT @jcvenegas ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liangchenye @jodh-intel yes, I prefer to have this PR merged today, and then fix the URL and clearlinux container usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Captured at #47 if someone wants to pick that up.
travis still fails |
Yep. It made me laugh actually seeing these two lines:
|
To simplify maintaince, create dockerfiles based on templates. This way when golang version is updated it will be done in one place versions.txt. This also allow to allways intall the same version of golang in any dockerfile. Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
@jodh-intel @bergwolf @liyingjun , travis passing. |
@devimc - could you review please? |
tests/image_creation.bats
Outdated
@@ -45,5 +45,9 @@ function build_image() | |||
} | |||
|
|||
@test "Can create euleros image" { | |||
if [ "$TRAVIS" = true ] | |||
then | |||
skip "travis timout, see: https://github.com/kata-containers/osbuilder/issues/46" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked a colleague from our company, we don't have a fast server. It is embarrassing.
I have tried the host server of our isula (a containerOS) community. It works good.
I'll use that repo URL instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liangchenye I check in travis docuementation, I added travis_wait
now seems all is OK.
Use travis configuration to wait more than 10 min Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
Still... lgtm |
This PR adds some fixes to make work travis.
config.sh
and not the version in host./cc @harche