The OpenShift 4.0 Developer Preview (registration required) is available for Amazon Web Services (AWS), and if you’re anything like me, you want to be among the first to get your hands on it.
The starting point is registering, where you’ll find overview information and that important “Get Started” button. Click it and you’re off to the big show.
(If you aren't a Red Hat Developer member, this is your reason to sign up. In fact, you must be a member in order to access the information and bits, but it’s free and easy and valuable, so why not?)
Once you get to the Developer Preview page, you’ll find the instructions and necessary links. If you’re already skilled in using AWS, you’ll speed right along with no problems. But if you’re anything like I was two weeks ago, you’re a newbie to AWS and additional information would be helpful. This blog post is that “additional information."
My newbie experience
There are some things you’ll need to do or understand or points that will make your life easier. As a newbie to AWS, I've gathered them here so you won't struggle or fail where I did.
You need to register your cluster domain in AWS Route 53
What is AWS Route 53? It’s the AWS DNS server. You need your domain to be registered there so AWS can direct traffic to your cluster, which means…you need a domain.
If this is experimental, evaluation, or proof-of-concept work you’re doing, I suggest registering a cheap domain for use here. I registered rhdemos.com, which was available and cheap (about eight dollars a year) and allows me to have complete freedom with the domain without worrying about muddying the waters of another (production) domain. It’s just easier for me to manage.
I registered rhdemos.com in Route 53 and received a message that it may take a while, but it turned out to be just a few minutes. This is good; computers are all about speed, and I hate waiting.
This was all new territory to me, and I managed to find my way through the AWS documents (the link to the documents is on the Developer Preview page). The part of this that struck me as “good to know” was this: I downloaded files and configured my credentials on my work MacBook Pro—only on that single machine. I can also do the same thing for any other machine I use, but my life is easier (okay, I’m lazy) by just sticking to this particular machine when working with OpenShift 4.0 on AWS. Not a big deal. If you want to enable multiple machines, you may want to do this step on several machines at the same time while it’s all fresh in your mind. That's not a problem; it's just a consideration.
Now you're almost ready
I just needed to download the installer and then I’d be ready to go. I followed the link on the Developer Preview page, made sure it was in my path and enabled (that is,
chmod +x…), and I was ready.
Now for the fun and easy part: You simply run the command
./openshift-install create cluster and off it goes. Just be certain you have all your credentials and settings right. If you don’t, the install won’t succeed (don’t ask me how I know this). If it does fail, and you’re lazy or not-thinking like I was, you go into AWS and start deleting assets right and left, all over the place.
Or, if you’re smarter than I was, you can run
./openshift-install --help and see that you can simply use the command
./openshift-install destroy cluster to delete everything and start over.
Boy did I felt dumb.
./openshift-install destroy cluster can be used to remove a cluster and all the associated artifacts.
You can create and wipe things out quickly
After running the command to destroy things, I ran the install with no problems. During the install, you’ll be asked which AWS region to use (I used my default value), the base domain (remember, the domain name you registered?), a cluster name (whatever you want), and a "pull secret." The pull secret comes from the Developer Preview web page and is unique to your email address. I copied mine to a document on my Mac’s desktop to keep it handy.
The OpenShift installation took nearly 24 minutes (Figure 1, below), after which it displayed important information about logging in, passwords, and web access (Figure 2, below). Keep this information handy.
Since I’m just experimenting with OpenShift 4.0 on AWS, I regularly create and destroy a cluster. I have not been leaving the cluster running 24x7; why spend the money if it’s not necessary? It’s just too easy to create a cluster and then destroy it at the end of the day. This is definitely a big plus, and kudos to the engineers for making this so easy.
You now have options
Yes, you can run OpenShift on your local PC using minishift. And that’s a great way to ease into OpenShift. But if you want to kick things up a notch (like, say, installing and using Red Hat CodeReady Workspaces) or give other team members at work access to your cluster, this works swimmingly. Plus, the performance is better than minishift running on your PC (which is sharing CPU cycles with Slack, Chrome, your email client, and so on).
Don’t forget: The AWS meter is running
You’re running things on AWS. You will pay for the AWS resources (for CPU cycles and disk and all the other parts). You can run up a hefty bill if you’re not mindful. Keep tabs on things, and destroy the cluster if you don’t need it. You’ve been warned.
Go for it
By combining the real-world advice above with the excellent instructions on the Developer Preview page, you can have OpenShift 4.0 Developer Preview up and running on AWS in minutes. This is your chance to grab those bragging rights ... I mean, to evaluate. Yeah.Last updated: March 27, 2023