Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Comments

Add Dockerfile for building cc-oci-runtime and qemu-lite for Centos and Fedora#3

Merged
sameo merged 4 commits intoclearcontainers:masterfrom
GabyCT:master
Mar 7, 2017
Merged

Add Dockerfile for building cc-oci-runtime and qemu-lite for Centos and Fedora#3
sameo merged 4 commits intoclearcontainers:masterfrom
GabyCT:master

Conversation

@GabyCT
Copy link
Contributor

@GabyCT GabyCT commented Feb 21, 2017

Signed-off-by: Gabriela Cervantes gabriela.cervantes.tellez@intel.com

@GabyCT GabyCT changed the title Add Dockerfile for building cc-oci-runtime Centos WIP: Add Dockerfile for building cc-oci-runtime Centos Feb 21, 2017
@GabyCT
Copy link
Contributor Author

GabyCT commented Feb 21, 2017

Missing qemu-lite spec, working on that :)

@GabyCT GabyCT force-pushed the master branch 2 times, most recently from ef16018 to 1fc6e0b Compare February 22, 2017 17:10
@GabyCT
Copy link
Contributor Author

GabyCT commented Feb 22, 2017

The qemu-lite spec is added

@GabyCT GabyCT changed the title WIP: Add Dockerfile for building cc-oci-runtime Centos Add Dockerfile for building cc-oci-runtime Centos Feb 22, 2017
@GabyCT GabyCT changed the title Add Dockerfile for building cc-oci-runtime Centos Add Dockerfile for building cc-oci-runtime and qemu-lite for Centos Feb 22, 2017
This will generate the rpms for cc-oci-runtime & qemu-lite on the host
for Centos and Fedora

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
@GabyCT GabyCT changed the title Add Dockerfile for building cc-oci-runtime and qemu-lite for Centos Add Dockerfile for building cc-oci-runtime and qemu-lite for Centos and Fedora Feb 23, 2017
@@ -0,0 +1,6 @@
# Ignore rpmbuild generated folders
2.1/build/rpmbuild/BUILD
Copy link
Contributor

Choose a reason for hiding this comment

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

2.1 is the proper path ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes 2.1 will be the new path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes 2.1 will be the new path

@@ -0,0 +1,7 @@
# To build
`$ sudo docker build -t centos-clear-containers .`
Copy link
Contributor

Choose a reason for hiding this comment

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

why sudo is needed to build the image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried without sudo but it was not working even if I do a # docker ps

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried without sudo but it was not working even if I do a # docker ps

mv ~/rpmbuild/SOURCES/2.1.0-rc.6.tar.gz ~/rpmbuild/SOURCES/cc-oci-runtime-2.1.0.rc.6.tar.gz

# Check os-distribution for build requirements for cc-oci-runtime
if [ `cat /etc/os-release | grep id | cut -d '=' -f2 | head -1` == "centos" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

if [ cat /etc/os-release | grep ID | cut -d '=' -f2 | head -1 == "centos" ]; then

ID is in capitals

@@ -0,0 +1,66 @@
diff --git a/Makefile.am b/Makefile.am
Copy link
Contributor

Choose a reason for hiding this comment

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

This entire file can be only one instead of one for centos and other for fedora.

You can replace the content of this with the content of:

intel/cc-oci-runtime#599

--with-cc-kernel=/usr/share/clear-containers/vmlinux.container \
--with-cc-image=/usr/share/clear-containers/clear-containers.img \
--with-cc-image-systemdsystemunitdir=/usr/lib/systemd/system \
--enable-autogopath
Copy link
Contributor

Choose a reason for hiding this comment

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

This only works if you apply the patch that is submitted here:

intel/cc-oci-runtime#599

#!/bin/bash

# Download cc-oci-runtime.tar.gz
curl -OkL https://github.com/01org/cc-oci-runtime/archive/2.1.0-rc.6.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to use params instead of hardcoded $1 (the tag to use to build cc-oci-runtime)

# Setup cc-oci-runtime
rpmdev-setuptree
cd ~/rpmbuild/SOURCES
mv ~/2.1.0-rc.6.tar.gz ~/rpmbuild/SOURCES
Copy link
Contributor

Choose a reason for hiding this comment

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

params? tags? instead hardcoded

mv ~/2.1.0-rc.6.tar.gz ~/rpmbuild/SOURCES

# Move qemu-lite tar
mv ~/da5004e3ffc6a79df82d1b9d8f8533c4045f193c.tar.gz ~/rpmbuild/SOURCES
Copy link
Contributor

Choose a reason for hiding this comment

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

params? tags? instead hardcoded

mv ~/da5004e3ffc6a79df82d1b9d8f8533c4045f193c.tar.gz ~/rpmbuild/SOURCES

# Update cc-oci-runtime tar name
mv ~/rpmbuild/SOURCES/2.1.0-rc.6.tar.gz ~/rpmbuild/SOURCES/cc-oci-runtime-2.1.0.rc.6.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

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

params? tags? instead hardcoded

gorozco1 and others added 2 commits March 1, 2017 22:21
  * Adds parameter to build X version of cc-oci-runtime
  * Adds the gopath patch currently in revision
  * Adds the race condition fix patch

Signed-off-by: Geronimo Orozco <geronimo.orozco@intel.com>
  Modification to cc-oci-runtime automate build on CentOS
@GabyCT
Copy link
Contributor Author

GabyCT commented Mar 2, 2017

Modifications will be apply to support 2.1.1

This will build the rpms for cc-oci-runtime and
qemu-lite.

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
@gorozco1
Copy link
Contributor

gorozco1 commented Mar 6, 2017

lgtm

@sameo
Copy link

sameo commented Mar 7, 2017

LGTM

@sameo sameo merged commit c396239 into clearcontainers:master Mar 7, 2017
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.

3 participants