Re: containers

From: Tim Hall <tim_at_oracle-base.com>
Date: Wed, 29 May 2019 19:54:55 +0100
Message-ID: <CAP=5zEgq3EgiXoju_UEb60oYOOjeiNA8b5Vc0gvKR5bC8MG9wg_at_mail.gmail.com>



You would not typically make the database itself part of the image. The database would reside in (a) the read-write layer of the container if you don't care about losing it (yuck), or (b) more commonly in a persistent volume.

You need to get representative data into the DB, or what's the point of testing using it right? If the storage is being handled outside the container, then you can use whatever storage wizardry you want to seed it. A snapshot of the before image of the data files can be replaced between tests. This is not much different to what you might do with a VM or even physical. It also drastically reduces your startup time if you are not having to create a new DB and load data as part of the startup.

I'm sure someone will come up with another clever way of doing it, but this is the way I do it, without the clever storage wizardry. :)

Cheers

Tim...

On Wed, May 29, 2019 at 7:20 PM Jeff Chirco <backseatdba_at_gmail.com> wrote:

> Ok I can understand CICD environments but how big were these databases?
> Isn't the database part of the docker image? And did data change from
> production not matter?
>
> On Wed, May 29, 2019 at 8:29 AM Seth Miller <sethmiller.sm_at_gmail.com>
> wrote:
>
>> We use Docker and now Kubernetes extensively in CICD software testing,
>> including in some cases Oracle databases. In a product I worked in
>> previously, we used Docker to spin up dozens of Oracle RAC systems daily.
>> This was a couple of years ago when Oracle told us it was impossible and
>> pointless.
>>
>> Seth
>>
>> On Wed, May 29, 2019 at 2:17 AM Tim Hall <tim_at_oracle-base.com> wrote:
>>
>>> Hi.
>>>
>>> We are using Docker for the application layer mostly. We have out Oracle
>>> REST Data Services (ORDS) running on Tomcat inside Docker. It's awesome and
>>> saves me so much time and is so much more flexible compared to when I was
>>> using regular tomcat instances. I think Docker fits in the middle tier so
>>> well that I now get annoyed when I have to use a regular VM.
>>>
>>> For one project I do web servers (Nginx), app servers (Rails) and
>>> databases (PorsgreSQL) all in Docker, using Swarm to define the
>>> infrastructure. I'm very happy with it. Small footprint database etc. Every
>>> weekend I rebuild all the images and replace the whole infrastructure with
>>> the latest & greatest in a few minutes. The "maintenance window" is a
>>> complete replacement of the entire stack. Docker is awesome for this.
>>> Obviously, config and data is kept in persistent volumes so it isn't lost.
>>>
>>> Typically I wouldn't recommend using Oracle in Docker. It works. I do it
>>> for demos, but really it's a play thing. I can't imagine doing anything
>>> serious with an Oracle database and Docker. Speaking to other folks, I get
>>> the same vibe from them. Large monolithic applications (Oracle, WebLogic
>>> etc.) don't play too well with Docker. They don't follow the typical
>>> container lifecycle of throw it away and replace with a newer version of
>>> the software.
>>>
>>> I've written a bunch of stuff about it here.
>>>
>>> https://oracle-base.com/articles/linux/articles-linux#docker
>>>
>>> I think that pretty much sums up my opinion on it, but it is just my
>>> opinion. :)
>>>
>>> Cheers
>>>
>>> Tim...
>>>
>>>>
>>>>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed May 29 2019 - 20:54:55 CEST

Original text of this message