Aprovisionamiento de Fedora CoreOS sobre OpenStack

Este guía muestra como aprovisionar los nuevos nodos Fedora CoreOS (FCOS) sobre un entorno en la nube OpenStack, tanto privado como público (como VEXXHOST).

Los pasos de abajo están probados con la versión OpenStack Victoria.


Antes de aprovisionar una máquina FCOS, usted debe tener un fichero de configuración Ignition que contenga sus personalizaciones. Si no tiene uno vea Produciendo un Fichero Ignition.

You also need to have access to an OpenStack environment and a functioning openstack CLI. Typically you’ll configure the client by using a clouds.yaml file or via environment variables. If you’re starting from scratch, this environment may need networks, SSH key pairs, security groups, etc.. set up. Please consult the OpenStack Documentation to learn more.

Downloading an OpenStack Image

Fedora CoreOS is designed to be updated automatically, with different schedules per stream. Once you have picked the relevant stream, download, verify, and decompress the latest OpenStack image:

For more information on FCOS stream offerings see Update Streams.
coreos-installer download --decompress -s $STREAM -p openstack -f qcow2.xz

Alternatively, you can manually download an OpenStack image from the download page. Verify the download, following the instructions on that page, and decompress it.

Uploading the Image to OpenStack

Create the FCOS image in OpenStack
IMAGE=${FILE:0:-6} # pull off .qcow2
openstack image create --disk-format=qcow2 --min-disk=10 --min-ram=2 --file=$FILE $IMAGE
Monitor image creation progress by listing the image
openstack image list --name=$IMAGE

Launching a VM instance

Now that you have an image created in your account you can launch a VM instance. You’ll have to specify several pieces of information in the command, such as instance flavor, network information, SSH key, etc…​

You’ll also need the Ignition config you created earlier. Here it is represented in the example command as ./example.ign, which indicates a file in the current directory named example.ign.

Launching a VM instance
OPENSTACK_KEYPAIR=mykeypair # optional
INSTANCE_NAME=myinstance # choose a name
openstack server create            \
     --key-name=$OPENSTACK_KEYPAIR \
     --network=$OPENSTACK_NETWORK  \
     --flavor=$OPENSTACK_FLAVOR    \
     --image=$IMAGE                \
     --user-data ./example.ign     \
Specifying --key-name is optional if you provide an SSH key in your Ignition config.
Monitor progress of the instance creation with openstack server show $INSTANCE_NAME.

Next, if you’d like to SSH into the instance from outside the OpenStack environment, you can assign a public IP to the instance:

Create and Assign a Floating IP
openstack floating ip create $OPENSTACK_NETWORK

FLOATING_IP=  # from just created floating IP
openstack server add floating ip $INSTANCE_NAME $FLOATING_IP

Now you should be able to SSH into the instance using the IP address associated with the floating IP. If you didn’t change the defaults, the username is core and ssh core@$FLOATING_IP should work.