Fornitura di Fedora CoreOS su Exoscale
Questa guida mostra come effettuare il provisioning di nuove istanze Fedora CoreOS (FCOS) su [Exoscale](https://exoscale.com) Cloud Hosting.
Prerequisiti
Prima di configurare una macchina FCOS, è consigliato avere un file di configurazione Ignition con le tue personalizzazioni. Se non ne hai uno, consulta Produzione di un File Ignition.
Fedora CoreOS dispone di un utente predefinito core che può essere utilizzato per esplorare il sistema operativo. Se desideri utilizzarlo, completa la sua configurazione fornendo, ad esempio, una chiave SSH.
|
If you do not want to use Ignition to get started, you can make use of the Afterburn support..
You also need to have access to an Exoscale account. Register if you don’t have one.
Uploading an FCOS image as a custom Template
Exoscale offers official FCOS templates, but they are currently out of date. For now, we recommend creating your own template. Track progress on fixing this in #1166. |
Exoscale provides Custom Templates to be able to upload any cloud image. To create a Custom Template you first need to download and decompress the image.
FLUSSO="stabile"
coreos-installer download -d -s $FLUSSO -p exoscale -f qcow2.xz
Alternatively, QCOW2 images can be downloaded from the download page and manually decompressed.
Next you can Register a Custom Template. This can be done from the Web Portal or the Exoscale CLI. Either option requires the uncompressed image to be uploaded somewhere public and for the URL and an MD5 checksum to be provided during registration. One option is to use the object storage provided by Exoscale to host the image.
# Set the version and calcuate the checksum
FCOS_VERSION='...'
FILE="fedora-coreos-${FCOS_VERSION}-exoscale.x86_64.qcow2"
CHECKSUM=$(md5sum "${FILE}" | cut -d " " -f 1)
# Upload to object storage
BUCKET='newbucket'
exo storage mb "sos://${BUCKET}"
exo storage upload --acl public-read "${FILE}" "sos://${BUCKET}/image-import/"
# Create the template using given URL and CHECKSUM
URL=$(exo storage show "sos://${BUCKET}/image-import/${FILE}" --output-template "{{.URL}}")
TEMPLATE="fedora-coreos-${FCOS_VERSION}"
exo compute instance-template register --boot-mode=uefi $TEMPLATE $URL $CHECKSUM
You can then view the template using exo compute instance-template show --visibility=private $TEMPLATE
.
Avvio di un’istanza VM
You can provision a FCOS instance using the Exoscale Web Portal or via the Exoscale CLI.
You will need to use at least version v1.54.0 of the Exoscale CLI. |
Do not use the --cloud-init-compress argument to the CLI. It causes the Ignition config to be passed compressed to the instance and Ignition doesn’t tolerate that.
|
exo compute ssh-key register key-name /path/to/key
NAME='worker'
TYPE='standard.medium'
DISK='10' # in GiB
SSHKEY='key-name'
TEMPLATE=$TEMPLATE # template name set above
exo compute instance create "${NAME}" \
--disk-size $DISK \
--ssh-key "${SSHKEY}" \
--template $TEMPLATE \
--template-visibility private \
--cloud-init "path/to/ignition-file.ign"
If just SSH access is desired and no further customization is required, you don’t need to pass any Ignition file and can omit the --cloud-init argument.
|
You can find out the instance’s assigned IP by running exo compute instance show "${NAME}"
|
You now should be able to SSH into the instance using the associated IP address.
ssh core@<ip address>
Want to help? Learn how to contribute to Fedora Docs ›