Initial documentation on Server, added toc

This commit is contained in:
Deon George 2018-03-08 00:34:16 +11:00
parent 568fece78b
commit 12ef07f1a1
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
9 changed files with 203 additions and 13 deletions

View File

@ -87,12 +87,13 @@ anchorjs: false # if you want to customize anchor. chec
#ga_domain: yoursite
# Sidebar settings
sidebar: false # whether or not using Sidebar.
sidebar: true # whether or not using Sidebar.
sidebar-about-description: "Deon George"
sidebar-avatar: img/ironman-draw.png # use absolute URL, seeing it's used in both `/` and `/about/`
#widgets:
#- featured-tags
widgets:
- toc
#- short-about
#- featured-tags
#- recent-posts
#- category
#- friends-blog
@ -157,3 +158,7 @@ deploy:
type: git
repository: http://dev.leenooks.net/deon/spdocker
branch: pages
clean_css:
exclude:
- '*.min.css'

55
package-lock.json generated
View File

@ -319,6 +319,25 @@
"readdirp": "2.1.0"
}
},
"clean-css": {
"version": "3.4.28",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-3.4.28.tgz",
"integrity": "sha1-vxlF6C/ICPVWlebd6uwBQA79A/8=",
"requires": {
"commander": "2.8.1",
"source-map": "0.4.4"
},
"dependencies": {
"source-map": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"requires": {
"amdefine": "1.0.1"
}
}
}
},
"cliui": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
@ -376,6 +395,14 @@
"resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.2.tgz",
"integrity": "sha1-EoGcZPr5VEbsCuB/5sr7brNwiyI="
},
"commander": {
"version": "2.8.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz",
"integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=",
"requires": {
"graceful-readlink": "1.0.1"
}
},
"compressible": {
"version": "2.0.13",
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.13.tgz",
@ -1641,6 +1668,11 @@
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
},
"graceful-readlink": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
},
"har-schema": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
@ -1778,6 +1810,29 @@
"safe-json-stringify": "1.1.0"
}
},
"hexo-clean-css": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/hexo-clean-css/-/hexo-clean-css-0.0.3.tgz",
"integrity": "sha1-hGY6ScB28pcJyXEzY/8ktJK/CTg=",
"requires": {
"bluebird": "2.11.0",
"clean-css": "3.4.28",
"minimatch": "3.0.4",
"object-assign": "2.1.1"
},
"dependencies": {
"bluebird": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz",
"integrity": "sha1-U0uQM8AiyVecVro7Plpcqvu2UOE="
},
"object-assign": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz",
"integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo="
}
}
},
"hexo-front-matter": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/hexo-front-matter/-/hexo-front-matter-0.2.3.tgz",

View File

