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

81 lines
4.6 KiB
Markdown
Raw Normal View History

2018-03-08 04:33:23 +00:00
---
subtitle: First Deployment
header-img: img/header_img/server.jpg
date: 2018-03-07 09:50:12
description: Spectrum Protect Server in a Docker Container - First run
related:
- { page: "index", title: "Containerising SP" }
- { page: "normalrun", title: "Normal Run of Container" }
2018-03-08 05:37:49 +00:00
- { page: "upgrade", title: "Upgrading SP" }
2018-03-14 06:34:06 +00:00
- { page: "recover", title: "Recovering the SP Database" }
2018-03-08 04:33:23 +00:00
---
# 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](/server) 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](https://www.ibm.com/support/knowledgecenter/SSEQVQ_8.1.4/srv.install/t_srv_plan_capacity-linux.html).
2018-03-14 06:34:06 +00:00
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.
2018-03-08 04:33:23 +00:00
## Configuration
Our configuration will use these defaults
2018-03-14 06:34:06 +00:00
```bash Helpful Variables
2018-03-08 04:33:23 +00:00
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
2018-03-14 06:34:06 +00:00
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.
2018-03-08 04:33:23 +00:00
2018-03-08 05:37:49 +00:00
`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`
2018-03-08 04:33:23 +00:00
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.
```bash Example
[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
```
<small>**NOTE**: The UID/GID should be the same as you defined in your Dockerfile</small>
## 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).
2018-03-08 05:37:49 +00:00
`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`
2018-03-08 04:33:23 +00:00
```tsm Expected Output
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.
```
2018-03-14 06:34:06 +00:00
<small>**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.</small>
2018-03-08 04:33:23 +00:00
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](normalrun.html).