Compare commits

..

4 Commits
master ... oc

Author SHA1 Message Date
Deon George
2db2cef7d5 Update for SP Server 8.1.9 2019-12-13 16:37:58 +11:00
Deon George
dbcbdf68f3 Update for SP Server 8.1.7 2019-05-06 14:51:11 +10:00
Deon George
5e5cc1b0e9 Changed install password, the installer doesnt like exclamations! 2018-04-03 09:22:00 +10:00
Deon George
c09e682e72 Initial OC setup 2018-03-11 11:48:17 +11:00
8 changed files with 16 additions and 235 deletions

57
Dockerfile Normal file → Executable file
View File

@ -1,7 +1,6 @@
# NAME ibm/spectrumprotect # NAME ibm/spectrumprotect-oc
# VERSION 8.1.9 # VERSION 8.1.9
# BUILD docker build -t="ibm/spectrumprotect:latest" . # BUILD docker build -t="ibm/spectrumprotect-oc:latest" .
# START docker run -dp 1500:1500 [ -p 1543:1543 ] -v source:/tsm -v source:/data --restart=always --name=spectrum-protect ibm/spectrumprotect
# Since SP is supported on RHEL and its not available in docker, we'll use CentOS. # Since SP is supported on RHEL and its not available in docker, we'll use CentOS.
FROM centos:7 FROM centos:7
@ -9,60 +8,22 @@ FROM centos:7
# OS Installation Prerequisites # OS Installation Prerequisites
RUN yum -y install http://yum.leenooks.net/CentOS/7/base/redhat-release-7-6.el7.centos.12.2.x86_64.rpm libaio ksh compat-libstdc++-33 numactl && yum clean all && rm -rf /var/tmp/* RUN yum -y install http://yum.leenooks.net/CentOS/7/base/redhat-release-7-6.el7.centos.12.2.x86_64.rpm libaio ksh compat-libstdc++-33 numactl && yum clean all && rm -rf /var/tmp/*
# Installation COPY install-oc.xml /tmp/
COPY install.xml install-fp.xml /tmp/
# New Install - Base level without License # Installation
## If you have the version from PPA (with license files), then use install.xml instead of install-fp.xml # http://public.dhe.ibm.com/storage/tivoli-storage-management/maintenance/server/v8r1/Linux/8.1.?.???/x86_64/ ... for maintenance releases (without license files).
RUN SOURCE_URL=http://YOUR_SITE_URL_HERE SOURCE=8.1.9.000-IBM-SPSRV-Linuxx86_64.bin && \ RUN SOURCE_URL=http://YOUR_SITE_URL_HERE SOURCE=8.1.9.000-IBM-SPSRV-Linuxx86_64.bin && \
mkdir -p /tmp/build && cd /tmp/build && \ mkdir -p /tmp/build && cd /tmp/build && \
curl -SL ${SOURCE_URL}/${SOURCE} > tsm && chmod +x tsm && ./tsm && rm -f tsm && \ curl -SL ${SOURCE_URL}/${SOURCE} > tsm && chmod +x tsm && ./tsm && rm -f tsm && \
./install.sh -s -input /tmp/install-fp.xml -acceptLicense && \ ./install.sh -s -input /tmp/install-oc.xml -acceptLicense && \
rm -rf /tmp/build /tmp/install*xml rm -rf /tmp/build /tmp/install*xml
## New Upgrade Install - Need to get license from base level - which you get from PPA. the patch you can get from Fixcentral
## https://www.ibm.com/support/fixcentral
## http://public.dhe.ibm.com/storage/tivoli-storage-management/maintenance/server/v8r1/Linux/8.1.?.???/x86_64/ ... for maintenance releases (without license files).
#RUN SOURCE_URL=http://YOUR_SITE_URL_HERE SOURCE=SP_8.1_LIN86_SER_STG_ML.bin FIXPACK=8.1.9.000-IBM-SPSRV-Linuxx86_64.bin && \
# mkdir -p /tmp/build/base && cd /tmp/build/base && \
# curl -SL ${SOURCE_URL}/${SOURCE} > tsm && chmod +x tsm && ./tsm && rm -f tsm && \
# ./install.sh -s -input /tmp/install.xml -acceptLicense && \
# rm -rf /tmp/build/base && \
# mkdir -p /tmp/build/patch && cd /tmp/build/patch && \
# curl -SL ${SOURCE_URL}/${FIXPACK} > tsm && chmod +x tsm && ./tsm && rm -f tsm && \
# ./install.sh -s -input /tmp/install-fp.xml -acceptLicense && \
# rm -rf /tmp/build /tmp/install*xml
# Dont forget to change the user in the init file too
ENV USER=tsm USERDIR=/tsm USERID=201 GROUPID=201
# Setup User
RUN groupadd servers -g ${GROUPID} && useradd -d ${USERDIR} -u ${USERID} -g ${GROUPID} -s /bin/bash ${USER}
# Server options file in place
COPY dsmserv.opt tsmdbmgr.opt ${USERDIR}/
COPY dsm.sys /opt/tivoli/tsm/server/bin/dbbkapi/
RUN chmod a+r /opt/tivoli/tsm/server/bin/dbbkapi/dsm.sys
# Create TSM Instance
# Change the default directory for the database to be the same as the instance directory for the server.
RUN /opt/tivoli/tsm/db2/instance/db2icrt -a server -s ese -u ${USER} ${USER} && \
mkdir -m 750 /database && chown ${USER}:servers /database /tsm/dsmserv.opt /tsm/tsmdbmgr.opt && \
su ${USER} -lc "db2 update dbm cfg using dftdbpath ${USERDIR} && db2set -i ${USER} DB2NOEXITLIST=ON"
# Setup sqllib/userprofile
RUN su ${USER} -lc "echo setenv LD_LIBRARY_PATH /opt/tivoli/tsm/server/bin/dbbkapi:/usr/local/ibm/gsk8_64/lib64:\\\$LD_LIBRARY_PATH >> sqllib/usercshrc && echo export LD_LIBRARY_PATH=/opt/tivoli/tsm/server/bin/dbbkapi:/usr/local/ibm/gsk8_64/lib64:\\\$LD_LIBRARY_PATH >> sqllib/userprofile && echo export DSMI_CONFIG=${USERDIR}/tsmdbmgr.opt >> sqllib/userprofile && echo export DSMI_DIR=/opt/tivoli/tsm/server/bin/dbbkapi >> sqllib/userprofile && echo export DSMI_LOG=${USERDIR} >> sqllib/userprofile"
# An admin macro to create the admin user
COPY admin.macro /tsm/
# init is how we start our container, it supports a "setup" mode for new installs
COPY init /sbin/ COPY init /sbin/
# Our final docker parameters # Our final docker parameters
EXPOSE 1500 1543 EXPOSE 11443
VOLUME [ "${USERDIR}","/database","/data" ]
ENTRYPOINT [ "/sbin/init" ] ENTRYPOINT [ "/sbin/init" ]
CMD [ "start" ] CMD [ "start" ]
# Set out local time # Fix OC startup, since it cant find liberty
RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime RUN sed -i 's#^installPath=#installPath=/opt/tivoli/tsm/ui#' /opt/tivoli/tsm/ui/Liberty/bin/opscenter.rc

