-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-satellite-all.sh
65 lines (49 loc) · 2.19 KB
/
install-satellite-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
## Load configurations
echo " ======= LOADING CONFIGURATIONS ======"
. "utils/parse_yaml.sh"
eval $(parse_yaml config-satellite-tools.yml "cfg_")
echo " ======= LOADED CONFIGURATIONS ======"
echo ""
echo "satellite_subs_parent_user: $cfg_satellite_subs_parent_user"
echo "satellite_subs_parent_pass $cfg_satellite_subs_parent_pass"
echo "satellite_subs_parent_pool $cfg_satellite_subs_parent_pool"
echo "list_repos $cfg_list_repos"
echo "scenario $cfg_scenario"
echo "fn_initial_organization $cfg_fn_initial_organization"
echo "fn_initial_location $cfg_fn_initial_location"
echo "fn_admin_username $cfg_fn_admin_username"
echo "fn_admin_password $cfg_fn_admin_password"
echo "fn_proxy_dns_managed $cfg_fn_proxy_dns_managed"
echo "fn_proxy_dhcp_managed $cfg_fn_proxy_dhcp_managed"
echo "load_manifest_subs $cfg_load_manifest_subs"
echo "name_manifest_subs $cfg_name_manifest_subs"
echo ""
. "private/configure-server.sh"
. "private/configure-subscription.sh"
. "private/configure-yum.sh"
echo " ======= INSTALLING ========"
configureFirewallCMD # Configuration ports in firewall
## removeAndUnRegisterSubcription # Optional for remove previous subscription
subscriptionRegisterAttach # Subscription and Attach
disableAllRepos # Disable default repos
enableReposCFG # Enable repos for Satellite
setReleaseUnset # Ensure that Red Hat Subscription Manager is not set to use a specific operating system release
yumPrepare # Prepare YUM
yumInstallSatellite # Install Satellite Package
yumInstallConfigureChronydAndSos # Install chrony & sos Package
# ======= SATELLITE INSTALLER =======
satellite-installer --scenario $cfg_scenario \
--foreman-initial-organization $cfg_fn_initial_organization \
--foreman-initial-location $cfg_fn_initial_location \
--foreman-admin-username $cfg_fn_admin_username \
--foreman-admin-password $cfg_fn_admin_password \
--foreman-proxy-dns-managed=$cfg_fn_proxy_dns_managed \
--foreman-proxy-dhcp-managed=$cfg_fn_proxy_dhcp_managed
if [ $cfg_load_manifest_subs = "true" ]; then
hammer subscription upload \
--file ~/$cfg_name_manifest_subs \
--organization $cfg_fn_initial_organization
else
echo " ======= INSTALL MANIFEST IN CONSOLE ========"
fi