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 : Podman : Generate and Play Kubernetes YAML Files

Today’s video demonstrates Podman’s ability to generate and play Kubernetes YAML files.

This is based on the following article.

You can might want to check out these also.

The star of today’s video is Max McDonald, son of Connor McDonald.

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…

Video : Install Podman on Oracle Linux 8 (OL8)

In today’s video we’ll take a look at installing Podman on Oracle Linux 8 (OL8).

This is based on the article here.

You can see more information about containers here.

The star of today’s video is John King. John’s been on the channel a couple of times before. Once to do a message to one of his super-fans, a work colleague of mine who was impressed that I know John, and once for a regular “.com” appearance. I blame the wife for the terrible audio. 🙂

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

Oracle Linux 8 (OL8) : Vagrant and Docker builds for 19c Database

A couple of days ago I mentioned the certification of Oracle database 19c on Oracle Linux 8 (OL8) with UEK6.

I’ve had a bunch of OL8 articles and builds for a while, but up until now they’ve included warnings to say they weren’t certified. Over the last couple of evenings I’ve made some changes, so I thought I would summarise then here.

Database 19c on OL8 Article

My article on installing 19c on OL8 (from July last year) now includes the new preinstall package. It also mentions that the installation will work without patches, but it will not be supported unless you include the 19.7 patches, and are using UEK6.

Oracle Database 19c Installation On Oracle Linux 8 (OL8)

Vagrant Build

I’ve had a vagrant build of 19c on OL8 since last year. This has been amended to use the new preinstall package, and to optionally include the 19.7 patches if you’ve downloaded them. By default the patch script is commented out, so folks without a support contract can still use the build. This isn’t meant to be a “supported build”, so I’m not personally bothered about the patches for it, but it seemed a little wrong to not include them, even if it is lip-service.

https://github.com/oraclebase/vagrant/tree/master/database/ol8_19

The base box is ‘bento/oracle-8’, which hasn’t been updated to 8.2 and UEK6 yet. Once again, this doesn’t phase me. The ‘bento/oracle-8’ image tracks the latest release (8.0, 8.1, 8.2 etc.), so at some point it will updated to the latest spin and UEK6.

My go-to Vagrant build has typically been the “ol7_19” build. I’m now going to switch to the “ol7_19” build.

I’ve also added 19c Data Guard build on OL8.

https://github.com/oraclebase/vagrant/tree/master/dataguard/ol8_19

Container (Docker/Podman) Build

Similar to the Vagrant build, I’ve updated by Docker build. It also uses the new preinstall package and includes and optional patch script. I’ve also switched back from the “oraclelinux:8” image to the “oraclelinux:8-slim” base image, which means I had to make some changes, like using “microdnf” instead of “dnf”. Similar to the vagrant build, I’ve left the patch script commented out by default, because I only use this build for playing and demos.

https://github.com/oraclebase/dockerfiles/tree/master/database/ol8_19

My go-to container combination was “ol7_19” plus “ol7_ords”. I’m now going to switch to “ol8_19” plus “ol8_ords” for running APEX 20.1 using containers.

What’s Next?

I’ve got a few things in the pipeline.

  • RAC on OL8 Vagrant Build. I’m unsure at the moment if I will include the patching for this, as it makes it more complicated. I might just stick with the base release. It’s definitely not production, so I’m not sure how much I care about making the build slower and more complicated.
  • I’ve got some Podman stuff I want to talk about that relates to both Vagrant and Docker, but that is better served in a separate post.

Cheers

Tim…

PS. I don’t feel I should need to say this, but experience tells me I should. This stuff on GitHub is just a playground for me. There is no error checking. It’s purposely kept simple so people can read it easily. It’s not production ready. I don’t support it. It’s not scripture. If you find value in it, that’s great. If you don’t, don’t use it. 🙂

PPS. I used the pirate costume as I thought it looked funny. There was no deeper meaning behind this. It was nearly a Pharaoh.

Oracle Linux 8 (OL8) : Updates – UEK6, Podman, Database 19c Certification

Last week I had a quick email exchange with Simon Coter from Oracle about a few things related to Oracle Linux 8. I’ve been a little out of the loop over the last few weeks because of some important world event or another, so I had a bit of catching up to do.

UEK6 Went GA

UEK6 had been in preview for a while. In March it went GA, and I managed to miss that until recently. Even if you don’t care directly about the Linux kernel, this was a big thing because it was the first UEK release on Oracle Linux 8, and most of us outside Oracle were thinking this would mark the start of certification of Oracle products on OL8 (see below).

Downloads

About a month ago Oracle announced you can download the Oracle Linux ISO images from yum.oracle.com. See here.

This is much cleaner than using eDelivery, but form experience eDelivery is a lot quicker for downloads!

Podman

In Oracle Linux 8 the Oracle supplied Docker engine has been replaced by Podman. I was blindly expecting Docker CE support, like we had with OL7, once UEK6 was released. When I asked about this I got educated about Podman. About a day later someone else mentioned it on Twitter.

I’ve got a separate blog post coming about Podman.

Oracle Linux 8.2

A few days ago Oracle Linux 8.2 was born (here).

Oracle Database 19c Certified on Oracle Linux 8

In my email exchange Simon told me WebLogic was already certified on OL8, but there had been no official announcement about the database certification yet.

Today I noticed Mike Dietrich had a blog post about this. The database is now certified on OL8. 🙂

This is the certification of 19c (19.7) database on OL8 with UEK6. I don’t know what will happen with previous database versions, but I kind-of hope they don’t certify them. I want to forget older releases exist.

Once I heard this I went on to the OL8 Yum repository and noticed the “oracle-database-preinstall-19c” package is now in the repo. Happy days.

I’ve got a separate post coming about this.

Conclusion

There’s been a lot happening while I was looking in the other direction. 🙂 The moral of this story is don’t blink, and keep looking at the Oracle Linux Blog.

Cheers

Tim…

PS. There is a lot more stuff on the Oracle Linux blog. I’ve just mentioned the things that directly affect me…

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…

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…