View File

@ -1,2 +0,0 @@
REG A admin password PASSE=30 FORCEPW=Y
GR AUTH admin CL=SY

View File

@ -1,6 +0,0 @@
SERVERName TSMDBMGR_TSM
COMMMETHod TCPIP
TCPSERVERAddr localhost
TCPPort 1500
ERRORLogname /tsm/tsmdbmgr.log
NODEName $$_TSMDBMGR_$$

View File

@ -1,26 +0,0 @@
COMMmethod TCPIP
TCPWindowsize 0
DATEformat 2
EXPInterval 0
VOLUMEHistory /tsm/VOLHIST.TXT
DEVCONFig /tsm/DEVCONFIG.TXT
DEDUPREQUIRESBACKUP NO
SSLTCPPORT 1543
ALLOWREORGINDEX YES
REORGBEGINTIME 08:00
REORGDURATION 12
THROUGHPUTDATATHRESHOLD 5
THROUGHPUTTIMETHRESHOLD 30
ARCHLOGCOMP YES
DISABLEREORGTable
DISABLEREORGIndex BF_AGGREGATED_BITFILES,BF_BITFILE_EXTENTS,BACKUP_OBJECTS,ARCHIVE_OBJECTS
DISABLEREORGCleanupindex
ACTIVELOGSize 2048
MIRRORLOGDirectory /database/mirrorlog
ARCHFAILOVERLOGDirectory /database/archfaillog
ACTIVELOGDirectory /database/activelog
ARCHLOGDirectory /database/archlog

