examples: Update k8s-install config to use Ignition only

* Ignition is preferred over Cloud-Config
This commit is contained in:
Dalton Hubble
2016-03-21 22:31:44 -07:00
parent ce806cb92a
commit 62d2b43fe1
8 changed files with 27 additions and 13 deletions

View File

@@ -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]

View File

@@ -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: |

View File

@@ -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: |

View File

@@ -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

View File

@@ -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:
ssh_authorized_keys:

View File

@@ -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

View File

@@ -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"
}

View File

@@ -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"
}