Import the content from Red Hat CDN
Create your application lifecycle
Create and publish your content view
#!/bin/bashMANIFEST=$1# Import the content from Red Hat CDN
hammer organization create \--name"ACME"\--label"ACME"\--description"My example organization for managing content"
hammer subscription upload \--file ~/$MANIFEST\--organization"ACME"
hammer repository-set enable\--name"Red Hat Enterprise Linux 7 Server (RPMs)"\--releasever"7Server"\--basearch"x86_64"\--product"Red Hat Enterprise Linux Server"\--organization"ACME"
hammer repository-set enable\--name"Red Hat Enterprise Linux 7 Server (Kickstart)"\--releasever"7Server"\--basearch"x86_64"\--product"Red Hat Enterprise Linux Server"\--organization"ACME"
hammer repository-set enable\--name"Red Hat Satellite Client 6 (for RHEL 7 Server) (RPMs)"\--basearch"x86_64"\--product"Red Hat Enterprise Linux Server"\--organization"ACME"
hammer product synchronize --name"Red Hat Enterprise Linux Server"\--organization"ACME"# Create your application lifecycle
hammer lifecycle-environment create \--name"Development"\--description"Environment for ACME's Development Team"\--prior"Library"\--organization"ACME"
hammer lifecycle-environment create \--name"Testing"\--description"Environment for ACME's Quality Engineering Team"\--prior"Development"\--organization"ACME"
hammer lifecycle-environment create \--name"Production"\--description"Environment for ACME's Product Releases"\--prior"Testing"\--organization"ACME"# Create and publish your content view
hammer content-view create \--name"Base"\--description"Base operating system"\--repositories"Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server,Red Hat Satellite Client 6 for RHEL 7 Server RPMs x86_64"\--organization"ACME"
hammer content-view publish \--name"Base"\--description"My initial content view for my operating system"\--organization"ACME"
hammer content-view version promote \
--content-view "Base"\--version1\
--to-lifecycle-environment "Development"\--organization"ACME"
hammer content-view version promote \
--content-view "Base"\--version1\
--to-lifecycle-environment "Testing"\--organization"ACME"
hammer content-view version promote \
--content-view "Base"\--version1\
--to-lifecycle-environment "Production"\--organization"ACME"
Copy to ClipboardCopied!Toggle word wrapToggle overflow
スクリプトに実行権限を設定します。
chmod +x content-init.sh
# chmod +x content-init.sh
Copy to ClipboardCopied!Toggle word wrapToggle overflow
Red Hat カスタマーポータルから、Red Hat サブスクリプションマニフェストのコピーをダウンロードし、マニフェストでスクリプトを実行します。