Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

docs: Create CentOS installation guide #372

Merged
merged 1 commit into from
Sep 14, 2017

Conversation

jodh-intel
Copy link
Contributor

@jodh-intel jodh-intel commented Jul 28, 2017

Write a document explaining how to install Clear Containers 3.0 on a
CentOS 7 system. Added associated scripts and configuration
files (which are lightly modified versions from
https://github.com/01org/cc-oci-runtime).

Fixes #371.

Signed-off-by: James O. D. Hunt [email protected]

@jodh-intel
Copy link
Contributor Author

Before this lands, we need an ack to confirm the instructions work for both:

  • CentOS 7
  • RHEL 7

@GabyCT - do you still have your RHEL environment?

@coveralls
Copy link

coveralls commented Jul 28, 2017

Coverage Status

Coverage remained the same at 53.451% when pulling a04cfa6 on jodh-intel:add-centos-install-doc into df043b1 on clearcontainers:master.

@jodh-intel
Copy link
Contributor Author

Note that this PR also uses the docker name cc-runtime (see #370).

@GabyCT
Copy link
Contributor

GabyCT commented Aug 1, 2017

@jodh-intel sorry, I do not have a RHEL

@jodh-intel
Copy link
Contributor Author

@GabyCT, @chavafg - do you know roughly how long it would take to get a system setup to test this?

@GabyCT
Copy link
Contributor

GabyCT commented Aug 10, 2017

@jodh-intel I will try to setup the end of the week

@gorozco1
Copy link
Contributor

@jodh-intel @GabyCT For Clear Containers 3.0 We only need scripts for RHEL.
CentOS packages are OK.

@jodh-intel
Copy link
Contributor Author

@gorozco1 - sure, the script does use the OBS packages, but most of the logic is needed to build qemu-lite which isn't in OBS fwics.

@GabyCT
Copy link
Contributor

GabyCT commented Aug 11, 2017

@jodh-intel, I am trying to test this issue however when I am doing the pull of your PR it has confilicts with the versions.txt could you please solve this so I can run it thanks

@coveralls
Copy link

coveralls commented Aug 15, 2017

Coverage Status

Coverage remained the same at 55.39% when pulling 2a782dd on jodh-intel:add-centos-install-doc into 7bde8a9 on clearcontainers:master.

@GabyCT
Copy link
Contributor

GabyCT commented Aug 15, 2017

@jodh-intel, when I running the script at RHEL, the following error is show:

Error: Package docker-ce-17.06.0.ce-1.el7.centos.x86_64 (docker-ce-stable)
Requires: container-selinux >= 2.9
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

@GabyCT
Copy link
Contributor

GabyCT commented Aug 15, 2017

@jodh-intel maybe it is related with this issue moby/moby#31651

@GabyCT
Copy link
Contributor

GabyCT commented Aug 15, 2017

@jodh-intel, I am using RHEL 7.3

@GabyCT
Copy link
Contributor

GabyCT commented Aug 15, 2017

@jodh-intel , I 've been searching and this problem is quite common as it appears in several sites docker/for-linux#20

@GabyCT
Copy link
Contributor

GabyCT commented Aug 15, 2017

@jodh-intel I forgot to mention that the system where I did the test was a fresh installed RHEL

@jodh-intel
Copy link
Contributor Author

Hi @GabyCT - Is the container-selinux package installed by default? What does yum info container-selinux show?

@gorozco1, @chavafg - I seem to remember we've seen something like this before. Any thoughts?

@GabyCT
Copy link
Contributor

GabyCT commented Aug 16, 2017

@jodh-intel , if I do
yum info container-selinux
Error: No matching Packages to list

@chavafg
Copy link
Contributor

chavafg commented Aug 16, 2017

We had some issues[1] with clear-containers-selinux on CentOS, which is provided by us. But seems that this package is from the RHEL repos. Someone from the issue that @GabyCT pasted above, recommends to manually download and install the package: docker/for-linux#20 (comment)

Not sure if that could work for us.

[1] clearcontainers/packaging#7

@GabyCT
Copy link
Contributor

GabyCT commented Aug 16, 2017

@chavafg actually this script is using the Centos packages for RHEL

@GabyCT
Copy link
Contributor

GabyCT commented Aug 16, 2017

@chavafg what is doing is trying to install the docker packages of centos in RHEL

sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum -y install docker-ce

@chavafg
Copy link
Contributor

chavafg commented Aug 16, 2017

maybe we need access to the EPEL repos?

@GabyCT
Copy link
Contributor

GabyCT commented Aug 16, 2017

@chavafg installing the rpm fixed the issue with docker, now we have the following error

Loaded plugins: product-id
adding repo from: http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/RHEL_7.3/home:clearcontainers:clear-containers-3.repo
grabbing file http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/RHEL_7.3/home:clearcontainers:clear-containers-3.repo to /etc/yum.repos.d/home:clearcontainers:clear-containers-3.repo
Could not fetch/save url http://download.opensuse.org/repositories/home:/clearcontainers:/clear-containers-3/RHEL_7.3/home:clearcontainers:clear-containers-3.repo to file /etc/yum.repos.d/home:clearcontainers:clear-containers-3.repo: [Errno 14] HTTP Error 404 - Not Found

@gorozco1 the resource is not available

@jodh-intel
Copy link
Contributor Author

Hi @GabyCT - I've now updated this PR to account for the small (but annoying ;) difference between CentOS and RHEL whereby the former sets VERSION_ID in /etc/os-release to the major release number (7), whereas RHEL sets it to major.minor format (7.3). This should fix the issue you were seeing with the OBS URL being incorrect on RHEL only.

@coveralls
Copy link

coveralls commented Aug 16, 2017

Coverage Status

Coverage remained the same at 55.39% when pulling 44572bc on jodh-intel:add-centos-install-doc into 743362f on clearcontainers:master.

@eadamsintel
Copy link

I asked Tom to try this out and the following step failed. When doing the git clone this centos-setup.sh is not there. How can I get the centos-setup.sh script?

script -efc ./installation/centos-setup.sh

[stack@otc-tme-cleartest clearcontainers]$ cd runtime
[stack@otc-tme-cleartest runtime]$ script -efc ./installation/centos-setup.sh
Script started, file is typescript
bash: ./installation/centos-setup.sh: No such file or directory
Script done, file is typescript

@jodh-intel
Copy link
Contributor Author

Hi @eadamsintel, this PR contains files that only exist in my branch (until it is merged into master). But the docs on this PR must assume they have already been merged into master.

Hence, to allow Tom to test this, he will have to follow the instructions but rather than running these commands:

$ cd $HOME/go/src/github/clearcontainers
$ git clone https://github.com/clearcontainers/runtime
$ cd runtime

... he must run:

$ cd $HOME/go/src/github/clearcontainers
$ git clone https://github.com/jodh-intel/runtime
$ cd runtime
$ git checkout add-centos-install-doc


# Install pre-requisites for gcc
gmp_file="gmp-${gmp_version}.tar.bz2"
curl -L -O "ftp://gcc.gnu.org/pub/gcc/infrastructure/${gmp_file}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we try to use always http/https if possible (some times user might be behind proxy and it might not work 100% with ftp)

compile gmp "${gmp_file}" "gmp-${gmp_version}"

mpfr_file="mpfr-${mpfr_version}.tar.bz2"
curl -L -O "ftp://gcc.gnu.org/pub/gcc/infrastructure/${mpfr_file}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we replace for http/https protocol?

compile mpfr "${mpfr_file}" "mpfr-${mpfr_version}"

mpc_file="mpc-${mpc_version}.tar.gz"
curl -L -O "ftp://gcc.gnu.org/pub/gcc/infrastructure/${mpc_file}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we replace for http/https protocol?

@eadamsintel
Copy link

eadamsintel commented Sep 10, 2017

Feedback from Tom "That workaround worked. The script is running. Had some proxy issues i had to work around. also the nopassword variable for sudo isn't working properly, been using root instead."

@jodh-intel
Copy link
Contributor Author

Hi @eadamsintel - I think proxies are out of scope of the document. Could tom comment on exactly what the problem with the sudo setup was (what is his github username?)?

I've just re-checked the sudo instructions and they are working for me.

Wrote a document explaining how to install Clear Containers 3.0
on a CentOS 7 system.

Added associated scripts and configuration files (which are lightly
modified versions from https://github.com/01org/cc-oci-runtime).

Fixes clearcontainers#371.

Signed-off-by: James O. D. Hunt <[email protected]>
@coveralls
Copy link

coveralls commented Sep 11, 2017

Coverage Status

Coverage remained the same at 97.04% when pulling 64ace3a on jodh-intel:add-centos-install-doc into 1fe09bb on clearcontainers:master.

@clearcontainersbot
Copy link

Popular Images qa-passed 👍

@coveralls
Copy link

coveralls commented Sep 11, 2017

Coverage Status

Coverage remained the same at 97.04% when pulling 155f374 on jodh-intel:add-centos-install-doc into 1fe09bb on clearcontainers:master.

@clearcontainersbot
Copy link

Popular Images qa-passed 👍

@jodh-intel
Copy link
Contributor Author

Hi @gorozco1 - good call on https urls! Fixed, re-tested and branch updated.

@tcthorn-intel
Copy link

I finally got a github account - I was able to get the script to run as a user - there appears to be an issue with the gobject version:

configure: error: Package requirements (gobject-2.0 >= 2.37.6 gio-2.0) were not met:

Requested 'gobject-2.0 >= 2.37.6' but version of GObject is 2.36.3

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables JSON_CFLAGS
and JSON_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Script done, file is typescript
[root@otc-tme-cleartest runtime]#

--Tom

@jodh-intel
Copy link
Contributor Author

Hi @tcthorn-intel - thanks for testing. I am confused though: there shouldn't be any version issues since we explicitly pin the builds to particular versions of libraries: gobject, gio and glib should all be at the same version - the one the script downloads.

Please can you attach your typescript file which might give us some more clues.

@gorozco1
Copy link
Contributor

@jodh-intel can we merge this now?

@gorozco1
Copy link
Contributor

@devimc @grahamwhaley @mcastelino could you review/approve this PR?

@tcthorn-intel
Copy link

Hi @jodh-intel Not a problem, I've attached the logfile.

typescript.txt

@jodh-intel
Copy link
Contributor Author

Hi @tcthorn-intel - I can't be sure, but your typescript suggests you were running on a RHEL system. If so, that's the problem - this PR is only for CentOS 7.

@jodh-intel
Copy link
Contributor Author

@gorozco1 - I'd love this to be merged as this PR has been open waaaaaaaay too long imho. We need atleast 1 independent test of it though. Do you want to give it a go?

@tcthorn-intel
Copy link

Hi @jodh-intel - The system was built with Centos 7.0. I rebuilt it prior to submitting my findings to make sure it wasn't something I had done.

@gorozco1
Copy link
Contributor

@jodh-intel I just tried the last bits of this PR and it works as expected. lgtm

@jodh-intel
Copy link
Contributor Author

Hi @tcthorn-intel - ok. Although it isn't stipulated in the doc, there is a tacit assumption that this be run on a fully-updated system. The script does update all packages with yum, but maybe the problems you are seeing somehow result from starting with a 7.0 system (rather than a more recent 7.3 one) without a reboot?

@gorozco1 - thanks for the ack. Just need one more from an approver...

@sameo
Copy link

sameo commented Sep 14, 2017

LGTM

Approved with PullApprove Approved with PullApprove Approved with PullApprove

@sameo sameo merged commit d34cdad into clearcontainers:master Sep 14, 2017
@tcthorn-intel
Copy link

Hi @jodh-intel - I can retry with 7.3 if you'd like. However, not to be a pain or anything - if that's the cause of the issue I saw, I would recommend stating somewhere near the top the exact release that it has been tested on. At present it just says "CentOS version 7", and that implies that it works either only on 7.0, or all of the 7 series (which would include 7.0).. Having spent time in both validation and customer support groups - if it's left undefined, someone will try it with the random 7.x install they have just laying around and fully patch it to the latest CentOS packages available for that release (per instructions), which may or may not work.

That's just my $.02 though.

@gorozco1
Copy link
Contributor

It was tested in CentOS Linux release 7.3.1611

@tcthorn-intel
Copy link

@gorozco1 Thanks!

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

Successfully merging this pull request may close these issues.