The CoreOS iPXE Server attempts to automate as much of the Booting CoreOS via iPXE process as possible, mainly generating iPXE boot scripts and serving CoreOS PXE boot images.
- [**Configuration**](#configuration) - [Environment Variables](#environment-variables) - [Data Directory](#data-directory) - [SSH Public Keys](#ssh-public-keys)Dynamically generate a CoreOS iPXE boot script.
GET http://coreos.ipxe.example.com
Parameters
Name | Type | Description |
---|---|---|
cloudconfig | string | The cloud config id to use. The key must exist as $COREOS_IPXE_SERVER_DATA_DIR/configs/$cloudconfig.yml |
console | string | Comma separated list of ttys to enable kernel output and a login prompt on. |
sshkey | string | The ssh key id to use. The key must exist as $COREOS_IPXE_SERVER_DATA_DIR/sshkeys/$sshkey.pub |
version | string | The CoreOS PXE image version to boot. Default: latest |
Response
HTTP/1.1 200 OK
set coreos-version latest
set base-url http://coreos.ipxe.example.com/images/amd64-usr/${coreos-version}
kernel ${base-url}/coreos_production_pxe.vmlinuz console=tty0 rootfstype=tmpfs
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot
GET http://coreos.ipxe.example.com?cloudconfig=cloud-config
Response
HTTP/1.1 200 OK
set coreos-version latest
set base-url http://coreos.ipxe.example.com/images/amd64-usr/${coreos-version}
kernel ${base-url}/coreos_production_pxe.vmlinuz console=tty0 rootfstype=tmpfs cloud-config-url=http://coreos.ipxe.example.com/configs/cloud-config.yml
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot
GET http://coreos.ipxe.example.com?sshkey=coreos
Response
HTTP/1.1 200 OK
set coreos-version latest
set base-url http://coreos.ipxe.example.com/coreos/amd64-usr/${coreos-version}
kernel ${base-url}/coreos_production_pxe.vmlinuz console=tty0 rootfstype=tmpfs sshkey="ssh-rsa AAAAB3Nza..."
initrd ${base-url}/coreos_production_pxe_image.cpio.gz
boot
COREOS_IPXE_SERVER_DATA_DIR
COREOS_IPXE_SERVER_BASE_URL
COREOS_IPXE_SERVER_LISTEN_PORT
COREOS_IPXE_SERVER_LISTEN_HOST
export COREOS_IPXE_SERVER_DATA_DIR="/opt/coreos-ipxe-server"
export COREOS_IPXE_SERVER_BASE_URL="coreos.ipxe.example.com"
export COREOS_IPXE_SERVER_LISTEN_PORT="80"
Create the data directory which will hold the CoreOS images, SSH public keys, and cloud configs:
mkdir $COREOS_IPXE_SERVER_DATA_DIR/images
mkdir $COREOS_IPXE_SERVER_DATA_DIR/sshkeys
mkdir $COREOS_IPXE_SERVER_DATA_DIR/configs
mkdir $COREOS_IPXE_SERVER_DATA_DIR/images/amd64-usr/298.0.0
cd $COREOS_IPXE_SERVER_DATA_DIR/images/amd64-usr/298.0.0
wget http://storage.core-os.net/coreos/amd64-usr/298.0.0/coreos_production_pxe_image.cpio.gz
wget http://storage.core-os.net/coreos/amd64-usr/298.0.0/coreos_production_pxe.vmlinuz
By default CoreOS iPXE boot scripts will be generated with the CoreOS version set to latest
. Add a symlink to ensure this works.
ln -s $COREOS_IPXE_SERVER_DATA_DIR/images/amd64-usr/298.0.0 $COREOS_IPXE_SERVER_DATA_DIR/images/amd64-usr/latest
cp ~/.ssh/id_rsa.pub $COREOS_IPXE_SERVER_DATA_DIR/sshkeys/coreos.pub
cp cloud-config.yml $COREOS_IPXE_SERVER_DATA_DIR/configs/cloud-config.yml
/opt/coreos-ipxe-server/
├── configs
│ └── cloud-config.yml
├── images
│ └── amd64-usr
│ ├── coreos_production_pxe.vmlinuz
│ ├── coreos_production_pxe_image.cpio.gz
│ └── latest -> /opt/coreos-ipxe-server/images/amd64-usr/298.0.0
└── sshkeys
└── coreos.pub
SSH public keys are required to log into your CoreOS system. SSH keys are configured via the sshkey boot parameter, which is part of the CoreOS iPXE boot script. SSH keys are identified by id and are stored under the $COREOS_IPXE_SERVER_DATA_DIR/sshkeys
directory.
Example:
$COREOS_IPXE_SERVER_DATA_DIR/sshkeys/coreos.pub
Cloud configs can be used to automate the configuration of your CoreOS install. The cloud-config-url
is configured via the cloud-config-url boot parameter, which is part of the CoreOS iPXE boot script. Cloud configs are identified by id and are stored under the $COREOS_IPXE_SERVER_DATA_DIR/cloud-configs
directory.
Example:
$COREOS_IPXE_SERVER_DATA_DIR/configs/cloud-config.yml