Create a cloud server
Control panel
OpenStack CLI
Terraform
-
В control panels go to Cloud platform → Servers.
-
Click Create a server.
-
Fill in the blocks:
-
Check the price of the cloud server.
-
Click Create.
Name and location
- Enter the server name. This will be set as the host name in the operating system.
- Select region and pool segment The pool segment determines the list of available server configurations and the cost of resources. The list of available server configurations and the cost of resources depends on the pool segment. Once the server is created, the pool segment cannot be changed.
Source
You can create a server from finished image with a pre-installed and customized operating system, appendices, own image, network drive or snapshot.
Finished image
appendix
Own image
Network disk
Snapshot
-
Click on the default source name.
-
Open the tab Ready-made images.
-
Select an image. Ready images are available in all pool segments.
-
Click Select.
-
Click on the default source name.
-
Open the tab Appendices.
-
Select an application. Applications are available in all pool segments.
-
Click Select
-
Click on the default source name.
-
Open the tab My images.
-
Select an image. The image must be in the same pool segment as the server.
-
Click Select.
-
Click on the default source name.
-
Open the tab Disks.
-
Select a disk. The disk must be in the same pool segment as the server.
-
Click Select.
-
Click on the default source name.
-
Open the tab Snapshots.
-
Select a snapshot. The snapshot must be in the same pool segment as the server.
-
Click Select.
Configuration
Two types of configurations are available for the server:
- fixed configurations — several ranges with different specifications, in which the resource ratio is fixed;
- arbitrary configurations In which any ratio of resources can be specified.
The configurations use different processors depending on the line and segment of the pool. After the server is created, you can reconfigure.
Fixed configuration
Arbitrary configuration
-
Click Fixed.
-
Open the tab with the desired ruler.
-
Select a configuration.
-
If both local and network disks are available in the selected configuration, select the disk to be used as the boot disk:
- local disk — check the box Local SSD NVMe disk. A server with a local disk can only be created from images and applications;
- network drive — don't check the box.
The amount of RAM that is allocated to the server may be less than specified in the configuration — the operating system kernel reserves some RAM depending on the kernel version and distribution. You can check the allocated amount on the server using the command
sudo dmesg | grep Memory
.
-
Click Arbitrary.
-
Specify the number of vCPUs and the size of RAM.
-
If you want to add GPUs to the server, click Add GPUselect GPU type and specify the number of GPUs.
-
If both local and network disks are available in the selected configuration, select the disk to be used as the boot disk:
- local disk — check the box Local SSD NVMe disk. A server with a local disk can only be created from images and applications;
- network drive — don't check the box.
The amount of RAM that is allocated to the server may be less than specified in the configuration — the operating system kernel reserves some RAM depending on the kernel version and distribution. You can check the allocated amount on the server using the command
sudo dmesg | grep Memory
.
Disks
-
If you did not check the checkbox when setting up the configuration Local SSD NVMe diskThe first specified network drive will be used as the server boot disk. To configure it:
1.1 Select network boot disk type.
1.2 Specify the size of the network boot disk in GB or TB. Take into account network disk limits to the maximum size.
-
Optional: to add additional network drives of the server:
2.1. Press Add.
2.2 Select network boot disk type.
2.3 Specify the size of the network boot disk in GB or TB. Take into account network disk limits to the maximum size.
Once the server is created, you can disconnect additional disks from it or connect new ones.
Network
When created, the server can be connected to one of the subnets:
- private — a subnet without access from the Internet;
- private + 1 public IP — a private subnet with a static public IP address. By default, only the server to which the public IP address connects will be accessible from the Internet in the subnet;
- public — a subnet in which all addresses are accessible from the Internet.
You can create a new subnet or add an existing subnet.
Private subnet
Private subnet and public IP address
Public subnet
-
To add an existing private subnet:
1.1 In the field Subnetwork select an existing subnet.
1.2 In the field Private IP specify the private IP address of the server.
-
To add a new private subnet:
2.1 In the field Subnetwork select Private.
2.2 Optional: Change the CIDR of the subnet.
2.3 Optionally: switch on the toggle switch DHCP.
2.4 Optionally: in the field Gateway change the IP address of the default gateway.
2.4 In the field A sub-network will be established on the network select an existing network on which to create a subnet, or New networkto create a subnet on the new network. If you have selected New network, enter the name of the network.
-
To add an existing private subnet and a static public IP address:
1.1 In the field Subnetwork select Private + 1 public IP.
1.2 In the field Private subnet select the subnet you created.
1.3 In the field Private IP enter the private IP address of the server.
1.4 If a public IP address is created, tap Connect existing and select a public IP address.
-
To add a new private subnet and a static public IP address, in the field Subnetwork select Private + 1 public IP. A private network will be automatically created
nat
, private subnet, router.router-nat
and a public IP address.
-
To add an existing public subnet:
1.1 In the field Subnetwork select an existing subnet.
1.2 In the field Public IP enter the public IP address of the server.
-
To add a new public subnet:
2.1 In the field Subnetwork select Public.
2.2 In the field Subnet size select the subnet size.
Access
-
Put it on the server SSH key for the project for a secure connection:
1.1 If the SSH key for the project has not been added to the cloud platform, click Add an SSH key, enter the key name, insert the public key in OpenSSH format, and press Add.
1.2 If the SSH key for the project is added to the cloud platform, in the field SSH key select an existing key. The SSH key is available only in the pool in which it is placed.
-
Optional: in the field Password for "root":
2.1 Copy the user password
root
— user with unlimited rights for all actions on the system.2.2 Save the password in a safe place and do not transmit it in public.
Optional: additional settings
-
To create interrupted server and check the box Interruptible server.
-
If you plan to create multiple servers and want to improve the fault tolerance of your infrastructure, add a server to the placement group:
2.1 To create a new group, in the field Accommodation group select New group, enter a group name, and select a policy for hosting on different hosts:
- preferably soft-anti-affinity. The system will try to place servers on different hosts. If there is no suitable host when creating a server, it will be created on the same host;
- anti-affinity is mandatory. Servers in a group must be located on different hosts. If there is no suitable host when creating a server, the server will not be created.
2.2 If the group is created, in the field Accommodation group select a placement group.
-
To add more information or filter the servers in the list, add tags servers. Operating system and configuration tags are automatically added. To add a new tag, in the Tags enter tag.
-
To add a script to be executed by the agent cloud-init at the first startup of the operating system, in the block Automation in the field User data:
- tab Text and paste the script with text;
- or open the tab File and upload the script file.
Examples of scripts and supported formats can be found in the manual User data.
-
Create a cloud server:
openstack server create \
[--image <image> | --volume <volume> | --snapshot <snapshot>] \
--flavor <flavor> \
--availability-zone <pool_segment> \
--nic net-id=<net_uuid> \
--key-name <key_name> \
<server_name>Specify:
- source type:
--image <image>
— to create a server from ready or own image. Parameter<image>
— ID or image name. You can view the list of images usingopenstack image list
;--volume <volume>
— to create a server from network drive. Parameter<volume>
— ID or disk name. You can view the list of network drives byopenstack volume list
;--snapshot <snapshot>
— to create a server from snapshot. Parameter<snapshot>
— ID or name of the snapshot. You can view the list of snapshots withopenstack snapshot list
;
<flavor>
— The ID or name of the flavor. The flavors correspond to cloud server configurations and determine the number of vCPUs, RAM, and local disk size (optional) of the server. You can use fixed-configuration flavors or flavor. For example,4011
— ID to create a Memory Line fixed configuration server with 2 vCPUs, 16GB RAM in a ru-9 pool. The list of flavors can be viewed withopenstack flavor list
or in a table List of fixed-configuration flavorings in all pools;<pool_segment>
— pool segment where the cloud server will be created, e.g.ru-9a
. The list of available pool segments can be found in the instructions Availability matrices;<net_uuid>
— The ID of the private or public network to which the server will be connected. The list can be viewed byopenstack network list
;<key_name>
— the name of the SSH key pair for the service user. If SSH keys have not been created, generate them. The list can be viewed withopenstack keypair list
;- optional:
--block-device-mapping vdb=<extra_volume>
— ID or name of the additional disk. The list can be viewed withopenstack volume list
; - optional:
--tag <tag_name> --os-compute-api-version 2.52
— tag to add more information about the server; - optional:
--tag preemptible --os-compute-api-version 2.72
— creation tag of an interrupted server; - optional:
--user-data <user_data.file>
— path to the script with Base64 encoded data. Scripts and tasks from the script will be executed at the first boot of the operating system. Examples of scripts can be found in the instructions User data; <server_name>
— server name.
- source type:
Use the instructions Create a server of arbitrary configuration with a bootable network drive and an additional network drive in the Terraform documentation.