Video : Convert CentOS to Oracle Linux

In today’s video we’ll demonstrate how to convert a CentOS installation to an Oracle Linux installation.

The video is based on this post.

The star of today’s video is Dan Norris, in a clip from a previous OpenWorld, which seems like a long distant memory now.

Cheers

Tim…

PS. I know I said there would be no more videos this year, but this was very much “of the moment”, so I thought it was worth doing.

Switching from CentOS 8 to Oracle Linux 8 (OL8)

If you’re a CentOS user, you’ve probably already seen Red Hat are ditching CentOS, and CentOS 8 will be the first casualty. At the time of writing Red Hat haven’t released a clear plan for what CentOS users should do. Neither Fedora or CentOS Stream are viable options for people looking for long term stability. There’s a suggestion that cut price RHEL licenses may be available in future, but all we know at this point is CentOS is on a road to nowhere.

One of the options you might want to consider is switching from CentOS 8 to Oracle Linux 8. Oracle Linux is a binary clone of RHEL, like CentOS. Also like CentOS, you can use Oracle Linux for free (downloads here), and that includes free updates.

But what do you do about your existing CentOS 8 installations? Well that’s really easy too, as you can convert them directly to Oracle Linux. Oracle have an overview of the process here, but it boils down to downloading a script from GitHub and running it. Here are the steps I used to do a conversion.

First, take a backup of the system, so you have a fallback restore point.

We display the contents of the “/etc/centos-release” file, which shows we have a CentOS 8.2 installation.

$ cat /etc/centos-release
CentOS Linux release 8.2.2004 (Core)
$

Download the conversion script from the Oracle GitHub repo, and run it. Then wait while it downloads the packaged as switches you from CentOS to Oracle Linux.

curl -O https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh
sudo bash centos2ol.sh

Reboot the system.

sudo reboot

We now have an Oracle Linux server running the UEK kernel.

$ sudo cat /etc/oracle-release
Oracle Linux Server release 8.3
$ uname -r
5.4.17-2036.101.2.el8uek.x86_64
$

If you don’t want to use the UEK kernel, you can switch to the Red Hat Compatibility Kernel really easily. List the current kernels.

$ ls -l /boot/vmlinuz-*
-rwxr-xr-x. 1 root root 8913656 Oct 22 22:59 /boot/vmlinuz-0-rescue-5fd85e2afa24422eb63894e2dbfa9898
-rwxr-xr-x. 1 root root 8975912 Dec 18 18:07 /boot/vmlinuz-0-rescue-caad1bd0b25943b1b526a131661074b3
-rwxr-xr-x. 1 root root 8920200 Sep 14 14:45 /boot/vmlinuz-4.18.0-193.19.1.el8_2.x86_64
-rwxr-xr-x. 1 root root 9520664 Dec 16 00:42 /boot/vmlinuz-4.18.0-240.8.1.el8_3.x86_64
-rwxr-xr-x. 1 root root 8975912 Dec 3 02:02 /boot/vmlinuz-5.4.17-2036.101.2.el8uek.x86_64
$

Set the latest Red Hat Compatibility Kernel as the default. It will be the highest version one without “uek” in the name.

$ sudo grubby --set-default /boot/vmlinuz-4.18.0-240.8.1.el8_3.x86_64
The default is /boot/loader/entries/caad1bd0b25943b1b526a131661074b3-4.18.0-240.8.1.el8_3.x86_64.conf with index 3 and kernel /boot/vmlinuz-4.18.0-240.8.1.el8_3.x86_64
$

Reboot the server.

$ sudo reboot

Now we are using the Red Hat Compatibility Kernel rather than UEK.

$ cat /etc/oracle-release
Oracle Linux Server release 8.3
$
$ uname -r
4.18.0-240.8.1.el8_3.x86_64
$

Easy!

At this point we need to do some testing to make sure we are happy with the final result!

