Create a preemptible cloud server
An preemptible cloud server is a cloud server that runs for no more than 24 hours after creation and can be stopped by Selectel at any time, for example, if the virtual host does not have enough resources for other cloud servers.
When a system interrupt occurs, the cloud server is not deleted — it stops and goes into EXPIRED status. After an interruption, the server can be restored. On the server with a network boot disk all data is saved, with a local boot disk all data is deleted. Learn more about restore-preemptible-server.
Preemptible servers support all the features that are available for regular cloud servers, while costing an average of 70% less.
You can make cloud server intermittent at create server or after — change server-type. A server of any configuration can be made interruptable.
What tasks is suitable for
Suitable for fault-tolerant systems where multiple servers are used and when some of them fail, the load is redistributed to other servers:
- for parallel batch data processing;
- CI/CD testing;
- Hadoop and Kubernetes projects;
- scaling fault-tolerant web services during peak load times;
- any fault-tolerant projects with variable load.
Restrictions
For the duration of the beta, interruptible cloud servers are only available in pool ru-7.
We do not guarantee a level of availability like regular cloud servers — preemptible servers are not subject to SLA for cloud platform.
Cost
The cost of a preemptible server is on average 70% lower than the cost of a regular cloud server with the same configuration.
During operation, the interrupted cloud servers are paid using cloud platform payment model.
After the interruption:
- vCPU, RAM, GPU, local disks are no longer charged starting from the next hour after the stop;
- public IP addresses, public subnets and network volumes continue to be charged.
Create an interruptible server
An preemptible server will be stopped by Selectel at any time within 24 hours of creation.
- Control panel
- OpenStack CLI
- In Control Panel, go to Cloud Platform → Servers.
- Click Create Server.
- In the Advanced Settings box, check the Repeatable Server checkbox.
- Select the rest of the server settings — see the Create Cloud Server instructions for details.
- Press Create.
-
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> \
--tag preemptible --os-compute-api-version 2.72 \
--block-device-mapping vdb=<extra_volume_name> \
<server_name>Specify:
- source type:
--image <image>
— to create a server from ready-made or own-image. The<image>
parameter is the name or ID of the image, the list can be viewed withopenstack image list
;--volume <volume>
— to create a server from disk. The<volume>
parameter is the name or ID of the disk, the list can be viewed withopenstack volume list
;--snapshot <snapshot>
— to create a server from snapshot. The<snapshot>
parameter is the name or ID of the snapshot, the list can be viewed withopenstack snapshot list
;
<flavor>
— server flavor (configuration) name or ID, the list can be viewed withopenstack flavor list
— see the View Configuration List instructions for details;<pool_segment>
— pool segment where the server will be created, the list can be viewed withopenstack availability zone list
;<net_uuid>
— ID of the private or public network to which the server will connect, the list can be viewed withopenstack network list
;<key_name>
is the name of the SSH key for the service user, the list can be viewed withopenstack keypair list
;--tag preemptible --os-compute-api-version 2.72
— tag to create preemptible server;- optional:
--block-device-mapping vdb=<extra_volume_name>
— name of 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:
--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. You can see sample scripts in the User data instructions; <server_name>
is the server name.
- source type:
Change server type
You can change the type of cloud server — make an unpreemptible server preemptible and vice versa.
An preemptible server will be stopped by Selectel at any time within 24 hours of creation. After each change of server type to interruptible, the 24 hour countdown starts over.
- Control panel
- OpenStack CLI
- In Control Panel, go to Cloud Platform → Servers.
- Open the server page → Configuration tab.
- In the Server Type box, click .
- Check the new server cost and click Change.
-
Change the server type to preemptible:
openstack server set \
--tag preemptible \
--os-compute-api-version 2.72 \
<server>Or an uninterrupted one:
openstack server unset \
--tag preemptible \
--os-compute-api-version 2.72 \
<server>Specify
<server>
— server name or ID, can be viewed with theopenstack server list
command
Restore an interrupted server
You can restore an interrupted server to EXPIRED status — resume its operation.
Recovery depends on the type of boot disk:
- if the disk is networked, the server recovers from the disk and continues to operate in the state it was in when it stopped;
- if the disk is local, a new cloud server is created from the image from which it was created. Data that appeared on the server during the process is not restored.
Once restored, the server will continue to be intermittent and will be stopped by Selectel at any time within 24 hours of restoration.
- Control panel
- OpenStack CLI
- In Control Panel, go to Cloud Platform → Servers.
- From the ( ) menu of the server, select Resume.
-
Reactivate the cloud server:
openstack server unshelve <server>
Specify
<server>
— server name or ID, can be viewed with theopenstack server list
command