Skip to content

Self-managed instances

Self-managed physical instance

Create an instance

In order to create a simple self-managed physical instance not integrated with Puppet you can follow the same steps as for VM creation, i.e.

[lxplus]$ openstack server create --flavor p1.abc123 --image "my-openstack-image" --key-name "my-openstack-key-name" --property landb-mainuser="my service e-group" --property landb-responsible="my service e-group" my-physical-instance

While not strictly required by the openstack server create command, providing an e-group to be used for the LanDB user and responsible fields is highly recommended to ensure effective communications related to data centre operations.

Note: You can set defaults for the responsible and main user in LanDB, see here. This way you do not need to specify them on the command line, and you can change them via instance metadata.

Note: The use of the cern-waitdns property is not supported when creating physical instances.

Creating an instance on a specific physical machine

There are use cases for which users might need to pin point the exact physical node an instance should be deploy to. In order to do so, one needs to have the node_selector role in their project - this can be requested from the CERN cloud team through a ticket.

To identify the particular node, one needs to obtain its uuid from Ironic, using either

openstack baremetal node list

# or

openstack baremetal node show -f value -c uuid $NODE_NAME

One can then use the uuid to deploy on a particular node by using the --hypervisor-hostname $NODE_UUID flag.

API v2.74+ only

The minimum version of the compute API for this parameter to be allowed is 2.74.**

One has to set this using the OS_COMPUTE_API_VERSION environment variable, or using the following flag:

--os-compute-api-version 2.74

Access to your physical instance

Similarly to virtual machines, the --key-name parameter specified during creation will allow root access to the instance via this key.

Standard CERN Linux and Windows images will equally allow access via LDAP provisioned ssh keys.

Alternatively, you could use an image with your credentials embedded.

As soon as your instance is in ACTIVE state, you can access it using the name you have provided in the previous step. Due to the network infrastructure limitations openstack server show my-physical-instance will not show an IP address associated with your machine, but you can check it in the LanDB portal.

Delete an instance

For deleting an instance you can follow the same steps as for VM deletion, i.e.

[lxplus]$ openstack server delete my-physical-instance

This command will delete your instance from the physical node and erase its hard drives so the machine is ready to be used with a new instance in the future.