From 62d2b43fe18d2346496b26acdad6edd8e547324e Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Mon, 21 Mar 2016 22:31:44 -0700 Subject: [PATCH] examples: Update k8s-install config to use Ignition only * Ignition is preferred over Cloud-Config --- examples/ignition/coreos-install.yaml | 3 +-- examples/ignition/k8s-master.yaml | 6 ++++++ examples/ignition/k8s-worker.yaml | 6 ++++++ examples/k8s-docker.yaml | 3 +++ examples/k8s-install.yaml | 9 ++++----- examples/k8s-rkt.yaml | 3 +++ examples/profiles/k8s-master-install/profile.json | 5 ++--- examples/profiles/k8s-worker-install/profile.json | 5 ++--- 8 files changed, 27 insertions(+), 13 deletions(-) diff --git a/examples/ignition/coreos-install.yaml b/examples/ignition/coreos-install.yaml index 1735a802..4920744b 100644 --- a/examples/ignition/coreos-install.yaml +++ b/examples/ignition/coreos-install.yaml @@ -11,8 +11,7 @@ systemd: [Service] Type=oneshot ExecStart=/usr/bin/curl {{.ignition_endpoint}}?{{.query}}&os=installed -o ignition.json - ExecStart=/usr/bin/curl {{.cloud_endpoint}}?{{.query}}&os=installed -o cloud - ExecStart=/usr/bin/coreos-install -d /dev/sda -C {{.coreos_channel}} -V {{.coreos_version}} -i ignition.json {{if .cloud_endpoint}}-c cloud{{end}} + ExecStart=/usr/bin/coreos-install -d /dev/sda -C {{.coreos_channel}} -V {{.coreos_version}} -i ignition.json ExecStart=/usr/bin/udevadm settle ExecStart=/usr/bin/systemctl reboot [Install] diff --git a/examples/ignition/k8s-master.yaml b/examples/ignition/k8s-master.yaml index 4aef058f..f171d9c1 100644 --- a/examples/ignition/k8s-master.yaml +++ b/examples/ignition/k8s-master.yaml @@ -88,6 +88,7 @@ systemd: WantedBy=multi-user.target storage: + {{ if .pxe }} disks: - device: /dev/sda wipe_table: true @@ -101,6 +102,11 @@ storage: force: true options: - "-LROOT" + {{else}} + filesystems: + - device: "/dev/disk/by-label/ROOT" + format: "ext4" + {{end}} files: - path: /etc/kubernetes/manifests/kube-proxy.yaml contents: | diff --git a/examples/ignition/k8s-worker.yaml b/examples/ignition/k8s-worker.yaml index 8bf98026..dc85a26a 100644 --- a/examples/ignition/k8s-worker.yaml +++ b/examples/ignition/k8s-worker.yaml @@ -76,6 +76,7 @@ systemd: WantedBy=multi-user.target storage: + {{ if .pxe }} disks: - device: /dev/sda wipe_table: true @@ -89,6 +90,11 @@ storage: force: true options: - "-LROOT" + {{else}} + filesystems: + - device: "/dev/disk/by-label/ROOT" + format: "ext4" + {{end}} files: - path: /etc/kubernetes/worker-kubeconfig.yaml contents: | diff --git a/examples/k8s-docker.yaml b/examples/k8s-docker.yaml index 031b833f..a567d9a5 100644 --- a/examples/k8s-docker.yaml +++ b/examples/k8s-docker.yaml @@ -7,6 +7,7 @@ groups: uuid: 16e7d8a7-bfa9-428b-9117-363341bb330b metadata: ipv4_address: 172.17.0.21 + pxe: "true" networkd_name: ens3 networkd_gateway: 172.17.0.1 networkd_dns: 172.17.0.3 @@ -28,6 +29,7 @@ groups: uuid: 264cd073-ca62-44b3-98c0-50aad5b5f819 metadata: ipv4_address: 172.17.0.22 + pxe: "true" networkd_name: ens3 networkd_gateway: 172.17.0.1 networkd_dns: 172.17.0.3 @@ -47,6 +49,7 @@ groups: uuid: 39d2e747-2648-4d68-ae92-bbc70b245055 metadata: ipv4_address: 172.17.0.23 + pxe: "true" networkd_name: ens3 networkd_gateway: 172.17.0.1 networkd_dns: 172.17.0.3 diff --git a/examples/k8s-install.yaml b/examples/k8s-install.yaml index 008f391c..5b3c2398 100644 --- a/examples/k8s-install.yaml +++ b/examples/k8s-install.yaml @@ -7,7 +7,6 @@ groups: coreos_channel: alpha coreos_version: 983.0.0 ignition_endpoint: http://bootcfg.foo:8080/ignition - cloud_endpoint: http://bootcfg.foo:8080/cloud - name: Master Node profile: k8s-master-install @@ -16,11 +15,11 @@ groups: os: installed metadata: ipv4_address: 172.15.0.21 - autoupdate: "true" networkd_name: ens3 networkd_gateway: 172.15.0.1 networkd_dns: 172.15.0.3 networkd_address: 172.15.0.21/16 + k8s_version: v1.1.8_coreos.0 k8s_etcd_endpoints: "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379" k8s_pod_network: 10.2.0.0/16 k8s_service_ip_range: 10.3.0.0/24 @@ -39,11 +38,11 @@ groups: os: installed metadata: ipv4_address: 172.15.0.22 - autoupdate: "true" networkd_name: ens3 networkd_gateway: 172.15.0.1 networkd_dns: 172.15.0.3 networkd_address: 172.15.0.22/16 + k8s_version: v1.1.8_coreos.0 k8s_etcd_endpoints: "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379" k8s_controller_endpoint: https://172.15.0.21 k8s_dns_service_ip: 10.3.0.1 @@ -60,11 +59,11 @@ groups: os: installed metadata: ipv4_address: 172.15.0.23 - autoupdate: "true" networkd_name: ens3 networkd_gateway: 172.15.0.1 networkd_dns: 172.15.0.3 networkd_address: 172.15.0.23/16 + k8s_version: v1.1.8_coreos.0 k8s_etcd_endpoints: "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379" k8s_controller_endpoint: https://172.15.0.21 k8s_dns_service_ip: 10.3.0.1 @@ -72,4 +71,4 @@ groups: fleet_metadata: "role=etcd,name=node3" etcd_name: node3 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: \ No newline at end of file + ssh_authorized_keys: diff --git a/examples/k8s-rkt.yaml b/examples/k8s-rkt.yaml index 40f44f2e..b3a0c877 100644 --- a/examples/k8s-rkt.yaml +++ b/examples/k8s-rkt.yaml @@ -7,6 +7,7 @@ groups: uuid: 16e7d8a7-bfa9-428b-9117-363341bb330b metadata: ipv4_address: 172.15.0.21 + pxe: "true" networkd_name: ens3 networkd_gateway: 172.15.0.1 networkd_dns: 172.15.0.3 @@ -29,6 +30,7 @@ groups: uuid: 264cd073-ca62-44b3-98c0-50aad5b5f819 metadata: ipv4_address: 172.15.0.22 + pxe: "true" networkd_name: ens3 networkd_gateway: 172.15.0.1 networkd_dns: 172.15.0.3 @@ -49,6 +51,7 @@ groups: uuid: 39d2e747-2648-4d68-ae92-bbc70b245055 metadata: ipv4_address: 172.15.0.23 + pxe: "true" networkd_name: ens3 networkd_gateway: 172.15.0.1 networkd_dns: 172.15.0.3 diff --git a/examples/profiles/k8s-master-install/profile.json b/examples/profiles/k8s-master-install/profile.json index a5f7e1a4..46fe9261 100644 --- a/examples/profiles/k8s-master-install/profile.json +++ b/examples/profiles/k8s-master-install/profile.json @@ -4,12 +4,11 @@ "kernel": "/assets/coreos/983.0.0/coreos_production_pxe.vmlinuz", "initrd": ["/assets/coreos/983.0.0/coreos_production_pxe_image.cpio.gz"], "cmdline": { - "cloud-config-url": "http://bootcfg.foo:8080/cloud?uuid=${uuid}&mac=${net0/mac:hexhyp}", "coreos.config.url": "http://bootcfg.foo:8080/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}", "coreos.autologin": "", "coreos.first_boot": "" } }, - "cloud_id": "kubernetes-master.sh", - "ignition_id": "etcd.yaml" + "cloud_id": "", + "ignition_id": "k8s-master.yaml" } diff --git a/examples/profiles/k8s-worker-install/profile.json b/examples/profiles/k8s-worker-install/profile.json index d131a250..3b3282f0 100644 --- a/examples/profiles/k8s-worker-install/profile.json +++ b/examples/profiles/k8s-worker-install/profile.json @@ -4,12 +4,11 @@ "kernel": "/assets/coreos/983.0.0/coreos_production_pxe.vmlinuz", "initrd": ["/assets/coreos/983.0.0/coreos_production_pxe_image.cpio.gz"], "cmdline": { - "cloud-config-url": "http://bootcfg.foo:8080/cloud?uuid=${uuid}&mac=${net0/mac:hexhyp}", "coreos.config.url": "http://bootcfg.foo:8080/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}", "coreos.autologin": "", "coreos.first_boot": "" } }, - "cloud_id": "kubernetes-worker.sh", - "ignition_id": "etcd.yaml" + "cloud_id": "", + "ignition_id": "k8s-worker.yaml" }