8.6. 複合コンテンツビューの作成
以下の手順を使用して複合コンテンツビューを作成します。Satellite Web UI の代わりに CLI を使用する場合は、CLI 手順 を参照してください。
手順
- Satellite Web UI で Content > Content Views に移動して、Create content view をクリックします。
- Create content view ウィンドウで、Name フィールドにビューの名前を入力します。Red Hat Satellite では、入力した名前から ラベル フィールドに自動的に入力されます。
- オプション: Description フィールドに、ビューの説明を入力します。
- Type タブで、Composite content view を選択します。
- オプション: コンテンツビューが再公開されると、複合コンテンツビューの新規バージョンを自動的に公開するには、Auto publish チェックボックスを選択します。
- Create content view をクリックします。
- コンテンツビュー タブで、複合コンテンツビューに追加するコンテンツビューを選択し、コンテンツビューの追加 をクリックします。
- Add content views ウィンドウで、各コンテンツビューのバージョンを選択します。
- オプション: コンテンツビューを最新バージョンに更新する場合は、Always update to latest version のチェックボックスを選択します。
- Add をクリックしてから、Publish new version をクリックします。
- オプション: 説明 フィールドに、コンテンツビューの説明を入力します。
- Publish ウィンドウで Promote スイッチを設定し、ライフサイクル環境を選択します。
- Next をクリックし、Finish をクリックします。
CLI 手順
複合コンテンツビューを作成する前に、既存のコンテンツビューのバージョン ID をリスト表示します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow hammer content-view version list \ --organization "My_Organization"
# hammer content-view version list \ --organization "My_Organization"
新しい複合コンテンツビューを作成します。
--auto-publish
オプションをyes
に設定すると、そのコンテンツビューを含むコンテンツビューが再公開されると、複合コンテンツビューは自動的に再公開されます。Copy to Clipboard Copied! Toggle word wrap Toggle overflow hammer content-view create \ --composite \ --auto-publish yes \ --name "Example_Composite_Content_View" \ --description "Example Composite Content View" \ --organization "My_Organization"
# hammer content-view create \ --composite \ --auto-publish yes \ --name "Example_Composite_Content_View" \ --description "Example Composite Content View" \ --organization "My_Organization"
複合コンテンツビューにコンテンツビューを追加します。コマンド内のコンテンツビュー、コンテンツビューのバージョン、および組織は、ID または名前で識別できます。複数のコンテンツビューを複合コンテンツビューに追加するには、含む必要のあるコンテンツビューごとにこの手順を繰り返します。
コンテンツビューで Always update to latest version オプションが有効になっている場合は、以下を実行します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --latest \ --organization "My_Organization"
# hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --latest \ --organization "My_Organization"
コンテンツビューの Always update to latest version オプションが無効になっている場合は、以下を実行します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --component-content-view-version-id Content_View_Version_ID \ --organization "My_Organization"
# hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --component-content-view-version-id Content_View_Version_ID \ --organization "My_Organization"
複合コンテンツビューを公開します。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow hammer content-view publish \ --name "Example_Composite_Content_View" \ --description "Initial version of Composite Content View" \ --organization "My_Organization"
# hammer content-view publish \ --name "Example_Composite_Content_View" \ --description "Initial version of Composite Content View" \ --organization "My_Organization"
すべての環境で複合コンテンツビューをプロモートします。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow hammer content-view version promote \ --content-view "Example_Composite_Content_View" \ --version 1 \ --to-lifecycle-environment "Development" \ --organization "My_Organization" hammer content-view version promote \ --content-view "Example_Composite_Content_View" \ --version 1 \ --to-lifecycle-environment "Testing" \ --organization "My_Organization" hammer content-view version promote \ --content-view "Example_Composite_Content_View" \ --version 1 \ --to-lifecycle-environment "Production" \ --organization "My_Organization"
# hammer content-view version promote \ --content-view "Example_Composite_Content_View" \ --version 1 \ --to-lifecycle-environment "Development" \ --organization "My_Organization" # hammer content-view version promote \ --content-view "Example_Composite_Content_View" \ --version 1 \ --to-lifecycle-environment "Testing" \ --organization "My_Organization" # hammer content-view version promote \ --content-view "Example_Composite_Content_View" \ --version 1 \ --to-lifecycle-environment "Production" \ --organization "My_Organization"