This type of switch may not be the preferred solution for every system, but it’s simple and saves you doing a full rebuild to switch to another distribution.

If you’re still not sure about Oracle Linux, here’s a FAQ post I wrote about it.

Cheers

Tim…

Video : Vagrant Oracle Real Application Clusters (RAC) Build

In today’s video we’ll discuss how to build a 2-node RAC setup using Vagrant.

This video is based on the OL8 19c RAC build, but it’s similar to that of the OL7 19c RAC build also. If you don’t have access to the patches from MOS, stick with the OL7 build, as it will work with the 19.3 base release. The GitHub repos are listed here.

If you need some more words to read, you can find descriptions of the builds here, as well as a beginners guide to Vagrant.

The video is a talk through of using the build, not an explanation of each individual step in the build, as that would be a really long video. If you just want a RAC to play with, run the build and you’ll have one. If you want to learn about the steps involved in doing a RAC build, read the scripts that make up the build. Please don’t ask for a GUI step through of a build or I’ll be forced to ask you to read Why no GUI installations anymore? 🙂

The star of today’s video is Neil Chandler, who seems to be doing a bit of plumbing! 🙂

Cheers

Tim…

Video : Using Podman With Existing Dockerfiles (Oracle Database and ORDS)

Today’s video shows me using some of my existing Docker builds with Podman. Specifically a 19c database container and an Oracle REST Data Services (ORDS) container.

For those with an understanding of Docker, it should look really familiar, but it does introduce a twist in the form of a pod.

The video is based on this article.

You can see more information about containers here.

The star of today’s video is Bart Sjerps. It was really hard to find a piece of this recording that didn’t have James Morle wittering over everyone on it. 🙂

Cheers

Tim…

Oracle Database 19c RAC On OL8 Using Vagrant

On Sunday 17th May I started the process of putting together a Vagrant build of Oracle 19c RAC on Oracle Linux 8 (OL8.2 + EUK). I figured it would take me about 20 minutes to amend my existing OL7 build, but it took the whole of that Sunday, every evening for the following week, and the whole of the following Saturday and Sunday to complete it. There were some late nights, so from an hours perspective it well over 5 days of work. Most of that time would have been completely unnecessary if I wasn’t an idiot.

First things first. The result of that effort was this build on GitHub, with an associated article on my website describing the build in more detail.

For the remainder of this post I want to describe the comedy of errors that went into this creation. These problems were not indicative of issues with the software. These problems were totally down to me being an idiot.

Changes when using OL8

The vast majority of the build remains the same, but there was one change that was necessary when moving to from OL7 to OL8. This became evident pretty quickly. When configuring shared disks and UDEV, I switched from using partprobe to partx. It did look like partprobe was working, but it chucked out loads of errors, and partx didn’t. I found out about this from Uncle Google.

There was also a slight difference in getting the UUID of a regular VirtualBox disk in OL8, but I had already noticed that on single instance builds, so that wasn’t a problem.

Where it all started to go wrong

So with those minor changes in place, all the prerequisites built fine and I was ready to start the Grid Infrastructure (GI) installation. I try to do these builds using the stock releases, so people without Oracle Support contracts can try them. In this case that meant using the 19.3 software. This really marked the point where it all started to go wrong. I knew this build was only certified on 19.7, but I continued anyway…

None of the 19.3 installers recognised OL8, so I had to fake the Linux distribution using the following environment variable.

export CV_ASSUME_DISTID=OEL7.6

The 19.3 GI software refused to install, saying there was a problem with passwordless SSH connectivity. I tested it and it all looked good to me. I searched for solutions to this on Google and MOS, checking out everything I could find that seemed relevant. None of the solutions helped.

For the hell of it I tried on older releases of OL8. I had the same issue with OL8.1, but OL8.0 worked fine. I figured this was something to do OpenSSL or the SSH config, so I searched for more MOS notes and tried everything I could find. After a very long time I reached out to Simon Coter, who came back with an unpublished note (Doc ID 2555697.1), which included a workaround. That solved my problem for the 19.3 GI installation on OL8.2.

