Skip to content

Commit

Permalink
Merge pull request #237 from splunk/feature/ubi-8
Browse files Browse the repository at this point in the history
Update base image to UBI8 and build with centos 8
  • Loading branch information
Ryan Faircloth authored and GitHub committed Dec 14, 2019
2 parents 9bda255 + 14ca932 commit f38135f
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 57 deletions.
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
image: $CI_IMAGE
registry: $REGISTRY
path: package
extra_build_args: --build-arg RH_ORG=$RH_ORG --build-arg RH_ACTIVATION=$RH_ACTIVATION

- docker/install-goss:
version: v0.3.7
Expand Down
2 changes: 0 additions & 2 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#
#You should have received a copy of the CC0 legalcode along with this
#work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
RH_ORG=xxxx
RH_ACTIVATION=xxxxx
SPLUNK_HEC_TOKEN=a778f63a-5dff-4e3c-a72c-a03183659e94
SPLUNK_PASSWORD=Changed@11
SPLUNK_START_ARGS=--accept-license
Expand Down
3 changes: 0 additions & 3 deletions docker-compose-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ services:
image: splunk/scs:latest
build:
context: ./package
args:
RH_ORG: ${RH_ORG}
RH_ACTIVATION: ${RH_ACTIVATION}
entrypoint:
- "tail"
- "-f"
Expand Down
3 changes: 0 additions & 3 deletions docker-compose-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ services:
image: rfaircloth/scs:edge
build:
context: ./package
args:
RH_ORG: ${RH_ORG}
RH_ACTIVATION: ${RH_ACTIVATION}
hostname: sc4s
ports:
- "514"
Expand Down
5 changes: 1 addition & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,9 @@ services:
image: splunk/scs:latest
build:
context: ./package
args:
RH_ORG: ${RH_ORG}
RH_ACTIVATION: ${RH_ACTIVATION}
hostname: sc4s
#When this is enabled test_common will fail
command: -det
# command: -det
ports:
- "514:514"
- "601:601"
Expand Down
64 changes: 24 additions & 40 deletions package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,27 @@
#
#You should have received a copy of the CC0 legalcode along with this
#work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
FROM registry.access.redhat.com/rhel7/rhel
FROM centos:centos8

ARG RH_ORG
ARG RH_ACTIVATION

ENV CONFIGURE_FLAGS="--prefix=/opt/syslog-ng --with-ivykis=system --with-jsonc=system --disable-env-wrapper --disable-memtrace --enable-tcp-wrapper --disable-linux-caps --disable-man-pages --enable-all-modules --enable-force-gnu99 --enable-json --enable-native --enable-python --enable-http --enable-kafka --disable-java --disable-java-modules --disable-spoof_source --disable-sun_streams --disable-sql --disable-pacct --disable-mongodb --disable-amqp --disable-stomp --disable-redis --disable-systemd --disable-geoip --disable-geoip2 --disable-riemann --disable-smtp --disable-snmp_dest --with-python=3 --enable-dynamic-linking"
ENV CONFIGURE_FLAGS="--prefix=/opt/syslog-ng --with-ivykis=system --with-jsonc=system --disable-env-wrapper --disable-memtrace --disable-tcp-wrapper --disable-linux-caps --disable-man-pages --enable-all-modules --enable-force-gnu99 --enable-json --enable-native --enable-python --enable-http --disable-kafka --disable-java --disable-java-modules --disable-spoof_source --disable-sun_streams --disable-sql --disable-pacct --disable-mongodb --disable-amqp --disable-stomp --disable-redis --disable-systemd --disable-geoip --disable-geoip2 --disable-riemann --disable-smtp --disable-snmp_dest --with-python=3 --enable-dynamic-linking"

