Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit 566f54b

Browse files
authored
Merge pull request #1879 from Adaptly/flatcar-0.15.x
[v0.15.0] Switch CoreOS to Flatcar
2 parents afcd99a + f05f730 commit 566f54b

File tree

9 files changed

+26
-37
lines changed

9 files changed

+26
-37
lines changed

builtin/files/cluster.yaml.tmpl

+4-6
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ clusterName: {{.ClusterName}}
66
# The URI of the S3 bucket for the cluster
77
s3URI: {{.S3URI}}
88

9-
# CoreOS release channel to use. Currently supported options: alpha, beta, stable
10-
# See coreos.com/releases for more information
9+
# Flatcar release channel to use. Currently supported options: alpha, beta, stable
10+
# See https://www.flatcar-linux.org/releases/ for more information
1111
#releaseChannel: stable
1212

13-
# The AMI ID of CoreOS.
14-
#
1513
# To update this to the latest AMI run the following command with the appropriate region and channel then place the resulting ID here
16-
# REGION=eu-west-1 && CHANNEL=stable && curl -s https://coreos.com/dist/aws/aws-$CHANNEL.json | jq -r ".\"$REGION\".hvm"
14+
# REGION=eu-west-1 CHANNEL=stable; curl -s https://$CHANNEL.release.flatcar-linux.net/amd64-usr/current/flatcar_production_ami_all.json | jq -r ".amis[] | select(.name==\"$REGION\") .hvm"
1715
amiId: "{{.AmiId}}"
1816

19-
# Container Linux has automatic updates https://coreos.com/os/docs/latest/update-strategies.html. This can be a risk in certain situations and this is why is disabled by default and you can enable it by setting this param to false.
17+
# Flatcar has automatic updates https://docs.flatcar-linux.org/os/update-strategies/#disable-automatic-updates-daemon. This can be a risk in certain situations and this is why is disabled by default and you can enable it by setting this param to false.
2018
disableContainerLinuxAutomaticUpdates: true
2119

2220
# Customizes how kube-aws deals with CloudFormation

