Feedback/Questions
I am not an expert at CI/CD, so when I wrote this article I passed it out to some people for feedback, to make sure I had not missed the mark. Here are some of the points raised and my responses.
- Q: What's the level of technical skill required to set this up?
- A: Quite a lot. Some of the Oracle features discussed here will not be very familiar to many DBAs, and possibly out of the reach of many developers unless they want to invest a lot of time. Containers have become a staple of software development, but are still new to many DBAs, so there is a learning curve here. With the exception of using something like Flashback Database, which should be understood by all DBAs, many of the solutions could be taxing.
- Q: What resources are we talking if we wanted to do this setup in the cloud?
- A: Most of the database cloud services focus on replacing traditional relatively static databases. Yes, you can create and drop databases at will, but they don't focus on speed of provisioning the service, and they give you little in the way of managing the "seed" data. My current attitude would be this would require Infrastructure as a Service (IaaS), with the DBAs and developers taking on the role of setting this up and managing it. I don't think the current batch of container cloud services bring anything to the mix to help you here, but I am not an expert so I could be wrong.
- Q: What can't I do if I'm using something like autonomous databases?
- A: I think the best you can hope for is the recovery approach. This is not being critical of this service, or any other cloud service. They just weren't designed for this purpose.
- Q: How do I manage my test data?
- A: Yes. That's really hard. Keeping the testing environment up to date with production, whilst still retaining reasonable and deterministic test cases can be a challenge. I touched on this briefly above, and that is about all I'm qualified to say.
- Q: Do we need this for unit testing or only larger scale system/integration testing?
- A: It depends. I work on one project where all database calls are replaced by hard-coded stubs for unit tests, so no actual database calls are made. It's a small project and this makes unit testing easier, and allows it to scale really well. Many developers could unit test at the same time without using up masses of resources on lots of databases. Most importantly, all the tests are repeatable. Clearly this would be meaningless for integration testing. This is why a number of approaches have been presented. You clearly have to approach the problem differently when comparing the unit testing of a small utility and the integration testing of a large application that works on lots of data.
- Q: Could this be used to run tests in parallel by having multiple environments spun up at once?
- A: Some of the options, like the self-contained docker image, lend themselves to having multiple environments simultaneously. Others are are more like the traditional Dev/Test/UAT/Live approach. A lot depends on the requirements from the database, and importantly the application layer. If you are testing a monolithic application layer, it is unlikely firing up a 1000 databases in Docker containers will be useful to you.
- Q: How do you manage database patching and specifically upgrades, what impact does that have on your test setup?
- A: For all the options listed, database upgrades and patches would require a recreation of the seed database. Either a new copy of production that was upgraded, or a manual upgrade of the existing seed database. This would then form the new seed used for subsequent testing until the next patch/upgrade. Management of this would be interesting.
- Q: Is approaching database testing and deployment like it's any other type of software a mistake?
- A: Clearly there are a lot of problems that are very data-specific. It is very different to running up and app server container and dropping in a new version of an application. Some people would argue that another engine might be easier to deal with, but most of this is really a matter of scale. I can do a convincing demo of a two table application in any engine, but what matters is how *you* need to use it. Most CI/CD pipelines are presented and discussed from the application layer perspective, and they tend to skirt around the data side of things. I believe this is why many developers like No/SQL databases. It allows them to delay the hard decisions.
- Q: At what point in your deployment does this add the most value?
- A: For large databases I think you will go for a more traditional Dev/Test/UAT/Live approach, and the pipeline will be more focused on automating and improving the efficiency of that. In this case, we are focusing more on the deployment mechanism itself and the integration testing later on in the testing cycle.
- Q: CI/CD would work for small self-contained applications or loosely coupled applications, but how would it work for larger monolithic applications, especially third party applications?
- A: I think every application would have to be dealt with in a case-by-case basis. If you are in total control of your environment CI/CD becomes a lot easier, as you can pick the technology stacks that work for you, and design your applications with this in mind. If you are working with legacy and/or third party applications you will be focusing on improving the flow through a more traditional environment setup. One size does not fit all.
- Q: What do you do with legacy systems?
- A: See answer to the previous question.
- Q: What scale does the option best apply too, 1 deploy a month or thousands a day?
- A: The "thousand deployments a day" approach is focused on the development of loosely coupled applications. If you could create a subset of a database that allows you to test that piece of the application and house it in a Docker image, this would work for that type of scenario. Having said that, I think that's a really small proportion of the customer base for your typical Oracle development. I suspect the requirements would be much more limited for many people. As mentioned before, many people will focus on improving the flow in traditional environment setups.
- Q: Is this the dirty secret of development that no one wants to talk about?
- A: It really does feel that way. Over the last few years I've questioned a lot of people about this and I'm yet to hear a satisfactory answer beyond, "Yeah. Data is difficult."
- Q: In "traditional" software development, i.e. separate from the database, you are actively trying to reduce state and inter-dependency. For databases they represent the antithesis of this. They are all state and inter-dependency. Comment?
- A: Yes. When I discuss Oracle in containers I say the database is the ultimate in "state", which you are trying to cram into a container that is focused on being stateless. It's no surprise these are odd bed-fellows. Even so, this doesn't mean you can't take advantage of containers, and use that knowledge to alter how you approach more traditional systems. In many cases, providing APIs as web services can allow these types of environments to co-exist. Neither is right or wrong. Neither is the best or worst. They often serve different purposes.
- Q: A person could do pretty well for themselves as a consultant just in this domain, right?
- A: A person could drive themselves insane trying!
For more information see:
Hope this helps. Regards Tim...