(gentle chiming music)
- Hey, folks.
I'm Nate Lager,
technical marketing manager here at Red Hat.
I'm here today to share with you the power of Image Builder,
hosted on the Red Hat Hybrid Cloud Console
when used in conjunction with AWS
as a cloud provider to create easily repeatable,
customizable base image deployments
for use across any infrastructure.
(gentle chiming music)
So I'm going to start out here
by just going right here to the hybrid cloud console.
This is where you would access things like Red Hat Insights,
or vulnerability management,
or OpenShift, or a number of other things.
But what we're going to do is head up here to the menu,
go to Red Hat Enterprise Linux, go to Red Hat Insights.
Now, on the screen that loads,
in that same menu down toward the bottom,
we're going to find Image Builder.
Now, once you go into Image Builder,
let's close that menu so it's out of our way,
you're going to see any images that have already been built.
Obviously, I have quite a few in here.
You'll probably have none if you've never been here before.
You'll just have a button that says Create Image.
In my case, I'm going to make a new one.
So when we go to create a new image,
the questions are relatively simple here.
We're going to select what base image
we want to install from.
Now, we can use RHEL 8 or RHEL 9.
There's also options in here for things like CentOS Stream
if you're doing development work,
but we're going to focus on supported RHEL 9.
Now,
I want to be clear that we don't need to provide
any actual cloud provider credentials
in order to make this work.
The hybrid cloud console will share an image
with your cloud provider so that you can then build an image
or build a instance from that image.
So we're going to pick AWS.
And you'll notice over on the side here
in the steps that are still left to be completed,
Amazon Web Services has showed up
underneath target environment.
That means that we're going to have to take an action there.
Now,
I also want to call attention
to these other options at the bottom here
and also the fact that if we wanted to,
we could select more than one cloud provider here.
So if you're a multi-cloud or hybrid cloud customer,
you could easily deploy the same image to any cloud provider
or on-premises technologies like VMware,
virtualization like KVM, or even a bare metal installer.
This will output an ISO file
that you can burn to a USB stick,
plug into a physical server,
and build the same image right there.
We're going to stick with just AWS for now.
Let's click Next.
That's going to ask for an account ID.
Now, this is not a credential necessarily.
This is the identifier from AWS.
You can retrieve your account ID
from the AWS Management Console.
I'm going to switch to another tab here
where I have my AWS Management Console open
and show you where you can grab it.
So from the management console at the upper right here,
which is a little blocked by my camera at the moment,
you can click on the menu where it has your name, right?
And then right here is your account ID.
You can simply, there's a little copy button right here.
Click on it and it'll copy it to your clipboard.
Now, we don't need that open now.
So we're going to go back here
and paste that account ID right in.
So once the account ID is pasted in there, we can hit Next.
Now,
we have options here
on how we'd like to register this system.
We can register and connect it to Insights,
We can register it only, or we can register it later.
When we do register and connect to Insights,
what this means is we'll end up with a system
that's fully registered
and has access to all of your entitled Red Hat software.
Plus it'll be registered with Insights.
So if you go back to the hybrid cloud console,
you can then get insights on your installed system.
Now,
the activation key is required
if you're going to register at build time.
So we're going to have to select an activation key.
I'm just going to select one from the list here.
There are several
'cause of the way this account is configured.
And we're going to hit Next.
Now, we can define a partition table here,
which is one of the key benefits of building
with Image Builder instead of simply picking a base RHEL
or other Linux from your cloud provider's console.
Sometimes for compliance reasons
or just because it's the way
you like to have your systems built,
you want to define a custom partition table.
And that's difficult to do on systems that are pre-built.
So what we're going to do
is we're going to make the root partition 10 gigabytes.
That's the default.
We're going to add another one for Home.
Maybe we'll make that two gigabytes
'cause we don't want our users
to eat up too much of our disk space, right?
And let's add another one.
Pretty common one that you might want is VAR.
We'll make that another four gigabytes.
And let's add one more for temp 'cause temp is another one
you don't want filling up your drive.
Now,
we have some constraints in place
so that things are written to temp
or home aren't going to fill up our partition,
but we have enough space for things like VAR and root.
Now,
another good piece of Image Builder
is that we can add in packages, right?
So let's just say we want to build a web server.
So let's add Apache.
All we have to do is search for it here.
It'll show up in the list, select it,
click the arrow, and it's in the list.
Maybe we also like an editor
that doesn't come out of the box with RHEL.
So let's add Vim and hit Next.
Now, we're going to have to give this an image name.
Now,
this image name is what's going to show up
in Image Builder on the hybrid cloud console that is
so that we can identify our image later.
In the case like I showed you earlier,
there were a lot of images.
You're going to want to make this something identifiable
and hit Next.
Now,
it gives us a quick review
of the information that we've entered;
registration information, the system configuration,
and the target environment.
If we hit Create Image,
it's now going to put it in the build queue.
You can see it right there at the top, ImageBuilder demo,
the item that we just selected.
If we expand this,
it'll give you basically just some identifying information.
Now,
we'll have to wait for the image
to actually come out at the other end
and then we can build a system based on it.
So I'm going to pause the recording for now
and we'll pick up after this image is built.
(gentle chiming music)
So now,
we've finished up the image definition
and the build itself.
You'll see in a second
that the build has completed at this point.
Now,
we're going to show you how to deploy it quickly
and easily to your cloud provider.
In this case AWS,
but this works with several cloud providers.
I didn't time it, but that took between five and 10 minutes.
And you can see right here that our image is ready.
So if we click on the launch instance button here or link,
what it's going to do is open up our cloud console on AWS
and bring us to the new instance window.
Now, if you're familiar with AWS and EC2 specifically,
you'll recognize that this is the new instance wizard.
What we'll do is we'll give our instance a name.
Imagebuilder-demo seems like a great name, doesn't it?
And now, you'll see we don't even have to select an image.
There's one pre-selected for us,
Composer-api and then a nice long ID.
So there's an AMI already available
within our AWS console that's based on the image
that was just churned out from Image Builder.
I didn't have to authenticate,
I didn't have to upload anything,
I didn't have to push any images around.
It's just here.
Now,
we can obviously select things like
what key we intend to use to connect to this system
and what instance type we'd like to use.
And I'm going to change the networking so that I'll be able
to access this system once it's up and running.
It's asking about a security group.
We're going to leave SSH open
because how else are we going to connect
to this system when it's built?
And as far as the basics are concerned,
that should cover it.
Let's click the launch instance button.
Now, as you might expect,
it's going to go through
and actually create an instance for us.
You can see that all of that succeeded.
If we go back to our instances list,
we should see our new instance,
imagebuilder-test right here.
And it says it's pending,
which means it's waiting to be built.
So once again,
I'm going to pause the video
while we wait for instance to build.
(gentle chiming music)
So now, our instance is up and running.
You can see we have a public IP address.
And we should be ready to connect to our instance.
So just like with most EC2 instances,
the user we're going to connect with is called ec2-user.
The same automations that build
that user into any other instance on AWS
is also built into the Image Builder built images.
So we're going to copy that IP address
and then we're going to switch on over to my terminal window
where I've actually already got the command ready to go.
So here we are at my local command prompt.
And I've already got my SSH command entered.
I've put in the proper key here,
which is my AWS key that I've used in the past.
So I've just told it to use that identity.
And here's ec2-user@
and then the IP address of our new instance.
We hit Enter.
SSH is going to do its due diligence,
and tell us that it doesn't recognize this key,
and ask us to accept it.
Once we accept it,
we should end up at a pretty familiar prompt.
Redhat-release tells us that this is RHEL 9.
So from here,
we should be able to see
that we have our repositories for our Red Hat software.
And there we have them.
So we could now install packages and whatnot.
But if you recall, during the setup, during Image Builder,
we told it to install a couple packages.
So let's check the local RPM database
and see if it has Apache installed.
There it is.
What was the other package we installed, Vim, wasn't it?
There it is.
(gentle chiming music)
And there you have it.
That was easy, right?
Now, we've got the image deployed on AWS.
And for future use,
you can just go back to your custom AMIs
and right in there will be that image builder base image.
You can even use that as a base for other customizations
that maybe you want to build into a permanent golden image.
I hope you found this video insightful.
And thanks for your time.
(gentle chiming music)