Ubuntuクライアントの登録

このセクションでは、Ubuntuオペレーティングシステムを実行しているクライアントの登録について説明します。

  • パッケージおよびメタデータはSUSEではなくUbuntuから提供されます。

  • サポートされている製品については、サポートされているUbuntuの機能にあるリリースノートとサポートテーブルを参照してください。

SUSE Multi-Linux Managerは、Saltを使用するUbuntu 20.04 LTSおよび22.04 LTSクライアントをサポートしています。

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 require an existing user with sudo privileges for Python.

Canonicalは、SUSE Multi-Linux Managerを保証またはサポートしていません。

1. ソフトウェアチャンネルの追加

UbuntuクライアントをSUSE Multi-Linux Managerサーバに登録する前に、必要なソフトウェアチャンネルを追加して同期する必要があります。

In the following section, descriptions often default to the x86_64 architecture. Replace it with other architectures if appropriate.

このプロシージャで必要な製品は次のとおりです。

Table 1. Ubuntu製品 - WebUI
OSバージョン 製品名

Ubuntu 24.04

Ubuntu 24.04

Ubuntu 22.04

Ubuntu 22.04

プロシージャ: ソフトウェアチャンネルの追加
  1. SUSE Multi-Linux ManagerのWeb UIで、管理  セットアップウィザード  製品に移動します。

  2. Locate the appropriate products for your client operating system and architecture using the search bar, and check the appropriate product. This will automatically check all mandatory channels. Also all recommended channels are checked as long as the include recommended toggle is turned on. Click the arrow to see the complete list of related products, and ensure that any extra products you require are checked.

  3. 製品の追加をクリックし、製品の同期が完了するまで待機します。

または、コマンドプロンプトでチャンネルを追加できます。 このプロシージャで必要なチャンネルは次のとおりです。

Table 2. Ubuntuチャンネル - CLI
OSバージョン ベースチャンネル

Ubuntu 24.04

ubuntu-2404-amd64-main-amd64

Ubuntu 22.04

ubuntu-2204-amd64-main-amd64

プロシージャ: コマンドプロンプトからのソフトウェアチャンネルの追加
  1. SUSE Multi-Linux Managerコンテナホストのコマンドプロンプトで、 root として、適切なチャンネルを追加します。

    mgrctl exec -- mgr-sync add channel <channel_label_1>
    mgrctl exec -- mgr-sync add channel <channel_label_2>
    mgrctl exec -- mgr-sync add channel <channel_label_n>
  2. 同期は自動的に開始されます。 チャンネルを手動で同期する場合、次のコマンドを使用します。

    mgrctl exec -- mgr-sync sync --with-children <channel_name>
  3. 続行前に、同期が完了していることを確認してください。

2. Ubuntu ESMパッケージのミラーリング

Canonicalは、Ubuntu Proのユーザと顧客向けにExpanded Security Maintenance (ESM)パッケージを提供しています。これらのパッケージは、複数のオペレーティングシステムコンポーネントと選択したアプリケーションを対象として、より長期のメンテナンス(10~12 年) を提供します。

これらのリポジトリは、Ubuntu Proに登録されているシステムから必要なGPGキーと個人用ベアラートークンを抽出すれば、SUSE Multi-Linux Manager内でも同期できます。

2.1. GPGキーとベアラートークンの抽出

UbuntuホストをUbuntu Proに登録します。個人用登録トークンは、Ubuntu Proダッシュボードで確認できます。このためにはUbuntu Oneアカウントが必要です。

sudo apt-get install ubuntu-advantage-tools
sudo pro attach <perosnal_token>

登録後、ファイル/etc/apt/auth.conf.d/90ubuntu-advantageでベアラートークンを確認できます。

machine esm.ubuntu.com/apps/ubuntu/ login bearer password <token>  # ubuntu-pro-client
machine esm.ubuntu.com/infra/ubuntu/ login bearer password <token>  # ubuntu-pro-client

リポジトリごとに1つの専用のベアラートークンが使用されます。

SUSE Multi-Linux Manager内で次のリポジトリを設定します。

2.2. Ubuntu ESMリポジトリの設定

リポジトリを作成するには、次のURLを使用します。

Table 3. Ubuntu ESMリポジトリ
URL 説明

https://bearer:<token>@esm.ubuntu.com/infra/ubuntu/dists/<release>-infra-updates/main/binary-<arch>/

オペレーティングシステムの機能更新

https://bearer:<token>@esm.ubuntu.com/infra/ubuntu/dists/<release>-infra-security/main/binary-<arch>/

オペレーティングシステムのセキュリティ更新

https://bearer:<token>@esm.ubuntu.com/apps/ubuntu/dists/<release>-apps-updates/main/binary-<arch>/

アプリケーションの機能更新

https://bearer:<token>@esm.ubuntu.com/apps/ubuntu/dists/<release>-apps-security/main/binary-<arch>/

アプリケーションのセキュリティ更新

<token>は個人用ベアラートークンに置き換えてください。また、archおよびreleaseも次のいずれかの値に置き換える必要があります。

Table 4. Ubuntu ESMのアーキテクチャとリリース
アーキテクチャ リリース

amd64arm64armelarmhfi386powerpcppc64els390x

bionicfocaljammynobletrustyxenial

