Enabled IP address determination for Traveler

This commit is contained in:
Deon George 2018-03-16 15:59:51 +11:00
parent 8bc4e40d19
commit f0a59b762d
3 changed files with 21 additions and 13 deletions

View File

@ -7,18 +7,15 @@ stages:
variables: variables:
VERSION: 9.0.1.9-9.0.1.20 VERSION: 9.0.1.9-9.0.1.20
CACHETAG: build CACHETAG: build
DOCKER_REGISTRY: registry.leenooks.net DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
services: services:
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind - ${CI_REGISTRY}/leenooks/ci-docker:dind
before_script: before_script:
- docker info - docker info
- docker version - docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY} - echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
- echo "CI_PROJECT_PATH ${CI_PROJECT_PATH} CI_COMMIT_TAG ${CI_COMMIT_TAG} CI_COMMIT_REF_NAME ${CI_COMMIT_REF_NAME}"
- echo "CI_REGISTRY ${CI_REGISTRY} CI_REGISTRY_IMAGE ${CI_REGISTRY_IMAGE} CI ${CI}"
test: test:
stage: test stage: test
@ -33,7 +30,8 @@ test:
build: build:
stage: build stage: build
script: script:
- ( docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true ) && df - if [ -f init ]; then chmod 500 init; fi
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}

View File

@ -1,22 +1,28 @@
# NAME leenooks/domino # NAME leenooks/domino
# VERSION 9.0.1.9-9.0.1.20 # VERSION 9.0.1.9-9.0.1.20
FROM registry.leenooks.net/leenooks/base:7 FROM centos:7
RUN yum -y install unzip which perl glibc.i686 libgcc.i686 libgcc && yum clean all RUN yum -y install unzip which perl glibc.i686 libgcc.i686 libgcc && yum clean all
RUN groupadd -g 201 servers && useradd -u 202 -g 201 notes RUN groupadd -g 201 servers && useradd -u 202 -g 201 notes
# Base Version of Domino & FP # Base Version of Domino & FP
COPY response.dat response-fp.dat /tmp/ COPY response.dat response-fp.dat /tmp/
RUN mkdir /tmp/domino && df && \ RUN mkdir /tmp/domino && cd /tmp/domino && \
cd /tmp/domino && curl -SL http://yum.leenooks.net/docker/domino/9.0.1 | tar xf - && cd /tmp/domino/linux64/domino && ./install -silent -options /tmp/response.dat && df && \ curl -SL http://yum.leenooks.net/docker/domino/9.0.1 | tar xf - && \
cd /tmp/domino && curl -SL http://yum.leenooks.net/docker/domino/9.0.1.9 | tar xf - && cd /tmp/domino/linux64/domino && NUI_NOTESDIR=/opt/ibm/domino ./install -script /tmp/response-fp.dat && rm -rf /tmp/* && df cd /tmp/domino/linux64/domino && ./install -silent -options /tmp/response.dat && \
cd /tmp/domino && \
curl -SL http://yum.leenooks.net/docker/domino/9.0.1.9 | tar xf - && \
cd /tmp/domino/linux64/domino && \
NUI_NOTESDIR=/opt/ibm/domino ./install -script /tmp/response-fp.dat && rm -rf /tmp/*
# TRAVELLER # TRAVELLER
COPY response-tvl.dat /tmp/ COPY response-tvl.dat /tmp/
RUN mkdir /tmp/domino && cd /tmp/domino && \ RUN mkdir /tmp/domino && cd /tmp/domino && \
curl -SL http://yum.leenooks.net/docker/traveler/9.0.1.18 | tar xzf - && ./TravelerSetup -f /tmp/response-tvl.dat -i SILENT -l en && \ curl -SL http://yum.leenooks.net/docker/traveler/9.0.1.18 | tar xzf - && \
curl -SL http://yum.leenooks.net/docker/traveler/9.0.1.20 | tar xzf - && ./TravelerSetup -f /tmp/response-tvl.dat -i SILENT -l en && rm -rf /tmp/* && df ./TravelerSetup -f /tmp/response-tvl.dat -i SILENT -l en && \
curl -SL http://yum.leenooks.net/docker/traveler/9.0.1.20 | tar xzf - && \
./TravelerSetup -f /tmp/response-tvl.dat -i SILENT -l en && rm -rf /tmp/*
COPY domino.sh /usr/local/sbin/ COPY domino.sh /usr/local/sbin/
EXPOSE 25 80 110 143 443 465 993 995 1352 EXPOSE 25 80 110 143 443 465 993 995 1352

View File

@ -39,6 +39,10 @@ case "$1" in
ulimit -n 60000 ulimit -n 60000
fi fi
# Change our primary interface address for traveler
OURIP=$(ip route get $(ip route show 0.0.0.0/0 | grep -oP 'via \K\S+') | grep -oP 'src \K\S+')
sed -i -r "s/^(NTS_HOST_IP_ADDR)=[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/\1=${OURIP}/" notes.ini
echo -n "Starting Domino server" echo -n "Starting Domino server"
start & start &
wait wait