Created
May 16, 2018 14:40
-
-
Save yannhowe/843623dab7ffc0592273e7d294e42d39 to your computer and use it in GitHub Desktop.
Connects to RHN, sets up required repositories and installs Satellite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo subscription-manager register | |
sudo subscription-manager attach | |
sudo subscription-manager refresh | |
sudo subscription-manager repos --enable=rhel-7-server-satellite-6.3-rpms --enable=rhel-server-rhscl-7-rpms --enable=rhel-7-server-rpms | |
sudo yum clean all | |
sudo yum repolist enabled | |
sudo yum update | |
sudo yum upgrade | |
sudo yum install satellite | |
sudo satellite-installer --scenario satellite \ | |
--foreman-initial-organization "$ORG" \ | |
--foreman-initial-location "$LOCATION" \ | |
--foreman-admin-password changemenowlah \ | |
--foreman-proxy-puppetca true \ | |
--foreman-proxy-tftp true \ | |
--enable-foreman-plugin-discovery | |
mkdir ~/.hammer | |
touch ~/.hammer/cli_config.yml | |
chmod 600 ~/.hammer/cli_config.yml | |
cat > ~/.hammer/cli_config.yml <<- "EOF" | |
:foreman: | |
:host: 'https://localhost/' | |
:username: 'admin' | |
:password: 'changemenowlah' | |
EOF | |
sudo hammer user update --login admin \ | |
--default-location-id 1 \ | |
--default-organization-id 1 \ | |
--locations "$LOCATION" \ | |
--organizations "$ORG" | |
hammer subscription upload \ | |
--organization-label angsana \ | |
--file ~/.hammer/cli_config.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment