Initial release
This commit is contained in:
parent
12239ff76e
commit
5deabda8f4
62
Dockerfile
Normal file
62
Dockerfile
Normal file
@ -0,0 +1,62 @@
|
||||
# NAME ibm/spectrumprotect
|
||||
# VERSION 8.1.1
|
||||
# BUILD docker build -t="ibm/spectrumprotect: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.
|
||||
FROM centos:7
|
||||
|
||||
# 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/*
|
||||
|
||||
# Installation
|
||||
COPY install.xml install-fp.xml /tmp/
|
||||
|
||||
## New Install - Base level with License
|
||||
#RUN SOURCE_URL=http://YOUR_SITE_URL_HERE && \
|
||||
# mkdir -p /tmp/build && cd /tmp/build && \
|
||||
# curl -SL ${SOURCE_URL}/8.1.4 > tsm && df && chmod +x tsm && ./tsm && rm -f tsm && df && \
|
||||
# ./install.sh -s -input /tmp/install.xml -acceptLicense && \
|
||||
# rm -rf /tmp/build
|
||||
|
||||
# New Upgrade Install - Need to get license from base level
|
||||
RUN SOURCE_URL=http://YOUR_SITE_URL_HERE && \
|
||||
mkdir -p /tmp/build/8.1.0 && cd /tmp/build/8.1.0 && \
|
||||
curl -SL ${SOURCE_URL}/8.1.0 > tsm && chmod +x tsm && ./tsm && rm -f tsm && \
|
||||
./install.sh -s -input /tmp/install.xml -acceptLicense && \
|
||||
rm -rf /tmp/build/8.1.0 && ls -al /tmp/ && df && \
|
||||
mkdir -p /tmp/build/8.1.1 && cd /tmp/build/8.1.1 && \
|
||||
curl -SL ${SOURCE_URL}/8.1.1 > tsm && chmod +x tsm && df && ./tsm && df && rm -f tsm && \
|
||||
./install.sh -s -input /tmp/install-fp.xml -acceptLicense && df && \
|
||||
rm -rf /tmp/install* /tmp/build/8.1.1 && ls -al /tmp/ && df && find /tmp/
|
||||
|
||||
# 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/
|
||||
|
||||
# Our final docker parameters
|
||||
EXPOSE 1500 1543
|
||||
VOLUME [ "${USERDIR}","/database","/data" ]
|
||||
ENTRYPOINT [ "/sbin/init" ]
|
||||
CMD [ "start" ]
|
2
admin.macro
Normal file
2
admin.macro
Normal file
@ -0,0 +1,2 @@
|
||||
REG A admin password PASSE=30 FORCEPW=Y
|
||||
GR AUTH admin CL=SY
|
6
dsm.sys
Normal file
6
dsm.sys
Normal file
@ -0,0 +1,6 @@
|
||||
SERVERName TSMDBMGR_TSM
|
||||
COMMMETHod TCPIP
|
||||
TCPSERVERAddr localhost
|
||||
TCPPort 1500
|
||||
ERRORLogname /tsm/tsmdbmgr.log
|
||||
NODEName $$_TSMDBMGR_$$
|
26
dsmserv.opt
Normal file
26
dsmserv.opt
Normal file
@ -0,0 +1,26 @@
|
||||
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
|
49
init
Executable file
49
init
Executable file
@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
NAME="SP"
|
||||
|
||||
function stop {
|
||||
echo "Stopping ${NAME}"
|
||||
echo "PLEASE connect with a client and issue HALT" && sleep 60
|
||||
}
|
||||
|
||||
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
|
||||
# @TODO: this assumes -v is used, but we have exposed the VOLUMES, so -v doesnt have to be used.
|
||||
[ ! -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 &
|
||||
|
||||
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
|
||||
|
||||
chown ${USER}:servers /database.init /tsm.init
|
||||
cp -a /tsm/.[a-z]* /tsm/* /tsm.init/
|
||||
su ${USER} -lc "mkdir /database.init/tsmdb /database.init/activelog /database.init/archlog /database.init/archfaillog /database.init/mirrorlog"
|
||||
|
||||
# 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" == "restore" ]; then
|
||||
su ${USER} -lc "dsmserv restore db ${2:+password=$2} restorekeys=yes on=DBDIRS.TXT"
|
||||
|
||||
else
|
||||
exec $@
|
||||
fi
|
112
install-fp.xml
Normal file
112
install-fp.xml
Normal file
@ -0,0 +1,112 @@
|
||||
<?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='false'/>
|
||||
-->
|
||||
|
||||
<!-- 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>
|
110
install.xml
Normal file
110
install.xml
Normal file
@ -0,0 +1,110 @@
|
||||
<?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>
|
1
tsmdbmgr.opt
Normal file
1
tsmdbmgr.opt
Normal file
@ -0,0 +1 @@
|
||||
SERVERNAME TSMDBMGR_TSM
|
Reference in New Issue
Block a user