-
Notifications
You must be signed in to change notification settings - Fork 433
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change default build image to ubuntu
- Loading branch information
Showing
6 changed files
with
158 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# syntax = docker/dockerfile:experimental | ||
FROM centos:8 as ovs-rpm | ||
ENV BUILD_DATE 20200930 | ||
ARG RPM_ARCH | ||
ARG ARCH | ||
|
||
RUN yum install dnf-plugins-core -y && \ | ||
yum config-manager --set-enabled powertools && \ | ||
yum install python36 git wget openssl-devel gcc \ | ||
make python3-devel openssl-devel kernel-devel kernel-debug-devel \ | ||
autoconf automake rpm-build redhat-rpm-config libtool libcap-ng-devel \ | ||
checkpolicy selinux-policy-devel unbound unbound-devel gcc-c++ \ | ||
desktop-file-utils graphviz groff python3-sphinx -y | ||
COPY build.sh /root/build.sh | ||
RUN bash /root/build.sh && \ | ||
mkdir /rpms/ && \ | ||
cp /ovs/rpm/rpmbuild/RPMS/${RPM_ARCH}/* /ovn/rpm/rpmbuild/RPMS/${RPM_ARCH}/* /rpms && \ | ||
cd /rpms && rm -f *debug* *docker* *vtep* *ipsec* && \ | ||
rm -rf /ovs /ovn /jemalloc-5.2.1 | ||
|
||
|
||
FROM centos:8 | ||
ENV BUILD_DATE 20200930 | ||
RUN yum remove -y bind-export-libs && yum update -y && \ | ||
yum install -y \ | ||
firewalld-filesystem openssl \ | ||
libatomic \ | ||
libpcap \ | ||
hostname ethtool \ | ||
iproute nc \ | ||
unbound-devel \ | ||
tcpdump ipset logrotate && \ | ||
yum clean all | ||
ARG RPM_ARCH | ||
RUN rpm -ivh --nodeps https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Everything/${RPM_ARCH}/os/Packages/i/iptables-1.8.0-5.fc30.${RPM_ARCH}.rpm | ||
|
||
RUN mkdir -p /var/run/openvswitch && \ | ||
mkdir -p /var/run/ovn && \ | ||
mkdir -p /etc/cni/net.d && \ | ||
mkdir -p /opt/cni/bin | ||
|
||
ARG ARCH | ||
ENV CNI_VERSION=v0.8.6 | ||
RUN curl -sSf -L --retry 5 https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-linux-${ARCH}-${CNI_VERSION}.tgz | tar -xz -C . ./loopback ./portmap | ||
|
||
ENV KUBE_VERSION="v1.13.2" | ||
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/${ARCH}/kubectl -o /usr/bin/kubectl \ | ||
&& chmod +x /usr/bin/kubectl | ||
|
||
RUN --mount=type=bind,target=/rpms,from=ovs-rpm,source=/rpms rpm -ivh --nodeps /rpms/*.rpm && \ | ||
sed '/su ovn ovn/d' /etc/logrotate.d/ovn | ||
|
||
COPY *.sh /kube-ovn/ | ||
COPY grace_stop_ovn_controller /usr/share/ovn/scripts/grace_stop_ovn_controller | ||
COPY 01-kube-ovn.conflist /kube-ovn/01-kube-ovn.conflist | ||
RUN rpm -e --nodeps sqlite-libs | ||
|
||
WORKDIR /kube-ovn | ||
COPY kube-ovn /kube-ovn/kube-ovn | ||
COPY kube-ovn-cmd /kube-ovn/kube-ovn-cmd | ||
RUN ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-controller && \ | ||
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-daemon && \ | ||
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-monitor && \ | ||
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-pinger && \ | ||
ln -s /kube-ovn/kube-ovn-cmd /kube-ovn/kube-ovn-speaker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (C) 2009, 2010, 2011, 2012 Nicira, Inc. | ||
# | ||
# Copying and distribution of this file, with or without modification, | ||
# are permitted in any medium without royalty provided the copyright | ||
# notice and this notice are preserved. This file is offered as-is, | ||
# without warranty of any kind. | ||
|
||
/var/log/openvswitch/*.log { | ||
daily | ||
compress | ||
sharedscripts | ||
missingok | ||
postrotate | ||
# Tell Open vSwitch daemons to reopen their log files | ||
if [ -d /var/run/openvswitch ]; then | ||
for ctl in /var/run/openvswitch/*.ctl; do | ||
ovs-appctl -t "$ctl" vlog/reopen 2>/dev/null || : | ||
done | ||
fi | ||
endscript | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (C) 2019 Red Hat, Inc. | ||
# | ||
# Copying and distribution of this file, with or without modification, | ||
# are permitted in any medium without royalty provided the copyright | ||
# notice and this notice are preserved. This file is offered as-is, | ||
# without warranty of any kind. | ||
|
||
/var/log/ovn/*.log { | ||
daily | ||
compress | ||
sharedscripts | ||
missingok | ||
postrotate | ||
# Tell OVN daemons to reopen their log files | ||
if [ -d /var/run/ovn ]; then | ||
for ctl in /var/run/ovn/*.ctl; do | ||
ovs-appctl -t "$ctl" vlog/reopen 2>/dev/null || : | ||
done | ||
fi | ||
endscript | ||
} |