Add ability to deploy certain OVS version

With this patch one can deploy any OpenVSwitch version
specified in ccp.yaml. Corresponding tarball will be
downloaded from http://openvswitch.org/releases/,
compiled and installed

Change-Id: I760512da59258b16749b144e9a980c88526fce54
This commit is contained in:
Oleg Bondarev 2016-12-22 18:02:32 +04:00
parent 4a3eb57007
commit 036fe9b7fb
2 changed files with 20 additions and 1 deletions

View File

@ -1,7 +1,20 @@
FROM {{ image_spec("base-tools") }}
MAINTAINER {{ maintainer }}
{% if ovs_version == "system" %}
RUN apt-get -y install --no-install-recommends \
openvswitch-switch \
&& apt-get clean
{% else %}
RUN apt-get update && \
apt-get -y install --no-install-recommends gcc libc6-dev libssl-dev libcap-ng-dev make module-init-tools && \
curl -Lo openvswitch-{{ ovs_version }}.tar.gz {{ url.ovs }}/openvswitch-{{ ovs_version }}.tar.gz && \
tar -xvzf openvswitch-{{ ovs_version }}.tar.gz && \
rm -rf openvswitch-{{ ovs_version }}.tar.gz && \
cd openvswitch-{{ ovs_version }} && \
./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc && \
make && make install && make clean && \
rm -rf openvswitch-{{ ovs_version }} && \
apt-get purge -y gcc libc6-dev libssl-dev libcap-ng-dev && \
apt-get clean
{% endif %}

View File

@ -66,3 +66,9 @@ sources:
openstack/networking-calico:
git_url: https://github.com/openstack/networking-calico.git
git_ref: master
versions:
ovs_version: "system"
url:
ovs: http://openvswitch.org/releases