builtin/files/etcdadm/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ save it in S3
3333
* `etcdadm restore` restores the etcd member running on the same node as etcdadm from a snapshot saved in S3
3434
* `etcdadm check` runs health checks against all the members in an etcd cluster so that `kubeadm reconfigure` updates the etcd member accordingly to the situation
3535
* `etcdadm reconfigure` reconfigures the etcd member on the same node as etcdadm so that it survives:
36-
* `N/2` or less permanently failed members, by automatically removing a permanently failed member and then re-add it as a brand-new member with empty data according to ["Replace a failed etcd member on CoreOS Container Linux"](https://coreos.com/etcd/docs/latest/etcd-live-cluster-reconfiguration.html#replace-a-failed-etcd-member-on-coreos-container-linux)
37-
* `(N/2)+1` or more permanently failed members, by automatically initiating a new cluster, from a snapshot if it exists, according to ["etcd disaster recovery on CoreOS Container Linux"](https://coreos.com/etcd/docs/latest/etcd-live-cluster-reconfiguration.html#etcd-disaster-recovery-on-coreos-container-linux)
36+
* `N/2` or less permanently failed members, by automatically removing a permanently failed member and then re-add it as a brand-new member with empty data according to ["Replace a failed etcd member on Flatcar Container Linux"](https://coreos.com/etcd/docs/latest/etcd-live-cluster-reconfiguration.html#replace-a-failed-etcd-member-on-coreos-container-linux)
37+
* `(N/2)+1` or more permanently failed members, by automatically initiating a new cluster, from a snapshot if it exists, according to ["etcd disaster recovery on Flatcar Container Linux"](https://coreos.com/etcd/docs/latest/etcd-live-cluster-reconfiguration.html#etcd-disaster-recovery-on-coreos-container-linux)
3838
* `etcdadm replace` is used to manually recover from an etcd member from a permanent failure. It resets the etcd member running on the same node as etcdadm by:
3939
1. clearing the contents of the etcd data dir
4040
2. removing and then re-adding the etcd member by running `etcdctl member remove` and then `etcdctl memer add`

builtin/files/userdata/cloud-config-controller

+4-7
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,10 @@ coreos:
4040
reboot-strategy: "off"
4141
units:
4242
{{if .DisableContainerLinuxAutomaticUpdates}}
43-
- name: disable-automatic-update.service
44-
command: start
45-
content: |
46-
[Unit]
47-
Description=Disable Container Linux automatic update. Work around to be removed on Ignition migration.
48-
[Service]
49-
ExecStart=/usr/bin/sh -c 'for u in update-engine locksmithd; do systemctl stop $${u}.service; systemctl mask $${u}.service; systemctl disable $${u}.service; done; systemctl reset-failed'
43+
- name: update-engine.service
44+
mask: true
45+
- name: locksmithd.service
46+
mask: true
5047
{{end}}
5148

5249
- name: handle-disable-request.service

builtin/files/userdata/cloud-config-etcd

+4-7
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,10 @@ coreos:
4242
reboot-strategy: "off"
4343
units:
4444
{{if .DisableContainerLinuxAutomaticUpdates}}
45-
- name: disable-automatic-update.service
46-
command: start
47-
content: |
48-
[Unit]
49-
Description=Disable Container Linux automatic update. Work around to be removed on Ignition migration.
50-
[Service]
51-
ExecStart=/usr/bin/sh -c 'for u in update-engine locksmithd; do systemctl stop $${u}.service; systemctl mask $${u}.service; systemctl disable $${u}.service; done; systemctl reset-failed'
45+
- name: update-engine.service
46+
mask: true
47+
- name: locksmithd.service
48+
mask: true
5249
{{end}}
5350
{{- range $u := .Etcd.CustomSystemdUnits}}
5451
- name: {{$u.Name}}

builtin/files/userdata/cloud-config-worker

+4-7
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,10 @@ coreos:
4242
reboot-strategy: "off"
4343
units:
4444
{{if .DisableContainerLinuxAutomaticUpdates}}
45-
- name: disable-automatic-update.service
46-
command: start
47-
content: |
48-
[Unit]
49-
Description=Disable Container Linux automatic update. Work around to be removed on Ignition migration.
50-
[Service]
51-
ExecStart=/usr/bin/sh -c 'for u in update-engine locksmithd; do systemctl stop $${u}.service; systemctl mask $${u}.service; systemctl disable $${u}.service; done; systemctl reset-failed'
45+
- name: update-engine.service
46+
mask: true
47+
- name: locksmithd.service
48+
mask: true
5249
{{end}}
5350
{{- range $u := .CustomSystemdUnits}}
5451
- name: {{$u.Name}}

docs/cli-reference/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Initialize the base configuration for a cluster ready for customization prior to
88

99
| Flag | Description | Default |
1010
| -- | -- | -- |
11-
| `ami-id` | The AMI ID of CoreOS Container Linux to deploy | The latest AMI for the Container Linux release channel specified in `cluster.yaml` |
11+
| `ami-id` | The AMI ID of Flatcar Container Linux to deploy | The latest AMI for the Container Linux release channel specified in `cluster.yaml` |
1212
| `availability-zone` | The AWS availability-zone to deploy to. Note, this can be changed to multi AZ in `cluster.yaml` | none |
1313
| `cluster-name` | The name of this cluster. This will be the name of the cloudformation stack | none |
1414
| `external-dns-name` | The hostname that will route to the api server | none |

docs/getting-started/step-2-render.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This is the second step of [running Kubernetes on AWS](README.md). Before we lau
66

77
### EC2 key pair
88

9-
The keypair that will authenticate SSH access to your EC2 instances. The public half of this key pair will be configured on each CoreOS node.
9+
The keypair that will authenticate SSH access to your EC2 instances. The public half of this key pair will be configured on each Flatcar node.
1010

1111
After creating a key pair, you will use the name you gave the keys to configure the cluster. Key pairs are only available to EC2 instances in the same region. More info in the [EC2 Keypair docs](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html).
1212

@@ -207,7 +207,7 @@ Each component certificate is only valid for 90 days, while the CA is valid for
207207
If deploying a production Kubernetes cluster, consider establishing PKI independently of this tool first. [Read more below.][tls-note]
208208

209209
**Did everything render correctly?**
210-
If you are familiar with CoreOS and the AWS platform, you may want to include some additional customizations or optional features. Read on below to explore more.
210+
If you are familiar with Flatcar and the AWS platform, you may want to include some additional customizations or optional features. Read on below to explore more.
211211

212212
[Yes, ready to launch the cluster][getting-started-step-3]
213213

@@ -236,15 +236,15 @@ You can now customize your cluster by editing asset files. Any changes to these
236236
* `cloud-config-worker`
237237
* `cloud-config-controller`
238238

239-
This directory contains the [cloud-init](https://github.com/coreos/coreos-cloudinit) cloud-config userdata files. The CoreOS operating system supports automated provisioning via cloud-config files, which describe the various files, scripts and systemd actions necessary to produce a working cluster machine. These files are templated with your cluster configuration parameters and embedded into the CloudFormation stack template.
239+
This directory contains the [cloud-init](https://github.com/coreos/coreos-cloudinit) cloud-config userdata files. The Flatcar operating system supports automated provisioning via cloud-config files, which describe the various files, scripts and systemd actions necessary to produce a working cluster machine. These files are templated with your cluster configuration parameters and embedded into the CloudFormation stack template.
240240

241241
Some common customizations are:
242242

243243
- [mounting ephemeral disks][mount-disks]
244244
- [allow pods to mount RDB][rdb] or [iSCSI volumes][iscsi]
245245
- [allowing access to insecure container registries][insecure-registry]
246246
- [use host DNS configuration instead of a public DNS server][host-dns]
247-
- [changing your CoreOS auto-update settings][update]
247+
- [changing your Flatcar auto-update settings][update]
248248
<br/><br/>
249249

250250
* **stack-template.json**
@@ -270,7 +270,7 @@ You can now customize your cluster by editing asset files. Any changes to these
270270

271271
### Kubernetes Container Runtime
272272

273-
The kube-aws tool now optionally supports using rkt as the kubernetes container runtime. To configure rkt as the container runtime you must run with a CoreOS version >= `v1151.0.0` and configure the runtime flag.
273+
The kube-aws tool now optionally supports using rkt as the kubernetes container runtime. To configure rkt as the container runtime you must run with a Flatcar version >= `v1151.0.0` and configure the runtime flag.
274274

275275
Edit the `cluster.yaml` file:
276276

docs/getting-started/step-4-update.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ some of your system pods will break (especially `kube-dns`). Deleting the said s
4444

4545
There is no solution for hosting an etcd cluster in a way that is easily updateable in this fashion- so updates are automatically masked for the etcd instances. This means that, after the cluster is created, nothing about the etcd ec2 instances is allowed to be updated.
4646

47-
Fortunately, CoreOS update engine will take care of keeping the members of the etcd cluster up-to-date, but you as the operator will not be able to modify them after creation via the update mechanism.
47+
Fortunately, Flatcar update engine will take care of keeping the members of the etcd cluster up-to-date, but you as the operator will not be able to modify them after creation via the update mechanism.
4848

4949
In the (near) future, etcd will be hosted on Kubernetes and this problem will no longer be relevant. Rather than concocting overly complex band-aid, we've decided to "punt" on this issue of the time being.
5050

docs/tutorials/quick-start.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Quick Start
22

3-
Get started with kube-aws and deploy a fully-functional Kubernetes cluster running on CoreOS Container Linux using AWS CloudFormation.
3+
Get started with kube-aws and deploy a fully-functional Kubernetes cluster running on Flatcar Container Linux using AWS CloudFormation.
44

55
After completing this guide, you will be able to deploy applications to Kubernetes on AWS and interact with the Kubernetes API using the `kubectl` CLI tool.
66

0 commit comments

Comments
 (0)