ENV DISTCHECK_CONFIGURE_FLAGS="--prefix=/opt/syslog-ng --with-ivykis=system --with-jsonc=system --disable-env-wrapper --disable-memtrace --enable-tcp-wrapper --disable-linux-caps --disable-man-pages --enable-all-modules --enable-force-gnu99 --enable-json --enable-native --enable-python --enable-http --enable-kafka --disable-java --disable-java-modules --disable-spoof_source --disable-sun_streams --disable-sql --disable-pacct --disable-mongodb --disable-amqp --disable-stomp --disable-redis --disable-systemd --disable-geoip --disable-geoip2 --disable-riemann --disable-smtp --disable-snmp_dest --with-python=3 --enable-dynamic-linking"
COPY confluent.repo /etc/yum.repos.d/confluent.repo
RUN subscription-manager register --org=$RH_ORG --activationkey=$RH_ACTIVATION --force
RUN subscription-manager repos --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-server-rhscl-7-rpms
RUN yum update -y; yum install wget -y
RUN rpm --import https://packages.confluent.io/rpm/5.2/archive.key
RUN cd /tmp ;\
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm ;\
yum install epel-release-latest-7.noarch.rpm -y ;\
rm epel-release-latest-7.noarch.rpm
RUN yum install findutils autoconf \
autoconf-archive automake ca-certificates git libtool pkgconfig bison byacc file \
flex pcre-devel glib2-devel openssl-devel librdkafka-devel libcurl-devel \
rh-python36 rh-python36-python-tools rh-python36-scldevel\
net-snmp-devel \
libuuid-devel cmake make libxslt docbook-style-xsl gcc-c++ tzdata libxml2 sqlite \
json-c-devel gnupg wget curl which bzip2 doxygen libsecret ivykis-devel -y
ENV DISTCHECK_CONFIGURE_FLAGS="--prefix=/opt/syslog-ng --with-ivykis=system --with-jsonc=system --disable-env-wrapper --disable-memtrace --disable-tcp-wrapper --disable-linux-caps --disable-man-pages --enable-all-modules --enable-force-gnu99 --enable-json --enable-native --enable-python --enable-http --disable-kafka --disable-java --disable-java-modules --disable-spoof_source --disable-sun_streams --disable-sql --disable-pacct --disable-mongodb --disable-amqp --disable-stomp --disable-redis --disable-systemd --disable-geoip --disable-geoip2 --disable-riemann --disable-smtp --disable-snmp_dest --with-python=3 --enable-dynamic-linking"

RUN subscription-manager unregister
RUN dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y ;\
dnf install 'dnf-command(config-manager)' -y ;\
dnf config-manager --set-enabled PowerTools -y; \
dnf update -y

RUN dnf group install "Development Tools" ;\
dnf install findutils autoconf \
autoconf automake ca-certificates git libtool pkgconfig bison byacc file \
flex pcre-devel glib2-devel openssl-devel libcurl-devel \
python3 python3-devel \
net-snmp-devel \
libuuid-devel cmake make libxslt gcc-c++ tzdata libxml2 sqlite \
gnupg wget curl which bzip2 libsecret ivykis-devel autoconf-archive json-c-devel -y

RUN echo source scl_source enable rh-python36 >>/etc/profile.d/enablepython36.sh ;\
source scl_source enable rh-python36

RUN CRITERION_VERSION=2.3.3 ;\
cd /tmp/;\
Expand All @@ -48,32 +40,24 @@ RUN CRITERION_VERSION=2.3.3 ;\

COPY syslog-ng /work

RUN source scl_source enable rh-python36 ;\
cd /work;\
pip install -r requirements.txt ;\
RUN cd /work;\
pip3 install -r requirements.txt ;\
./autogen.sh ;\
./configure $CONFIGURE_FLAGS ;\
make -j -l 2.5 install


FROM registry.access.redhat.com/ubi7/ubi

COPY confluent.repo /etc/yum.repos.d/confluent.repo
FROM registry.access.redhat.com/ubi8/ubi

RUN cd /tmp ;\
yum install -y wget ;\
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm ;\
yum install epel-release-latest-7.noarch.rpm -y ;\
rm epel-release-latest-7.noarch.rpm ;\
rpm --import https://packages.confluent.io/rpm/5.2/archive.key ;\
yum install gcc tzdata libdbi libsecret libxml2 sqlite tcp_wrappers librdkafka \
rh-python36 rh-python36-python-tools libcurl ivykis scl-utils tcp_wrappers-libs curl wget openssl -y;\
echo source scl_source enable rh-python36 >>/etc/profile.d/enablepython36.sh ;\
source scl_source enable rh-python36
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y; \
dnf update -y ;\
dnf install wget gcc tzdata libdbi libsecret libxml2 sqlite \
python3 libcurl ivykis scl-utils curl wget openssl -y

ENV DEBCONF_NONINTERACTIVE_SEEN=true

RUN source scl_source enable rh-python36 ; curl -fsSL https://goss.rocks/install | GOSS_VER=v0.3.7 sh
RUN curl -fsSL https://goss.rocks/install | GOSS_VER=v0.3.7 sh
COPY goss.yaml /etc/goss.yaml

COPY --from=0 /opt/syslog-ng /opt/syslog-ng
Expand Down
8 changes: 4 additions & 4 deletions package/confluent.repo
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
#work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
[Confluent.dist]
name=Confluent repository (dist)
baseurl=https://packages.confluent.io/rpm/5.2/7
baseurl=https://packages.confluent.io/rpm/5.3/7
gpgcheck=1
gpgkey=https://packages.confluent.io/rpm/5.2/archive.key
gpgkey=https://packages.confluent.io/rpm/5.3/archive.key
enabled=1

[Confluent]
name=Confluent repository
baseurl=https://packages.confluent.io/rpm/5.2
baseurl=https://packages.confluent.io/rpm/5.3
gpgcheck=1
gpgkey=https://packages.confluent.io/rpm/5.2/archive.key
gpgkey=https://packages.confluent.io/rpm/5.3/archive.key
enabled=1

0 comments on commit f38135f

Please sign in to comment.