Skip to content

Instantly share code, notes, and snippets.

@glevand
Last active November 1, 2017 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glevand/1efa8c1a41ef320a41fb945f86569b18 to your computer and use it in GitHub Desktop.
Save glevand/1efa8c1a41ef320a41fb945f86569b18 to your computer and use it in GitHub Desktop.

Linaro Developer Cloud CoreOS Container Linux HOWTO

2007.11.01

Image Creation

Use an existing CoreOS Container Linux image from the Developer Cloud or create a new image if what you need is not available.

# See: https://coreos.com/releases
channel="beta"
release="1548.4.0"

wget -O coreos-${channel}-${release}-arm64.img.bz2.sig \
    https://${channel}.release.core-os.net/arm64-usr/${release}/coreos_production_openstack_image.img.bz2.sig
wget -O coreos-${channel}-${release}-arm64.img.bz2 \
    https://${channel}.release.core-os.net/arm64-usr/${release}/coreos_production_openstack_image.img.bz2

# See: https://coreos.com/os/docs/latest/verify-images.html
gpg --verify coreos-${channel}-${release}-arm64.img.bz2.sig

bunzip2 coreos-${channel}-${release}-arm64.img.bz2

openstack image create  \
   --container-format bare \
   --disk-format qcow2 \
   --file coreos-${channel}-${release}-arm64.img \
   --property hw_firmware_type=uefi \
   --property os_command_line="console=ttyAMA0" \
   --property hw_disk_bus=scsi \
   --property hw_scsi_model=virtio-scsi \
   coreos-${channel}-${release}-arm64

Machine Provisioning

CoreOS Container Linux uses the Ignition machine provisioning utility. To access the machine you will at the very least need to provision the core user account with ssh_authorized_keys. This account will have passwordless sudo privileges so additional administration can be done manually after startup.

See:

Download the latest ct transpiler release:

Create an Ignition config source and run it through the transpiler:

cat ignition.config.src | ct > ignition.config

You can use the on-line config validatior to check the resulting ignition.config file:

Sample Ignition config source:

storage:
  files:
    - path: /etc/hostname
      filesystem: root
      contents:
        inline: coreos-1
      mode: 420

passwd:
  users:
    - name: core
      ssh_authorized_keys:
        - ssh-rsa ...

Server Creation

Pass the Ignition config as openstack user data. When Ignition runs it will receive the config from the openstack metadata server.

openstack server create \
    --flavor m1.medium \
    --image coreos-${channel}-${release}-arm64 \
    --user-data ignition.config \
    coreos-${channel}-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment