Skip to content

iquiw/packer-fedora-coreos

Repository files navigation

Packer Fedora CoreOS

Packer build scripts for VirtualBox.

Build

Requirements

Base

Run build.sh to build base Fedora CoreOS box.

sh build.sh

Static IP

Run build-staticip.sh to build Fedora CoreOS box with static IP setting. Specify server IP where coreos-installer downloads ignition.cfg as 1st argument. Specify box IP address, gateway IP address, DNS servers as 2nd, 3rd, 4th arguments.

sh build-staticip.sh 192.168.56.1 192.168.56.100/24 192.168.56.1 1.1.1.1

Preparation

Requirements

Updating Fedora CoreOS version

jq '.architectures.x86_64.artifacts.metal.formats as $formats |
  ($formats["iso"].disk | {
    iso_url: .location,
    iso_checksum: .sha256,
    ignition_url: "https://raw.githubusercontent.com/iquiw/packer-fedora-coreos/master/ignition.cfg",
  }) + {
    raw_url: $formats["raw.xz"].disk.location
  }' fedora-coreos-streams/streams/stable.json

Configure ignition setting

variant: fcos
version: 1.1.0
passwd:
  users:
    - name: vagrant
      ssh_authorized_keys:
        - "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key"
      groups:
        - wheel
        - sudo
        - docker
storage:
  files:
    - path: /etc/fstab
      contents:
        inline: ""
      mode: 0644
      user:
        id: 0
      group:
        id: 0
    # https://github.com/coreos/fedora-coreos-docs/blob/master/modules/ROOT/pages/faq.adoc#why-does-ssh-stop-working-after-upgrading-to-fedora-33
    - path: /etc/ssh/sshd_config.d/10-insecure-rsa-keysig.conf
      mode: 0600
      contents:
        inline: |
          PubkeyAcceptedKeyTypes=+ssh-rsa

Translate by butane

butane --strict --pretty ignition.yml

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages