-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extract installer binary, instead of OPENSHIFT_INSTALL_RELEASE_IMAGE_…
…OVERRIDE and use pre-configured network.
- Loading branch information
Showing
7 changed files
with
74 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
bold=$(tput bold) | ||
bright=$(tput setaf 14) | ||
reset=$(tput sgr0) | ||
|
||
echo_bright() { | ||
echo "${bold}${bright}$1${reset}" | ||
} | ||
|
||
echo "${bold}Creating GCP resources${reset}" | ||
if [[ -z "$ID" ]]; then | ||
echo the following environment variables must be provided: | ||
echo "\$ID to name gcp network and subnet" | ||
exit 1 | ||
fi | ||
set -euo pipefail | ||
|
||
export ZONE=$(gcloud config get-value compute/zone) | ||
export PROJECT=$(gcloud config get-value project) | ||
echo_bright "Creating network ${ID}" | ||
gcloud compute networks create "${ID}" \ | ||
--subnet-mode=custom \ | ||
--bgp-routing-mode=regional | ||
|
||
echo_bright "Creating subnet for network ${ID}" | ||
gcloud compute networks subnets create "${ID}" \ | ||
--network "${ID}" \ | ||
--range=10.0.0.0/9 | ||
|
||
echo_bright "Creating firewall rules for network ${ID}" | ||
gcloud compute firewall-rules create "${ID}" \ | ||
--network "${ID}" \ | ||
--allow tcp:22,icmp | ||
|
||
echo "${bold}Network and subnet successfully created${reset}" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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