This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
spdocker/source/server/firstrun.md
2018-03-14 17:34:06 +11:00

4.6 KiB

subtitle header-img date description related
First Deployment img/header_img/server.jpg 2018-03-07 09:50:12 Spectrum Protect Server in a Docker Container - First run
page title
index Containerising SP
page title
normalrun Normal Run of Container
page title
upgrade Upgrading SP
page title
recover Recovering the SP Database

First deployment of a Spectrum Protect Server (in a container)

NOTES:

  • The following instructions are for a Spectrum Protect 8.1.4 instance. I used the same procedure described here to build the Docker Image. The only difference is that I performed a new install using the installation media that would be available from Passport Advantage. (Thus it was just an install, not an 8.1.0 install and followed by a 8.1.4 upgrade).
  • Make sure you follow the guidelines for space required as presented in the Knowledge Center. Our Docker Image will have the SP database in /database, the instance user in /tsm and storage pools in /data. Ultimately these will be volumes provisioned from the host and using host storage, or your preferred Docker persistent volume storage technology.
  • The storage used in the example below is from the host file systems, passed to the container with Docker's -v option.
  • This implementation is using DISK or CLOUD storage pool storage. While accessing tape should be possible, I haven't explored what is required for that to work.

Configuration

Our configuration will use these defaults

TSM_DB=/srv/sp/database
TSM_USER=/srv/sp/user
TSM_DATA=/srv/sp/data
  • TSM_DB is where the TSM Database will be stored on the Docker Host, and will be passed to the container with -v $TSM_DB:/database
  • TSM_USER is where the TSM Instance user's home directory is on the Docker Host, and will be passed to the container with -v $TSM_USER:/tsm
  • TSM_DATA is where the TSM Disk based storage pools are stored on the Docker Host, and will be passed to the container with -v $TSM_DATA:/data If data is stored in a cloud pool, then this would be where the acceleration pool is holding data before it gets sent to the cloud.

First Run Init #1

The first init run will be to create the database layout, and to copy the initialise database (as performed when containerising SP) onto our persistent storage.

docker run --detach=false --hostname=tsm --interactive=false -v $TSM_USER:/tsm.init -v $TSM_DB:/database.init --privileged=true --rm=true --restart=no --tty=false --name=spectrumprotect ibm/spectrumprotect:8.1.4 init1

You wont see any output, but if you look in your $TSM_USER path, you should see the familiar TSM instance owner files (like sqllib). The $TSM_DB directory should have sub directories created for the DB2 database, active and archive logs.

[root@d-1-1 test-sp-server]# ls -aln $TSM_DB
total 0
drwxr-xr-x 7 201 201 4096 Mar  8 14:30 .
drwxr-xr-x 5   0   0 4096 Mar  8 14:25 ..
drwxr-xr-x 2 201 201 4096 Mar  8 14:30 activelog
drwxr-xr-x 2 201 201 4096 Mar  8 14:30 archfaillog
drwxr-xr-x 2 201 201 4096 Mar  8 14:30 archlog
drwxr-xr-x 2 201 201 4096 Mar  8 14:30 mirrorlog
drwxr-xr-x 2 201 201 4096 Mar  8 14:30 tsmdb

NOTE: The UID/GID should be the same as you defined in your Dockerfile

First Run Init #2

The second init run will now run the post-install setup for a new environment (dsmserv formatdb and then create the ADMIN user).

docker run --detach=false --hostname=tsm --interactive=false -v $TSM_USER:/tsm -v $TSM_DB:/database --privileged=true --rm=true --restart=no --tty=false --name=spectrumprotect ibm/spectrumprotect:8.1.4 init2

ANR7800I DSMSERV generated at 16:03:41 on Nov 17 2017.

IBM Spectrum Protect for Linux/x86_64
Version 8, Release 1, Level 4.000

Licensed Materials - Property of IBM
...
ANR0916I IBM Spectrum Protect distributed by International Business Machines is
now ready for use.
ANR2068I Administrator ADMIN registered.
ANR2076I System privilege granted to administrator ADMIN.
ANR1912I Stopping the activity log because of a server shutdown.
ANR0369I Stopping the database manager because of a server shutdown.

NOTE: With 8.1.4 I noticed a lot of DBI1306N messages floating up the screen. That doesn't appear to be an actual problem.

The "Init" steps will only need to be run the once for any "new" instance of SP. Thereafter, you'll start SP using the Normal steps documented here.