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 |
このプロシージャで必要な製品は次のとおりです。
| OSバージョン | 製品名 |
|---|---|
Ubuntu 24.04 |
Ubuntu 24.04 |
Ubuntu 22.04 |
Ubuntu 22.04 |
SUSE Multi-Linux ManagerのWeb UIで、に移動します。
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 recommendedtoggle is turned on. Click the arrow to see the complete list of related products, and ensure that any extra products you require are checked.製品の追加をクリックし、製品の同期が完了するまで待機します。
または、コマンドプロンプトでチャンネルを追加できます。 このプロシージャで必要なチャンネルは次のとおりです。
| OSバージョン | ベースチャンネル |
|---|---|
Ubuntu 24.04 |
ubuntu-2404-amd64-main-amd64 |
Ubuntu 22.04 |
ubuntu-2204-amd64-main-amd64 |
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>同期は自動的に開始されます。 チャンネルを手動で同期する場合、次のコマンドを使用します。
mgrctl exec -- mgr-sync sync --with-children <channel_name>続行前に、同期が完了していることを確認してください。
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を使用します。
| URL | 説明 |
|---|---|
https://bearer:<token>@esm.ubuntu.com/infra/ubuntu/dists/<release>-infra-updates/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も次のいずれかの値に置き換える必要があります。
| アーキテクチャ | リリース |
|---|---|
|
|
SUSE Multi-Linux Managerでリポジトリを同期するには、対応するGPGキー(ubuntu-advantage-esm-infra-trusty.gpg、ubuntu-advantage-esm-apps.gpg)をインポートする必要があります。これらのキーは、Ubuntu Proに登録されているシステムの/etc/apt/trusted.gpg.dにあります。これらのファイルをコピーしてSUSE Multi-Linux Managerシステムにコピーし、次のようにインポートします。
mgradm gpg add /path/to/gpg.key
すでに同期済みのUbuntu親チャンネルの下に適切な子チャンネルを作成します。その後、リポジトリを同期できます。
|
ここで説明する手順を使用するとサブスクリプションの制限を回避できますが、これはサービス利用規約に違反し、法的な結果を招く場合があります。常に、使用するシステムの数に対して十分な数のサブスクリプションが存在する必要があります。 |
3. 同期ステータスの確認
In the SUSE Multi-Linux Manager Web UI, navigate to and select the
Productstab. This dialog displays a completion bar for each product when they are being synchronized.Alternatively, you can navigate to , then click the channel associated to the repository. Navigate to the
Repositoriestab, then clickSyncand checkSync Status.
tailを実行する前に利用可能なログを一覧表示するには、コンテナホストで次のコマンドを実行します。
mgrctl exec ls /var/log/rhn/reposync/SUSE Multi-Linux Managerコンテナホストのコマンドプロンプトで、rootとして、チャンネルログファイルの同期を確認します。
mgrctl exec -ti -- tail -f /var/log/rhn/reposync/<channel-label>.log同期の進行中に各子チャンネルは独自のログを生成します。 同期が完了したことを確認するには、ベースチャンネルと子チャンネルのログファイルをすべて確認する必要があります。
|
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 |
5.1. rootユーザアクセスの許可
-
On the client, edit the
sudoersfile:sudo visudo
Grant
sudoaccess to the user by adding this line at the end of thesudoersfile. 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 |
5.2. SSH経由でインストール時に作成されたユーザとしてブートストラップする
SSH経由でUbuntuクライアントをブートストラップするには、インストール時に作成されたユーザをsudoグループに追加する必要があります。 次にクライアントからブートストラップスクリプトを実行します。
-
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>
-
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 |
6. クライアントの登録
クライアントを登録するには、ブートストラップリポジトリが必要です。 デフォルトでは、ブートストラップリポジトリは自動的に作成され、すべての同期製品に対して毎日再生成されます。 コンテナホストのコマンドプロンプトからブートストラップリポジトリを手動で作成できます。
mgrctl exec -ti mgr-create-bootstrap-repo
クライアントの登録については、クライアントの登録を参照してください。