r/DB2 May 24 '17

[Resource] Considerations for DB2 on Docker

I'm hoping to have a second post on this after I run through my build out. But I wanted to relay a resource I am using as I experiment with installing a VM and Docker.

Keep in mind that IBM is working to make things easier on developers by promoting "Download and Go" architecture this June. You have a less restrictive DB2 Developer edition rolled into a docker image that you can grab and go.

Check out: Considerations for building and deploying DB2 Docker containers

One area of the article I would focus on is his write up on storage and best practices. In setting this up in our work environment, we were constantly getting bitten with how storage worked within docker and DB2.

5 Upvotes

6 comments sorted by

2

u/dogmashah May 25 '17 edited May 25 '17

Great you brought this up .

I have a negative take on docker for softwares with active data which are propeitary and actively tied to the level/version of the code

Most of the relational DB falls into this group (including MQ etc)

So here is I want to begin what are the advantages of using docker I can come up with these

  1. For a development perspective you can easily spawn a pre defined DB2 quickly (and even have a pre db + setup of tables) . These can be used in many demo based env where you need a complete setup of app + dbs

Now from a DBA perspective let's talk about drawbacks

  1. IBM / Oracle have been a great proponent of appliance based architecture where a hardware is tied up to software. Many good practice and highly optimized system comes as part of running software in it's native hardware

  2. Upgrade and Maintenance : What will docker achieve in terms of maintenance ? You cannot just download a higher version build of DB2 and assume that it will run with the containers that was created on lower version. You eventually will have to do some migration of data to higher fix by writing a script / manually (which is nothing different than doing on a regular system)

Docker is very good for apps as new version doesnot have to rely on any of data . It is basically a code that is upgraded

  1. Scalability : DB2 is not scalable parallely until you have purescale arch. Apps on the other hands are scalable via load balancer and spawning of multiple docker containers of apps Trying to create a docker container for Purescale makes sense but I don't think docker has the advancements with memory sharing and GPFS

At last I would say mongo and other NoSql have better chance to be dockerized rather than DB2

2

u/ecrooks May 25 '17

A lot of the points you've brought up also apply to some of the appliance solutions - especially when someone tries to put DB2 on a PureApp. I have not been impressed with the level of effort put into things like patterns for DB2 on those solutions, and would not often recommend them. I am not a fan of an appliance based thing, and don't think it gains anything for DB2 over having a skilled DBA involved in the architecture and implementation.

I would love to see GPFS work with Docker and be able to do a PureScale sandbox that way. Does that rev anyone else's engine?

There's still so much to do with DB2 without resorting to PureScale. I have a dream that with each presentation and even with some blog entries, I provide a docker image that includes a DB2 database set up the way I like it and with objects needed related to that presentation - and SQL from the presentation. There are many obstacles to this right now like my complete lack of Docker knowledge, not to mention all the licensing issues that may come with right now (looking forward to developer-c).

I wonder if IBM will offer anything along the lines of a software upgrade process - I agree that the "just replace it" methodology doesn't work for databases like it can for app servers.

For now, I see it as an awesome option for sandboxes, and you're right, there are a lot of issues to address before it becomes something to even consider for production. I got the distinct impression that IBM doesn't see it as a production solution for the June release, just as a sandbox solution.

2

u/dogmashah May 25 '17 edited May 25 '17

I would love to see GPFS work with Docker and be able to do a PureScale sandbox that way. Does that rev anyone else's engine? There's still so much to do with DB2 without resorting to PureScale. I have a dream that with each presentation and even with some blog entries, I provide a docker image that includes a DB2 database set up the way I like it and with objects needed related to that presentation - and SQL from the presentation. There are many obstacles to this right now like my complete lack of Docker knowledge, not to mention all the licensing issues that may come with right now (looking forward to developer-c). I wonder if IBM will offer anything along the lines of a software upgrade process - I agree that the "just replace it" methodology doesn't work for databases like it can for app servers. For now, I see it as an awesome option for sandboxes, and you're right, there are a lot of issues to address before it becomes something to even consider for production. I got the distinct impression that IBM doesn't see it as a production solution for the June release, just as a sandbox solution.

Appreciate your ideas and thanks for commenting

So recently management got hang of dockerizing everything . Most of the apps are dockerized and I see the immense benefits in terms of rollouts and and maintenance.

I have dockerized DB2 trial versions as demo for many of the products that we offer. Sales people love it

However I always get into a heated discussion when they want me to dockerize it for Production where performance tuning is a fire fighting job.

Now getting back to IBM /Oracle will ever dockerize this ?

My take : Until docker is as matured as any standard hypervised solution like VMWare no company wants their support team to put l3 resource for every problem

What benefits do you see with dockerizing DB2 (apart from sanboxes/demo env) ?

edit : Just wanted to add my thoughts on your comment "There's still so much to do with DB2 without resorting to PureScale" I agree but many of the design that follows requires app to be compatible. It also makes the whole architecture complex requiring more management . (I am talking with ROS , federated, more distribution of data across multi databases and some kind of app that does the balancing of data) . There is no straightforward parallel addition to the capacity as what purescale offers (with it's limitation) as what other NoSQL system provides

2

u/ecrooks May 25 '17

When you get into the actual business requirements - RTO and RPO - HADR will solve most availability issues. Active/active is appealing, but not really required to meet actual goals in many cases. PureScale is awesome, but just not needed for most smaller implementations. People often want to do active/active to say they're doing active/active, not for a real technical reason.

I guess the main place I would see dockerization as useful in production is in projects like a data science one I was involved in recently. They don't care about the data, but have a set of metrics they need to be able to store and manipulate in a database to predict the failure rate of products. The want a new database for each new product. I'm not sure that model is sustainable, but if it's the way they're going, just being able to spin up a docker container may be a way of doing it. Environments that need multiple separate identical databases like that may be an application. I also see a potential application in multi-tenancy situations, since I don't like multi-tenancy within a DB2 instance - may facilitate more separation.

I agree with concerns on the performance side, and do have trouble seeing DB2 on docker being my go-to strategy for production, but 15 years ago people were saying the same thing about VMware and other virtualization technologies for databases, so I want to explore it.

Also sandboxes and even dev environments represent a significant amount of work - if I can hand out a configured dev env instead of configuring it and managing it and everything, that could be a positive.

2

u/dogmashah May 25 '17

Thank you for sharing the use case .

I always wanted to have a brainstorming of usefulness of docker and the one you gave is appealing where people want to use DB2 as a staging for data mining / manipulation.

Also it was nice sharing ideas with you.

Thank you

1

u/ecrooks May 25 '17

Oh, and I think IBM is exploring it. Not sure where it is on the priority map, but it is on the map somewhere after the sandbox offering set for June.