Virtual Private Cloud (VPC) Configuration
Log in to your Xcellhost cloud account and select Virtual Private Cloud (VPC) on the Products page.
Create a VPC in the required region.
Configuration options will appear for the VPC and the VSwitch, which ships with the VPC. What you'll need to do first is to give your VPC a name and set the destination CIDR block. Remember, you cannot change the CIDR block configuration once you have set it. Here, we have set the CIDR block to 192.168.0.0/16 as an example. This CIDR block allows us, 65,534 possible hosts, IP addresses in our VPC.
Now let's configure the VPC's VSwitch. Every Xcellhost Cloud VPC comes with one VSwitch. You'll need to provide the VSwitch a name and configure the CIDR block for the VSwitch. Again, once you have set the CIDR block for the VSwitch it cannot be changed. Here, we have given the VSwitch a smaller range of the available VPC private IP addresses with 192.168.0.0/24, which allows us, 254 possible hosts. This VSwitch will manage a subsection of our VPC infrastructure. When you're done, click OK.
Once the VPC and VSwitch are configured, check the details. Note that the VPC and VSwitch are given unique ID numbers. Click Complete to create the VPC.
You will now see your VPC on the list for the region. Note that the Route Table that comes with every VPC and the VSwitch, which we just configured.
Click Manage to view the VPC details.
On the VPC details page, you will be able to see the full configuration details for the VPC.
Now, let's add an ECS instance to the VPC. We have created ECS instances in previous tutorials so, this time, let's first create the Elastic IP addresses we need for accessing each ECS instance. Go to Elastic IP Addresses and, in the region you choose earlier, click Create EIP.
The Elastic IP purchase screen comes up. Check the details. Here, we chose the minimum configuration details and requested two EIPs.
Last, you'll have to agree to terms and click Activate.
Your Elastic IP addresses are listed by region on the Elastic IP Addresses page. Now we can bind the addresses to your ECS instances. Click Bind under the Actions option.
After the Bind configuration box will appear, the IP Address box shows the public Elastic IP Address details that you have just bought. It needs to be bound to an ECS instance.
When you click the drop-down, you will see that there are no ECS instances available. Click Create ECS Instance.
You are taken to the Alibaba Cloud Elastic Compute Service (ECS) page where you can configure and create an ECS instance. For the tutorial's purposes, we have chosen the pay-as-you-go basic configuration in Zone A of our region. After you're done with that, click Next.
Step 2 details the network configuration. Pick the VPC and VSwitch we have just created. We will leave the Security Group details for now. Click Next.
Step 3 is System Configurations where you can give your server instance a name and set the login credentials. We will leave these for now. Click Next: Grouping to go to the next step.
Step 4 is Grouping by tags for organizing your ECS instances. Let's also skip this for now and go to Preview.
Check that all the details are correct and click Create Instance.
You will eventually see a success box. Wait for a moment or two before going back to the page where you are going to bind an ECS instance to an EIP.
The instance you just created, with the server name and ID, is now available for binding to your EIP in the dropdown. Click OK.
You can check that your ECS instance is available through the public EIP by pinging it on the terminal. All ECS instances have ICMP open by default.
Let's delete one of the Elastic IP Addresses we created, the one we are not going to use right now. Go to the Elastic IP Addresses page and select the EIP you want to delete. Click Release.
The EIP is gone.
Control access to your ECS instances by creating Security Groups and Key Pairs for your VPC and its ECS instances. Do this through the Networks and Security options in the Elastic Compute Service left-side navigation pane.
if you're not using an ECS instance, it's good practice to put it in a non-running status. There are other ways to get to ECS instance details. We'll go there through the Elastic IP Addresses console in the VPC console left-side navigation pane.
Click the Bind Instance ECS link and click Stop to stop the instance.
If you go back to the Elastic Compute Service list, you will see the instance in the process of stopping. If your ECS instance is a pay-as-you-go, you will not be charged for it when it is stopped.