@ -7,6 +7,7 @@
},
"dependencies": {
"hexo": "^3.6.0",
"hexo-clean-css": "0.0.3",
"hexo-generator-archive": "^0.1.4",
"hexo-generator-category": "^0.1.3",
"hexo-generator-cname": "^0.3.0",

View File

@ -4,4 +4,126 @@ header-img: img/header_img/server.jpg
date: 2018-03-07 09:50:12
description: Spectrum Protect Server in a Docker Container
---
TBA
# Putting Spectrum Protect into a Container
(These instructions as based on Spectrum Protect 8.1.4. References to *SP* means Spectrum Protect.)
## Create your Dockerfile
As at the time of writing these instructions, Red Hat linux is not available in the Docker hub - but CentOS is a good clone. We'll use it
### Image preparation
```Dockerfile
FROM centos:7
```
Next we need to install some dependancies - these are documented in the Knowledge Center as a requirement for running SP on Linux
```Dockerfile
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/*
```
<small>**NOTE**: During the installation of SP, it tests to make sure it is running on RedHat linux by testing the existence of an RPM package `redhat-release`. The redhat-release installed on line 1 is a fake RPM package - it installs no files, but just emulates the existance of that required RPM package.</small>
### Spectrum Protect Installation
Now copy in our silent install configuration files
```Dockerfile
COPY install.xml install-fp.xml /tmp/
```
<small>**NOTE**: We only include the silent install configuration files here - not the installation media, otherwise the size of the resulting Docker image is too big. Current versions of `docker build` do provide the ability to "flatten" the resulting container, but those instructions are outside the scope of this tutorial.</small>
**INCLUDE LINKS TO install.xml files**
Next, is performing a silent installation of SP.
```Dockerfile
RUN mkdir -p /tmp/build/8.1.0 && cd /tmp/build/8.1.0 && \
curl -SL http://SITE_URL/docker/tsm/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 && \
mkdir -p /tmp/build/8.1.x && cd /tmp/build/8.1.x && \
curl -SL http://SITE_URL/docker/tsm/8.1.x > tsm && \
chmod +x tsm && ./tsm && rm -f tsm && \
./install.sh -s -input /tmp/install-fp.xml -acceptLicense && df && \
rm -rf /tmp/install* /tmp/build/8.1.x
```
**NOTE**: Some information on what is occuring here.
* This is an "new install" (lines 1-5) then followed by an "upgrade" (lines 6-12). The reason for the new install first, is that the Spectrum Protect license files and license libraries are not available in upgrades. So you'll need to install from your downloaded media from Passport Advantage, and then upgrade it to the latest release from Fix Central.
* To avoid the resulting Docker Image being too large, we download the installation media from a web server (Line 2) and then delete it after it has been expanded (line 3). We also do the same for up upgrade package (lines 7 & 8).
* Lines 4 and 9 are silent installation methods for install SP and applying updates.
* Lines 5 and 10 delete any installation files to reduce the size of the resulting Docker Image.
### Spectrum Protect Post-Installation
Now we set our user environment that will utlimately run SP
```Dockerfile
ENV USER=tsm USERDIR=/tsm USERID=201 GROUPID=201
```
<small>**NOTE**: You can set these according to your enterprise policy. `USERDIR` will ultimately need to be persistant storage using your favourite storage provisioning methodology. I generally host mount when starting the container using `-v /host/path/user:/tsm` and it works well. I have used some 3rd party persistent storage offerings, however, they often have not worked. While I havent explored in detail why not, I suspect it is because of Direct IO calls being made by DB2 and those 3rd party offerings not supporting those sytem calls.</small>
Now we create our user
```Dockerfile
RUN groupadd servers -g ${GROUPID} && useradd -d ${USERDIR} -u ${USERID} -g ${GROUPID} -s /bin/bash ${USER}
```
Copy some default Server configuration files in place
```Dockerfile
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
```
**INCLUDE LINKS TO files**
We'll now do some post installation setup, first create the DB2 instance for our user and change the default directory for the database to be the same as the instance directory for the server.
```Dockerfile
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"
```
<small>**NOTE**: Keep all these commands on one RUN line otherwise the `db2 update dbm` command will fail with an `SQL6031N` error.</small>
Setup sqllib/userprofile
```Dockerfile
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"
```
### Final Docker Image Parameters
And our final Docker Image settings for when our container starts.
```Dockerfile
EXPOSE 1500 1543
VOLUME [ "${USERDIR}","/database","/data" ]
COPY admin.macro /tsm/
COPY init /sbin/
# Starting
ENTRYPOINT [ "/sbin/init" ]
CMD [ "start" ]
```
A complete Dockerfile is available here **TODO** if you need one as a starting point. Once you have your images loaded on a web server, the config files, you are reading to run `docker build -t ibm/spectrumprotect:8.1.x .`
If your final build is successful, you should see a Docker Image that is about 3GB.
```plain
REPOSITORY TAG IMAGE ID CREATED SIZE
ibm/spectrumprotect 8.1.1 14aba816e231 2 minutes ago 2.96GB
```
**NOTES**
* Make sure you have enough space in your `/var/lib/docker` directory - the build will use many GBs.
Now that your container is built, you'll want to start it a specific way, depending on whether you are starting a clean new instance of SP, or an existing instance. Those details are [here](here).

View File

@ -19,10 +19,10 @@
<link rel="canonical" href="<%= config.url + config.root + (page.path||'').replace('index.html', '') %>">
<!-- Bootstrap Core CSS -->
<%- css('css/bootstrap.min.css') %>
<%- css('css/bootstrap.css') %>
<!-- Custom CSS -->
<%- css('css/beantech.min.css')%>
<%- css('css/beantech.css')%>
<!-- Pygments Highlight CSS -->
<%- css('css/highlight') %>

View File

@ -0,0 +1,5 @@
<!-- Short About -->
<section class="visible-md visible-lg">
<h5>Table of Contents</h5>
<%- toc(page.content,{list_number:false}) %>
</section>

View File

@ -9,6 +9,9 @@
padding-right: 5%;
}
}
.container {
width: 100%;
}
.sidebar-container {
color: #bfbfbf;
font-size: 14px;
@ -22,12 +25,17 @@
color: #808080 !important;
text-decoration: none;
}
.sidebar-container a.toc-link {
color: #606060 !important;
text-decoration: none;
}
.sidebar-container a {
color: #bfbfbf !important;
}
.sidebar-container a:hover,
.sidebar-container a:active {
color: #0085a1 !important;
color: #000000 !important;
}
.sidebar-container .tags a {
border-color: #bfbfbf;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long