7.12. 複合コンテンツビューの作成
以下の手順を使用して複合コンテンツビューを作成します。Satellite Web UI の代わりに CLI を使用する場合は、CLI 手順 を参照してください。
手順
- Satellite Web UI で、Content > Lifecycle > Content Views に移動します。
- Create content view をクリックします。
- Create content view ウィンドウで、Name フィールドにビューの名前を入力します。Red Hat Satellite では、入力した名前から ラベル フィールドに自動的に入力されます。
- オプション: Description フィールドに、ビューの説明を入力します。
- Type タブで、Composite content view を選択します。
- オプション: コンテンツビューが再公開されたときに複合コンテンツビューの新しいバージョンを自動的に公開する場合は、Auto publish チェックボックスをオンにします。
- Create content view をクリックします。
- Content views タブで、複合コンテンツビューに追加するコンテンツビューを選択し、Add content views をクリックします。
- Add content views ウィンドウで、各コンテンツビューのバージョンを選択します。
- オプション: コンテンツビューを最新バージョンに自動的に更新する場合は、Always update to latest version チェックボックスをオンにします。
- Add をクリックしてから、Publish new version をクリックします。
- オプション: Description フィールドに、コンテンツビューの説明を入力します。
- Publish ウィンドウで Promote スイッチを設定し、ライフサイクル環境を選択します。
- Next をクリックし、Finish をクリックします。
CLI 手順
複合コンテンツビューを作成する前に、既存のコンテンツビューのバージョン ID をリスト表示します。
$ hammer content-view version list \ --organization "My_Organization"新しい複合コンテンツビューを作成します。
--auto-publishオプションをyesに設定すると、そのコンテンツビューを含むコンテンツビューが再公開されると、複合コンテンツビューは自動的に再公開されます。$ 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 オプションが有効になっている場合:
$ 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 オプションが無効になっている場合:
$ 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 publish \ --name "Example_Composite_Content_View" \ --description "Initial version of composite content view" \ --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"