Packer build scripts for VirtualBox.
- VirtualBox
- packer
- bash
- curl
- butane, python3, cat, sed, sha256sum for Static IP
Initialize packer.
packer init fedora-coreos.pkr.hcl
Run build.sh to build base Fedora CoreOS box.
sh build.sh
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
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
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
butane --strict --pretty ignition.yml
MIT