In today’s video we’ll take a look at Docker Compose, which allows you to define multi-container applications. In this example we are using the Oracle REST Data Services and Oracle Database 19c images we built on Oracle Linux 8 (oraclelinux:8-slim) in previous videos.
For those that prefer to read, this is based on the following information.
I may need to do a bunch of scripting related to our load balancers, and I have the choice of using the API from the servers directly, Ansible Core or the web services exposed by AWX. I wanted to play around with AWX anyway, so that seemed like a good excuse…
First step was to install AWX. It’s pretty easy, but I must admit to spending a few minutes in a state of confusion until I rebooted my brain and started again. Turning things off and on always works. I’m an Oracle Linux person and “I do Docker”, so the obvious choice was to install it using the Docker-Compose method on Oracle Linux 7 (OL7).
I was so tired before the event I was really nervous I would fall asleep half way through a presentation and start snoring. 🙂 When I got there I was greeted by an array of pizzas. I wanted to eat them so badly, but then I would definitely sleep, so I resisted. 🙂 I spent a bit of time chatting to one of the hosts Shaun McLernon before the sessions started.
The agenda had a last minute change, as one of the speakers was ill, so the first presentation was a lighthearted one by Alistair Hey called “CV Driven Development – Why it’s ok not to be ‘cool’. ” He spoke about the things that trigger alarm bells when he’s looking at CVs, and used that as a segway into comparing what’s cool, with what just works. A specific case being a comparison between Kubernetes and AWS ECS, where he compared the pros and cons of each. The take home message was use the correct tool for the job, where the “correct tool” choice will be influenced by your requirements, skills and what works for your organisation.
Being short of a speaker, a couple of folks stepped up to talk about their projects in a lightning talk style. First up was Marcus Oaten with a talk about an environment built on Docker for testing new architectures for a Drupal application. Essentially using Docker to model all the services and layers to try new approaches out before having to commit to a specific architectural change.
Next up was Dan Webb speaking about the evolution of the builds used for a PHP environment he was working on. Moving from large-ish multi-purpose containers to smaller single-purpose containers with separation of duties and multi-stage builds.
I think the lightning talks worked really well. They triggered a lot of discussion, with people throwing out ideas.
The meetup was really useful. I like the “this is what we are doing” stuff, as it feels a lot more real, and shows the thought process and progression. I’m not sure about the experience level of the other folks, but I’m a Docker newbie, so this sort of thing is more important to me than hearing all about the super-cool stuff I will probably never use. I like hearing that as well, but this this stuff is more relevant to me at this stage.
I definitely plan to go again. Thanks to the folks at Black Cat Technology Solutions for sponsoring and organising the event, and to the speakers for stepping up to the plate.
In today’s video we’ll take a look at a simple Docker build for Oracle REST Data Services (ORDS). In this example we’re using Tomcat on Oracle Linux 8 (oraclelinux:8-slim), which is connecting to an Oracle 19c database.
This video is based on the following articles and links.
Yesterday evening I went along to the Birmingham Digital & DevOps Meetup for the first time. It followed the usual meetup format of quick intro, talk, break, talk then home.
First up was Elton Stoneman from Docker with “Just What Is A “Service Mesh”, And If I Get One Will It Make Everything OK?” The session started by describing the problems associated with communication between the building blocks of a system, and how a service mesh can alleviate some of them. It then moved on to some service mesh demos using Istio. These included examples of altering the routing of traffic to do canary testing and targeting specific groups etc.
Elton was really honest about the learning curve, issues and overhead associated with this sort of setup. One comment I really liked was when he showed a slide containing the following, saying that often people assume there is a progression from left to right.
Meaning people assume you learn Docker, then you need some form of orchestration so you learn Swarm. From there you naturally progress to Kubernetes and once you understand that, you will inevitably move on to a service mesh using something like Istio. Elton’s point was you don’t *have to* continue on this progression. You can step off at any point once you’ve achieved the functionality you need. I think this is a really important point and I can see it reflected in what I do with Docker. We’ve got some things that stop at just using Docker containers, with no orchestration at all. I work on a project that requires some orchestration, so we use Swarm, which is really easy to use. So far I’ve had no reason to go beyond Swarm, and even considering a service mesh is so far down the line for us. I’m not discounting the relevance of these for everyone, but they don’t make sense for me at this point.
It was a really good session and I learned a lot. You can check out Elton’s blog here.
After the break it was James Relph with “Container Security Fundamentals”. This started of with a basic introduction to containers, using that as an entry point to explain how containers can be problematic from a security perspective, and what you can do to reduce the impact. He covered a lot of stuff, some of which I already do, some I know about and some stuff that was new to me. This is not an exhaustive list.
Don’t automatically trust images from Docker hub. Do your due diligence, even when they are from a reputable source.
Use your own image repository. He mentioned ECR amongst others. This can be used for your own images, but also base images from Docker Hub, which you have verified.
Don’t use “latest”, but use specific tagged versions. Latest gives you all the latest fixes, but all the latest bugs too. You should test and verify before you let images out into your infrastructure.
Multi-stage builds to reduce the size of containers and minimise the attack surface. Basically, copy out what you need and leave the crap behind.
Using sidecar containers to provide specific services, allowing your application images to remain more focused. The sidecar images can be maintained by feature experts to make sure they are as secure as possible.
Scanning images using Clair, amongst other things, to check for dodgy software. One of the audience mentioned Anchore.
Using microVMs like Firecracker to provide additional isolation, whilst retaining the ease of use of containers. I’ve not played with this, but I have tried Kata Containers, which seems to do pretty much the same.
There was a lot in there!
I was a bit nervous going into the event thinking it would all go over my head, and some of it probably did, but it was cool. I got to speak to a few people before the event, during the break and at the end. It seemed like there were quite a mix of people there from beginners in these areas upward, so I didn’t feel out of place.
A few times I found myself thinking, that’s great, but what do I do about my 3rd party applications? I’ve written before (here) about how 3rd party apps screw everything up. 🙂
Yesterday I noticed the oraclelinux section on Docker Hub included “oraclelinux:8-slim”, so when I got home a did a quick run through some builds using it.
ol8_ords : This build is based on “oraclelinux:8-slim” and includes OpenJDK 12, Tomcat 9, ORDS 19, SQLcl 19 and the APEX 19 images.
ol8_19 : This build is based on “oraclelinux:8-slim” and includes the 19c database and APEX 19.
ol8_183 : This build is based on “oraclelinux:8-slim” and includes the 18c database and APEX 19.
There are also some new compose files, so I could test database and ORDS containers working together.
Everything worked fine, but here come the inevitable warnings and comments.
The Oracle database is not certified on Oracle Linux 8 yet, so the database builds are just for playing around, not a recommendation.
The database preinstall packages don’t exist yet, so I installed the main required packages with DNF, but I didn’t do some of the additional manual setup I would normally do, so it’s not a perfect example of an installation. I assume the preinstall packages will eventually be released, and I will substitute them in.
The ORDS build is not subject to the same certification restrictions as the database, so as far as I know, I could consider using this, although the build I use for work differs a little to this and is still using Oracle JDK 8 and Tomcat 8.5.
If you are interested in playing around with Docker, you can find my articles on it here, and my public builds here.