Skip to content

Commit 1fec91a

Browse files
committed
Add instructions for using coreos-ipxe-server.
1 parent 745fbde commit 1fec91a

File tree

1 file changed

+64
-3
lines changed

1 file changed

+64
-3
lines changed

README.md

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,71 @@ If you're trying to boot CoreOS, consider using [coreos-ipxe-server](https://git
3838

3939
## Network boot in MCP2
4040

41+
### Prerequisites
42+
43+
#### DHCP / TFTP / iPXE server
44+
45+
Deploy an Ubuntu 16.x server attached to the target VLAN (other distros might work but have not been tested):
46+
47+
1. `apt-get install -y git built-essential liblzma-dev mkisofs tftpd-hpa`.
48+
2. `mkdir -p /usr/local/src/ipxe`
49+
3. `cd /usr/local/src/ipxe`
50+
4. `git clone git://git.ipxe.org/ipxe.git .`
51+
5. `cd src`
52+
6. `make`
53+
7. `cp bin/undionly.kpxe /var/lib/tftpboot`
54+
8. Place a copy of the `mcp2-dhcp-server` executable on this machine.
55+
56+
If you're using `coreos-ipxe-server`:
57+
58+
1. Place a copy of the `coreos-ipxe-server` executable on this machine.
59+
2. `export COREOS_IPXE_SERVER_DATA_DIR=/opt/coreos-ipxe-server`
60+
3. `mkdir -p $COREOS_IPXE_SERVER_DATA_DIR/{configs,images,profiles,sshkeys}`
61+
4. `mkdir -p $COREOS_IPXE_SERVER_DATA_DIR/images/amd64-usr/310.1.0`
62+
5. `pushd $COREOS_IPXE_SERVER_DATA_DIR/images/amd64-usr/310.1.0`
63+
6. `wget http://storage.core-os.net/coreos/amd64-usr/310.1.0/coreos_production_pxe_image.cpio.gz`
64+
7. `wget http://storage.core-os.net/coreos/amd64-usr/310.1.0/coreos_production_pxe.vmlinuz`
65+
8. `popd`
66+
9. Place an SSH public key in `$COREOS_IPXE_SERVER_DATA_DIR/sshkeys/coreos.pub`
67+
10. Place a cloud-config in `$COREOS_IPXE_SERVER_DATA_DIR/configs/development.yml`:
68+
```yaml
69+
#cloud-config
70+
71+
ssh_authorized_keys:
72+
- ssh-rsa AAAAB3Nza...
73+
coreos:
74+
etcd:
75+
addr: $private_ipv4:4001
76+
peer-addr: $private_ipv4:7001
77+
units:
78+
- name: etcd.service
79+
command: start
80+
- name: fleet.service
81+
command: start
82+
- name: docker.socket
83+
command: start
84+
oem:
85+
id: coreos
86+
name: CoreOS Custom
87+
version-id: 310.1.0
88+
home-url: https://coreos.com
89+
```
90+
11. Place a profile in `$COREOS_IPXE_SERVER_DATA_DIR/profiles/development.json`:
91+
```json
92+
{
93+
"cloud_config": "development",
94+
"rootfstype": "btrfs",
95+
"sshkey": "coreos",
96+
"version": "310.1.0"
97+
}
98+
```
99+
100+
### Process
101+
41102
1. Create a VM using VMWare Workstation or VMWare fusion (ensure it has 1 disk and 1 network adapter, with hardware versiom <= 10).
42103
2. Do not install an operating system (leave the disk completely empty).
43104
3. Close VMWare, and use [ovftool](https://my.vmware.com/web/vmware/details?downloadGroup=OVFTOOL400&productId=353) to convert the virtual machine to OVF format (`ovftool myserver.vmx ovf/myserver.ovf`).
44105
4. Upload the `.ovf`, `.vmdk`, and `.mf` files to CloudControl and import it as a client image (ensure that "Import without Guest OS Customization" is checked, see [here](https://docs.mcp-services.net/display/CCD/How+to+Import+an+OVF+Package+as+a+Client+Image) for details).
45-
5. Run `mcp2-dhcp-server` on the same machine as your TFTP / iPXE server.
46-
6. Deploy a new server from your client image, and start it. Network boot should proceed automatically.
47-
106+
5. On your DHCP / iPXE server, run `coreos-ipxe-server`.
107+
6. On your DHCP / iPXE server, run `mcp2-dhcp-server`.
108+
7. Deploy a new server from your client image, and start it. Network boot should proceed automatically.

0 commit comments

Comments
 (0)