41
init
View File

@ -5,52 +5,17 @@ NAME="SP"
function stop { function stop {
echo "Stopping ${NAME}" echo "Stopping ${NAME}"
kill $(pgrep dsmserv) /opt/tivoli/tsm/ui/Liberty/bin/opscenter.rc stop
echo "You should really connect with a client and issue HALT" && sleep 60
} }
trap 'stop' SIGTERM trap 'stop' SIGTERM
[ -z "${USER}" ] && echo "The USER environment variable is not set - this script wont work without it." && exit 1
if [ "$1" == "start" ]; then if [ "$1" == "start" ]; then
# @TODO: this assumes -v is used, but we have exposed the VOLUMES, so -v doesnt have to be used. /opt/tivoli/tsm/ui/Liberty/bin/opscenter.rc start
[ ! -f /tsm/.INIT -o ! -f /database/.INIT ] && echo "Please use -v <USER>:/tsm.init and <DATABASE>:/database.init and run init1" && exit 1
[ -x /opt/tivoli/tsm/server/bin/dsmserv ] && su ${USER} -lc /opt/tivoli/tsm/server/bin/dsmserv & ( while ps -p $(cat /opt/tivoli/tsm/ui/Liberty/usr/servers/.pid/guiServer.pid) >/dev/null; do sleep 600; done ) &
# **NOTE**: ln /opt/tivoli/tsm/server/bin/dbbkapi/dsm.sys to /tsm/dbbkapi/dsm.sys, otherwise backups will fail
ln -sf /tsm/dbbkapi/dsm.sys /opt/tivoli/tsm/server/bin/dbbkapi/dsm.sys
wait wait
# Init one needs to copy some data from the install /tsm directory to our persistent storage volume - so that volume should be mounted under /tsm.init
elif [ "$1" == "init1" ]; then
[ ! -d /tsm.init -o ! -d /database.init ] && echo "ERROR: /tsm.init or /database.init doesnt exist" && exit 1
cp -a /tsm/.[a-z]* /tsm/* /tsm.init/
mkdir /database.init/tsmdb /database.init/activelog /database.init/archlog /database.init/archfaillog /database.init/mirrorlog
chown -R ${USER}:servers /database.init /tsm.init
# Init two creates our database, and runs our admin marco.
elif [ "$1" == "init2" ]; then
su ${USER} -lc "sed -i \"s/\$(cat sqllib/db2nodes.cfg |awk '{print \$2}')/$(hostname)/\" sqllib/db2nodes.cfg"
su ${USER} -lc "dsmserv format dbdir=/database/tsmdb activelogsize=2048 activelogdirectory=/database/activelog archlogdirectory=/database/archlog archfailoverlogdirectory=/database/archfaillog mirrorlogdirectory=/database/mirrorlog"
[ -f $(eval echo ~${USER}/admin.macro) ] && su ${USER} -lc "dsmserv runfile admin.macro"
touch /database/.INIT
touch /tsm/.INIT
elif [ "$1" == "upgrade" ]; then
[ ! -f /tsm/.INIT -o ! -f /database/.INIT ] && echo "Please use -v <USER>:/tsm.init and <DATABASE>:/database.init and re-run upgrade" && exit 1
/opt/tivoli/tsm/db2/instance/db2iupdt -d ${USER}
elif [ "$1" == "restoredb" ]; then
su ${USER} -lc "dsmserv restore db ${2:+password=$2} restorekeys=yes on=DBDIRS.TXT"
elif [ "$1" == "restore" ]; then
echo "! Running [dsmserv $@]"
su ${USER} -lc "dsmserv $@"
else else
exec $@ exec $@
fi fi

View File

@ -10,7 +10,7 @@
<!-- Set these variables if you are installing the OC.--> <!-- Set these variables if you are installing the OC.-->
<variable name="port" value="11443" /> <variable name="port" value="11443" />
<variable name="ssl.password" value="" /> <variable name="ssl.password" value="T$M4Ev3ryB0dY+" />
<!-- Update the value of installDir to change the installation directory.--> <!-- Update the value of installDir to change the installation directory.-->
<variable name='installDir' value='/opt/tivoli/tsm'> <variable name='installDir' value='/opt/tivoli/tsm'>
@ -36,7 +36,7 @@
<!-- Operations Center profile variables. --> <!-- Operations Center profile variables. -->
<data key="user.securePortNumber,com.tivoli.dsm.gui.offering" value="${port}" /> <data key="user.securePortNumber,com.tivoli.dsm.gui.offering" value="${port}" />
<data key="user.SSL_PASSWORD" value="T$M4Ev3ryB0dY!" /> <data key="user.SSL_PASSWORD" value="T$M4Ev3ryB0dY+" />
</profile> </profile>
<install modify='false'> <install modify='false'>
@ -45,7 +45,7 @@
<offering id='com.tivoli.dsm.server' <offering id='com.tivoli.dsm.server'
profile='IBM Tivoli Storage Manager' profile='IBM Tivoli Storage Manager'
features='com.tivoli.dsm.server.main' features='com.tivoli.dsm.server.main'
installFixes='none' selected='true'/> installFixes='none' selected='false'/>
<!-- Change selected='false' to skip install of the storage agent offering --> <!-- Change selected='false' to skip install of the storage agent offering -->
<offering id='com.tivoli.dsm.stagent' <offering id='com.tivoli.dsm.stagent'
@ -90,7 +90,7 @@
<offering id='com.tivoli.dsm.gui.offering' <offering id='com.tivoli.dsm.gui.offering'
profile='IBM Tivoli Storage Manager' profile='IBM Tivoli Storage Manager'
features='com.tivoli.dsm.gui.main_asm,com.ibm.java.jre' features='com.tivoli.dsm.gui.main_asm,com.ibm.java.jre'
installFixes='none' selected='false'/> installFixes='none' selected='true'/>
</install> </install>
<preference name='com.ibm.cic.common.core.preferences.connectTimeout' value='30'/> <preference name='com.ibm.cic.common.core.preferences.connectTimeout' value='30'/>

View File

@ -1,110 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<agent-input clean="true" temporary="true">
<variables>
<!--@ATTENTION@ Select your product license before doing a silent install. -->
<!-- Enter 'tsm' for the value of license.selection to accept the IBM Tivoli Storage Manager license -->
<!-- Enter 'tsmee' for the value of license.selection to accept the IBM Tivoli Storage Manager Extended Edition license -->
<!-- Enter 'ssam' for the value of license.selection to accept the IBM System Storage Archive Manager license -->
<variable name='license.selection' value='tsmee'/>
<!-- Set these variables if you are installing the OC.-->
<variable name="port" value="11443" />
<variable name="ssl.password" value="" />
<!-- Update the value of installDir to change the installation directory.-->
<variable name='installDir' value='/opt/tivoli/tsm'>
<!-- For Windows, update this value to change the installation directory.-->
<if name='platform:os' equals='win32' value='C:\Program Files\Tivoli\TSM'/>
</variable>
</variables>
<server>
<repository location='repository'/>
</server>
<profile id='IBM Tivoli Storage Manager' installLocation='${installDir}' >
<data key='user.license,com.tivoli.dsm.server' value='${license.selection}'/>
<!-- @ATTENTION@ If you are upgrading an exsting server instance, replace <instanceName>-->
<!-- with the instance name you are upgrading below. If you are upgrading multiple instances -->
<!-- you can add additional instanceName_update and instanceName_password lines below for each -->
<!-- additional instance. -->
<!--data key='user.<instanceName>_update,com.tivoli.dsm.server' value='true'/-->
<!-- Update this value with the instance users password. -->
<!--data key='user.<instanceName>_password,com.tivoli.dsm.server' value=''/-->
<!-- Operations Center profile variables. -->
<data key="user.securePortNumber,com.tivoli.dsm.gui.offering" value="${port}" />
<data key="user.SSL_PASSWORD" value="T$M4Ev3ryB0dY!" />
</profile>
<install modify='false'>
<!-- This will install the server offering -->
<offering id='com.tivoli.dsm.server'
profile='IBM Tivoli Storage Manager'
features='com.tivoli.dsm.server.main'
installFixes='none' selected='true'/>
<!-- Change selected='false' to skip install of the storage agent offering -->
<offering id='com.tivoli.dsm.stagent'
profile='IBM Tivoli Storage Manager'
features='com.tivoli.dsm.stagent.main'
installFixes='none' selected='false'/>
<!-- Change selected='false' to skip install of the device offering -->
<offering id='com.tivoli.dsm.devices'
profile='IBM Tivoli Storage Manager'
features='com.tivoli.dsm.devices.main'
installFixes='none' selected='false'/>
<!-- This will install the license offering -->
<offering id='com.tivoli.dsm.license'
profile='IBM Tivoli Storage Manager'
features='com.tivoli.dsm.license.main'
installFixes='none' selected='true'/>
<!-- Change selected='false' to skip install of the Language offering -->
<!-- Language Feature names:
com.tivoli.dsm.lang.spanish
com.tivoli.dsm.lang.portuguese
com.tivoli.dsm.lang.german
com.tivoli.dsm.lang.french
com.tivoli.dsm.lang.italian
com.tivoli.dsm.lang.russian
com.tivoli.dsm.lang.japanese
com.tivoli.dsm.lang.korean
com.tivoli.dsm.lang.tchinese
com.tivoli.dsm.lang.schinese
-->
<offering id='com.tivoli.dsm.lang'
profile='IBM Tivoli Storage Manager'
features=''
installFixes='none' selected='false'/>
<!-- Change selected='false' to skip install of the Operation center offering -->
<offering id='com.tivoli.dsm.gui.offering'
profile='IBM Tivoli Storage Manager'
features='com.tivoli.dsm.gui.main_asm,com.ibm.java.jre'
installFixes='none' selected='false'/>
</install>
<preference name='com.ibm.cic.common.core.preferences.connectTimeout' value='30'/>
<preference name='com.ibm.cic.common.core.preferences.readTimeout' value='45'/>
<preference name='com.ibm.cic.common.core.preferences.downloadAutoRetryCount' value='0'/>
<preference name='offering.service.repositories.areUsed' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.ssl.nonsecureMode' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication' value='false'/>
<preference name='http.ntlm.auth.kind' value='NTLM'/>
<preference name='http.ntlm.auth.enableIntegrated.win32' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.keepFetchedFiles' value='false'/>
<preference name='PassportAdvantageIsEnabled' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.searchForUpdates' value='false'/>
<preference name='com.ibm.cic.agent.ui.displayInternalVersion' value='false'/>
<preference name='com.ibm.cic.common.sharedUI.showErrorLog' value='true'/>
<preference name='com.ibm.cic.common.sharedUI.showWarningLog' value='true'/>
<preference name='com.ibm.cic.common.sharedUI.showNoteLog' value='true'/>
</agent-input>

View File

@ -1 +0,0 @@
SERVERNAME TSMDBMGR_TSM