Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for beta app dev pack #1

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
domino1000_AppDevPack/resources/ibm_domino_V10_appdev_pack_V1.0_linux64_beta.tar
domino1001/resources/domino1001installer/DOM_SVR_V10.0.1_64_BIT_Lnx.tar
domino1001_AppDevPack/resources/DOMINO_APPDEV_PACK_1.0_LNX_EN.tar
domino1001_AppDevPack_101/resources/
domino1001_FP1/resources/
15 changes: 15 additions & 0 deletions domino1000_AppDevPack/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM klehmann/domino:10.0.0

ENV DOM_SRC=resources/
ENV NUI_NOTESDIR /opt/ibm/domino/notes/latest/linux

COPY ${DOM_SRC}/ibm_domino_V10_appdev_pack_V1.0_linux64_beta.tar ${NUI_NOTESDIR}

RUN cd ${NUI_NOTESDIR} && \
tar -xf ${NUI_NOTESDIR}/ibm_domino_V10_appdev_pack_V1.0_linux64_beta.tar && \
cd /opt/ibm/domino/notes/latest/linux && \
ls -la libnotes.so && \
tar -xf ${NUI_NOTESDIR}/proton-addin-0.1.0-5497660.tgz && \
/bin/bash -c "sh -v ./setup_proton.sh"

EXPOSE 25 80 443 1352 3002
17 changes: 17 additions & 0 deletions domino1000_AppDevPack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Download Domino 10 Beta App Dev Pack installation archive
===========================================================

Domino 10 beta app dev pack installation archive is expected to be downloaded, the .tgz extracted to "resources" which should give a file named "ibm_domino_V10_appdev_pack_V1.0_linux64_beta.tar".

The file is not included in this repository for licensing reasons.


Create Docker image for Domino 10
=============================================================================
The Dockerfile in this directory creates a new Docker image klehmann/domino:10.0.0-appdev based on "centos" and installs Domino 10.

docker build -t klehmann/domino:10.0.0-appdev .

Once installed, you will need to add proton to the server tasks and set the listen port and address, as in the documentation. This process just copies the files across and sets permissions on make_certs.sh and make_keyring.sh.

Note: no action is taken to enforce HTTPS access to proton in the docker image
3 changes: 3 additions & 0 deletions domino1000_AppDevPack/resources/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Download the Domino 10 app dev pack beta, extract it in this directory and ensure it's named "ibm_domino_V10_appdev_pack_V1.0_linux64_beta.tar".

You should also extract the tar file locally, because it includes the file "domino-appdev-docs-site.tgz", which is a ZIP file containing the documentation.
69 changes: 69 additions & 0 deletions domino1001/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
FROM centos

ENV DOM_SCR=resources/initscripts
ENV DOM_CONF=resources/serverconfig/domino1001_response.dat
ENV DOM_ENTRYPOINT_FILE=resources/entrypoint/domino_docker_entrypoint.sh
ENV DOM_DOMINO10INSTALLER=resources/domino1001installer/DOM_SVR_V10.0.1_64_BIT_Lnx.tar

# environment variable required by Domino setup

ENV NUI_NOTESDIR /opt/ibm/domino/

# install latest linux patches and setup notes user and group

RUN yum update -y && \
yum install -y which && \
yum install -y nano && \
yum install -y wget && \
yum install -y bc && \
yum install -y perl && \
useradd -ms /bin/bash notes && \
usermod -aG notes notes && \
usermod -d /local/notesdata notes && \
sed -i '$d' /etc/security/limits.conf && \
echo 'notes soft nofile 60000' >> /etc/security/limits.conf && \
echo 'notes hard nofile 80000' >> /etc/security/limits.conf && \
echo '# End of file' >> /etc/security/limits.conf

RUN mkdir -p /tmp/sw-repo && \
mkdir -p /tmp/sw-repo/serverconfig

# copy the Domino 10 installer archive
COPY ${DOM_DOMINO10INSTALLER} /tmp/sw-repo/

# copy the server setup file (which components to install)
COPY ${DOM_CONF} /tmp/sw-repo/serverconfig/

# copy entrypoint file to start the initial server setup or the server process
COPY ${DOM_ENTRYPOINT_FILE} /domino_docker_entrypoint.sh
RUN chmod 775 /domino_docker_entrypoint.sh

