English Chinese (Simplified) (zh_CN)
Provisioning Fedora CoreOS on OpenStack
This guide shows how to provision new Fedora CoreOS (FCOS) nodes on an OpenStack cloud environment, either private, or public (like https://vexxhost.com/[VEXXHOST]).
The steps below were tested against the OpenStack Victoria release.
Prerequisites
Before provisioning an FCOS machine, you must have an Ignition configuration file containing your customizations. If you do not have one, see xref:producing-ign.adoc[Producing an Ignition File].
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 xref:update-streams.adoc[Update Streams].
STREAM='stable'
coreos-installer download --decompress -s $STREAM -p openstack -f qcow2.xz
Alternatively, you can manually download an OpenStack image from the https://getfedora.org/coreos/download?tab=cloud_operators[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
FILE=fedora-coreos-XX.XXXXXXXX.X.X-openstack.x86_64.qcow2
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`.
OPENSTACK_NETWORK=private
OPENSTACK_KEYPAIR=mykeypair # optional
OPENSTACK_FLAVOR=v1-standard-2
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 \
$INSTANCE_NAME
Specifying `--key-name` is optional if you provide an SSH key in your Ignition config.