Registering Ubuntu Clients
This section contains information about registering Salt clients running Ubuntu operating systems.
Uyuni supports Ubuntu 16.04 LTS and 18.04 LTS Clients using Salt. Traditional clients are not supported.
|
Canonical does not endorse or support Uyuni. |
Bootstrapping is supported for starting Ubuntu clients and performing initial state runs such as setting repositories and performing profile updates.
However, the root user on Ubuntu is disabled by default, so to use bootstrapping, you will require an existing user with sudo privileges for Python.
Prepare to Register
Some preparation is required before you can register Ubuntu clients to the Uyuni Server.
-
At the command prompt on the Uyuni Server, as root, install the
spacewalk-utilspackage:zypper in spacewalk-utils
-
Add the Ubuntu channels. For Ubuntu 16.04:
spacewalk-common-channels \ ubuntu-1604-pool-amd64-uyuni \ ubuntu-1604-amd64-main-uyuni \ ubuntu-1604-amd64-main-updates-uyuni \ ubuntu-1604-amd64-main-security-uyuni \ ubuntu-1604-amd64-universe-uyuni \ ubuntu-1604-amd64-universe-updates-uyuni \ ubuntu-1604-amd64-uyuni-client
For Ubuntu 18.04:
+
spacewalk-common-channels \ ubuntu-1804-pool-amd64-uyuni \ ubuntu-1804-amd64-main-uyuni \ ubuntu-1804-amd64-main-updates-uyuni \ ubuntu-1804-amd64-main-security-uyuni \ ubuntu-1804-amd64-universe-uyuni \ ubuntu-1804-amd64-universe-updates-uyuni \ ubuntu-1804-amd64-uyuni-client
-
Synchronize the new custom channels.
|
You need all the new channels fully synchronized, including Universe (Universe contains important dependencies for Salt), before bootstrapping any Ubuntu client. |
|
Ubuntu channels can be very large. Synchronization can sometimes take several hours. |
When you have the channels set up, associate each channel with the appropriate repository, and synchronize then channels (optionally configure scheduled syncronization).
To do this, proceed to , and for each channel you created, click on it and:
-
Navigate to the
Repositories -
Navigate to the
Syncand click Sync Now to begin synchronization immediately. -
You can also setup a scheduled syncronization from this screen.
Monitor Synchronization Progress
There are two ways to check if a channel has finished synchronizing:
-
In the Uyuni Web UI, navigate to , then click on the channel associated to the repository. Navigate to the
Repositories, thenSyncand checkSync Status -
Check the synchronization log file at the command prompt with
tail -f /var/log/rhn/reposync/channel-label.log.Each child channel will generate its own log during the synchronization progress.
You will need to check all the base and child channel log files to be sure that the synchronization is complete.
Trust GPG Keys on Clients
By default, Ubuntu does not trust the GPG key for Uyuni Ubuntu client tools.
The clients can be successfully bootstrapped without the GPG key being trusted.
However, they will not be able to install new client tool packages or update them.
To fix this, add this key to the ORG_GPG_KEY= parameter in all Ubuntu bootstrap scripts:
uyuni-gpg-pubkey-0d20833e.key
You do not need to delete any previously stored keys.
If you are boostrapping clients from the Uyuni Web UI, you will need to use a salt state to trust the key. Create the salt state and assign it to the organization. You can then use an activation key and configuration channels to deploy the key to the clients.
Root Access
The root user on Ubuntu is disabled by default.
You can enable it by editing the sudoers file.
-
On the client, edit the
sudoersfile:sudo visudo
Grant
sudoaccess to the user by adding this line to thesudoersfile. Replace<user>with the name of the user that will be used to bootstrap the client in the Web UI:<user> ALL=NOPASSWD: /usr/bin/python, /usr/bin/python2, /usr/bin/python3
|
This procedure grants root access without requiring a password, which is required for registering the client.
When the client is successfully installed it will run with root privileges, so the access is no longer required.
We recommend that you remove the line from the |
Register Clients
-
To register your Ubuntu clients, you will need a bootstrap repository. Create the bootstrap repository at the command prompt, with this command:
mgr-create-bootstrap-repo --with-custom-channels
For more information on registering your clients, see client-configuration:registration-overview.adoc.