SUSE Multi-Linux Managerでリポジトリを同期するには、対応するGPGキー(ubuntu-advantage-esm-infra-trusty.gpgubuntu-advantage-esm-apps.gpg)をインポートする必要があります。これらのキーは、Ubuntu Proに登録されているシステムの/etc/apt/trusted.gpg.dにあります。これらのファイルをコピーしてSUSE Multi-Linux Managerシステムにコピーし、次のようにインポートします。

mgradm gpg add /path/to/gpg.key

すでに同期済みのUbuntu親チャンネルの下に適切な子チャンネルを作成します。その後、リポジトリを同期できます。

ここで説明する手順を使用するとサブスクリプションの制限を回避できますが、これはサービス利用規約に違反し、法的な結果を招く場合があります。常に、使用するシステムの数に対して十分な数のサブスクリプションが存在する必要があります。

3. 同期ステータスの確認

プロシージャ: Web UIからの同期の進捗状況の確認
  1. In the SUSE Multi-Linux Manager Web UI, navigate to Admin  Setup Wizard and select the Products tab. This dialog displays a completion bar for each product when they are being synchronized.

  2. Alternatively, you can navigate to Software  Manage  Channels, then click the channel associated to the repository. Navigate to the Repositories tab, then click Sync and check Sync Status.

プロシージャ: コマンドプロンプトから同期の進捗状況を確認する
  1. tailを実行する前に利用可能なログを一覧表示するには、コンテナホストで次のコマンドを実行します。

    mgrctl exec ls /var/log/rhn/reposync/
  2. SUSE Multi-Linux Managerコンテナホストのコマンドプロンプトで、rootとして、チャンネルログファイルの同期を確認します。

    mgrctl exec -ti -- tail -f /var/log/rhn/reposync/<channel-label>.log
  3. 同期の進行中に各子チャンネルは独自のログを生成します。 同期が完了したことを確認するには、ベースチャンネルと子チャンネルのログファイルをすべて確認する必要があります。

Ubuntuチャンネルは非常に大きいことがあります。 同期に数時間かかる場合があります。

4. GPGキーの管理

クライアントではGPGキーを使用して、ソフトウェアパッケージをインストールする前にパッケージ認証の確認が行われます。 信頼されているソフトウェアのみクライアントにインストールできます。

クライアントのセキュリティにとってGPGキーを信頼することは重要です。 必要かつ信頼できるキーを決定するのは管理者のタスクです。 GPGキーが信頼されていない場合、ソフトウェアチャンネルは使用できないため、クライアントにチャンネルを割り当てるかどうかは、キーを信頼するかどうかによって決まります。

GPGキーの詳細については、GPGキーを参照してください。

5. rootアクセス

UbuntuのrootユーザはデフォルトでSSHアクセスが無効になっています。

To be able to onboard using a regular user, you need to edit the sudoers file.

This issue happens with self-installed versions of Ubuntu. If the default user has been granted administrative privileges during installation time, a password is required to perform privilege escalation using sudo. With cloud instances this does not happen because cloud-init automatically creates a file under /etc/sudoers.d and grants privilege escalation through sudo without the need for a password.

5.1. rootユーザアクセスの許可

プロシージャ: rootユーザアクセスの許可
  1. On the client, edit the sudoers file:

    sudo visudo

    Grant sudo access to the user by adding this line at the end of the sudoers file. Replace <user> with the name of the user that is bootstrapping the client in the Web UI:

    <user>  ALL=NOPASSWD: /usr/bin/python, /usr/bin/python2, /usr/bin/python3, /var/tmp/venv-salt-minion/bin/python

This procedure grants root access without requiring a password, which is required for registering the client. When the client is successfully installed it runs with root privileges, so the access is no longer required. We recommend that you remove the line from the sudoers file after the client has been successfully installed.

5.2. SSH経由でインストール時に作成されたユーザとしてブートストラップする

SSH経由でUbuntuクライアントをブートストラップするには、インストール時に作成されたユーザをsudoグループに追加する必要があります。 次にクライアントからブートストラップスクリプトを実行します。

プロシージャ: インストール時に作成されたユーザのsudoグループへの追加とSSH経由でのブートストラップ
  1. On the client, as root, run from the command line (replace <username> with the name of the install-created user):

    sudo usermod -aG sudo <username>
  2. Bootstrap the client system from its command line (replace <SERVER_FQDN> with the fully qualified domain name of the SUSE Multi-Linux Manager Server):

    sudo su -
    curl -Sks https://<SERVER_FQDN>/pub/bootstrap/bootstrap-script.sh | /bin/bash

Ubuntu can only be bootstrapped using the corresponding Ubuntu bootstrap script run from the client system’s command line after issuing sudo su - as above. It cannot be bootstrapped via the SUSE Multi-Linux Manager Web UI due to the fact that the root user is disabled on Ubuntu by default, and that the Web UI does not permit for privilege escalation of the Ubuntu install-created user.

6. クライアントの登録

クライアントを登録するには、ブートストラップリポジトリが必要です。 デフォルトでは、ブートストラップリポジトリは自動的に作成され、すべての同期製品に対して毎日再生成されます。 コンテナホストのコマンドプロンプトからブートストラップリポジトリを手動で作成できます。

mgrctl exec -ti mgr-create-bootstrap-repo

クライアントの登録については、クライアントの登録を参照してください。