The scripts in this directory can be used to deploy or clean up the resources for the IBM Cloud solution tutorial.
File | Description |
---|---|
vpc-multi-region-single-create.sh | Creates VPC resources in a single region. |
vpc-multi-region-create.sh | Creates VPC resources in multiple regions. |
vpc-multi-region-cleanup.sh | Removes all created resources. |
cis/cis-glb-create.sh | Configures a global load balancer. |
-
In a browser visit IAM authorizations and add an authorization from the source: VPC Infrastructure, Load Balancer for VPC to the Target Certificate Manager
-
Target the vpc generation to 1 or 2
-
Open the terminal and add your SSH key
ssh-add -K ~./ssh/<YOUR_PRIVATE_KEY>
-
Navigate to
vpc-multi-region
folder in the repo and create a.env
file from the templatecd vpc-multi-region cp template.env .env
-
Provide the required details in the
.env
file and save.ibmcloud is target --gen 2
-
Execute the shell script and follow the steps of execution to setup VPCs in multiple regions in ONE-GO
./vpc-multi-region-create.sh
-
For creating VPC resources in a single region, run this script
./vpc-multi-region-single-create <REGION_NAME>
The following named resources are created by the script above:
Resource type Name(s) Comments Virtual Private Cloud (VPC) BASENAME-REGION Subnet BASENAME-bastion-REGION-ZONE1 Subnet BASENAME-REGION-ZONE1-subnet Subnet BASENAME-REGION-ZONE2-subnet Security Group BASENAME-bastion-REGION-ZONE1-sg Security Group BASENAME-maintenance-sg Security Group BASENAME-sg Virtual Server Instance (VSI) BASENAME-bastion-REGION-ZONE1-vsi Virtual Server Instance (VSI) BASENAME-REGION-zone1-vsi Virtual Server Instance (VSI) BASENAME-REGION-zone2-vsi Floating IP BASENAME-bastion-ip Floating IP BASENAME-REGION-zone1-ip Floating IP BASENAME-REGION-zone2-ip Load Balancer BASENAME-REGION-lb Load Balancer back-end pool BASENAME-REGION-lb-pool Instances are attached as pool members
to the pool with HTTP and HTTPS front-end listeners -
The Global Load Balancer will be connected to the VPC Load balancers when using the vpc-multi-region-create.sh. If executing manually run the below script to create a Global Load Balancer(GLB)
cd cis ./cis-glb-create.sh
- Run the below script to delete CIS GLB resources and VPC resources in ONE-GO.
./vpc-multi-region-cleanup.sh <VPC_NAME> <LOAD_BALANCER_NAME>
- To delete VPC resources,
cd ../scripts && ./vpc-cleanup.sh <VPC_NAME>
- To delete CIS global load balancer resources,
cd cis && ./cis-glb-cleanup.sh