Skip to content

Commit

Permalink
Updates for New Software versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jncox committed Jul 29, 2020
1 parent e696815 commit 6c19a8e
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 93 deletions.
3 changes: 3 additions & 0 deletions scripts/all_bootcamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ case ${1} in
export ISO_IMAGES=(\
Nutanix-VirtIO-1.1.5.iso \
Windows2016.iso \
FrameCCA-2.1.6.iso \
FrameGuestAgentInstaller_1.0.2.7.iso \
Nutanix-VirtIO-1.1.5.iso \
veeam/VBR_10.0.0.4442.iso \
)

Expand Down
39 changes: 0 additions & 39 deletions scripts/frame_bootcamp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,45 +20,6 @@ case ${1} in

export AUTH_SERVER='AutoAD'

# Networking needs for Frame Bootcamp
export NW2_DHCP_START="${IPV4_PREFIX}.132"
export NW2_DHCP_END="${IPV4_PREFIX}.149"
export NW2_DHCP_START2="${IPV4_PREFIX}.250"
export NW2_DHCP_END2="${IPV4_PREFIX}.253"

export USERNW01_NAME='User01-Network'
export USERNW01_VLAN=${NW2_VLAN}

export USERNW02_NAME='User02-Network'
export USERNW02_VLAN=${NW2_VLAN}

export USERNW03_NAME='User03-Network'
export USERNW03_VLAN=${NW2_VLAN}

export USERNW04_NAME='User04-Network'
export USERNW04_VLAN=${NW2_VLAN}

export USERNW05_NAME='User05-Network'
export USERNW05_VLAN=${NW2_VLAN}

export USERNW06_NAME='User06-Network'
export USERNW06_VLAN=${NW2_VLAN}

export USERNW07_NAME='User07-Network'
export USERNW07_VLAN=${NW2_VLAN}

export USERNW08_NAME='User08-Network'
export USERNW08_VLAN=${NW2_VLAN}

export USERNW09_NAME='User09-Network'
export USERNW09_VLAN=${NW2_VLAN}

export USERNW10_NAME='User10-Network'
export USERNW10_VLAN=${NW2_VLAN}

export USERNW11_NAME='User11-Network'
export USERNW11_VLAN=${NW2_VLAN}

args_required 'PE_HOST PC_LAUNCH'
ssh_pubkey & # non-blocking, parallel suitable

Expand Down
40 changes: 20 additions & 20 deletions scripts/global.vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# shellcheck disable=SC2034
RELEASE='release.json'
PC_DEV_VERSION='5.17.0.3'
PC_DEV_VERSION='2020.7'
PC_CURRENT_VERSION='5.17.0.3'
PC_STABLE_VERSION='5.11.2.1'
FILES_VERSION='3.6.3'
FILES_VERSION='3.7.0'
FILE_ANALYTICS_VERSION='2.1.1.1'
NTNX_INIT_PASSWORD='nutanix/4u'
PRISM_ADMIN='admin'
Expand Down Expand Up @@ -43,7 +43,7 @@ SSH_OPTS+=' -q' # -v'
###################################################

ERA_Blueprint='EraServerDeployment.json'
ERAServerImage='ERA-Server-build-1.2.1.qcow2'
ERAServerImage='ERA-Server-build-1.3.1.qcow2'
ERAServerName='EraServer'
ERA_USER="admin"
ERA_PASSWORD="nutanix/4u"
Expand Down Expand Up @@ -288,14 +288,14 @@ AUTH_ADMIN_GROUP='SSP Admins'
case "${OCTET[0]}.${OCTET[1]}" in

