From 83330b5e2d2bfd822f49c65af44136c10bc133ee Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Wed, 6 Jan 2016 10:54:06 -0800 Subject: [PATCH] examples: Add etcd small and large cluster configs --- Documentation/bootcfg.md | 2 +- Documentation/config.md | 4 +-- Documentation/physical-hardware.md | 2 +- Documentation/virtual-hardware.md | 2 +- cmd/bootcfg/main.go | 8 ++--- data/machines/default/machine.json | 4 --- examples/README.md | 33 +++++++++++++++++++ {data => examples/dev}/cloud/node1.yml | 0 {data => examples/dev}/cloud/node2.yml | 0 .../dev}/cloud/orion-cloud-config.yml | 0 {data => examples/dev}/ignition/node1.json | 0 {data => examples/dev}/ignition/node2.json | 0 .../machine.json | 0 .../machine.json | 0 .../machines/52:54:00:20:17:f9/machine.json | 0 examples/dev/machines/default/machine.json | 4 +++ {data => examples/dev}/specs/orion/spec.json | 0 examples/etcd-large/cloud/etcd1.yml | 31 +++++++++++++++++ examples/etcd-large/cloud/etcd2.yml | 31 +++++++++++++++++ examples/etcd-large/cloud/etcd3.yml | 31 +++++++++++++++++ examples/etcd-large/cloud/worker.yml | 14 ++++++++ .../machine.json | 16 +++++++++ .../machine.json | 16 +++++++++ .../machine.json | 16 +++++++++ .../machine.json | 4 +++ .../machine.json | 4 +++ examples/etcd-large/specs/worker/spec.json | 13 ++++++++ examples/etcd-small/cloud/etcd.yml | 28 ++++++++++++++++ examples/etcd-small/cloud/worker.yml | 13 ++++++++ .../machine.json | 16 +++++++++ .../etcd-small/machines/default/machine.json | 4 +++ examples/etcd-small/specs/worker/spec.json | 13 ++++++++ 32 files changed, 296 insertions(+), 13 deletions(-) delete mode 100644 data/machines/default/machine.json create mode 100644 examples/README.md rename {data => examples/dev}/cloud/node1.yml (100%) rename {data => examples/dev}/cloud/node2.yml (100%) rename {data => examples/dev}/cloud/orion-cloud-config.yml (100%) rename {data => examples/dev}/ignition/node1.json (100%) rename {data => examples/dev}/ignition/node2.json (100%) rename {data => examples/dev}/machines/074fbe06-94a9-4336-9e8a-20b6f81efb6c/machine.json (100%) rename {data => examples/dev}/machines/2d9354a2-e8db-4021-bff5-20ffdf443d6f/machine.json (100%) rename {data => examples/dev}/machines/52:54:00:20:17:f9/machine.json (100%) create mode 100644 examples/dev/machines/default/machine.json rename {data => examples/dev}/specs/orion/spec.json (100%) create mode 100644 examples/etcd-large/cloud/etcd1.yml create mode 100644 examples/etcd-large/cloud/etcd2.yml create mode 100644 examples/etcd-large/cloud/etcd3.yml create mode 100644 examples/etcd-large/cloud/worker.yml create mode 100644 examples/etcd-large/machines/16e7d8a7-bfa9-428b-9117-363341bb330b/machine.json create mode 100644 examples/etcd-large/machines/264cd073-ca62-44b3-98c0-50aad5b5f819/machine.json create mode 100644 examples/etcd-large/machines/39d2e747-2648-4d68-ae92-bbc70b245055/machine.json create mode 100644 examples/etcd-large/machines/4ed46e8e-db69-471e-b874-0990dd65649d/machine.json create mode 100644 examples/etcd-large/machines/53683e94-3273-4a49-9a82-d769b88e3ccf/machine.json create mode 100644 examples/etcd-large/specs/worker/spec.json create mode 100644 examples/etcd-small/cloud/etcd.yml create mode 100644 examples/etcd-small/cloud/worker.yml create mode 100644 examples/etcd-small/machines/16e7d8a7-bfa9-428b-9117-363341bb330b/machine.json create mode 100644 examples/etcd-small/machines/default/machine.json create mode 100644 examples/etcd-small/specs/worker/spec.json diff --git a/Documentation/bootcfg.md b/Documentation/bootcfg.md index 44a29442..9f43e5ab 100644 --- a/Documentation/bootcfg.md +++ b/Documentation/bootcfg.md @@ -30,7 +30,7 @@ The latest image corresponds to the most recent `coreos-baremetal` master commit Run the container and mount the data and images directories as volumes. - docker run -p 8080:8080 --name=bootcfg --rm -v $PWD/data:/data:Z -v $PWD/images:/images:Z coreos/bootcfg -address=0.0.0.0:8080 + docker run -p 8080:8080 --name=bootcfg --rm -v $PWD/examples/dev:/data:Z -v $PWD/images:/images:Z coreos/bootcfg -address=0.0.0.0:8080 ## Endpoints diff --git a/Documentation/config.md b/Documentation/config.md index af6a479f..78ce3c68 100644 --- a/Documentation/config.md +++ b/Documentation/config.md @@ -14,9 +14,9 @@ Binary - ./run -address=0.0.0.0:8080 -data-path=./data -images-path=./images -log-level=debug + ./run -address=0.0.0.0:8080 -data-path=./examples/dev -images-path=./images -log-level=debug Container - docker run -p 8080:8080 --name=bootcfg --rm -v $PWD/data:/data:Z -v $PWD/images:/images:Z coreos/bootcfg:latest -address=0.0.0.0:8080 -data-path=./data -images-path=./images -log-level=debug + docker run -p 8080:8080 --name=bootcfg --rm -v $PWD/examples/dev:/data:Z -v $PWD/images:/images:Z coreos/bootcfg:latest -address=0.0.0.0:8080 -data-path=./data -images-path=./images -log-level=debug diff --git a/Documentation/physical-hardware.md b/Documentation/physical-hardware.md index 06efe28d..8d083feb 100644 --- a/Documentation/physical-hardware.md +++ b/Documentation/physical-hardware.md @@ -21,7 +21,7 @@ Set up `coreos/bootcfg` according to the [docs](bootcfg.md). Pull the `coreos/bo Run the `bootcfg` container to serve configs for any of the network environments we'll discuss next. - docker run -p 8080:8080 --net=host --name=bootcfg --rm -v $PWD/data:/data:Z -v $PWD/images:/images:Z coreos/bootcfg:latest -address=0.0.0.0:8080 [-log-level=debug] + docker run -p 8080:8080 --net=host --name=bootcfg --rm -v $PWD/examples/dev:/data:Z -v $PWD/images:/images:Z coreos/bootcfg:latest -address=0.0.0.0:8080 [-log-level=debug] Note, the kernel options in the [data](../data) `Spec` examples reference 172.17.0.2 (the libvirt case). Your kernel cmdline options should reference the IP or DNS name where `bootcfg` runs. diff --git a/Documentation/virtual-hardware.md b/Documentation/virtual-hardware.md index 440bdcfe..734785b1 100644 --- a/Documentation/virtual-hardware.md +++ b/Documentation/virtual-hardware.md @@ -14,7 +14,7 @@ Set up `coreos/bootcfg` according to the [docs](bootcfg.md). Pull the `coreos/bo Run the `bootcfg` container to serve configs for any of the network environments we'll discuss next. - docker run -p 8080:8080 --name=bootcfg --rm -v $PWD/data:/data:Z -v $PWD/images:/images:Z coreos/bootcfg:latest -address=0.0.0.0:8080 -log-level=debug + docker run -p 8080:8080 --name=bootcfg --rm -v $PWD/examples/dev:/data:Z -v $PWD/images:/images:Z coreos/bootcfg:latest -address=0.0.0.0:8080 -log-level=debug Note, the kernel options in the [data](../data) `Spec` examples reference 172.17.0.2, the first container IP Docker is likely to assign to `bootcfg`. Ensure your kernel options point to where `bootcfg` runs. diff --git a/cmd/bootcfg/main.go b/cmd/bootcfg/main.go index 0a36d77f..90f30e38 100644 --- a/cmd/bootcfg/main.go +++ b/cmd/bootcfg/main.go @@ -17,8 +17,8 @@ var log = capnslog.NewPackageLogger("github.com/coreos/coreos-baremetal/cmd/boot func main() { flags := flag.NewFlagSet("bootcfg", flag.ExitOnError) address := flags.String("address", "127.0.0.1:8080", "HTTP listen address") - dataPath := flags.String("data-path", "./data", "Path to config data directory") - imagesPath := flags.String("images-path", "./images", "Path to static image assets") + dataPath := flags.String("data-path", "./data", "Path to data directory") + imagesPath := flags.String("images-path", "./images", "Path to static assets") // available log levels https://godoc.org/github.com/coreos/pkg/capnslog#LogLevel logLevel := flags.String("log-level", "info", "Set the logging level") @@ -35,10 +35,10 @@ func main() { log.Fatal("A valid HTTP listen address is required") } if finfo, err := os.Stat(*dataPath); err != nil || !finfo.IsDir() { - log.Fatal("A path to a config data directory is required") + log.Fatal("A path to a data directory is required") } if finfo, err := os.Stat(*imagesPath); err != nil || !finfo.IsDir() { - log.Fatal("A path to an image assets directory is required") + log.Fatal("A path to an assets directory is required") } // logging setup diff --git a/data/machines/default/machine.json b/data/machines/default/machine.json deleted file mode 100644 index f1b8d842..00000000 --- a/data/machines/default/machine.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "id": "default", - "spec_id": "orion" -} \ No newline at end of file diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 00000000..483c7fd3 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,33 @@ + +# Examples + +Examples contains `bootcfg` data directories showcasing different PXE-bootable baremetal clusters. These examples work with libvirt VMs setup with known hardware attributes by `scripts/libvirt`. + +## Clusters + +| Name | Description | Type | Docs | +|------------|-------------|------|---------------| +| etcd-small | Cluster with 1 etcd node, 4 proxies | cloud config | [cluster-architecture](https://coreos.com/os/docs/latest/cluster-architectures.html) | +| etcd-large | Cluster with 3 etcd nodes, 2 proxies | cloud config | [cluster-architecture](https://coreos.com/os/docs/latest/cluster-architectures.html) | + +## Usage + +First, read about the [bootcfg](../Documentation/bootcfg.md) config service. Then setup the config service and network boot environment using the [libvirt guide](../Documentation/virtual-hardware.md). + +Create 5 libvirt VM nodes on the `docker0` bridge. + + ./scripts/libvirt create # create node1 ... node5 + +Generally, you just need to run the `coreos/bootcfg` container and the `coreos/dnsmasq` container (which runs network boot services). + +For `coreos/bootcfg`, mount one of the example directories with `-v $PWD/examples/some-example:/data:Z` and provide the `-data-path` if the mount location differs from `/data`. + +Reboot to see nodes boot with PXE and create a cluster. + + ./scripts/libvirt reboot + +Clean up by powering off and destroying the VMs. + + ./scripts/libvirt shutdown # graceful + ./scripts/libvirt poweroff # non-graceful + ./scripts/libvirt destroy diff --git a/data/cloud/node1.yml b/examples/dev/cloud/node1.yml similarity index 100% rename from data/cloud/node1.yml rename to examples/dev/cloud/node1.yml diff --git a/data/cloud/node2.yml b/examples/dev/cloud/node2.yml similarity index 100% rename from data/cloud/node2.yml rename to examples/dev/cloud/node2.yml diff --git a/data/cloud/orion-cloud-config.yml b/examples/dev/cloud/orion-cloud-config.yml similarity index 100% rename from data/cloud/orion-cloud-config.yml rename to examples/dev/cloud/orion-cloud-config.yml diff --git a/data/ignition/node1.json b/examples/dev/ignition/node1.json similarity index 100% rename from data/ignition/node1.json rename to examples/dev/ignition/node1.json diff --git a/data/ignition/node2.json b/examples/dev/ignition/node2.json similarity index 100% rename from data/ignition/node2.json rename to examples/dev/ignition/node2.json diff --git a/data/machines/074fbe06-94a9-4336-9e8a-20b6f81efb6c/machine.json b/examples/dev/machines/074fbe06-94a9-4336-9e8a-20b6f81efb6c/machine.json similarity index 100% rename from data/machines/074fbe06-94a9-4336-9e8a-20b6f81efb6c/machine.json rename to examples/dev/machines/074fbe06-94a9-4336-9e8a-20b6f81efb6c/machine.json diff --git a/data/machines/2d9354a2-e8db-4021-bff5-20ffdf443d6f/machine.json b/examples/dev/machines/2d9354a2-e8db-4021-bff5-20ffdf443d6f/machine.json similarity index 100% rename from data/machines/2d9354a2-e8db-4021-bff5-20ffdf443d6f/machine.json rename to examples/dev/machines/2d9354a2-e8db-4021-bff5-20ffdf443d6f/machine.json diff --git a/data/machines/52:54:00:20:17:f9/machine.json b/examples/dev/machines/52:54:00:20:17:f9/machine.json similarity index 100% rename from data/machines/52:54:00:20:17:f9/machine.json rename to examples/dev/machines/52:54:00:20:17:f9/machine.json diff --git a/examples/dev/machines/default/machine.json b/examples/dev/machines/default/machine.json new file mode 100644 index 00000000..d787b733 --- /dev/null +++ b/examples/dev/machines/default/machine.json @@ -0,0 +1,4 @@ +{ + "id": "default", + "spec_id": "orion" +} diff --git a/data/specs/orion/spec.json b/examples/dev/specs/orion/spec.json similarity index 100% rename from data/specs/orion/spec.json rename to examples/dev/specs/orion/spec.json diff --git a/examples/etcd-large/cloud/etcd1.yml b/examples/etcd-large/cloud/etcd1.yml new file mode 100644 index 00000000..d3ff4078 --- /dev/null +++ b/examples/etcd-large/cloud/etcd1.yml @@ -0,0 +1,31 @@ +#cloud-config +coreos: + etcd2: + name: node1 + initial-cluster: node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380 + initial-advertise-peer-urls: http://172.17.0.21:2380 + initial-cluster-state: new + advertise-client-urls: http://172.17.0.21:2379 + listen-client-urls: http://0.0.0.0:2379 + listen-peer-urls: http://172.17.0.21:2380 + units: + - name: etcd2.service + command: start + - name: fleet.service + command: start + - name: 00-ens3.network + runtime: true + content: | + [Match] + Name=ens3 + [Network] + Address=172.17.0.21/16 + - name: down-interfaces.service + command: start + content: | + [Service] + Type=oneshot + ExecStart=/usr/bin/ip link set ens3 down + ExecStart=/usr/bin/ip addr flush dev ens3 + - name: systemd-networkd.service + command: restart diff --git a/examples/etcd-large/cloud/etcd2.yml b/examples/etcd-large/cloud/etcd2.yml new file mode 100644 index 00000000..0c4d5ff6 --- /dev/null +++ b/examples/etcd-large/cloud/etcd2.yml @@ -0,0 +1,31 @@ +#cloud-config +coreos: + etcd2: + name: node2 + initial-cluster: node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380 + initial-advertise-peer-urls: http://172.17.0.22:2380 + initial-cluster-state: new + advertise-client-urls: http://172.17.0.22:2379 + listen-client-urls: http://0.0.0.0:2379 + listen-peer-urls: http://172.17.0.22:2380 + units: + - name: etcd2.service + command: start + - name: fleet.service + command: start + - name: 00-ens3.network + runtime: true + content: | + [Match] + Name=ens3 + [Network] + Address=172.17.0.22/16 + - name: down-interfaces.service + command: start + content: | + [Service] + Type=oneshot + ExecStart=/usr/bin/ip link set ens3 down + ExecStart=/usr/bin/ip addr flush dev ens3 + - name: systemd-networkd.service + command: restart diff --git a/examples/etcd-large/cloud/etcd3.yml b/examples/etcd-large/cloud/etcd3.yml new file mode 100644 index 00000000..f8459e36 --- /dev/null +++ b/examples/etcd-large/cloud/etcd3.yml @@ -0,0 +1,31 @@ +#cloud-config +coreos: + etcd2: + name: node3 + initial-cluster: node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380 + initial-advertise-peer-urls: http://172.17.0.23:2380 + initial-cluster-state: new + advertise-client-urls: http://172.17.0.23:2379 + listen-client-urls: http://0.0.0.0:2379 + listen-peer-urls: http://172.17.0.23:2380 + units: + - name: etcd2.service + command: start + - name: fleet.service + command: start + - name: 00-ens3.network + runtime: true + content: | + [Match] + Name=ens3 + [Network] + Address=172.17.0.23/16 + - name: down-interfaces.service + command: start + content: | + [Service] + Type=oneshot + ExecStart=/usr/bin/ip link set ens3 down + ExecStart=/usr/bin/ip addr flush dev ens3 + - name: systemd-networkd.service + command: restart diff --git a/examples/etcd-large/cloud/worker.yml b/examples/etcd-large/cloud/worker.yml new file mode 100644 index 00000000..27515e3c --- /dev/null +++ b/examples/etcd-large/cloud/worker.yml @@ -0,0 +1,14 @@ +#cloud-config +coreos: + etcd2: + initial-cluster: node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380 + proxy: on + listen-client-urls: http://localhost:2379 + fleet: + metadata: "role=worker" + etcd_servers: "http://localhost:2379" + units: + - name: etcd2.service + command: start + - name: fleet.service + command: start \ No newline at end of file diff --git a/examples/etcd-large/machines/16e7d8a7-bfa9-428b-9117-363341bb330b/machine.json b/examples/etcd-large/machines/16e7d8a7-bfa9-428b-9117-363341bb330b/machine.json new file mode 100644 index 00000000..8707f7be --- /dev/null +++ b/examples/etcd-large/machines/16e7d8a7-bfa9-428b-9117-363341bb330b/machine.json @@ -0,0 +1,16 @@ +{ + "id": "16e7d8a7-bfa9-428b-9117-363341bb330b", + "spec": { + "boot": { + "kernel": "/images/coreos/835.9.0/coreos_production_pxe.vmlinuz", + "initrd": ["/images/coreos/835.9.0/coreos_production_pxe_image.cpio.gz"], + "cmdline": { + "cloud-config-url": "http://172.17.0.2:8080/cloud?uuid=${uuid}&mac=${net0/mac:hexhyp}", + "coreos.autologin": "" + } + }, + "cloud_id": "etcd1.yml", + "ignition_id": "" + }, + "spec_id": "" +} diff --git a/examples/etcd-large/machines/264cd073-ca62-44b3-98c0-50aad5b5f819/machine.json b/examples/etcd-large/machines/264cd073-ca62-44b3-98c0-50aad5b5f819/machine.json new file mode 100644 index 00000000..b4d49244 --- /dev/null +++ b/examples/etcd-large/machines/264cd073-ca62-44b3-98c0-50aad5b5f819/machine.json @@ -0,0 +1,16 @@ +{ + "id": "39d2e747-2648-4d68-ae92-bbc70b245055", + "spec": { + "boot": { + "kernel": "/images/coreos/835.9.0/coreos_production_pxe.vmlinuz", + "initrd": ["/images/coreos/835.9.0/coreos_production_pxe_image.cpio.gz"], + "cmdline": { + "cloud-config-url": "http://172.17.0.2:8080/cloud?uuid=${uuid}&mac=${net0/mac:hexhyp}", + "coreos.autologin": "" + } + }, + "cloud_id": "etcd2.yml", + "ignition_id": "" + }, + "spec_id": "" +} diff --git a/examples/etcd-large/machines/39d2e747-2648-4d68-ae92-bbc70b245055/machine.json b/examples/etcd-large/machines/39d2e747-2648-4d68-ae92-bbc70b245055/machine.json new file mode 100644 index 00000000..f3027341 --- /dev/null +++ b/examples/etcd-large/machines/39d2e747-2648-4d68-ae92-bbc70b245055/machine.json @@ -0,0 +1,16 @@ +{ + "id": "264cd073-ca62-44b3-98c0-50aad5b5f819", + "spec": { + "boot": { + "kernel": "/images/coreos/835.9.0/coreos_production_pxe.vmlinuz", + "initrd": ["/images/coreos/835.9.0/coreos_production_pxe_image.cpio.gz"], + "cmdline": { + "cloud-config-url": "http://172.17.0.2:8080/cloud?uuid=${uuid}&mac=${net0/mac:hexhyp}", + "coreos.autologin": "" + } + }, + "cloud_id": "etcd3.yml", + "ignition_id": "" + }, + "spec_id": "" +} diff --git a/examples/etcd-large/machines/4ed46e8e-db69-471e-b874-0990dd65649d/machine.json b/examples/etcd-large/machines/4ed46e8e-db69-471e-b874-0990dd65649d/machine.json new file mode 100644 index 00000000..379143d6 --- /dev/null +++ b/examples/etcd-large/machines/4ed46e8e-db69-471e-b874-0990dd65649d/machine.json @@ -0,0 +1,4 @@ +{ + "id": "4ed46e8e-db69-471e-b874-0990dd65649d", + "spec_id": "worker" +} diff --git a/examples/etcd-large/machines/53683e94-3273-4a49-9a82-d769b88e3ccf/machine.json b/examples/etcd-large/machines/53683e94-3273-4a49-9a82-d769b88e3ccf/machine.json new file mode 100644 index 00000000..2f7bd8dd --- /dev/null +++ b/examples/etcd-large/machines/53683e94-3273-4a49-9a82-d769b88e3ccf/machine.json @@ -0,0 +1,4 @@ +{ + "id": "53683e94-3273-4a49-9a82-d769b88e3ccf", + "spec_id": "worker" +} diff --git a/examples/etcd-large/specs/worker/spec.json b/examples/etcd-large/specs/worker/spec.json new file mode 100644 index 00000000..22f7e181 --- /dev/null +++ b/examples/etcd-large/specs/worker/spec.json @@ -0,0 +1,13 @@ +{ + "id": "worker", + "boot": { + "kernel": "/images/coreos/835.9.0/coreos_production_pxe.vmlinuz", + "initrd": ["/images/coreos/835.9.0/coreos_production_pxe_image.cpio.gz"], + "cmdline": { + "cloud-config-url": "http://172.17.0.2:8080/cloud?uuid=${uuid}&mac=${net0/mac:hexhyp}", + "coreos.autologin": "" + } + }, + "cloud_id": "worker.yml", + "ignition_id": "" +} \ No newline at end of file diff --git a/examples/etcd-small/cloud/etcd.yml b/examples/etcd-small/cloud/etcd.yml new file mode 100644 index 00000000..f70d7af7 --- /dev/null +++ b/examples/etcd-small/cloud/etcd.yml @@ -0,0 +1,28 @@ +#cloud-config +coreos: + etcd2: + name: etcdserver + initial-cluster: etcdserver=http://172.17.0.21:2380 + initial-advertise-peer-urls: http://172.17.0.21:2380 + advertise-client-urls: http://172.17.0.21:2379 + listen-client-urls: http://0.0.0.0:2379 + listen-peer-urls: http://0.0.0.0:2380 + units: + - name: etcd2.service + command: start + - name: 00-ens3.network + runtime: true + content: | + [Match] + Name=ens3 + [Network] + Address=172.17.0.21/16 + - name: down-interfaces.service + command: start + content: | + [Service] + Type=oneshot + ExecStart=/usr/bin/ip link set ens3 down + ExecStart=/usr/bin/ip addr flush dev ens3 + - name: systemd-networkd.service + command: restart diff --git a/examples/etcd-small/cloud/worker.yml b/examples/etcd-small/cloud/worker.yml new file mode 100644 index 00000000..945746f2 --- /dev/null +++ b/examples/etcd-small/cloud/worker.yml @@ -0,0 +1,13 @@ +#cloud-config +coreos: + etcd2: + proxy: on + listen-client-urls: http://localhost:2379 + initial-cluster: etcdserver=http://172.17.0.21:2380 + fleet: + etcd_servers: "http://localhost:2379" + units: + - name: etcd2.service + command: start + - name: fleet.service + command: start \ No newline at end of file diff --git a/examples/etcd-small/machines/16e7d8a7-bfa9-428b-9117-363341bb330b/machine.json b/examples/etcd-small/machines/16e7d8a7-bfa9-428b-9117-363341bb330b/machine.json new file mode 100644 index 00000000..eb1a05d1 --- /dev/null +++ b/examples/etcd-small/machines/16e7d8a7-bfa9-428b-9117-363341bb330b/machine.json @@ -0,0 +1,16 @@ +{ + "id": "16e7d8a7-bfa9-428b-9117-363341bb330b", + "spec": { + "boot": { + "kernel": "/images/coreos/835.9.0/coreos_production_pxe.vmlinuz", + "initrd": ["/images/coreos/835.9.0/coreos_production_pxe_image.cpio.gz"], + "cmdline": { + "cloud-config-url": "http://172.17.0.2:8080/cloud?uuid=${uuid}&mac=${net0/mac:hexhyp}", + "coreos.autologin": "" + } + }, + "cloud_id": "etcd.yml", + "ignition_id": "" + }, + "spec_id": "" +} diff --git a/examples/etcd-small/machines/default/machine.json b/examples/etcd-small/machines/default/machine.json new file mode 100644 index 00000000..f2a06b1d --- /dev/null +++ b/examples/etcd-small/machines/default/machine.json @@ -0,0 +1,4 @@ +{ + "id": "default", + "spec_id": "worker" +} diff --git a/examples/etcd-small/specs/worker/spec.json b/examples/etcd-small/specs/worker/spec.json new file mode 100644 index 00000000..22f7e181 --- /dev/null +++ b/examples/etcd-small/specs/worker/spec.json @@ -0,0 +1,13 @@ +{ + "id": "worker", + "boot": { + "kernel": "/images/coreos/835.9.0/coreos_production_pxe.vmlinuz", + "initrd": ["/images/coreos/835.9.0/coreos_production_pxe_image.cpio.gz"], + "cmdline": { + "cloud-config-url": "http://172.17.0.2:8080/cloud?uuid=${uuid}&mac=${net0/mac:hexhyp}", + "coreos.autologin": "" + } + }, + "cloud_id": "worker.yml", + "ignition_id": "" +} \ No newline at end of file