Metadati del flusso

I metadati su Fedora CoreOS sono disponibili in un formato JSON personalizzato, chiamato "stream metadata". Per mantenere l’automazione, si prevede che interagirai con questi metadati del flusso.

Il formato è stabile ed è pensato per essere relativamente autoesplicativo. Non esiste ancora uno schema JSON. Tuttavia, nella maggior parte dei browser web, navigando all’URL, il JSON verrà visualizzato in una forma facile da leggere.

URL canonico

L’URL per il flusso stable è: https://builds.coreos.fedoraproject.org/streams/stable.json. Puoi sostituire stable con altri flussi disponibili, come descritto in Aggiornamenti dei Flussi.

Utilizzo di coreos-installer per scaricare

The coreos-installer tool has built-in support for fetching artifacts:

STREAM="stable"
coreos-installer download --decompress -s $STREAM -p openstack -f qcow2.xz

Using coreos/stream-metadata-go

There is an official coreos/stream-metadata-go library for software written in the Go programming language. The README.md file in that repository contains a link to example code.

Example: Script ec2 CLI

Fetch the latest x86_64 AMI in us-west-1 and use it to launch an instance:

$ AMI=$(curl -sSL https://builds.coreos.fedoraproject.org/streams/stable.json | jq -r '.architectures.x86_64.images.aws.regions["us-west-1"].image')
$ echo "${AMI}"
ami-021238084bf8c95ff
$ aws ec2 run-instances --region us-west-1 --image-id "${AMI}" ...