Merge pull request #109 from coreos/fix-two-stage-install

examples: Fix 2-stage install CoreOS and etcd_proxy setup
This commit is contained in:
Dalton Hubble
2016-03-17 11:25:06 -07:00
4 changed files with 11 additions and 10 deletions

View File

@@ -92,7 +92,7 @@ Build the `dnsmasq.aci` ACI.
Run `dnsmasq.aci`.
sudo rkt --insecure-options=image run dnsmasq.aci --net=metal0:IP=172.15.0.3 -- -d -q --dhcp-range=172.15.0.50,172.15.0.99 --enable-tftp --tftp-root=/var/lib/tftpboot --dhcp-userclass=set:ipxe,iPXE --dhcp-boot=tag:#ipxe,undionly.kpxe --dhcp-boot=tag:ipxe,http://bootcfg.foo:8080/boot.ipxe --log-queries --log-dhcp --dhcp-option=3,172.15.0.1 --address=/bootcfg.foo/172.15.0.2
sudo rkt --insecure-options=image run dnsmasq.aci --dns=8.8.8.8 --net=metal0:IP=172.15.0.3 -- -d -q --dhcp-range=172.15.0.50,172.15.0.99 --enable-tftp --tftp-root=/var/lib/tftpboot --dhcp-userclass=set:ipxe,iPXE --dhcp-boot=tag:#ipxe,undionly.kpxe --dhcp-boot=tag:ipxe,http://bootcfg.foo:8080/boot.ipxe --log-queries --log-dhcp --dhcp-option=3,172.15.0.1 --address=/bootcfg.foo/172.15.0.2
In this case, dnsmasq runs a DHCP server allocating IPs to VMs between 172.15.0.50 and 172.15.0.99, resolves `bootcfg.foo` to 172.15.0.2 (the IP where `bootcfg` runs), and points iPXE clients to `http://bootcfg.foo:8080/boot.ipxe`.

View File

@@ -64,3 +64,4 @@ groups:
networkd_dns: 172.15.0.3
fleet_metadata: role=etcd-proxy
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
ssh_authorized_keys:

View File

@@ -11,7 +11,7 @@ systemd:
Type=oneshot
Environment=OUTPUT=/run/metadata/bootcfg
ExecStart=/usr/bin/mkdir --parent /run/metadata
ExecStart=/usr/bin/bash -c 'curl --url http://bootcfg.foo:8080/metadata --retry 10 --output ${OUTPUT}'
ExecStart=/usr/bin/bash -c 'curl --url "http://bootcfg.foo:8080/metadata?{{.query}}" --retry 10 --output ${OUTPUT}'
[Install]
WantedBy=multi-user.target
- name: fleet.service

View File

@@ -37,17 +37,17 @@ function usage {
}
function create_docker {
virt-install --name node1 -u 16e7d8a7-bfa9-428b-9117-363341bb330b --pxe --disk pool=default,size=4 --boot=hd,network --network=bridge:docker0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node2 -u 264cd073-ca62-44b3-98c0-50aad5b5f819 --pxe --disk pool=default,size=4 --boot=hd,network --network=bridge:docker0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node3 -u 39d2e747-2648-4d68-ae92-bbc70b245055 --pxe --disk pool=default,size=4 --boot=hd,network --network=bridge:docker0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node4 -u 4ed46e8e-db69-471e-b874-0990dd65649d --pxe --disk pool=default,size=4 --boot=hd,network --network=bridge:docker0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node1 -u 16e7d8a7-bfa9-428b-9117-363341bb330b --pxe --disk pool=default,size=6 --boot=hd,network --network=bridge:docker0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node2 -u 264cd073-ca62-44b3-98c0-50aad5b5f819 --pxe --disk pool=default,size=6 --boot=hd,network --network=bridge:docker0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node3 -u 39d2e747-2648-4d68-ae92-bbc70b245055 --pxe --disk pool=default,size=6 --boot=hd,network --network=bridge:docker0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node4 -u 4ed46e8e-db69-471e-b874-0990dd65649d --pxe --disk pool=default,size=6 --boot=hd,network --network=bridge:docker0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
}
function create_rkt {
virt-install --name node1 -u 16e7d8a7-bfa9-428b-9117-363341bb330b --pxe --disk pool=default,size=4 --boot=hd,network --network=bridge:metal0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node2 -u 264cd073-ca62-44b3-98c0-50aad5b5f819 --pxe --disk pool=default,size=4 --boot=hd,network --network=bridge:metal0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node3 -u 39d2e747-2648-4d68-ae92-bbc70b245055 --pxe --disk pool=default,size=4 --boot=hd,network --network=bridge:metal0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node4 -u 4ed46e8e-db69-471e-b874-0990dd65649d --pxe --disk pool=default,size=4 --boot=hd,network --network=bridge:metal0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node1 -u 16e7d8a7-bfa9-428b-9117-363341bb330b --pxe --disk pool=default,size=6 --boot=hd,network --network=bridge:metal0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node2 -u 264cd073-ca62-44b3-98c0-50aad5b5f819 --pxe --disk pool=default,size=6 --boot=hd,network --network=bridge:metal0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node3 -u 39d2e747-2648-4d68-ae92-bbc70b245055 --pxe --disk pool=default,size=6 --boot=hd,network --network=bridge:metal0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
virt-install --name node4 -u 4ed46e8e-db69-471e-b874-0990dd65649d --pxe --disk pool=default,size=6 --boot=hd,network --network=bridge:metal0 --memory=1024 --vcpus=1 --os-type=linux --noautoconsole
}
nodes=(node1 node2 node3 node4)