The GI configuration step and the DB software-only installation went fine, as they had done on OL8.0 also. Unfortunately the DBCA was failing to create a database, producing errors about passwordless SSH problems. The previous fix wasn’t helping, and I tried every variation I could find, short of totally downgrading OpenSSL.

At this point I pinged Markus Michalewicz a message, hoping he would be my salvation. In short he confirmed the build did work fine on OL8.2 if I used the 19.7 software, so the writing was on the wall. Then I stumbled on a MOS note (Doc ID 29529394.8) that explained the DBCA problem on OL8. There was no workaround, and it said it was fixed in 19.7. There is always a workaround, even if it means hacking the Linux distribution to death, but the more you do that the less realistic your build is, so at that point I conceded that it was not sensible to continue with the 19.3.

When I write it down like this it doesn’t seem like a lot, but all this took a long time. I was trying different Vagrant boxes, and eventually built some of my own for OL8.0 and OL8.2, to make sure I knew exactly what was on them. Added to that, many of the tests required full rebuilds, so I was waiting sometimes in excess of an hour to to see a success/fail message on the next test. It was soul destroying, and I nearly gave up a few times during the week.

A New Hope

Once I decided to go with the 19.7 patch things moved pretty quickly. I had the 19.3 GI installed and configured and the 19.3 DB software installed, so I added in a script to patch the lot to 19.7, and the database creation worked fine. Job done.

I cleaned things up a bit, pushed it to GitHub and put together the longer description of the build in the form of an article (see links above).

Pretty soon after I put all this live I got a comment from Abdellatif AG asking why I didn’t just use the “-applyRU” parameter in the Grid and DB software installations to apply the patches as part of the installation. At this point I felt a mix of emotions. I was kind of frustrated with myself for wasting so much time trying to get 19.3 working in the first place, then annoyed at myself for being so blinkered by the existing build I hadn’t seen the obvious solution regarding the patching. Why build it all then patch it, when you can do it right first time?

The conversion of the build to use the “-applyRU” parameter with the runInstaller and gridSetup.sh calls was really quick, but the testing took a long time, because these builds take in excess of 90 minutes each try. Things pretty much worked first time.

Now that I was effectively using 19.7 software out of the gate I figured many of the tweaks I had put in place when using the 19.3 software were no longer needed. I started to remove these tweaks and everything was good. By the end of that process I was pretty much left with the OL7-type build I started with. The vast majority of my time over the last week has been unnecessary…

Conclusion

The 19c (19.7) RAC build on OL8.2+UEK6 is pretty straight forward and works without any drama.

This process has shown me how stubborn and blinkered I can be at times. Taking a step back and getting a fresh perspective would have saved me a lot of time in the long run.

Thanks to Simon Coter, Markus Michalewicz and Abdellatif AG who all witnessed my descent into madness.

Cheers

Tim…

PS. There are some extra notes at the end of the article, which include some of the MOS notes I tried along the way. They are unnecessary for the build, but I felt like I should record them.

PPS. The image is how I feel at the end of this process.

Oracle Linux 8 (OL8) : Podman

When Oracle Linux 8 (OL8) was released, one of the first things I did was check for the Oracle supplied Docker engine. Nothing.

Not to worry I thought. They are probably waiting for UEK6 to ship before they worry about the Docker engine. I pretty much left it at that. I wasn’t really in much of a rush. To be honest, a new version of Oracle Linux doesn’t really hit my radar until the Oracle database is certified on it. 🙂

UEK6 went live in March and still no sign, so in a recent email exchange with Simon Coter I mentioned it, and was set on the path to Podman.

If I’m honest my first thought was, “Oh FFS! I’ve only just learnt Docker and now I’ve got to start again!” To qualify that, having used Oracle databases for 25 years, using Docker for about 2.5 years feels like I’ve only just started. 🙂

