Aprovisionamiento de Fedora CoreOS en DigitalOcean

Esta guía muestra como aprovisionar los nuevos nodos Fedora CoreOS (FCOS) en DigitalOcean. Las imágenes de Fedora CoreOS no se publican edn la actualidad directamente en DigitalOcean, de modo que usted debe descargar una imagen Fedora CoreOS DigitalOcean y subirla a su cuenta DigitalOcean como una imagen personalizada.

Prerrequisitos

Before provisioning an FCOS machine, you must have an Ignition configuration file containing your customizations. If you do not have one, see Producing an Ignition File.

If you do not want to use Ignition to get started, you can make use of the Afterburn support and provide an SSH key via the cloud provider and continue from there.

You also need to have access to a DigitalOcean account. The examples below use the doctl command-line tool.

Creating a DigitalOcean custom image

Fedora CoreOS is designed to be updated automatically, with different schedules per stream.

  1. Once you have picked the relevant stream, find the corresponding DigitalOcean image on the download page and copy the URL of the Download link.

  2. Create the custom image:

    Example uploading FCOS to a DigitalOcean custom image
    doctl compute image create my-fcos-image --region sfo2 --image-url <download-url> --wait

Launching a droplet

  1. If you don’t already have an SSH key uploaded to DigitalOcean, upload one:

    Example uploading an SSH key to DigitalOcean
    doctl compute ssh-key create my-key --public-key "$(cat ~/.ssh/id_rsa.pub)"
  2. Launch a droplet. Your Ignition configuration can be passed to the VM as its user data, or you can skip passing user data if you just want SSH access. This provides an easy way to test out FCOS without first creating an Ignition config.

    When creating a FCOS DigitalOcean droplet, you must specify an SSH key for the droplet, even if you plan to inject SSH keys via Ignition.

    Example launching FCOS on DigitalOcean using an Ignition configuration file
    image_id=$(doctl compute image list-user | grep my-fcos-image | cut -f1 -d ' ')
    key_id=$(doctl compute ssh-key list | grep my-key | cut -f1 -d ' ')
    doctl compute droplet create my-fcos-droplet --image "${image_id}" --region sfo2 --size s-2vcpu-2gb --user-data-file <ignition-config-path> --ssh-keys "${key_id}" --wait

    While the DigitalOcean documentation mentions cloud-init and scripts, FCOS does not support cloud-init or the ability to run scripts from user-data. It accepts only Ignition configuration files.