# download domino installer and do a silent installation
RUN cd /tmp/sw-repo/ && \
tar -xf DOM_SVR_V10.0.1_64_BIT_Lnx.tar &&\
cd /tmp/sw-repo/linux64/domino && \
/bin/bash -c "./install -silent -options /tmp/sw-repo/serverconfig/domino1001_response.dat" && \
cd / && \
rm /tmp/* -R

# copy startup script and set execution rights

RUN mkdir -p /etc/sysconfig/
COPY ${DOM_SCR}/rc_domino /etc/init.d/
RUN chmod u+x /etc/init.d/rc_domino && \
chown root.root /etc/init.d/rc_domino
COPY ${DOM_SCR}/rc_domino_script /opt/ibm/domino/
RUN chmod u+x /opt/ibm/domino/rc_domino_script && \
chown notes.notes /opt/ibm/domino/rc_domino_script
COPY ${DOM_SCR}/rc_domino_config /etc/sysconfig/

USER notes
WORKDIR /local/notesdata
ENV LOGNAME=notes
ENV PATH=$PATH:/opt/ibm/domino/

# define which internal ports to expose when running

EXPOSE 25 80 443 1352

CMD ["/domino_docker_entrypoint.sh"]
19 changes: 19 additions & 0 deletions domino1001/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Download Domino 10.0.1 installation archive
===========================================================

Domino 10.0.1 installation archive is expected to be downloaded to "resources/domino10installer" and named "DOM_SVR_V10.0.1_64_BIT_Lnx.tar".

The file is not included in this repository for licensing reasons.


Create Docker image for Domino 10.0.1
=============================================================================
The Dockerfile in this directory creates a new Docker image klehmann/domino:10.0.1 based on "centos" and installs Domino 10.

docker build -t klehmann/domino:10.0.1 .

Starting new Docker containers with this image runs the server in listen mode for remote server setup on port 1352.

Next steps
============
Go to directory "domino1001_scriptsupport" and extend this Docker image to run the first server setup from the command line.
2 changes: 2 additions & 0 deletions domino1001/resources/domino1001installer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Download the Domino 10.0.1 installer in this directory and name it "DOM_SVR_V10.0.1_64_BIT_Lnx.tar".

3 changes: 3 additions & 0 deletions domino1001/resources/entrypoint/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Entrypoint script for the Docker image that runs the Domino server in listen mode on port 1352 for remote server setup when the server.id is missing.

Copyright Daniel Nashed https://www.nashcom.de/nshweb/pages/startscript.htm
76 changes: 76 additions & 0 deletions domino1001/resources/entrypoint/domino_docker_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#!/bin/sh

###########################################################################
# Docker Entrypoint - Start/Stop Script for Domino on xLinux/zLinux/AIX #
# Version 3.2.0 30.10.2018 #
# #
# (C) Copyright Daniel Nashed/NashCom 2005-2018 #
# Feedback [email protected] #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.#
# See the License for the specific language governing permissions and #
# limitations under the License. #
###########################################################################

# This script is the main entry point for Docker container and used instead of rc_domino.
# You can still interact with the start script invoking rc_domino which is Docker aware.
# This entry point is invoked by Docker to start the Domino server and also acts as a shutdown monitor.

DOMINO_DOCKER_CFG_SCRIPT=/docker_prestart.sh
DOMINO_START_SCRIPT=/opt/ibm/domino/rc_domino_script

stop_server ()
{
echo "--- Stopping Domino Server ---"
su - notes -c "$DOMINO_START_SCRIPT stop"
echo "--- Domino Server Shutdown ---"
exit 0
}

# "docker stop" will send a SIGTERM to the shell. catch it and stop Domino gracefully.
# Ensure to use e.g. "docker stop --time=90 .." to ensure server has sufficient time to terminate.

trap "stop_server" 1 2 3 4 6 9 13 15 17 19 23

# Check if server is configured. Else start custom configuration script
if [ ! -e "/local/notesdata/server.id" ]; then
if [ ! -z "$DOMINO_DOCKER_CFG_SCRIPT" ]; then
if [ -x "$DOMINO_DOCKER_CFG_SCRIPT" ]; then
$DOMINO_DOCKER_CFG_SCRIPT
fi
fi
fi

# Check if server is configured. Else start remote configuation on port 1352
if [ ! -e "/local/notesdata/server.id" ]; then

echo "--- Configuring Domino Server ---"
su - notes -c "cd /local/notesdata; /opt/ibm/domino/bin/server -listen 1352"
echo "--- Configuration ended ---"
echo
fi

# Finally start server

echo "--- Starting Domino Server ---"

su - notes -c "$DOMINO_START_SCRIPT start"

# Wait for shutdown signal. This loop should never terminate, because it would
# shutdown the Docker container immediately and kill Domino.

while true
do
sleep 1
done

return 0

3 changes: 3 additions & 0 deletions domino1001/resources/initscripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Domino server startup scripts, copied to /etc/sysconfig/

Copyright Daniel Nashed https://www.nashcom.de/nshweb/pages/startscript.htm
Loading