Convert2RHEL は、Red Hat Enterprise Linux (RHEL) に類似したオペレーティングシステム、または Red Hat Enterprise Linux (RHEL) から派生したオペレーティングシステム (CentOS Linux や Oracle Linux など) を変換する Red Hat ユーティリティです。サポートされているオペレーティングシステムの完全なリストについては、 このドキュメントをお読みください。詳細については、Terry Bowling のブログ記事 (Oracle Linux に関する記事はこちら) を参照してください。
Red Hat Satellite 6.10 では、まず Convert2RHEL の一括操作機能が導入されました。これについては、こちらの記事で説明しています。Satellite 6.11 は、これらの機能を次の 2 つの面で発展させています。
-
Ansible ロールにより、Convert2RHEL の Satellite サーバーの設定/準備を自動化
-
Ansible Playbook により、ホストの変換を自動化
以下のフローチャートは、Satellite 6.11 で Convert2RHEL の一括操作を実行するために必要なタスクの概要を示しています。
![Flowchart of tasks required to perform a bulk Convert2RHEL operation Flowchart of tasks required to perform a bulk Convert2RHEL operation](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image1.png?itok=f2OyGqiC)
準備ができたら、Centos/Oracle Linux ホストを Satellite に登録し、ホストを RHEL に変換するジョブをスケジュールします。
この Ansible ロールは、個別の Ansible サーバーを使用して Satellite サーバーに手動で適用できることに注意してください。
ここでは、この新しい自動化の実装に必要なすべての手順について詳しく説明します。
Satellite サーバーを準備する
まず、こちらの手順に従って、付属の Ansible Roles をインポートします。
まず、[Configure] > [Roles] に移動します。
![first go to Configure > Roles first go to Configure > Roles](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image3.png?itok=KqIkGMTR)
[Import…] をクリックします。
![Click on Import Click on Import](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image4.png?itok=3KodoKNx)
[Select All]、[Submit] の順にクリックします。
![Click on Select All and then Submit Click on Select All and then Submit](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image4_0.gif?itok=AM3_0qOX)
次に、Ansible ロールを Satellite サーバーで実行する前に、変数を作成する必要があります。これらの変数を使用して、Satellite サーバーで Convert2RHEL の一括操作をどのように構成するかを Ansible ロールに指示します。その内容には、サブスクリプションのマニフェスト、組織、場所、管理者の資格情報などの指定が含まれます。
Ansible ロールの変数を設定する最も簡単で迅速な方法は、Satellite サーバーで hammer コマンドラインユーティリティを使用することです。Ansible ロールの変数は、Satellite の Web UI を使用して設定することもできます。
この Satellite サーバーでは次の変数を定義しています。
変数 |
値 |
satellite_rhel_wait_for_syncs |
true |
satellite_manifest_path |
/usr/share/satellite/manifest_satellite_20220815T193102Z.zip |
satellite_organization |
Acme Org |
satellite_password |
Ha ha no you don’t |
satellite_username |
myee |
satellite_server_url |
https://ip-172-31-29-4.us-west-1.compute.internal |
satellite_validate_certs |
true |
satellite_content_rhel_enable_rhel7 |
true |
satellite_content_rhel_enable_rhel8 |
true |
次に、hammer ユーティリティを使用して Ansible ロールの変数を作成する方法を示します。
satellite_rhel_wait_for_syncs
この Ansible ロールは、一括 Convert2RHEL 操作の実行に必要なリポジトリーを設定し、同期します。 satellite_rhel_wait_for_syncs 変数は、リポジトリとの同期が完了するまで待機するように指示します。
rootとしてログインし、Satellite サーバーのコマンドラインインタフェースに次のように入力します。
hammer ansible variables create --location "Vancouver" --organization "Acme Org" --ansible-role redhat.satellite.convert2rhel --variable satellite_rhel_wait_for_syncs --variable-type boolean --default-value false --override true
satellite_manifest_path
Ansible ロールが実行されると、サブスクリプションのマニフェストがアップロードされ、すべての新しいホストに適切なライセンスが付与されます。有効なマニフェストをすでにアップロードしている場合は、再度アップロードする必要があります。
hammer ansible variables create --location "Vancouver" --organization "Acme Org" --ansible-role redhat.satellite.convert2rhel --variable satellite_manifest_path --variable-type string --default-value "/usr/share/satellite/manifest_satellite_20220815T193102Z.zip" --override true
satellite_organization/usr
この例で使用する Satellite 組織は「Acme Org」です。
hammer ansible variables create --location "Vancouver" --organization "Acme Org" --ansible-role redhat.satellite.convert2rhel --variable satellite_organization --variable-type string --default-value "Acme Org" --override true
satellite_password
Ansible ロールには Satellite 管理者の資格情報が必要です。ここにパスワードを入力します。
hammer ansible variables create --location "Vancouver" --organization "Acme Org" --ansible-role redhat.satellite.convert2rhel --variable satellite_password --variable-type string --default-value "YOUR_ADMIN_PASSWORD" --override true
注:パスワードを使用しないようにするには、代わりに Personal Access Tokens を設定します。
![To avoid using passwords you can set up Personal Access Tokens instead To avoid using passwords you can set up Personal Access Tokens instead](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image5.png?itok=uBNlSmPy)
satellite_username
ここに管理者のユーザー名を入力します。
hammer ansible variables create --location "Vancouver" --organization "Acme Org" --ansible-role redhat.satellite.convert2rhel --variable satellite_username --variable-type string --default-value "myee" --override true
satellite_server_url
Satellite サーバーの URL は、ホストが curl ユーティリティを使用してアクセスするために必要とする URL です。
hammer ansible variables create --location "Vancouver" --organization "Acme Org" --ansible-role redhat.satellite.convert2rhel --variable satellite_server_url --variable-type string --default-value "https://ip-172-31-29-4.us-west-1.compute.internal" --override true
satellite_validate_certs
この値は true に設定する必要があります。
hammer ansible variables create --location "Vancouver" --organization "Acme Org" --ansible-role redhat.satellite.convert2rhel --variable satellite_validate_certs --variable-type boolean --default-value true --override true
satellite_content_rhel_enable_rhel7
この変数は、CentOS 7 (または Oracle) ホストから RHEL7 への変換を有効にするために RHEL7 コンテンツを同期するよう、Ansible ロールに指定します。RHEL7 のコンテンツを同期しない場合は、この変数で false を指定します。
hammer ansible variables create --location "Vancouver" --organization "Acme Org" --ansible-role redhat.satellite.convert2rhel --variable satellite_content_rhel_enable_rhel7 --variable-type boolean --default-value true --override true
satellite_content_rhel_enable_rhel8
この変数は、CentOS 8 (または Oracle) ホストから RHEL8 への変換を有効にするために RHEL8 コンテンツを同期するよう、Ansible ロールに指定します。RHEL8 のコンテンツを同期しない場合は、この変数で false
を指定します。
hammer ansible variables create --location "Vancouver" --organization "Acme Org" --ansible-role redhat.satellite.convert2rhel --variable satellite_content_rhel_enable_rhel8 --variable-type boolean --default-value true --override true
変数が正しく設定されているかどうかは、Web UI で確認できます。サブメニューで Ansible の [Variables] に移動します。
![Go to the Ansible Variables sub-menu Go to the Ansible Variables sub-menu](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image6.png?itok=3-dpETUY)
作成した変数が表示されるまでページを進めます。
![Ansible variables Ansible variables](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image7.png?itok=wOg5DDRc)
次に、Satellite が自身に対するリモート実行ジョブを実行できるようにする必要があります。
注:すでに Satellite サーバーに対してリモート実行ジョブを実行できるようにしてある場合、この手順は不要です。
root として Satellite サーバーにログインし、次のコマンドを実行します。
satellite-installer \ --foreman-proxy-plugin-remote-execution-ssh-install-key true
出力は次のようになります。
![Satellite installer sample output Satellite installer sample output](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image8.png?itok=BgEqKX-L)
次に、Ansible ロールを Satellite サーバーに適用します。
[Hosts] > [All Hosts] をクリックします。
![Click on Hosts > All Hosts Click on Hosts > All Hosts](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image9.png?itok=v8eX6T7g)
Satellite サーバーを編集します。
![Edit your Satellite server Edit your Satellite server](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image10.png?itok=vb_ukCQF)
[Ansible Roles] タブをクリックします。
![Click on the Ansible Roles tab Click on the Ansible Roles tab](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image11.png?itok=L5_eipVY)
Convert2RHEL ロールは、サブメニューの 2 ページ目にあります。+ 記号をクリックして、redhat.satellite.convert2rhel ロールを Satellite サーバーに割り当てます。
![The Convert2RHEL roles is on the second page The Convert2RHEL roles is on the second page](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image12.png?itok=yUF3c_PK)
[Submit] をクリックします。
![Click Submit Click Submit](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image13.png?itok=gp6d_3Uw)
ホスト情報ページにリダイレクトされます。[Schedule Remote Job] ボタンをクリックし、 [Run Ansible roles] を選択します。
![Click on the Schedule Remote Job button and select Run Ansible roles Click on the Schedule Remote Job button and select Run Ansible roles](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image14.png?itok=FTjKIOT7)
ジョブのステータスを表示するページにリダイレクトされます。ジョブのリアルタイムステータスを確認するには、Satellite ホストをクリックします。
![Click on the Satellite host to see the real-time status of the job Click on the Satellite host to see the real-time status of the job](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image15.png?itok=255gvsBD)
ジョブの各タスクが実行されていることを確認できます。
![Here you can see each task in the job being executed Here you can see each task in the job being executed](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image16.png?itok=UOwk5fOR)
注:Ansible ロールは、必要なコンテンツの同期、ホストグループとアクティベーションキーの作成などのタスクを行います。Satellite 6.11 には、CentOS 7 ホストを登録するために作成されたアクティベーションキー「Convert2RHEL7」によって Convert2RHEL8 リポジトリが有効化されるというバグがあります。このバグを回避するには、「convert2rhel_centos7」アクティベーションキーでこのリポジトリをオーバーライドする必要があります。
![To work around this bug, you must override this repo in the "convert2rhel_centos7" activation key To work around this bug, you must override this repo in the "convert2rhel_centos7" activation key](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image17.png?itok=6GkgIm1c)
変換を実行する
重要:変換を実行する前に、対象ホストを最新の状態にし、最新のカーネルで再起動する必要があります。
まず、変換するホストを登録する必要があります。ここでは CentOS7 ホストを変換します。[Hosts] > [Register Host] をクリックします。
![Click on Hosts > Register Host Click on Hosts > Register Host](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image18.png?itok=aaA6IsfE)
テスト用の CentOS ホストでは、Satellite サーバーから認証局ファイルをコピーしていません。その方法の 詳細については、こちらをご覧ください。
Register Host メニューで、1) 「CentOS 7 converting」ホストグループ、2) 「Insecure」、3) 「Advanced」を選択します。[Insecure] オプションを使用すると、最初の自己署名証明書の検証を実行しないでスクリプトを実行できます。それ以降の通信は完全に保護されます。「Insecure」の使用を避けたい場合は、 こちらで証明書のインポートの詳細についてご確認ください。
![Register Host Register Host](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image19.png?itok=9RRnNLJk)
次に、[Advanced] をクリックします。
[Register Host] メニューの [Advanced] コンテキストで、次のタスクを実行します。
-
「Activation Keys」がホストグループ「convert2rhel_centos7」から継承されていることを確認します。ここでは何もクリックする必要はありません。
-
[Generate] をクリックします。これにより curl スクリプトが生成されます。これは、コピーして CentOS ホストの CLI に貼り付けます。
-
コピーボタンをクリックして curl スクリプトをコピーします。
![Register Host Advanced Tab Register Host Advanced Tab](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image20.png?itok=nYCNIB3e)
対象ホストの 1 つにログインします。ホストの正しいロケールをエクスポートします。
export LANG=en_US.UTF-8
curl スクリプトを貼り付けて実行します。出力例を次に示します。
![Some example output Some example output](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image21.png?itok=-6bq-toY)
すべての対象ホストに対してこのタスクを繰り返します。
[Hosts] メニューに、Satellite に登録されているすべての CentOS ホストが表示されます。
![In the Hosts menu, you see all your CentOS hosts registered to Satellite. In the Hosts menu, you see all your CentOS hosts registered to Satellite.](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image22.png?itok=-aqdqiKQ)
次のタスクを実行して、Convert2RHEL 操作を開始します。
-
対象ホストを選択します。
-
[Select Action] をクリックし、 [Schedule Remote Job] を選択します。
![Click on "Select Action" and select "Schedule Remote Job". Click on "Select Action" and select "Schedule Remote Job".](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image23.png?itok=aL6-4YEk)
[Job invocation] メニューで、次のタスクを実行します。
-
[Job category] ドロップダウンで、 [Convert 2 RHEL] を選択します。
-
[Activation Key] ドロップダウンで、 [convert2rhel_rhel7] を選択します。
-
[Submit] をクリックして、Convert2RHEL の一括操作を開始します。
![Click "Submit" to start the bulk Convert2RHEL operation. Click "Submit" to start the bulk Convert2RHEL operation.](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image24.png?itok=PKziO1mK)
[Job Overview] メニューにリダイレクトされます。ここでホストをクリックすると、各ホストのジョブのリアルタイムステータスを表示できます。
![You’ll be redirected to the "Job Overview" menu You’ll be redirected to the "Job Overview" menu](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image25.png?itok=PdUNQWv8)
ジョブのリアルタイムビューは次のとおりです。
![Here’s the real-time view of the job. Here’s the real-time view of the job.](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image26.png?itok=E6RY8S-T)
最終的に、すべてのホストが一度に RHEL に変換されます。
![The final result, all hosts converted to RHEL at once! The final result, all hosts converted to RHEL at once!](/rhdc/managed-files/styles/wysiwyg_full_width/private/convert2rhel-bulk-satellite-image27.png?itok=iYxdc0GM)
詳細については、Convert2RHEL の公式ドキュメントを参照してください。
執筆者紹介
As a Senior Principal Technical Marketing Manager in the Red Hat Enterprise Linux business unit, Matthew Yee is here to help everyone understand what our products do. He joined Red Hat in 2021 and is based in Vancouver, Canada.
チャンネル別に見る
自動化
テクノロジー、チームおよび環境に関する IT 自動化の最新情報
AI (人工知能)
お客様が AI ワークロードをどこでも自由に実行することを可能にするプラットフォームについてのアップデート
オープン・ハイブリッドクラウド
ハイブリッドクラウドで柔軟に未来を築く方法をご確認ください。
セキュリティ
環境やテクノロジー全体に及ぶリスクを軽減する方法に関する最新情報
エッジコンピューティング
エッジでの運用を単純化するプラットフォームのアップデート
インフラストラクチャ
世界有数のエンタープライズ向け Linux プラットフォームの最新情報
アプリケーション
アプリケーションの最も困難な課題に対する Red Hat ソリューションの詳細
オリジナル番組
エンタープライズ向けテクノロジーのメーカーやリーダーによるストーリー
製品
ツール
試用、購入、販売
コミュニケーション
Red Hat について
エンタープライズ・オープンソース・ソリューションのプロバイダーとして世界をリードする Red Hat は、Linux、クラウド、コンテナ、Kubernetes などのテクノロジーを提供しています。Red Hat は強化されたソリューションを提供し、コアデータセンターからネットワークエッジまで、企業が複数のプラットフォームおよび環境間で容易に運用できるようにしています。
言語を選択してください
Red Hat legal and privacy links
- Red Hat について
- 採用情報
- イベント
- 各国のオフィス
- Red Hat へのお問い合わせ
- Red Hat ブログ
- ダイバーシティ、エクイティ、およびインクルージョン
- Cool Stuff Store
- Red Hat Summit