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

88 lines
5.1 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)
2019-05-06 05:00:01 +00:00
2018-03-08 04:33:23 +00:00
> **NOTES**:
2019-06-28 01:28:11 +00:00
> * The following instructions are for a Spectrum Protect 8.1.8 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 from the IBM public website. (Thus it was just an install, not an 8.1.0 install and followed by a 8.1.8 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.8/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
2019-06-28 02:17:40 +00:00
SP_DB=/srv/sp/database
SP_USER=/srv/sp/user
SP_DATA=/srv/sp/data
SP_IMAGE=ibm/spectrumprotect:8.1.8
2018-03-08 04:33:23 +00:00
```
2019-06-28 02:17:40 +00:00
* **SP_DB** is where the TSM Database will be stored on the Docker Host, and will be passed to the container with `-v ${SP_DB}:/database`
* **SP_USER** is where the TSM Instance user's home directory is on the Docker Host, and will be passed to the container with `-v ${SP_USER}:/tsm`
* **SP_DATA** is where the TSM Disk based storage pools are stored on the Docker Host, and will be passed to the container with `-v ${SP_DATA}:/data`
2019-07-02 00:16:16 +00:00
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. Make sure that this directory is owned by your SP instance user ID that you used in the [DockerFile](/server/#Spectrum-Protect-Post-Installation) when you built the container.
2019-06-28 02:17:40 +00:00
* **SP_IMAGE** is the name of your docker image (if you followed the instructions on this site it is `ibm/spectrumprotect:8.1.8`
2018-03-08 04:33:23 +00:00
## 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
2019-06-28 02:17:40 +00:00
`docker run --detach=false --hostname=tsm --interactive=false -v ${SP_USER}:/tsm.init -v ${SP_DB}:/database.init --privileged=true --rm=true --restart=no --tty=false --name=spectrumprotect ${SP_IMAGE} init1`
2018-03-08 04:33:23 +00:00
2019-06-28 02:17:40 +00:00
You wont see any output, but if you look in your ${SP_USER} path, you should see the familiar TSM instance owner files (like sqllib). The ${SP_DB} directory should have sub directories created for the DB2 database, active and archive logs.
2018-03-08 04:33:23 +00:00
```bash Example
2019-06-28 02:17:40 +00:00
[root@d-1-1 test-sp-server]# ls -aln ${SP_DB}
2018-03-08 04:33:23 +00:00
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
2019-05-06 05:00:01 +00:00
The second init run will now run the post-install setup for a new environment (`dsmserv formatdb` and then create the ADMIN user - using the macro file added during the build).
2018-03-08 04:33:23 +00:00
2019-06-28 02:17:40 +00:00
`docker run --detach=false --hostname=tsm --interactive=false -v ${SP_USER}:/tsm -v ${SP_DB}:/database --privileged=true --rm=true --restart=no --tty=false --name=spectrumprotect ${SP_IMAGE} init2`
2018-03-08 04:33:23 +00:00
```tsm Expected Output
2019-05-06 05:00:01 +00:00
ANR7800I DSMSERV generated at 00:18:30 on Feb 5 2019.
2018-03-08 04:33:23 +00:00
IBM Spectrum Protect for Linux/x86_64
2019-05-06 05:00:01 +00:00
Version 8, Release 1, Level 7.000
2018-03-08 04:33:23 +00:00
Licensed Materials - Property of IBM
...
2018-04-03 02:17:10 +00:00
ANR0152I Database manager successfully started.
ANR2976I Offline DB backup for database TSMDB1 started.
ANR2974I Offline DB backup for database TSMDB1 completed successfully.
...
2018-03-08 04:33:23 +00:00
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.
```
2019-06-28 01:28:11 +00:00
<small>**NOTE**: With 8.1.8 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
2019-05-06 05:00:01 +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).