Flujo de meta-datos
Los metadatos de Fedora CoreOS están disponibles en un formato JSON personalizado, llamado "metadatos de flujo". Para mantener la automatización, se espera que interactúe con estos metadatos de flujo.
El formato es estable y está diseñado para ser relativamente autodocumentado. Aún no existe un esquema JSON. Sin embargo, en la mayoría de los navegadores web, al acceder a la URL, el JSON se mostrará de forma legible.
Canonical URL
The URL for the stable stream is: https://builds.coreos.fedoraproject.org/streams/stable.json You can similarly replace stable here with other available Update Streams.
Using coreos-installer to download
The coreos-installer tool has built-in support for fetching artifacts:
STREAM="stable"
coreos-installer download --decompress -s $STREAM -p openstack -f qcow2.xz
Utilizando 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.
Ejemplo: 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}" ...
Want to help? Learn how to contribute to Fedora Docs ›