Create a cloud server
Control panel
OpenStack CLI
Terraform
-
In the Control panel, on the top menu, click Products and select Cloud Servers.
-
Click Create 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 the region and pool segment in which the server will be created.The list of available server configurations and resource costs depends on the pool segment.Once the server is created, you cannot change the pool segment.
Source
You can create a server from a pre-built image with a pre-installed and configured operating system, an application, your own image, a network disk, or a snapshot.
Finished image
appendix
Own image
Network disk
Snapshot
-
Click on the default source name.
-
Open the Ready Images tab.
-
Optional: check the GPU optimized images checkbox to filter out GPU optimized OS images.
-
Select an image. Ready images are available in all pool segments.
-
If you are creating a server with a non-GPU configuration, uncheck the Auto Select GPU Image checkbox so that the optimized OS image is not automatically selected when you change to a GPU configuration.
-
Press Select.
-
Click on the default source name.
-
Open the Applications tab.
-
Select an application. Applications are available in all pool segments.
-
Press Select
-
Click on the default source name.
-
Open the My Images tab.
-
Select an image. The image must be in the same pool as the server.
-
Press Select.
-
Click on the default source name.
-
Open the Disks tab.
-
Select a disk. The disk must be in the same pool segment as the server.
-
Press Select.
-
Click on the default source name.
-
Open the Snapshots tab.
-
Select a snapshot. The snapshot must be in the same pool segment as the server.
-
Press 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 where any resource ratio can be specified.
The configurations use different processors depending on the line and pool segment.After the server is created, you can change the configuration.
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 — do not check the checkbox.
The amount of RAM allocated to the server may be less than the amount 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 with
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 GPU, select the GPU type and specify the number of GPUs. If you selected a non-GPU optimized image in the source block and the Auto Select GPU image checkbox is selected, the selected image will automatically change to a GPU optimized image.
-
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 — do not check the checkbox.
The amount of RAM allocated to the server may be less than the amount 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 with
sudo dmesg | grep Memory
.
Disks
-
If you did not check the Local SSD NVMe disk checkbox when setting up the configuration, the first specified network disk will be used as the server boot disk. To configure it:
1.1 Select the type of network boot disk.
1.2 Specify the size of the network boot disk in GB or TB. Observe the maximum size limits of network disks.
1.3 If you selected the Universal v2 disk type, specify the total number of read and write operations in IOPS. After creating a disk, you can change the number of IOPS — decrease or increase. There is no limit to the number of IOPS changes.
-
Optional: to add additional server network disks:
2.1 Click Add.
2.2 Select the type of network boot disk.
2.3 Specify the size of the network boot disk in GB or TB. Observe the maximum size limits of network disks.
2.4 If you selected the Universal v2 disk type, specify the total number of read and write operations in IOPS. After creating a disk, you can change the number of IOPS — decrease or increase. There is no limit to the number of IOPS changes.
Once the server is created, you can disconnect additional disks from it or connect new ones.
Network
A server can be added to a new subnet or to an existing subnet. The subnet can be:
- private — a subnet without access from the Internet or with a single static public IP address. The IP address connects to a server that will be accessible from the Internet;
- public — a subnet in which all addresses are accessible from the Internet.
Private subnet
Public subnet
-
Click Private Subnet.
-
In the Public IP address for access from the Internet field, select the subnet type:
- The new public IP address is a private subnet with a static public IP address. Only the server to which the public IP address is connected will be accessible from the Internet;
- No public IP address — a private subnet with no access from the Internet. You cannot connect to the server from the Internet, including via SSH or RDP.
-
To add a server to an existing private subnet:
3.1 Expand the private subnet settings block.
3.2 Select an existing subnet in the Subnet field.
3.3 In the Private IP field, specify the private IP address of the server. For a private subnet with a public IP address, the public address will be automatically connected to the private address;
-
To add a server to a new private subnet on an existing network:
4.1 Expand the private subnet settings block.
4.2. In the Subnet field, select New Subnet.
4.3 Optional: Change the CIDR of the subnet.
4.4 Optionally: enable the DHCP toggle switch.
4.5 Optionally: in the Gateway field, change the IP address of the default gateway.
4.6. In the Network field, select the existing network where the subnet will be created or New network. For a private subnet with a public IP address,
router-<network_name>
, where<network_name>
is the network name, will be automatically created.4.7. If you selected New Network, enter a network name.
-
To add a server to a new network and private subnet:
5.1 Expand the private subnet settings block.
5.2 Optional: Change the CIDR of the subnet.
5.3 Optionally: enable the DHCP toggle switch.
5.4 Optionally: in the Gateway field, change the IP address of the default gateway.
5.5. In the Network field, select New Network to create a new network and private subnet.
5.6 Maintain the network name. For a private subnet with a public IP address,
router-<network_name>
, where<network_name>
is the network name, will be automatically created.
-
Click Public Subnet.
-
In the Subnet Size field, select the subnet size.
Safety
Select security groups to filter traffic on server ports. Without security groups, traffic will not be allowed. If there is no block, port security is disabled on the server network . With traffic filtering disabled, all traffic will be allowed.
Access
-
Place an SSH key for the project on the server for secure connection:
1.1 If the SSH key for the project is not added to the cloud platform, click Add SSH Key, enter the key name, insert the public key in OpenSSH format, and click Add.
1.2. If an SSH key for the project is added to the cloud platform. select the existing key in the SSH key field.SSH key is available only in the pool in which it is hosted.
-
Optional: in the Password field for "root":
2.1 Copy the password of the
root
user — a user with unlimited rights to 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 an interruptible server, check the Interruptible Server checkbox.
-
If you plan to create multiple servers and want to improve the fault tolerance of your infrastructure, add the server to a placement group:
2.1 To create a new group, in the Hosting Group field, 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 a group has been created, select the placement group in the Placement Group field.
-
To add additional information or filter servers in the list, add server tags. Operating system and configuration tags are automatically added. To add a new tag, enter a tag in the Tags field.
-
To add a script that will be executed by the cloud-init agent when the operating system first starts up, in the Automation block in the User data field:
- open the Text tab and paste the script with text;
- or open the File tab and upload a file with the script.
Examples of scripts and supported formats can be found in the User data instructions.
-
Create a cloud server:
openstack server create \
[--image <image> | --volume <volume> | --snapshot <snapshot>] \
--flavor <flavor> \
--availability-zone <pool_segment> \
--nic net-id=<net_uuid> \
--security-group <security_group> \
--key-name <key_name> \
<server_name>Specify:
- source type:
--image <image>
— to create a server from off-the-shelf or custom image. Parameter<image>
— The ID or name of the image. The image must be in the same pool as the server. The list of images can be viewed withopenstack image list
;--volume <volume>
— to create a server from network disk. Parameter<volume>
— ID or name of the disk. The disk must be in the same pool segment as the server. The list of network disks can be viewed withopenstack volume list
;--snapshot <snapshot>
— to create a server from snapshot. Parameter<snapshot>
— The ID or name of the snapshot. The snapshot must be in the same pool segment as the server. The list of snapshots can be viewed 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 create a flavor. For example,4011
— ID to create a Memory Line fixed configuration server with 2 vCPUs, 16 GB RAM in a ru-9 pool. You can view the list of flavors usingopenstack flavor list
or in the table List of fixed configuration flavors in all pools;<pool_segment>
— pool segment in which 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>
— ID of the private or public network to which the server will be connected. The list of networks can be viewed withopenstack network list
;<security_group>
— The ID or name of the security group that will be assigned to all ports on the server. To create a server with a security group, the network must have port security enabled. port security. The list of groups can be viewed with the commandopenstack security group list
;<key_name>
— name of the SSH key pair for the service user. If SSH keys are not created, generate them. The list of keypairs can be viewed withopenstack keypair list
;- optional:
--block-device-mapping vdb=<extra_volume>
— ID or name of the extra disk. The list of disks can be viewed usingopenstack 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
— tag to create an interruptible 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 User data instruction; <server_name>
— server name.
- source type:
Use the instructions Create an arbitrary configuration server with a bootable network and optional network disk in the Terraform documentation.