2
2
3
3
source experiment/run-library.sh
4
4
5
+ organization=" ${PARAM_organization:- Default Organization} "
5
6
manifest=" ${PARAM_manifest:- conf/ contperf/ manifest.zip} "
6
7
inventory=" ${PARAM_inventory:- conf/ contperf/ inventory.ini} "
7
8
private_key=" ${PARAM_private_key:- conf/ contperf/ id_rsa_perf} "
@@ -28,7 +29,6 @@ job_name="${PARAM_job_name:-Sat_Experiment}"
28
29
max_age_input=" ${PARAM_max_age_input:- 19000} "
29
30
skip_down_setup=" ${PARAM_skip_down_setup:- false} "
30
31
31
- do=" Default Organization"
32
32
dl=" Default Location"
33
33
34
34
opts=" --forks 100 -i $inventory --private-key $private_key "
@@ -41,68 +41,70 @@ generic_environment_check
41
41
# If we already have setup ready - all repos synced, etc we can skip directly to registering and downloading batches. PLEASE DELETE ALL HOSTS FROM SATELLITE.
42
42
if [ " $skip_down_setup " != " true" ]; then
43
43
section " Upload manifest"
44
- h regs-10-ensure-loc-in-org.log " organization add-location --name 'Default Organization' --location 'Default Location'"
44
+ h_out " --no-headers --csv organization list --fields name" | grep --quiet ' ^$organization$' \
45
+ || h regs-10-ensure-org.log " organization create --name '$organization '"
46
+ h regs-10-ensure-loc-in-org.log " organization add-location --name '$organization ' --location '$dl '"
45
47
a regs-10-manifest-deploy.log -m copy -a " src=$manifest dest=/root/manifest-auto.zip force=yes" satellite6
46
- h regs-10-manifest-upload.log " subscription upload --file '/root/manifest-auto.zip' --organization '$do '"
48
+ h regs-10-manifest-upload.log " subscription upload --file '/root/manifest-auto.zip' --organization '$organization '"
47
49
s $wait_interval
48
50
49
51
50
52
section " Sync from CDN" # do not measure because of unpredictable network latency
51
- h regs-20-set-cdn-stage.log " organization update --name 'Default Organization ' --redhat-repository-url '$cdn_url_full '"
52
- h regs-20-reposet-enable-rhel7.log " repository-set enable --organization '$do ' --product 'Red Hat Enterprise Linux Server' --name 'Red Hat Enterprise Linux 7 Server (RPMs)' --releasever '7Server' --basearch 'x86_64'"
53
- h regs-20-repo-immediate-rhel7.log " repository update --organization '$do ' --product 'Red Hat Enterprise Linux Server' --name 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server' --download-policy 'immediate'"
54
- h regs-20-repo-sync-rhel7.log " repository synchronize --organization '$do ' --product 'Red Hat Enterprise Linux Server' --name 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server'"
53
+ h regs-20-set-cdn-stage.log " organization update --name '$organization ' --redhat-repository-url '$cdn_url_full '"
54
+ h regs-20-reposet-enable-rhel7.log " repository-set enable --organization '$organization ' --product 'Red Hat Enterprise Linux Server' --name 'Red Hat Enterprise Linux 7 Server (RPMs)' --releasever '7Server' --basearch 'x86_64'"
55
+ h regs-20-repo-immediate-rhel7.log " repository update --organization '$organization ' --product 'Red Hat Enterprise Linux Server' --name 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server' --download-policy 'immediate'"
56
+ h regs-20-repo-sync-rhel7.log " repository synchronize --organization '$organization ' --product 'Red Hat Enterprise Linux Server' --name 'Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server'"
55
57
s $wait_interval
56
58
57
59
58
60
section " Sync Tools repo" # do not measure because of unpredictable network latency
59
- h regs-30-sat-tools-product-create.log " product create --organization '$do ' --name SatToolsProduct"
60
- h regs-30-repository-create-sat-tools.log " repository create --organization '$do ' --product SatToolsProduct --name SatToolsRepo --content-type yum --url '$repo_sat_tools '"
61
- h regs-30-repository-sync-sat-tools.log " repository synchronize --organization '$do ' --product SatToolsProduct --name SatToolsRepo"
61
+ h regs-30-sat-tools-product-create.log " product create --organization '$organization ' --name SatToolsProduct"
62
+ h regs-30-repository-create-sat-tools.log " repository create --organization '$organization ' --product SatToolsProduct --name SatToolsRepo --content-type yum --url '$repo_sat_tools '"
63
+ h regs-30-repository-sync-sat-tools.log " repository synchronize --organization '$organization ' --product SatToolsProduct --name SatToolsRepo"
62
64
s $wait_interval
63
65
64
66
section " Sync Client repos" # do not measure because of unpredictable network latency
65
- h regs-30-sat-client-product-create.log " product create --organization '$do ' --name SatClientProduct"
66
- h regs-30-repository-create-sat-client_7.log " repository create --organization '$do ' --product SatClientProduct --name SatClient7Repo --content-type yum --url '$repo_sat_client_7 '"
67
- h regs-30-repository-sync-sat-client_7.log " repository synchronize --organization '$do ' --product SatClientProduct --name SatClient7Repo"
67
+ h regs-30-sat-client-product-create.log " product create --organization '$organization ' --name SatClientProduct"
68
+ h regs-30-repository-create-sat-client_7.log " repository create --organization '$organization ' --product SatClientProduct --name SatClient7Repo --content-type yum --url '$repo_sat_client_7 '"
69
+ h regs-30-repository-sync-sat-client_7.log " repository synchronize --organization '$organization ' --product SatClientProduct --name SatClient7Repo"
68
70
s $wait_interval
69
- h regs-30-repository-create-sat-client_8.log " repository create --organization '$do ' --product SatClientProduct --name SatClient8Repo --content-type yum --url '$repo_sat_client_8 '"
70
- h regs-30-repository-sync-sat-client_8.log " repository synchronize --organization '$do ' --product SatClientProduct --name SatClient8Repo"
71
+ h regs-30-repository-create-sat-client_8.log " repository create --organization '$organization ' --product SatClientProduct --name SatClient8Repo --content-type yum --url '$repo_sat_client_8 '"
72
+ h regs-30-repository-sync-sat-client_8.log " repository synchronize --organization '$organization ' --product SatClientProduct --name SatClient8Repo"
71
73
s $wait_interval
72
74
73
75
section " Sync Download Test repo"
74
- # h product-create-downtest.log "product create --organization '$do ' --name DownTestProduct"
76
+ # h product-create-downtest.log "product create --organization '$organization ' --name DownTestProduct"
75
77
ap repository-create-downtest.log playbooks/tests/downloadtest-syncrepo.yaml -e " repo_download_test=$repo_download_test repo_count_download_test=$repo_count_download_test "
76
- # h repository-create-downtest.log "repository create --organization '$do ' --product DownTestProduct --name DownTestRepo --content-type yum --url '$repo_download_test'"
77
- # h repo-sync-downtest.log "repository synchronize --organization '$do ' --product DownTestProduct --name DownTestRepo"
78
+ # h repository-create-downtest.log "repository create --organization '$organization ' --product DownTestProduct --name DownTestRepo --content-type yum --url '$repo_download_test'"
79
+ # h repo-sync-downtest.log "repository synchronize --organization '$organization ' --product DownTestProduct --name DownTestRepo"
78
80
s $wait_interval
79
81
80
82
section " Prepare for registrations"
81
83
ap regs-40-recreate-client-scripts.log playbooks/satellite/client-scripts.yaml -e " registration_hostgroup=hostgroup-for-{{ tests_registration_target }}" # this detects OS, so need to run after we synces one
82
84
83
85
h_out " --no-headers --csv domain list --search 'name = {{ containers_domain }}'" | grep --quiet ' ^[0-9]\+,' \
84
- || h regs-40-domain-create.log " domain create --name '{{ containers_domain }}' --organizations '$do '"
86
+ || h regs-40-domain-create.log " domain create --name '{{ containers_domain }}' --organizations '$organization '"
85
87
tmp=$( mktemp )
86
- h_out " --no-headers --csv location list --organization '$do '" | grep ' ^[0-9]\+,' > $tmp
88
+ h_out " --no-headers --csv location list --organization '$organization '" | grep ' ^[0-9]\+,' > $tmp
87
89
location_ids=$( cut -d ' ,' -f 1 $tmp | tr ' \n' ' ,' | sed ' s/,$//' )
88
- h regs-40-domain-update.log " domain update --name '{{ containers_domain }}' --organizations '$do ' --location-ids '$location_ids '"
90
+ h regs-40-domain-update.log " domain update --name '{{ containers_domain }}' --organizations '$organization ' --location-ids '$location_ids '"
89
91
90
- h regs-40-ak-create.log " activation-key create --content-view '$do View' --lifecycle-environment Library --name ActivationKey --organization '$do '"
91
- h_out " --csv subscription list --organization '$do ' --search 'name = SatToolsProduct'" > $logs /subs-list-tools.log
92
+ h regs-40-ak-create.log " activation-key create --content-view '$organization View' --lifecycle-environment Library --name ActivationKey --organization '$organization '"
93
+ h_out " --csv subscription list --organization '$organization ' --search 'name = SatToolsProduct'" > $logs /subs-list-tools.log
92
94
tools_subs_id=$( tail -n 1 $logs /subs-list-tools.log | cut -d ' ,' -f 1 )
93
- skip_measurement=' true' h 43-ak-add-subs-tools.log " activation-key add-subscription --organization '$do ' --name ActivationKey --subscription-id '$tools_subs_id '"
94
- h_out " --csv subscription list --organization '$do ' --search 'name = \" $rhel_subscription \" '" > $logs /subs-list-rhel.log
95
+ skip_measurement=' true' h 43-ak-add-subs-tools.log " activation-key add-subscription --organization '$organization ' --name ActivationKey --subscription-id '$tools_subs_id '"
96
+ h_out " --csv subscription list --organization '$organization ' --search 'name = \" $rhel_subscription \" '" > $logs /subs-list-rhel.log
95
97
rhel_subs_id=$( tail -n 1 $logs /subs-list-rhel.log | cut -d ' ,' -f 1 )
96
- skip_measurement=' true' h 43-ak-add-subs-rhel.log " activation-key add-subscription --organization '$do ' --name ActivationKey --subscription-id '$rhel_subs_id '"
97
- h_out " --csv subscription list --organization '$do ' --search 'name = SatClientProduct'" > $logs /subs-list-client.log
98
+ skip_measurement=' true' h 43-ak-add-subs-rhel.log " activation-key add-subscription --organization '$organization ' --name ActivationKey --subscription-id '$rhel_subs_id '"
99
+ h_out " --csv subscription list --organization '$organization ' --search 'name = SatClientProduct'" > $logs /subs-list-client.log
98
100
client_subs_id=$( tail -n 1 $logs /subs-list-client.log | cut -d ' ,' -f 1 )
99
- skip_measurement=' true' h 43-ak-add-subs-client.log " activation-key add-subscription --organization '$do ' --name ActivationKey --subscription-id '$client_subs_id '"
100
- h regs-40-subs-list-downtest.log " --csv subscription list --organization '$do ' --search 'name = DownTestProduct'" > $logs /subs-list-downrepo.log
101
+ skip_measurement=' true' h 43-ak-add-subs-client.log " activation-key add-subscription --organization '$organization ' --name ActivationKey --subscription-id '$client_subs_id '"
102
+ h regs-40-subs-list-downtest.log " --csv subscription list --organization '$organization ' --search 'name = DownTestProduct'" > $logs /subs-list-downrepo.log
101
103
down_test_subs_id=$( tail -n 1 $logs /subs-list-downrepo.log | cut -d ' ,' -f 1 )
102
- h regs-40-ak-add-subs-downtest.log " activation-key add-subscription --organization '$do ' --name ActivationKey --subscription-id '$down_test_subs_id '"
104
+ h regs-40-ak-add-subs-downtest.log " activation-key add-subscription --organization '$organization ' --name ActivationKey --subscription-id '$organizationwn_test_subs_id '"
103
105
104
106
tmp=$( mktemp )
105
- h_out " --no-headers --csv capsule list --organization '$do '" | grep ' ^[0-9]\+,' > $tmp
107
+ h_out " --no-headers --csv capsule list --organization '$organization '" | grep ' ^[0-9]\+,' > $tmp
106
108
for row in $( cut -d ' ' -f 1 $tmp ) ; do
107
109
capsule_id=$( echo " $row " | cut -d ' ,' -f 1 )
108
110
capsule_name=$( echo " $row " | cut -d ' ,' -f 2 )
@@ -114,11 +116,11 @@ if [ "$skip_down_setup" != "true" ]; then
114
116
location_name=" Location for $capsule_name "
115
117
fi
116
118
h_out " --no-headers --csv subnet list --search 'name = $subnet_name '" | grep --quiet ' ^[0-9]\+,' \
117
- || h regs-44-subnet-create-$capsule_name .log " subnet create --name '$subnet_name ' --ipam None --domains '{{ containers_domain }}' --organization '$do ' --network 172.0.0.0 --mask 255.0.0.0 --location '$location_name '"
119
+ || h regs-44-subnet-create-$capsule_name .log " subnet create --name '$subnet_name ' --ipam None --domains '{{ containers_domain }}' --organization '$organization ' --network 172.0.0.0 --mask 255.0.0.0 --location '$location_name '"
118
120
subnet_id=$( h_out " --output yaml subnet info --name '$subnet_name '" | grep ' ^Id:' | cut -d ' ' -f 2 )
119
121
a regs-45-subnet-add-rex-capsule-$capsule_name .log satellite6 -m " shell" -a " curl --silent --insecure -u {{ sat_user }}:{{ sat_pass }} -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' https://localhost//api/v2/subnets/$subnet_id -d '{\" subnet\" : {\" remote_execution_proxy_ids\" : [\" $capsule_id \" ]}}'"
120
122
h_out " --no-headers --csv hostgroup list --search 'name = $hostgroup_name '" | grep --quiet ' ^[0-9]\+,' \
121
- || ap regs-41-hostgroup-create-$capsule_name .log playbooks/satellite/hostgroup-create.yaml -e " Default_Organization ='$do ' hostgroup_name=$hostgroup_name subnet_name=$subnet_name "
123
+ || ap regs-41-hostgroup-create-$capsule_name .log playbooks/satellite/hostgroup-create.yaml -e " organization ='$organization ' hostgroup_name=$hostgroup_name subnet_name=$subnet_name "
122
124
done
123
125
124
126
fi
0 commit comments