10.55 ) # HPOC us-east = DUR
PC_DEV_METAURL='http://10.55.251.38/workshop_staging/pcdeploy-5.17.0.3.json'
PC_DEV_URL='http://10.55.251.38/workshop_staging/euphrates-5.17.0.3-stable-prism_central.tar'
PC_DEV_METAURL='http://10.55.251.38/workshop_staging/pcdeploy-pc.2020.7.json'
PC_DEV_URL='http://10.55.251.38/workshop_staging/pc.2020.7.tar'
PC_CURRENT_METAURL='http://10.55.251.38/workshop_staging/pcdeploy-5.16.1.2.json'
PC_CURRENT_URL='http://10.55.251.38/workshop_staging/euphrates-5.16.1.2-stable-prism_central.tar'
PC_STABLE_METAURL='http://10.55.251.38/workshop_staging/pcdeploy-5.11.2.1.json'
PC_STABLE_URL='http://10.55.251.38/workshop_staging/euphrates-5.11.2.1-stable-prism_central.tar'
FILES_METAURL='http://10.55.251.38/workshop_staging/afs-3.6.3.json'
FILES_URL='http://10.55.251.38/workshop_staging/nutanix-afs-el7.3-release-afs-3.6.3-stable.qcow2'
FILES_METAURL='http://10.55.251.38/workshop_staging/afs-3.7.0.json'
FILES_URL='http://10.55.251.38/workshop_staging/nutanix-afs-el7.3-release-afs-3.7.0-stable.qcow2'
FILE_ANALYTICS_METAURL='http://10.55.251.38/workshop_staging/nutanix-file_analytics-el7.7-release-2.1.1.1-metadata.json'
FILE_ANALYTICS_URL='http://10.55.251.38/workshop_staging/nutanix-file_analytics-el7.7-release-2.1.1.1.qcow2'
JQ_REPOS=(\
Expand Down Expand Up @@ -327,14 +327,14 @@ case "${OCTET[0]}.${OCTET[1]}" in
OBJECTS_OFFLINE_REPO='http://10.55.251.38/workshop_staging/objects'
;;
10.42 ) # HPOC us-west = PHX
PC_DEV_METAURL='http://10.42.194.11/workshop_staging/pcdeploy-5.17.0.3.json'
PC_DEV_URL='http://10.42.194.11/workshop_staging/euphrates-5.17.0.3-stable-prism_central.tar'
PC_DEV_METAURL='http://10.42.194.11/workshop_staging/pcdeploy-pc.2020.7.json'
PC_DEV_URL='http://10.42.194.11/workshop_staging/pc.2020.7.tar'
PC_CURRENT_METAURL='http://10.42.194.11/workshop_staging/pcdeploy-5.16.1.2.json'
PC_CURRENT_URL='http://10.42.194.11/workshop_staging/euphrates-5.16.1.2-stable-prism_central.tar'
PC_STABLE_METAURL='http://10.42.194.11/workshop_staging/pcdeploy-5.11.2.1.json'
PC_STABLE_URL='http://10.42.194.11/workshop_staging/euphrates-5.11.2.1-stable-prism_central.tar'
FILES_METAURL='http://10.42.194.11/workshop_staging/afs-3.6.3.json'
FILES_URL='http://10.42.194.11/workshop_staging/nutanix-afs-el7.3-release-afs-3.6.3-stable.qcow2'
FILES_METAURL='http://10.42.194.11/workshop_staging/afs-3.7.0.json'
FILES_URL='http://10.42.194.11/workshop_staging/nutanix-afs-el7.3-release-afs-3.7.0-stable.qcow2'
FILE_ANALYTICS_METAURL='http://10.42.194.11/workshop_staging/nutanix-file_analytics-el7.7-release-2.1.1.1-metadata.json'
FILE_ANALYTICS_URL='http://10.42.194.11/workshop_staging/nutanix-file_analytics-el7.7-release-2.1.1.1.qcow2'
JQ_REPOS=(\
Expand Down Expand Up @@ -366,14 +366,14 @@ case "${OCTET[0]}.${OCTET[1]}" in
OBJECTS_OFFLINE_REPO='http://10.42.194.11/workshop_staging/objects'
;;
10.38 ) # HPOC us-west = PHX 1-Node Clusters
PC_DEV_METAURL='http://10.42.194.11/workshop_staging/pcdeploy-5.17.0.3.json'
PC_DEV_URL='http://10.42.194.11/workshop_staging/euphrates-5.17.0.3-stable-prism_central.tar'
PC_DEV_METAURL='http://10.42.194.11/workshop_staging/pcdeploy-pc.2020.7.json'
PC_DEV_URL='http://10.42.194.11/workshop_staging/pc.2020.7.tar'
PC_CURRENT_METAURL='http://10.42.194.11/workshop_staging/pcdeploy-5.16.1.2.json'
PC_CURRENT_URL='http://10.42.194.11/workshop_staging/euphrates-5.16.1.2-stable-prism_central.tar'
PC_STABLE_METAURL='http://10.42.194.11/workshop_staging/pcdeploy-5.11.2.1.json'
PC_STABLE_URL='http://10.42.194.11/workshop_staging/euphrates-5.11.2.1-stable-prism_central.tar'
FILES_METAURL='http://10.42.194.11/workshop_staging/afs-3.6.3.json'
FILES_URL='http://10.42.194.11/workshop_staging/nutanix-afs-el7.3-release-afs-3.6.3-stable.qcow2'
FILES_METAURL='http://10.42.194.11/workshop_staging/afs-3.7.0.json'
FILES_URL='http://10.42.194.11/workshop_staging/nutanix-afs-el7.3-release-afs-3.7.0-stable.qcow2'
FILE_ANALYTICS_METAURL='http://10.42.194.11/workshop_staging/nutanix-file_analytics-el7.7-release-2.1.1.1-metadata.json'
FILE_ANALYTICS_URL='http://10.42.194.11/workshop_staging/nutanix-file_analytics-el7.7-release-2.1.1.1.qcow2'
JQ_REPOS=(\
Expand All @@ -394,7 +394,7 @@ case "${OCTET[0]}.${OCTET[1]}" in
'https://s3.amazonaws.com/get-ahv-images/AutoDC2.qcow2' \
)
AUTOAD_REPOS=(\
'http://10.42.194.11/workshop_staging/AutoAD.qcow2' \
'http://10.42.194.11/workshop_staging/AutoAD_05272020.qcow2' \
'https://s3.amazonaws.com/get-ahv-images/AutoAD.qcow2' \
)
PC_DATA='http://10.42.194.11/workshop_staging/seedPC.zip'
Expand All @@ -410,14 +410,14 @@ case "${OCTET[0]}.${OCTET[1]}" in
fi
;;
10.136 ) # HPOC us-west = BLR
PC_DEV_METAURL='http://10.136.239.13/workshop_staging/pcdeploy-5.17.0.3.json'
PC_DEV_URL='http://10.136.239.13/workshop_staging/euphrates-5.17.0.3-stable-prism_central.tar'
PC_DEV_METAURL='http://10.136.239.13/workshop_staging/pcdeploy-pc.2020.7.json'
PC_DEV_URL='http://10.136.239.13/workshop_staging/pc.2020.7.tar'
PC_CURRENT_METAURL='http://10.136.239.13/workshop_staging/pcdeploy-5.16.1.2.json'
PC_CURRENT_URL='http://10.136.239.13/workshop_staging/euphrates-5.16.1.2-stable-prism_central.tar'
PC_STABLE_METAURL='http://10.136.239.13/workshop_staging/pcdeploy-5.11.2.1.json'
PC_STABLE_URL='http://10.136.239.13/workshop_staging/euphrates-5.11.2.1-stable-prism_central.tar'
FILES_METAURL='http://10.136.239.13/workshop_staging/afs-3.6.3.json'
FILES_URL='http://10.136.239.13/workshop_staging/nutanix-afs-el7.3-release-afs-3.6.3-stable.qcow2'
FILES_METAURL='http://10.136.239.13/workshop_staging/afs-3.7.0.json'
FILES_URL='http://10.136.239.13/workshop_staging/nutanix-afs-el7.3-release-afs-3.7.0-stable.qcow2'
FILE_ANALYTICS_METAURL='http://10.136.239.13/workshop_staging/nutanix-file_analytics-el7.7-release-2.1.1.1-metadata.json'
FILE_ANALYTICS_URL='http://10.136.239.13/workshop_staging/nutanix-file_analytics-el7.7-release-2.1.1.1.qcow2'
JQ_REPOS=(\
Expand Down
30 changes: 15 additions & 15 deletions scripts/lib.pc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function lcm() {
# Get the latest version from the to be updated uuid. Put always a value in the array otherwise we loose/have skewed verrsions to products
version=($(jq --arg uuid "$uuid" '.group_results[].entity_results[] | select (.data[].values[].values[]==$uuid) .data[] | select (.name=="version") .values[].values[]' reply_json_ver.json | sort |tail -1 | tr -d \"))
# If no version upgrade available add a blank item in the array
if [[ -z $version ]]; then
if [[ -z $version ]]; then
version='NA'
fi
version_ar+=($version)
Expand Down Expand Up @@ -902,14 +902,14 @@ log "EraServer IP |${ERA_HOST}|"
## Create the EraManaged network inside Era ##
log "Reset Default Era Password"

_reset_passwd=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_Default_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/auth/update" --data '{ "password": "'${ERA_PASSWORD}'"}' | jq -r '.status' | tr -d \")
_reset_passwd=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_Default_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/auth/update" --data '{ "password": "'${ERA_PASSWORD}'"}' | jq -r '.status' | tr -d \")

log "Password Reset |${_reset_passwd}|"

## Accept EULA ##
log "Accept Era EULA"

_accept_eula=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/auth/validate" --data '{ "eulaAccepted": true }' | jq -r '.status' | tr -d \")
_accept_eula=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/auth/validate" --data '{ "eulaAccepted": true }' | jq -r '.status' | tr -d \")

log "Accept EULA |${_accept_eula}|"

Expand All @@ -936,7 +936,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_era_cluster_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/clusters" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_era_cluster_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/clusters" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Era Cluster ID: |${_era_cluster_id}|"

Expand All @@ -947,12 +947,12 @@ ClusterJSON='{"ip_address": "'${PE_HOST}'","port": "9440","protocol": "https","d

echo $ClusterJSON > cluster.json

_task_id=$(curl -k -H 'Content-Type: multipart/form-data' -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/clusters/${_era_cluster_id}/json" -F file="@"cluster.json)
_task_id=$(curl -k -H 'Content-Type: multipart/form-data' -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/clusters/${_era_cluster_id}/json" -F file="@"cluster.json)

## Add the Secondary Network inside Era ##
log "Create ${NW2_NAME} DHCP/IPAM Network"

_dhcp_network_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/resources/networks" --data '{"name": "'${NW2_NAME}'","type": "DHCP"}' | jq -r '.id' | tr -d \")
_dhcp_network_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/resources/networks" --data '{"name": "'${NW2_NAME}'","type": "DHCP"}' | jq -r '.id' | tr -d \")

log "Created ${NW2_NAME} Network with Network ID |${_dhcp_network_id}|"

Expand Down Expand Up @@ -991,7 +991,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_static_network_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/resources/networks" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_static_network_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/resources/networks" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Created ${NW3_NAME} Network with Network ID |${_static_network_id}|"

Expand All @@ -1017,7 +1017,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_primary_network_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_primary_network_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Created Primary-MSSQL-NETWORK Network Profile with ID |${_primary_network_profile_id}|"

Expand All @@ -1043,7 +1043,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_postgres_network_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_postgres_network_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Created Primary_PGSQL_NETWORK Network Profile with ID |${_postgres_network_profile_id}|"

Expand All @@ -1069,7 +1069,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_oracle_network_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_oracle_network_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Created Primary_ORACLE_NETWORK Network Profile with ID |${_oracle_network_profile_id}|"

Expand All @@ -1095,7 +1095,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_eramanagaed_network_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_eramanagaed_network_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Created ERAMANAGED_MSSQL_NETWORK Network Profile with ID |${_eramanagaed_network_profile_id}|"

Expand Down Expand Up @@ -1130,7 +1130,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_xs_compute_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_xs_compute_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Created CUSTOM_EXTRA_SMALL Compute Profile with ID |${_xs_compute_profile_id}|"

Expand Down Expand Up @@ -1165,7 +1165,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_oracle_small_compute_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_oracle_small_compute_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Created ORACLE_SMALL Compute Profile with ID |${_oracle_small_compute_profile_id}|"

Expand Down Expand Up @@ -1215,7 +1215,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_ntnxlab_domain_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_ntnxlab_domain_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Created NTNXLAB Domain Profile with ID |${_ntnxlab_domain_profile_id}|"

Expand Down Expand Up @@ -1286,7 +1286,7 @@ HTTP_JSON_BODY=$(cat <<EOF
EOF
)

_oracle_param_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.8/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")
_oracle_param_profile_id=$(curl ${CURL_HTTP_OPTS} -u ${ERA_USER}:${ERA_PASSWORD} -X POST "https://${ERA_HOST}/era/v0.9/profiles" --data "${HTTP_JSON_BODY}" | jq -r '.id' | tr -d \")

log "Created ORACLE_SMALL_PARAMS Parameters Profile with ID |${_oracle_param_profile_id}|"

Expand Down
Loading

0 comments on commit 6c19a8e

Please sign in to comment.