[node-patches] Change in ovirt-node[master]: [DRAFT] Docker build support for Node

rbarry at redhat.com rbarry at redhat.com
Tue Feb 18 15:27:27 UTC 2014


Ryan Barry has uploaded a new change for review.

Change subject: [DRAFT] Docker build support for Node
......................................................................

[DRAFT] Docker build support for Node

To make Node building less troublesome, provide Dockerfiles and
images in the Docker index which build from master by default but
can grab a change from Gerrit and build from there.

Change-Id: Ied2ebfdc53ebe76636aa5a7553b750be67e58312
Signed-off-by: Ryan Barry <rbarry at redhat.com>
---
A docker/Dockerfile-el6
A docker/Dockerfile-f19
A docker/Dockerfile-f20
A docker/buildovirt.sh
4 files changed, 80 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/79/24679/1

diff --git a/docker/Dockerfile-el6 b/docker/Dockerfile-el6
new file mode 100644
index 0000000..b83d29f
--- /dev/null
+++ b/docker/Dockerfile-el6
@@ -0,0 +1,10 @@
+FROM centos:latest
+VOLUME ["/ovirt"]
+RUN yum -y install install livecd-tools appliance-tools-minimizer
+RUN yum -y install fedora-packager python-devel rpm-build createrepo
+RUN yum -y install selinux-policy-doc checkpolicy selinux-policy-devel
+RUN yum -y install autoconf automake python-mock python-lockfile
+
+ADD ./buildovirt.sh /buildovirt.sh
+ENTRYPOINT ["./buildovirt.sh"]
+CMD ["master"]
diff --git a/docker/Dockerfile-f19 b/docker/Dockerfile-f19
new file mode 100644
index 0000000..b2c3b78
--- /dev/null
+++ b/docker/Dockerfile-f19
@@ -0,0 +1,10 @@
+FROM mattdm/fedora
+VOLUME ["/ovirt"]
+RUN yum -y install install livecd-tools appliance-tools-minimizer
+RUN yum -y install fedora-packager python-devel rpm-build createrepo
+RUN yum -y install selinux-policy-doc checkpolicy selinux-policy-devel
+RUN yum -y install autoconf automake python-mock python-lockfile
+
+ADD ./buildovirt.sh /buildovirt.sh
+ENTRYPOINT ["./buildovirt.sh"]
+CMD ["master"]
diff --git a/docker/Dockerfile-f20 b/docker/Dockerfile-f20
new file mode 100644
index 0000000..4944055
--- /dev/null
+++ b/docker/Dockerfile-f20
@@ -0,0 +1,10 @@
+FROM fedora:20
+VOLUME ["/ovirt"]
+RUN yum -y install install livecd-tools appliance-tools-minimizer
+RUN yum -y install fedora-packager python-devel rpm-build createrepo
+RUN yum -y install selinux-policy-doc checkpolicy selinux-policy-devel
+RUN yum -y install autoconf automake python-mock python-lockfile
+
+ADD ./buildovirt.sh /buildovirt.sh
+ENTRYPOINT ["./buildovirt.sh"]
+CMD ["master"]
diff --git a/docker/buildovirt.sh b/docker/buildovirt.sh
new file mode 100755
index 0000000..b391808
--- /dev/null
+++ b/docker/buildovirt.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+# oVirt Node ISO build script
+#
+# Copyright (C) 2014 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA  02110-1301, USA.  A copy of the GNU General Public License is
+# also available at http://www.gnu.org/copyleft/gpl.html.
+
+cd /ovirt
+git clone http://gerrit.ovirt.org/p/ovirt-node.git
+git clone http://gerrit.ovirt.org/p/ovirt-node-iso.git
+
+export OVIRT_NODE_BASE=$PWD
+OVIRT_CACHE_DIR=/ovirt/ovirt-cache
+OVIRT_LOCAL_REPO=file://${OVIRT_CACHE_DIR}/ovirt
+export OVIRT_CACHE_DIR
+export OVIRT_LOCAL_REPO
+BUILD_NUMBER=999
+
+cd ovirt-node
+if [[ "$1" == "master" ]]; then
+  git checkout master
+else
+  git fetch $1 && git checkout FETCH_HEAD
+fi
+make distclean
+./autogen.sh --with-image-minimizer 
+make iso publish
+CONFIGURE_ARGS="--with-recipe=../ovirt-node/recipe"
+if [ ! -z $BUILD_NUMBER ]; then
+  CONFIGURE_ARGS+=" --with-build-number=$BUILD_NUMBER"
+fi
+cd ../ovirt-node-iso
+rm *.iso
+make distclean
+./autogen.sh ${CONFIGURE_ARGS}
+make rpms
+make iso


-- 
To view, visit http://gerrit.ovirt.org/24679
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied2ebfdc53ebe76636aa5a7553b750be67e58312
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>



More information about the node-patches mailing list