hammer product create --organization-id 1 \
--name "CentOS 7 Linux for x86_64" \
--description "Repositories to use with CentOS 7 Linux"
hammer gpg create --organization-id 1 \
--key "RPM-GPG-KEY-CentOS-7" \
--name "RPM-GPG-KEY-CentOS-7"
http://mirror.cogentco.com/pub/linux/centos/7/os/x86_64/
hammer repository create --organization-id 1 \
--product "CentOS 7 Linux for x86_64" \
--name "CentOS 7 Base RPMS" \
--label "CentOS_7_Base_RPMS" \
--content-type "yum" \
--download-policy "on_demand" \
--gpg-key "RPM-GPG-KEY-CentOS-7" \
--url "http://mirror.cogentco.com/pub/linux/centos/7/os/x86_64/" \
--mirror-on-sync "no"
hammer repository create --organization-id 1 \
--product "CentOS 7 Linux for x86_64" \
--name "CentOS 7 Update RPMS" \
--label "CentOS_7_Update_RPMS" \
--content-type "yum" \
--download-policy "on_demand" \
--gpg-key "RPM-GPG-KEY-CentOS-7" \
--url "http://mirror.cogentco.com/pub/linux/centos/7/updates/x86_64/" \
--mirror-on-sync "no"
hammer repository create --organization-id 1 \
--product "CentOS 7 Linux for x86_64" \
--name "CentOS 7 Extras RPMS" \
--label "CentOS_7_Extras_RPMS" \
--content-type "yum" \
--download-policy "on_demand" \
--gpg-key "RPM-GPG-KEY-CentOS-7" \
--url "http://mirror.cogentco.com/pub/linux/centos/7/extras/x86_64/" \
--mirror-on-sync "no"
sclo repo: http://mirror.cogentco.com/pub/linux/centos/7/sclo/x86_64/
hammer repository create --organization-id 1 \
--product "CentOS 7 Linux for x86_64" \
--name "CentOS 7 EPEL RPMS" \
--label "CentOS_7_EPEL_RPMS" \
--content-type "yum" \
--download-policy "on_demand" \
--gpg-key "RPM-GPG-KEY-CentOS-7" \
--url "http://mirror.cogentco.com/pub/linux/epel/7/x86_64/" \
--mirror-on-sync "no"
hammer content-view create --organization-id 1 \
--name "CentOS_7" \
--description "Content view for CentOS 7"
# change $(seq a b) to list from
hammer repository list --organization-id 1 --product "CentOS 7 Linux for x86_64"
for i in $(seq 6 8); do \
hammer content-view add-repository --organization-id 1 \
--name "CentOS_7" \
--product "CentOS 7 Linux for x86_64" \
--repository-id "$i"; \
done
hammer content-view publish --organization-id 1 \
--name "CentOS_7" \
--description "Publishing repositories"
hammer lifecycle-environment list --organization-id 1
hammer activation-key create --organization-id 1 \
--name "centos7" \
--description "CentOS 7 Activation Key" \
--lifecycle-environment "Library" \
--content-view "CentOS_7" \
--unlimited-hosts
hammer activation-key list --organization-id 1
# list subscriptions for org
hammer subscription list --organization-id 1
# use subscription-id from above
hammer activation-key add-subscription --organization-id 1 \
--name "centos7" \
--quantity "1" \
--subscription-id "3"