How To Manage Spacewalk Channels And Repositories
In our previous tutorial, we discussed how to install and configure Spacewalk server in CentOS 7 server. This is the second part of Spacewalk server. In this tutorial, let us discuss how to manage Spacewalk Channels, types of channels, and how to assign repositories to the channels.
Manage Spacewalk Channels
As you may know, Red Hat Satellite server and Spacewalk server is working based on the concept of Channels.
A channel is a logical collection of packages. The channel may contain packages from a specific distribution, also a channel may contain packages for a specific application or group of applications. The users can also define their own channels. Any Spacewalk client can subscribe to a channel to download, update, install packages. The channels are linked to a normal YUM repository. A channel can be linked to several repositories. We can clone, sync or customize the channels.
There are two type of channels.
- Base channel ;
- Child channel.
The Base channel contains the packages based on a specific architecture and a specific distribution, whereas a Child channel contains extra packages, for example packages of MariaDB. The Child channel is linked to the Base channel. A base channel can have any number of child channels. The Spacewalk client should subscribe to only one Base channel, and can subscribe to any number of Child channels of its base channel. Every base channel has a registration key. So that the clients can use this key to register themselves with the corresponding base channel automatically.
Create a Base channel
Log in to Spacewalk server’s web console. Open up your web browser and navigate tohttps://spacewalk-server-ip/.
The following screen should appear. Enter username and password which you defined in the previous tutorial during Spacewalk installation. In my case my username is admin and password is centos.
This is how my Spacewalk’s dashboard looked.
Now, let us create the Base channel.
Go to Channels (top menu) –> Manage Software Channels (left pane) –> Create Channel.
Enter Channel name, Channel type, select architecture etc. Finally click Create Channel.
We have created a Base repository. Now, we’ll assign a real YUM repository to the Base channel.
Adding repository to Base channel
Go to Channels –> Manage Software Channels –> Manage Repositories –> Create New repository.
Enter the repository name and actual URL and click Create Repository:
Now, we need to create a registration key for the base channel, so that the Spacewalk clients can easily subscribe the corresponding Base channel.
Creating a registration key to the Base channel
Go to Systems (top menu) –> Activation Keys (left pane) –> Create key.
Leave all the fields blank and select your base channel which we created before from the drop down list. Click Create Activation Key.
This activation will be needed by the Spacewalk clients to subscribe the desired channels.
Now, You can assign this Base channel to your Spacewalk client. But, here in my case, I want to assign only Child channels to my clients.
Let us go and create a Child channel.
Create A Child channel
Go to Channels (top menu) –> Manage Software Channels (left pane) -> Create Channel. Enter the Child channel name, label, Parent channel, Architecture, and Channel description etc. Don’t forget to select the Parent channel from the drop down list. Finally, click Create Channel button.
Similarly, we need to create a repository to the above Channel as described in the base channel section.
Adding Repository to Child Channel
Go to Channels –> Manage Software Channels –> Manage Repositories –> Create New repository.
For example, let us create a MariaDB repository. You can create your own.
Enter the repository name and actual URL:
Please note that we just have created a repository for the Child channel. But, we haven’t assign it to the Channel yet.
Assigning repository to Child channel
Go to to Manage Software Channels again. Select the newly created child channel.
Click on “Repositories” tab.
Select the above newly created repository from the list. Finally, click “Update repositories”.
Please note that I have selected only the MariaDB repository (a repository created for Child channel). If you want to get packages from the CentOS official repository, you should select the centos7_mirror repository.
Now, it is time to sync all packages to the child channel’s repository. To do that, go to Channels –> Manage Software Channels –> <child-channel-name> –> Repositories –> Sync –> Sync Now.
Also, you can Schedule the sync process at regular Intervals on daily, weekly, monthly basis if you want.
The packages will be downloaded from the official MariaDB repository and kept in/var/satellite/ folder of your Spacewalk server. Make sure you have enough space in /var/satellite/ folder.
To verify whether the package synchronization is completed, go to Channels –> Manage Software Channels –> <Select your channel(Child or Base Channel)> –> Packages –> List / Remove.
You’ll see that the packages from official MariaDB repository have been synced to your Spacewalk server.
That’s all for now. In our next article, let us see how to install Spacewalk clients, and how to subscribe channels for the clients, and also how to install packages from the Spacewalk server’s Channel.
Nhận xét
Đăng nhận xét