Create Network in Bluvalt

There are two ways to create resources in Openstack, a graphical user interface by using the Horizon dashboard, and the other way is by using CLI access.

1- Create required networks and subnets:

For our example, we need one network only.

To get API access, please follow the KB Click here.

a- Creating Needed Networks:

Create the network using command:

openstack network create <NET_NAME>
copy

b- Creating Corresponding Subnets:

Create a relative subnet using command:

openstack subnet create <SUBNET_NAME> --network <NET_NAME> --subnet-range <X.X.X.X/X>
copy

Using the graphical user interface to create the needed networks and subnets. Go to Networkcopy => Networkingcopy => Click on Create Networkcopy

file

Give a network name

file

Give the subnet name and network address

file

Then click createcopy.

Repeat the above for any needed networks and subnets.

2- Creating Openstack Router:

Create a virtual router:

openstack router create <ROUTER_NAME>
copy

Add router to needed subnet:

openstack router add subnet <ROUTER_NAME_OR_ID> <SUBNET_NAME_OR_ID>
copy

Link the router to the external provider network:

openstack router set <ROUTER_NAME> --external-gateway <EXTERNAL_NETWORK_ID>
copy

Note that, external network ID for RUH2 is c975f064-d2b8-413c-9493-981f68bf887acopy, and for JED1 is 80e37cda-1762-4d98-8e55-df3e33710295copy

You can also use the Horizon dashboard to create the needed router.

Go to Networkcopy => Routerscopy => Click on Create Routercopy

file

Give the Router name and click Createcopy.

Now, after creating the router, you will need to set the router as an external one, to do that just click Set Gatewaycopy, then select the External Networkcopy

file

Again click Set Gatewaycopy

The next step is to add an interface to the created router from any needed subnet.

Click on the router name. Click on Add Interfacecopy Select the Subnetcopy, and optionally you can select the IP Address.

file

Then click Add Interfacecopy

3- Creating Security Groups:

The next step is to create a security group. You can create a security group from GUI or from CLI.

a- From CLI:

openstack security group create <SEC_GROUP_NAME> --description "Security Group"
copy

Add needed rules:

openstack security group rule create <SEC_GROUP_NAME> \
    --protocol tcp --dst-port 443:443 --remote-ip 0.0.0.0/0
copy

b- From GUI:

Got to Network => Security Groups => Click Create Security Groupcopy file Give the security group name and click Create Security Groupcopy

Click Manage Rulescopy file

Click Add Rulecopy file

Add select HTTPScopy

file

Add any additional needed rules

4- Creating an Instance:

Now, we will create an instance.

a- From CLI:

Use the following command to create the instance:

openstack server create \
    --flavor <FLAVOR_NAME> --image <IMAGE_ID> --availability-zone <ZONE_NAME> --security-group default --security-group <SEC_GROUP_NAME> \
    --network <NET_NAME> \
    --boot-from-volume <VOLUME_SIZE> --max 1 \
    --wait <SERVER_NAME>
copy

In this demo we simplify the code and used --networkcopy flag, for more advanced use cases, refer to the ‘–nic’ parameter.

b- Create the an instance from GUI:

Please follow this KB Click here