First things first. We currently use Docker in production, so I wanted a route to OL8 without any substantial change, should I need it. So I did this.

It’s not a recommendation. Just something to keep in my back pocket.

After a quick bout of denial I sat down and started to work through some stuff with Podman. Time for a couple of quotes to set some context.

“What is Podman? Podman is a daemonless container engine for developing, managing, and running OCI Containers on your Linux System. Containers can either be run as root or in rootless mode. Simply put: `alias docker=podman`.”

https://podman.io/

“The podmanbuildah, and skopeo container tools are provided in the Oracle Linux 8 release. These tools are compatible with the Open Container Initiative (OCI) and can be used to manage the same Linux containers that are produced and managed by Docker and other compatible container engines. Because these tools are light-weight and primarily focused on a subset of features, you can run them minus the overhead of working with a daemon process.”

Release Notes for Oracle Linux 8

After reading this, I was a little less daunted. I installed Podman on OL8 and started to play. That resulted in these posts.

The later is an example of how I run up my demo Docker system using Podman. It’s made up of a container for Oracle Database 19c, and a separate container running ORDS on Tomcat. You’ll notice I use my Docker builds with no changes. It just shows that from a basic usage perspective Podman=Docker.

A few quick things I noticed immediately when switching to Podman.

  • Networking is a little different. You define a pod to hold containers, and you expose services to the outside world at the Pod level. Containers inside the Pod can speak to each other. For the simple examples I’ve worked with is actually easier than using Docker networks.
  • There is a package called “podman-docker”, which allows you to use the Docker command, even though you are using Podman. I don’t really like this. I think it’s better to just stick to a regular alias if you feel the need to retain the Docker command. Better still, just get used to typing podman instead of docker.
  • There is no native equivalent of docker-compose. There is a podman-compose project you might want to try. Of course the name “Podman” gives you a clue about what you should really be doing. Defining pods. In addition to manually defining pods, they can get run from a YAML file that’s compatible with Kubernetes. You can generate these YAML files from an existing pod. I’ve not written up this aspect yet, but it’s coming. 🙂

So far it’s been a pretty simple journey, but remember I’m a noob. The articles and my opinions on this will evolve over time.

A quick mention about Vagrant. When I am playing with Docker and Podman I use Vagrant to build a play VM. As a result of this stuff I’ve changed things around a little. If you look at my Vagrant respository you will see the old docker directory has gone and now we have these.

I’ve now pretty much ditched my OL7 Docker environment in favour of the OL8 Podman environment. The only way I’m really going to learn it is by forcing myself to use it. 🙂

If anyone else is in the denial phase, I understand where you are at. Just get started. It’s not so bad. 🙂

Cheers

Tim…

PS. I’ve not played with Buildah and Skopeo yet.

PPS. The image has no significance. It just looks good. 🙂

Vagrant Build of AWX on Oracle Linux 7 Using Docker-Compose Method

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).

The post includes the basic Docker setup, but if you need something a little more, check out the installation article and video.

If you don’t care about the build and just need AWX up quickly, you can use this Vagrant build that does everything for you, including Docker and AWX on Oracle Linux. 🙂

Cheers

Tim…

Video : Docker : Oracle REST Data Services (ORDS) Build

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.

The star of today’s video is Colm Divilly, of ORDS fame. 🙂

Cheers

Tim…

Video : Install Docker on Oracle Linux 7 (OL7)

Today’s video is a run through installing the Docker engine on Oracle Linux 7 (OL7).

You can get the commands mentioned in this video from the following article.

You can see my other Docker posts and builds here.

The star of today’s video is Robyn Sands, formerly of the Oracle Real World Performance Group, and now something to do with some fruit company… 🙂

Cheers

Tim…

Docker : New Builds Using Oracle Linux 8 (oraclelinux:8-slim)

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.

Cheers

Tim…