21
AD-1172 Shipping Domino How to Put Domino in a Container and Live Happy Book of Recipes Matteo Bisi, Daniele Vistalli @ Factor-y

Connect2016 - 1172 Shipping domino

Embed Size (px)

Citation preview

Page 1: Connect2016 - 1172 Shipping domino

AD-1172 Shipping DominoHow to Put Domino in a Container and Live Happy Book of RecipesMatteo Bisi, Daniele Vistalli @ Factor-y

Page 2: Connect2016 - 1172 Shipping domino

About us

Matteo Bisi• IBM Champions for Social Business (2014,2015,2016)

• IBM Certified Advanced System Administrator - Notes and Domino 9.0

• System engineer @ Factor-y S.r.l.

Daniele Vistalli• CEO & CTO @ Factor-y S.r.l.

• R&D nerd with business focus

Page 3: Connect2016 - 1172 Shipping domino

Docker + DominoWhat and why

Page 4: Connect2016 - 1172 Shipping domino

Docker and containers in 1 slideDocker is a way to “package” your software in an image:• File system

• System security (user/groups) & settings

• TCP Network (ports that needs to be reachable)

• Image inheritance is possible (incremental specialization)

Docker is a way to “ship & run” your software to other systems:• Start an “image” to get a container where your software runs

• Manage containers (start/stop/control etc)

• The container runs regardless of the actual (underlying) system (VM, bare metal, etc)

Page 5: Connect2016 - 1172 Shipping domino

Why package domino ? (developers edition)

Domino could be packaged to make developers happy

• Think about automated testing:

Start a clean server every time and test your software

Create “acceptance” environments in seconds

Keep an archive of images for every software release to perfrom back-version debugging/testing (start a clean server in minutes)

• Think about saving time:

Use a standard image your admin has built, just fire it up

Page 6: Connect2016 - 1172 Shipping domino

Why package domino ? (admin edition)

• Linux based servers ?

• Create images to support developers (standard deployment)

• Create images to ship & deploy your product in cloud with high density

Pack the server, the software (NSFs and plugins) and deploy

Manage upgrades by just upgrading the image and attaching the data volume (see volumes)

• Consolidate multiple servers on a single powerful machine but maintain complete isolation

Page 7: Connect2016 - 1172 Shipping domino

Dominobuilt to be packaged

Page 8: Connect2016 - 1172 Shipping domino

Program / data separation

Domino is born with clean separation, perfect for packaging

• Binary folder contains all server components

• NOTESDATA contains the “server instance”

We all know that you can often move a server by copy/paste NOTESDATA + reinstall domino. THIS IS UNIQUE

• NOTES.INI = core settings in a controllable and manageable place (no arcane binary or registry location)

Page 9: Connect2016 - 1172 Shipping domino

File systems

A Domino server filesystem is well-defined and can be managed

• NotesData : all your databases and config files

• DAOS : if DAOS is enabled.. Attachments go here

• Transaction Logs : If transaction logs enabled, you find them in a well defined place

• FTIndexes : Full-text indexes can be placed in a specific location

• View rebuild : Temporary rebuild data can also be placed “somewhere”

This is perfect, Docker has “VOLUMES” a way to define filesystem attachments that “persist” even if a container is stopped/destroyed and rebuilt.

VOLUMES allow to “mount” persistent filesystems to attach points defined in the IMAGE description

Page 10: Connect2016 - 1172 Shipping domino

Network services

• Domino is a network server

• Each service uses TCP ports

• To expose a port from a container to the “external” world you need to declare those

• Plan for your needs, identify network ports and EXPOSE

EXPOSE 80 443 1352 (and eventually others)

Page 11: Connect2016 - 1172 Shipping domino

Install and configuration automation

What about Domino setup and configuration ?

Once again we’re lucky

1. Domino server silent installRUN /bin/bash -c "/tmp/sw-repo/install -silent -options /tmp/sw-repo/unix_response.dat"

2. Recorded server configuration/opt/ibm/domino/bin/server -silent /local/notesdata/playground.pds /local/notesdata/playground.txt

Page 12: Connect2016 - 1172 Shipping domino

Lab: Creating a domino image for developers

Page 13: Connect2016 - 1172 Shipping domino

What we need (installers, dockerfile)

1. Create a “build” directory where we place our “work files”

2. Put domino server installers

3. Put FP installers for domino server

4. Create a “dockerfile” aka “Image creation script”

5. Use docker CLI to create the image and build it

Page 14: Connect2016 - 1172 Shipping domino

DockerFile anatomy

A “DockerFile” is a text file with docker commands, it

• Declares the “base image” to inherit from

• Copies files to the image filesystem

• Executes commands in the image to setup things

• Declares “VOLUME” mappings

• Declares ports to “EXPOSE”d.

Page 15: Connect2016 - 1172 Shipping domino

Setup the environment (DockerFile 1/3)# Select the base image to inherit from

FROM ubuntu:14.04

# Execute unix commands: add user, group and set limits

RUN adduser notes

RUN usermod -aG notes notes

RUN usermod -d /local/notesdata notes

RUN sed -i '$d' /etc/security/limits.conf

RUN echo 'notes soft nofile 60000' >> /etc/security/limits.conf

RUN echo 'notes hard nofile 80000' >> /etc/security/limits.conf

RUN echo '# End of file' >> /etc/security/limits.conf

Page 16: Connect2016 - 1172 Shipping domino

Install domino (DockerFile 2/3)

# Copy our installers from our build directory to the image file system

COPY sw-repo/domino901/ /tmp/sw-repo/

# Silent install domino/

RUN /bin/bash -c "/tmp/sw-repo/install -silent -options /tmp/sw-repo/unix_response.dat"

Page 17: Connect2016 - 1172 Shipping domino

Configure domino and cleanup (DockerFile 3/3)# Prepare for configuration and run scripted configuration

ENV NUI_NOTESDIR /opt/ibm/domino/

RUN cp /tmp/sw-repo/*.id /local/notesdata/

RUN cp /tmp/sw-repo/playground.* /local/notesdata/

RUN su notes -c "cd /local/notesdata && /opt/ibm/domino/bin/server -silent /local/notesdata/playground.pds /local/notesdata/playground.txt"

# Declare TCP ports to be exposed

EXPOSE 80 443 1352

# Clean up "tmp"

RUN rm -rf /tmp/*

--------------------------------------------

Now we build the image from the Unix Prompt:

Docker> docker build –f <dockerfilename>

Page 18: Connect2016 - 1172 Shipping domino

Live DemoIt’s true, not a dream

Page 19: Connect2016 - 1172 Shipping domino

Thank you

Page 20: Connect2016 - 1172 Shipping domino

Acknowledgements and DisclaimersAvailability. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates.

The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS-IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.

Page 21: Connect2016 - 1172 Shipping domino

Acknowledgements and Disclaimers cont.© Copyright IBM Corporation 2015. All rights reserved.

• U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

• IBM, the IBM logo, ibm.com, and IBM Domino are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml

Docker is a trademark of Docker, Inc.

Other company, product, or service names may be trademarks or service marks of others.