Hello and welcome to this video on managing Oracle Linux modules streams and profiles.
With Oracle Linux, new package management functions deliver content through two main
repositories, the BaseOS repository and the Application Stream, or AppStream, repository.
The BaseOS repository provides the core set of functionality in RPM packages, while the
AppStream repository includes user-space applications, languages, databases, and other packages.
Oracle Linux 8 Appstreams allows the use of modules, streams and profiles to manage different
versions of software applications.
A module is a set of RPM packages that belong together as a group.
The group can contain packages for the application, including utilities, libraries, documentation
and more.
Each module can have one or more streams which hold different versions of content for the
module.
For each module, only one of its streams can be enabled to provide access to its packages,
and only one stream of a module can be active at any time.
Each of the streams receives their updates independently.
Profiles can also be set for each module.
Profiles have lists of packages which are installed according to a use case, such as
for a server, or a minimum configuration, or for a development setup.
Modules always have a default profile used if none is selected, and combinations of profiles
can be set for a module.
Managing module streams is done through the OS Management service in the console, but
can be done using the command line.
You can read more about working with modules and streams in the documentation at this link.
In this video we will be focusing on working with AppStream modules through the Oracle
Cloud Infrastructure console.
So let's go to our console and begin using modules, streams and profiles.
Here we are looking at our Oracle Linux 8 instance.
To get to module information, we scroll down to the Resources menu and select OS Management.
This gives us the overview of the OS Management service and information about updates for
packages, bugs, etc on our node.
To get to modules, we go to the right, and hover our mouse over the three dots menu and
select View OS Management details.
From the managed instance details for OS Management we can see the default info displayed is for
available package updates, below this we select Modules.
This generates a list of all the modules that are configurable for our instance.
If we scroll down we can see there are quite a few listed, and there is one of four pages
being shown.
The module that we are going to work with in this particular video is the PHP module.
So we could search through each page one by one until we find PHP, or we can use the search
field at the top right.
If we type PHP into the search field, it filters to show us the PHP module.
In the module column is the name PHP.
The Stream column tells us the version enabled for the module.
Currently this module is not enabled, but if it was enabled, the 7.2 version shown here
would be the default version used.
As there are no profiles currently set, under the Installed Profiles column don't see any
profile name.
On the right is the status column, with a simple dash, this indicates this module is
currently not enabled or disabled.
Before we make any changes, let's go and have a look at the instance, to see the PHP module
information from the command line.
We switch to our terminal to our instance.
Using the command sudo dnf module list php, we can see the current information regarding
modules for the PHP package.
In the output we see there are four rows for PHP, 7.2 7.3 7.4 and 8.0.
At the bottom you can see a Hint, showing marker settings which are used to indetify
the settings after enabling the module, or setting a stream or profile.
We see D for default, E for enabled, X for disabled and I for installed.
Under the Stream column there are four possible streams that can be selected.
And the default being 7.2 which is what we saw in our console.
Under Profiles we see there are three profiles available to be configured, the default profile
for PHP is the Common profile as indicated by the d in brackets beside it.
There is also the Devel and the Minimal profile.
We can see that there is no letter e in brackets for Enabled, indicating this particular module
has not been enabled on this instance.
So configuration of module, streams and profiles, can be done using the command line interface
but for this video we are going to the cloud console.
Returning to the console, we can also view more about the module.
We click on the name PHP.
The Name column shows the available modules that can be used.
As the module has not been enabled yet, the status for most is disabled, but as 7.2 is
the default, it has the dash beside it.
Under Profiles is the list of profile names, each representing the various packages that
will be installed depending on the profile selected.
Clicking on the Managed Instance Details in the breadcrumbs returns us the default OS
management information for the instance.
Again, we need to select Modules and then filter for PHP.
To view stream information we click on the 7.2 name.
We now see a brief list of the packages that will be used depending on which profile we
select.
Clicking the dropdown arrow on the right of the common row, expands to show the packages
and versions used for this profile.
Clicking on the dropdown arrow for devel shows us an even longer list of packages for this
profile.
Let's now go and enable the PHP module for this instance.
Clicking on the Managed Instance Details in the breadcrumbs again we return to the default
OS management information for the instance.
Again, we need to select Modules and then filter for PHP.
To enable this module we use the three dots menu on the right, and select Edit Module.
This opens up an Edit window for the module, and it has a number of sections.
At the top is a warning that modifying module streams can impact other dependencies, so
its worth reading the guidelines at the link shown to be familiar with caveats and warnings.
We see the module name of PHP, and there is a drop down list for Module Stream allowing
us to select which stream we want to use.
We can see that 7.4 7.3 and 8.0 are disabled, as indicated in the brackets.
7.2 has a dash, which means if we enable this module without selecting a stream, 7.2 would
be chosen.
We will choose 8.0.
In the next section called Action, we use the radio buttons to enable or disable the
stream
But before we enable, lets look at the next section shows which profiles are available.
We see we cant select a profile, and this is because the stream must be enabled before
we can select a profile.
We can enable the stream now and come back later to select a profile, or we could enable
it, also choose a profile, and have both actions performed.
For now we will just enable the 8.0 stream and click the Save Changes button.
To carry out this task a work request is generated.
Under Resources we select Work Requests.
We see a request to enable the module stream for this instance under the Operation Type
column, and after a few minutes it will show succeeded, indicating it has been completed
successfully.
We click on the work request name, and select Associated Resources, there is an entry for
the module stream PHP 8.0, and one for our instance mor-olstreams2.
Returning to our terminal for our instance.
We use the sudo dnf module list php command again.
Now we see under the Stream column, beside 8.0 is the letter e in brackets, indicating
this stream is now enabled.
The rest is still the same as we have not made any profile selections.
Now let's return to our console and select a profile to use.
We click on the instance name link beside Associated Managed Instance to return to our
OS management details for the instance.
We click modules again, and put PHP into the search field.
The columns now show the 8.0 Stream and under Status we see Enabled.
We use the three dots menu on the right, and select Edit Module again.
This time in the Edit window we see the module is enabled, so we can select the profile,
here we choose devel.
We click Save Changes.
Again a work request is created, so we click on Work Requests and then on the new Install
Module Stream Profile name under Operation type.
Clicking again Associated Resources, we see the two requests with one now installing the
devel profile for the php 8.0 stream.
Returning to our terminal for our instance.
We use the sudo dnf module list php command again.
Now we see in the profiles for the 8.0 row, the letter i in brackets beside devel, indicating
this profile is installed.
Remember, we can configure multiple profiles for a module, as it will just mean all the
packages associated with each profile are installed.
Now let's disable the module stream for the instance.
Returning to the console, we click on the instance name link beside Associated Managed
Instance to return to our OS management details for the instance.
We click modules again, and put PHP into the search field.
Here we now see the 8.0 stream and devel profile configured for the enabled module.
Click the three dots menu on the right, and select Edit Module.
Back in our edit window, we see that we cannot select either of the radio buttons to enable
or disable the module stream.
This is because we must first remove any profiles associated with our stream selection before
we can disable it.
This also applies if you want to change to a different stream version.
Unchecking the devel profile box, now we can select the disable radio button.
And we save changes.
Clicking Work Requests we now see three operations, Remove Module Stream Profile, Disable Module
Stream and Compound.
After a few minutes we can refresh the screen and it shows succeeded for all three.
Returning to our terminal for our instance.
We run the sudo dnf module list php command again.
Now we see for the streams the letter x in brackets beside all, indicating all have been
disabled.
We also see the profile marker beside devel for 8.0 is gone.
Returning to the console, we click on Modules under Resources and then put php into the
search field.
And we can now see that the module is disabled.
So that's how to enable an AppStream module in Oracle Linux, select a stream and profile,
and finally disable it.
Oracle provides an extensive number of resources which you can use to learn about this subject
and others.
Use the links here to find more content about this video as well as Oracle Linux and using
Linux on Oracle Cloud Infrastructure.
That's the end of the video, thanks for watching.