diff --git a/_config.yml b/_config.yml index 491b04f..85b972e 100644 --- a/_config.yml +++ b/_config.yml @@ -92,6 +92,7 @@ sidebar-about-description: "Deon George" sidebar-avatar: img/ironman-draw.png # use absolute URL, seeing it's used in both `/` and `/about/` widgets: - toc +- related-links #- short-about #- featured-tags #- recent-posts diff --git a/source/server/firstrun.md b/source/server/firstrun.md new file mode 100644 index 0000000..9a0eb9e --- /dev/null +++ b/source/server/firstrun.md @@ -0,0 +1,78 @@ +--- +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" } +--- +# 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). + 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 prefered Docker persistent volume storage technology. +> * The storage used in the example below is from the host filesystems, 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 havent explored what is required for that to work. + +## Configuration +Our configuration will use these defaults + +```bash Container Variables +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 containering 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 leenooks/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. + +```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 +``` + +**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 leenooks/spectrumprotect:8.1.4 init2` + +```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. +``` + +**NOTE**: With 8.1.4 I noticed a lot of `DBI1306N` messages floating up the screen. That doesnt 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](normalrun.html). diff --git a/source/server/index.md b/source/server/index.md index 138969b..94d7d2a 100644 --- a/source/server/index.md +++ b/source/server/index.md @@ -3,6 +3,9 @@ title: Server header-img: img/header_img/server.jpg date: 2018-03-07 09:50:12 description: Spectrum Protect Server in a Docker Container +related: +- { page: "firstrun", title: "Initial Container Setup" } +- { page: "normalrun", title: "Normal Run of Container" } --- # Putting Spectrum Protect into a Container (These instructions as based on Spectrum Protect 8.1.1. References to *SP* means Spectrum Protect.) @@ -13,6 +16,8 @@ description: Spectrum Protect Server in a Docker Container > * Also make sure your host has sufficient memory to perform the build - SP requires at least 12GB of RAM to pass the installation logic. I actually perform the build on an iMac with 16GB of memory allocated to Docker. It is also using the `overlay` storage driver, which means the size of the volume the build container gets is the available free capacity of my /Users mount point. > * The accompaning files for this build are available in my [gitlab](http://dev.leenooks.net/deon/spdocker/tree/master) +> * And lastly, most importantly, running SP in a container is **not officially supported by IBM** - so you cannot make a helpdesk call about having problems. + Technically it should work without problems, but if you are experiencing a problem, be prepaid to recreate your environment on a physical host and validate that your problem still exists (and thus not a result of Docker or the implementation on Docker). ## 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 diff --git a/source/server/normalrun.md b/source/server/normalrun.md new file mode 100644 index 0000000..4432ac5 --- /dev/null +++ b/source/server/normalrun.md @@ -0,0 +1,62 @@ +--- +subtitle: Normal Run +header-img: img/header_img/server.jpg +date: 2018-03-07 09:50:12 +description: Spectrum Protect Server in a Docker Container - Normal Run +related: +- { page: "index", title: "Containerising SP" } +- { page: "firstrun", title: "Initial Container Setup" } +--- +# Normal Run of a Spectrum Protect Server (in a container) +> **NOTES**: +> * The storage used in the example below is from the host filesystems, 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 havent explored what is required for that to work. + +## Configuration +Our configuration will use these defaults + +```bash Container Variables +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. + +# Normal Run + +Starting SP for normal operations. + +`docker run --detach=true --hostname=tsm --interactive=false -v $TSM_USER:/tsm -v $TSM_DB:/database -v $TSM_DATA:/data --memory=16g -p 1500:1500 -p 1543:1543 --privileged=true --rm=false --restart=no --tty=false --name=spectrumprotect leenooks/spectrumprotect:8.1.4` + +```tsm Expected Startup, viewable by doing docker log -f spectrumprotect +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 +... +ANR8200I TCP/IP Version 4 driver ready for connection with clients on port +1500. +ANR2560I Schedule manager started. +ANR2825I License audit process 1 completed successfully - 0 nodes audited. +ANR0985I Process 1 for AUDIT LICENSE running in the BACKGROUND completed with +completion state SUCCESS at 04:09:10. +ANR0993I Server initialization complete. +IBM Spectrum Protect:SERVER1> +``` + +You should now be able to connect with the Admin Client. + +**NOTES**: +* For Spectrum Protect you need to use `--privileged=true`. From what I have worked out, DB2 needs this. I did find some notes on DB2 in docker [here](https://www.ibm.com/developerworks/data/library/techarticle/dm-1602-db2-docker-trs/index.html), and tried these options without using `--privileged=true` but DB2 still reported some errors. + I dont think it is an issue running SP in privileged mode, but if you do find a solution to have it run without full privileges, I would be interested ;) + The link above has some important tips regarding DB2 memory and the `--memory=` setting. +* When defining your DISK based storage pools (or STGPOOLDIR for your cloud pools), remember the path to your "data" is `/data` inside the container. If you use another path, you will loose that data when the container is destroyed. +* You should be able to run many SP instances on the same host (or swarm) even at different version levels. In container, they can all respond to port 1500, and outside the container, they'll need to have unique ports eg: `-p 1501:1500`, `-p 1502:1500`, etc. (Just remember to think about resource requirements and potential resource contention.) +* Use the same `--hostname=` setting that you used when running the *init* steps above. DB2 is sensitive to hostname changes. +* Spectrum Scale makes a great persistent storage filesytem for Docker containers, and gives you great optoins for Specturm Protect. For example, you could move SP to different hosts very easily (stop on hosta, start on hostb - if both hosts see the same Spectrum Scale file system and your database/data are on it). diff --git a/themes/spd/layout/_widget/related-links.ejs b/themes/spd/layout/_widget/related-links.ejs new file mode 100644 index 0000000..65c6110 --- /dev/null +++ b/themes/spd/layout/_widget/related-links.ejs @@ -0,0 +1,10 @@ +<% if (page.related) { %> +
+
Related Pages
+ +
+<% } %>