Skip to content

Commit

Permalink
Create a hyperkube and hypershift image and RPMs
Browse files Browse the repository at this point in the history
Remove both binaries from the origin binary. Future images will depend
on these instead of openshift-control-plane.
  • Loading branch information
smarterclayton committed Apr 25, 2018
1 parent 0d964fa commit 4464d84
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 59 deletions.
16 changes: 10 additions & 6 deletions hack/lib/constants.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,8 @@ readonly OS_ALL_IMAGES=(
origin-pod
origin-base
origin-cli
origin-hypershift
origin-hyperkube
origin-control-plane
origin-node
origin-deployer
Expand Down Expand Up @@ -347,16 +349,18 @@ function os::build::images() {
( os::build::image "${tag_prefix}-cli" images/cli ) &

# images that depend on "${tag_prefix}-base" or "${tag_prefix}-cli"
( os::build::image "${tag_prefix}-control-plane" images/origin ) &
( os::build::image "${tag_prefix}-egress-router" images/egress/router ) &
( os::build::image "${tag_prefix}-egress-http-proxy" images/egress/http-proxy ) &
( os::build::image "${tag_prefix}-egress-dns-proxy" images/egress/dns-proxy ) &
( os::build::image "${tag_prefix}-hyperkube" images/hyperkube ) &
( os::build::image "${tag_prefix}-hypershift" images/hypershift ) &
( os::build::image "${tag_prefix}-control-plane" images/origin ) &
( os::build::image "${tag_prefix}-egress-router" images/egress/router ) &
( os::build::image "${tag_prefix}-egress-http-proxy" images/egress/http-proxy ) &
( os::build::image "${tag_prefix}-egress-dns-proxy" images/egress/dns-proxy ) &
( os::build::image "${tag_prefix}-keepalived-ipfailover" images/ipfailover/keepalived ) &

for i in `jobs -p`; do wait $i; done

# images that depend on "${tag_prefix}-control-plane
# images that depend on "${tag_prefix}-control-plane"
( os::build::image "${tag_prefix}-haproxy-router" images/router/haproxy ) &
( os::build::image "${tag_prefix}-keepalived-ipfailover" images/ipfailover/keepalived ) &
( os::build::image "${tag_prefix}-deployer" images/deployer ) &
( os::build::image "${tag_prefix}-recycler" images/recycler ) &
( os::build::image "${tag_prefix}-docker-builder" images/builder/docker/docker-builder ) &
Expand Down
1 change: 1 addition & 0 deletions images/hyperkube/.cccp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
job-id: origin-hyperkube
16 changes: 16 additions & 0 deletions images/hyperkube/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# This is the official OpenShift CLI image. It can be used to get a CLI environment
# for OpenShift.
#
# The standard name for this image is openshift/origin-hyperkube
#
FROM openshift/origin-base

RUN INSTALL_PKGS="origin-hyperkube" && \
yum --enablerepo=origin-local-release install -y ${INSTALL_PKGS} && \
rpm -V ${INSTALL_PKGS} && \
yum clean all

LABEL io.k8s.display-name="OpenShift Kubernetes Server Commands" \
io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
io.openshift.tags="openshift,hyperkube"
8 changes: 8 additions & 0 deletions images/hyperkube/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
reviewers:
- smarterclayton
- stevekuznetsov
- sdodson
approvers:
- smarterclayton
- kargakis
- stevekuznetsov
2 changes: 2 additions & 0 deletions images/hyperkube/bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
1 change: 1 addition & 0 deletions images/hypershift/.cccp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
job-id: origin-hyperkube
16 changes: 16 additions & 0 deletions images/hypershift/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#
# This is the official OpenShift CLI image. It can be used to get a CLI environment
# for OpenShift.
#
# The standard name for this image is openshift/origin-hypershift
#
FROM openshift/origin-base

RUN INSTALL_PKGS="origin-hypershift" && \
yum --enablerepo=origin-local-release install -y ${INSTALL_PKGS} && \
rpm -V ${INSTALL_PKGS} && \
yum clean all

LABEL io.k8s.display-name="OpenShift Server Commands" \
io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
io.openshift.tags="openshift,hypershift"
8 changes: 8 additions & 0 deletions images/hypershift/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
reviewers:
- smarterclayton
- stevekuznetsov
- sdodson
approvers:
- smarterclayton
- kargakis
- stevekuznetsov
2 changes: 2 additions & 0 deletions images/hypershift/bin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!.gitignore
8 changes: 4 additions & 4 deletions images/ipfailover/keepalived/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#
# VIP failover monitoring container for OpenShift Origin.
# VIP failover monitoring container for OpenShift.
#
# ImageName: openshift/origin-keepalived-ipfailover
#
FROM openshift/origin-control-plane
FROM openshift/origin-base

RUN INSTALL_PKGS="kmod keepalived iproute psmisc nmap-ncat net-tools ipset ipset-libs" && \
yum install -y $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
yum clean all
COPY . /var/lib/ipfailover/keepalived/

LABEL io.k8s.display-name="OpenShift Origin IP Failover" \
io.k8s.description="This is a component of OpenShift Origin and runs a clustered keepalived instance across multiple hosts to allow highly available IP addresses." \
LABEL io.k8s.display-name="OpenShift IP Failover" \
io.k8s.description="This is a component of OpenShift and runs a clustered keepalived instance across multiple hosts to allow highly available IP addresses." \
io.openshift.tags="openshift,ha,ip,failover"
EXPOSE 1985
WORKDIR /var/lib/ipfailover
Expand Down
9 changes: 5 additions & 4 deletions images/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This is an OpenShift Origin node image with integrated OpenvSwitch SDN.
# This is an OpenShift node image with integrated OpenvSwitch SDN.
#
# This image expects to have a volume mounted at /etc/origin/node that contains
# a KUBECONFIG file giving the node permission to talk to the master and a
Expand All @@ -14,9 +14,10 @@ COPY system-container/system-container-wrapper.sh /usr/local/bin/
COPY system-container/manifest.json system-container/config.json.template system-container/service.template system-container/tmpfiles.template /exports/

RUN INSTALL_PKGS=" \
origin-hyperkube origin-node origin-sdn-ovs \
socat ethtool device-mapper iptables nmap-ncat e2fsprogs \
xfsprogs device-mapper-persistent-data ceph-common \
origin-sdn-ovs libmnl libnetfilter_conntrack conntrack-tools \
libmnl libnetfilter_conntrack conntrack-tools \
libnfnetlink iptables iproute bridge-utils procps-ng ethtool socat openssl \
binutils xz kmod-libs kmod sysvinit-tools device-mapper-libs dbus \
iscsi-initiator-utils bind-utils \
Expand All @@ -27,8 +28,8 @@ RUN INSTALL_PKGS=" \
rpm -V $INSTALL_PKGS && \
yum clean all

LABEL io.k8s.display-name="OpenShift Origin Node" \
io.k8s.description="This is a component of OpenShift Origin and contains the software for individual nodes when using SDN." \
LABEL io.k8s.display-name="OpenShift Node" \
io.k8s.description="This is a component of OpenShift and contains the software for individual nodes when using SDN." \
io.openshift.tags="openshift,node"

ENV OPENSHIFT_CONTAINERIZED=true \
Expand Down
33 changes: 0 additions & 33 deletions images/node/Dockerfile.centos7

This file was deleted.

40 changes: 28 additions & 12 deletions origin.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%global openvswitch_version 2.6.1
# this is the version we obsolete up to. The packaging changed for Origin
# 1.0.6 and OSE 3.1 such that 'openshift' package names were no longer used.
%global package_refector_version 3.0.2.900
%global package_refactor_version 3.0.2.900
%global golang_version 1.9.1
# %commit and %os_git_vars are intended to be set by tito custom builders provided
# in the .tito/lib directory. The values in this spec file will not be kept up to date.
Expand Down Expand Up @@ -86,7 +86,7 @@ BuildRequires: krb5-devel
BuildRequires: rsync
Requires: %{name}-clients = %{version}-%{release}
Requires: iptables
Obsoletes: openshift < %{package_refector_version}
Obsoletes: openshift < %{package_refactor_version}

#
# The following Bundled Provides entries are populated automatically by the
Expand All @@ -107,13 +107,22 @@ teams and applications. It provides a secure and multi-tenant configuration for
Kubernetes allowing you to safely host many different applications and workloads
on a unified cluster.

%package hypershift
Summary: %{product_name} server commands

%description hypershift
%{summary}

%package hyperkube
Summary: %{product_name} Kubernetes server commands

%description hyperkube
%{summary}

%package master
Summary: %{product_name} Master
Requires: %{name} = %{version}-%{release}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Obsoletes: openshift-master < %{package_refector_version}
Obsoletes: openshift-master < %{package_refactor_version}

%description master
%{summary}
Expand All @@ -127,6 +136,7 @@ Summary: %{product_name} Test Suite
%package node
Summary: %{product_name} Node
Requires: %{name} = %{version}-%{release}
Requires: %{name}-hyperkube = %{version}-%{release}
Requires: docker >= %{docker_version}
Requires: util-linux
Requires: socat
Expand All @@ -138,7 +148,7 @@ Requires: conntrack-tools
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Obsoletes: openshift-node < %{package_refector_version}
Obsoletes: openshift-node < %{package_refactor_version}
Obsoletes: tuned-profiles-%{name}-node
Provides: tuned-profiles-%{name}-node

Expand All @@ -147,7 +157,7 @@ Provides: tuned-profiles-%{name}-node

%package clients
Summary: %{product_name} Client binaries for Linux
Obsoletes: openshift-clients < %{package_refector_version}
Obsoletes: openshift-clients < %{package_refactor_version}
Requires: git
Requires: bash-completion

Expand All @@ -157,7 +167,7 @@ Requires: bash-completion
%if 0%{?make_redistributable}
%package clients-redistributable
Summary: %{product_name} Client binaries for Linux, Mac OSX, and Windows
Obsoletes: openshift-clients-redistributable < %{package_refector_version}
Obsoletes: openshift-clients-redistributable < %{package_refactor_version}
BuildRequires: goversioninfo

%description clients-redistributable
Expand All @@ -179,7 +189,7 @@ Requires: bind-utils
Requires: ethtool
Requires: procps-ng
Requires: iproute
Obsoletes: openshift-sdn-ovs < %{package_refector_version}
Obsoletes: openshift-sdn-ovs < %{package_refactor_version}

%description sdn-ovs
%{summary}
Expand Down Expand Up @@ -356,8 +366,6 @@ chmod 0744 $RPM_BUILD_ROOT/usr/sbin/%{name}-docker-excluder
%doc README.md
%license LICENSE
%{_bindir}/openshift
%{_bindir}/hyperkube
%{_bindir}/hypershift
%{_bindir}/openshift-deploy
%{_bindir}/openshift-f5-router
%{_bindir}/openshift-recycle
Expand All @@ -379,6 +387,14 @@ chmod 0744 $RPM_BUILD_ROOT/usr/sbin/%{name}-docker-excluder
%{_libexecdir}/%{name}
%{_libexecdir}/%{name}/extended.test

%files hypershift
%defattr(-,root,root,0700)
%{_bindir}/hypershift

%files hyperkube
%defattr(-,root,root,0700)
%{_bindir}/hyperkube

%files master
%defattr(-,root,root,0700)
%config(noreplace) %{_sysconfdir}/origin/master
Expand Down

0 comments on commit 4464d84

Please sign in to comment.