From 312816d888d0eaa80e022be5459084f4d8a96341 Mon Sep 17 00:00:00 2001 From: Core Date: Tue, 17 Apr 2018 14:40:26 +0200 Subject: [PATCH] migrate from container linux to flatcar linux --- .gitignore | 24 ++++----- .travis.yml | 2 +- Makefile | 8 +-- .../runlevels/builder/10.builder.sh | 2 +- .../Makefile | 2 +- .../aci-manifest.yml | 6 +-- .../runlevels/build/10.sh | 0 .../tests/install.bats | 0 discoveryC/bootinfo.go | 20 ++++---- discoveryC/tests/proc/cmdline0 | 2 +- discoveryC/tests/proc/cmdline1 | 2 +- discoveryC/tests/proc/cmdline2 | 2 +- discoveryC/tests/proc/cmdline3 | 2 +- docs/api.md | 4 +- docs/enjoliver-architecture.md | 2 +- docs/usage-development.md | 2 +- enjoliver-agent/README.md | 2 +- enjoliver-agent/version_test.go | 6 +-- enjoliver-api/enjoliver.yaml | 10 ++-- enjoliver-api/enjoliver/configs.py | 8 +-- enjoliver-api/enjoliver/crud.py | 24 ++++----- enjoliver-api/enjoliver/generator.py | 6 +-- enjoliver-api/enjoliver/k8s_2t.py | 2 +- enjoliver-api/enjoliver/model.py | 10 ++-- enjoliver-api/enjoliver/routes.py | 28 +++++------ enjoliver-api/tests/test_api.py | 12 ++--- enjoliver-api/tests/test_generate_profiles.py | 20 ++++---- enjoliver-api/tests/test_model_dbs.py | 6 +-- enjoliver-testsuite/Makefile | 3 ++ enjoliver-testsuite/enjoliver.yaml | 8 +-- .../ignition/euid-discovery-no-disk.yaml | 16 +++--- .../ssh_authorized_keys/testing.id_rsa.pub | 2 +- enjoliver-testsuite/testing.id_rsa | 50 +++++++++---------- enjoliver-testsuite/testing.id_rsa.pub | 2 +- inte/test_api_gunicorn.py | 18 +++---- inte/test_api_simple.py | 18 +++---- inte/test_matchbox.py | 24 ++++----- matchbox/assets/coreos/oem-cloudinit.service | 6 --- matchbox/assets/{coreos => flatcar}/Makefile | 14 +++--- matchbox/assets/{coreos => flatcar}/README.md | 6 +-- .../{coreos => flatcar}/alter-distribution.sh | 42 ++++++++-------- .../assets/{coreos => flatcar}/aws-upload.sh | 6 +-- matchbox/assets/{coreos => flatcar}/disk.py | 2 +- .../{coreos => flatcar}/disk_layout.json | 14 +++--- matchbox/assets/{coreos => flatcar}/disk_util | 2 +- .../flatcar-install} | 48 +++++++++--------- .../flatcar-metadata-sshkeys@.service} | 4 +- matchbox/assets/flatcar/oem-cloudinit.service | 6 +++ .../{coreos => flatcar}/role-policy.json | 0 .../{coreos => flatcar}/trust-policy.json | 0 matchbox/ignition/discovery.yaml | 18 +++---- .../etcd-member-kubernetes-control-plane.yaml | 18 +++---- matchbox/ignition/kubernetes-node.yaml | 18 +++---- misc/first_boot.txt | 10 ++-- misc/other_boot.txt | 6 +-- runtime/Makefile | 2 +- runtime/config.py | 4 +- validate.py | 20 ++++---- 58 files changed, 302 insertions(+), 299 deletions(-) rename aci/{aci-container-linux => aci-flatcar}/Makefile (97%) rename aci/{aci-container-linux => aci-flatcar}/aci-manifest.yml (62%) rename aci/{aci-container-linux => aci-flatcar}/runlevels/build/10.sh (100%) rename aci/{aci-container-linux => aci-flatcar}/tests/install.bats (100%) delete mode 100644 matchbox/assets/coreos/oem-cloudinit.service rename matchbox/assets/{coreos => flatcar}/Makefile (81%) rename matchbox/assets/{coreos => flatcar}/README.md (88%) rename matchbox/assets/{coreos => flatcar}/alter-distribution.sh (76%) rename matchbox/assets/{coreos => flatcar}/aws-upload.sh (88%) rename matchbox/assets/{coreos => flatcar}/disk.py (95%) rename matchbox/assets/{coreos => flatcar}/disk_layout.json (93%) rename matchbox/assets/{coreos => flatcar}/disk_util (99%) rename matchbox/assets/{coreos/coreos-install => flatcar/flatcar-install} (93%) rename matchbox/assets/{coreos/coreos-metadata-sshkeys@.service => flatcar/flatcar-metadata-sshkeys@.service} (62%) create mode 100644 matchbox/assets/flatcar/oem-cloudinit.service rename matchbox/assets/{coreos => flatcar}/role-policy.json (100%) rename matchbox/assets/{coreos => flatcar}/trust-policy.json (100%) diff --git a/.gitignore b/.gitignore index 0fe69c2d..4f27f2d0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,11 +7,11 @@ *.bundle .cache/ /chain/chain.ipxe -CoreOS_Image_Signing_Key.asc -coreos_production_pxe_image.cpio.gz -coreos_production_pxe_image.cpio.gz.sig -coreos_production_pxe.vmlinuz -coreos_production_pxe.vmlinuz.sig +Flatcar_Image_Signing_Key.asc +flatcar_production_pxe_image.cpio.gz +flatcar_production_pxe_image.cpio.gz.sig +flatcar_production_pxe.vmlinuz +flatcar_production_pxe.vmlinuz.sig /discoveryC/discoveryC /discoveryC/dist/ /ectl/ectl @@ -61,13 +61,13 @@ coreos_production_pxe.vmlinuz.sig *.idea image.aci *.iml -/matchbox/assets/coreos/1* -/matchbox/assets/coreos/1353.7.0/ -/matchbox/assets/coreos/container.json -/matchbox/assets/coreos/current -/matchbox/assets/coreos/current/ -/matchbox/assets/coreos/image-id.json -/matchbox/assets/coreos/task-import-snapshot.json +/matchbox/assets/flatcar/1* +/matchbox/assets/flatcar/1353.7.0/ +/matchbox/assets/flatcar/container.json +/matchbox/assets/flatcar/current +/matchbox/assets/flatcar/current/ +/matchbox/assets/flatcar/image-id.json +/matchbox/assets/flatcar/task-import-snapshot.json /matchbox/assets/discoveryC/discoveryC /matchbox/assets/keys /node-agent/node-agent diff --git a/.travis.yml b/.travis.yml index b915fa4b..8f60cb42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,7 +43,7 @@ matrix: #before_script: # - make assets # - sudo -E make aci_core -# - sudo -E make container_linux +# - sudo -E make flatcar # - make config #script: diff --git a/Makefile b/Makefile index b8f5b529..dfe0da3d 100644 --- a/Makefile +++ b/Makefile @@ -105,12 +105,12 @@ config: touch $(HOME)/.config/enjoliver/config.env touch $(HOME)/.config/enjoliver/config.json -container_linux: acserver - $(MAKE) -C aci/aci-container-linux install +flatcar: acserver + $(MAKE) -C aci/aci-flatcar install ./runtime/runtime.rkt run --set-env=COMMIT_ID=$(shell git log --pretty=format:'%h' -n 1) \ --volume enjoliver,kind=host,source=$(CWD),readOnly=false \ --stage1-path=$(CWD)/runtime/rkt/stage1-fly.aci --insecure-options=all \ - --interactive enjoliver.local/container-linux:latest + --interactive enjoliver.local/flatcar:latest pkill -F runtime/acserver.pid || true dev_setup: @@ -124,7 +124,7 @@ dev_setup: su -m $(MY_USER) -c "make -C $(CWD) front" su -m $(MY_USER) -c "make -C $(CWD) assets" $(MAKE) -C $(CWD) aci - $(MAKE) -C $(CWD) container_linux + $(MAKE) -C $(CWD) flatcar su -m $(MY_USER) -c "make -C $(CWD) validate" su -m $(MY_USER) -c "make -C $(CWD) config" chown -R $(MY_USER): $(CWD) diff --git a/aci/aci-dnsmasq/runlevels/builder/10.builder.sh b/aci/aci-dnsmasq/runlevels/builder/10.builder.sh index fce22dc1..f89c0886 100755 --- a/aci/aci-dnsmasq/runlevels/builder/10.builder.sh +++ b/aci/aci-dnsmasq/runlevels/builder/10.builder.sh @@ -18,5 +18,5 @@ mkdir -pv ${TFTP_DIR} curl -fL -o ${TFTP_DIR}/undionly.kpxe http://boot.ipxe.org/undionly.kpxe ln -sv ${TFTP_DIR}/undionly.kpxe ${TFTP_DIR}/undionly.kpxe.0 -curl -fL -o ${TFTP_DIR}/grub.efi https://stable.release.core-os.net/amd64-usr/current/coreos_production_pxe_grub.efi +curl -fL -o ${TFTP_DIR}/grub.efi https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_pxe_grub.efi diff --git a/aci/aci-container-linux/Makefile b/aci/aci-flatcar/Makefile similarity index 97% rename from aci/aci-container-linux/Makefile rename to aci/aci-flatcar/Makefile index 6c7052d1..d8b33afc 100644 --- a/aci/aci-container-linux/Makefile +++ b/aci/aci-flatcar/Makefile @@ -7,7 +7,7 @@ ACI=$(PROJECT)/aci DEBIAN=debian UPX=upx -TARGET=container-linux +TARGET=flatcar default: install diff --git a/aci/aci-container-linux/aci-manifest.yml b/aci/aci-flatcar/aci-manifest.yml similarity index 62% rename from aci/aci-container-linux/aci-manifest.yml rename to aci/aci-flatcar/aci-manifest.yml index a4b93a91..e996dc77 100644 --- a/aci/aci-container-linux/aci-manifest.yml +++ b/aci/aci-flatcar/aci-manifest.yml @@ -1,4 +1,4 @@ -name: enjoliver.local/container-linux:latest +name: enjoliver.local/flatcar:latest aci: dependencies: - enjoliver.local/upx:latest @@ -6,9 +6,9 @@ aci: exec: - /usr/bin/make - -C - - /enjoliver/matchbox/assets/coreos + - /enjoliver/matchbox/assets/flatcar - re mountPoints: - name: enjoliver path: /enjoliver - readOnly: false \ No newline at end of file + readOnly: false diff --git a/aci/aci-container-linux/runlevels/build/10.sh b/aci/aci-flatcar/runlevels/build/10.sh similarity index 100% rename from aci/aci-container-linux/runlevels/build/10.sh rename to aci/aci-flatcar/runlevels/build/10.sh diff --git a/aci/aci-container-linux/tests/install.bats b/aci/aci-flatcar/tests/install.bats similarity index 100% rename from aci/aci-container-linux/tests/install.bats rename to aci/aci-flatcar/tests/install.bats diff --git a/discoveryC/bootinfo.go b/discoveryC/bootinfo.go index 7ca95a1a..de035a7a 100644 --- a/discoveryC/bootinfo.go +++ b/discoveryC/bootinfo.go @@ -15,24 +15,24 @@ type BootInfo struct { } const ( - coreosConfigUrl = "coreos.config.url=" + flatcarConfigUrl = "flatcar.config.url=" uuidField = "uuid=" macField = "mac=" rawQueryPrefix = "REQUEST_RAW_QUERY=" ) -// in the /proc/cmdline parse the line to get the coreos config url -func getCoreosConfigUrl(b []byte) (string, error) { +// in the /proc/cmdline parse the line to get the flatcar config url +func getFlatcarConfigUrl(b []byte) (string, error) { cmdline := string(b) - glog.V(2).Infof("get %s in %q", coreosConfigUrl, cmdline) + glog.V(2).Infof("get %s in %q", flatcarConfigUrl, cmdline) for i, word := range strings.Fields(cmdline) { - if strings.Contains(word, coreosConfigUrl) { - line := strings.Split(word, coreosConfigUrl)[1] - glog.V(2).Infof("found %q at word %d", coreosConfigUrl, i) + if strings.Contains(word, flatcarConfigUrl) { + line := strings.Split(word, flatcarConfigUrl)[1] + glog.V(2).Infof("found %q at word %d", flatcarConfigUrl, i) return line, nil } } - return "", fmt.Errorf("Cannot find %q", coreosConfigUrl) + return "", fmt.Errorf("Cannot find %q", flatcarConfigUrl) } // randomID is the current boot ID @@ -91,9 +91,9 @@ func (c *Config) ParseCommandLine() (bootInfo BootInfo, err error) { glog.Errorf("fail to read %s", err) return bootInfo, err } - url, err := getCoreosConfigUrl(b) + url, err := getFlatcarConfigUrl(b) if err != nil { - glog.Errorf("fail to get CoreOS Config Url %s", err) + glog.Errorf("fail to get Flatcar Config Url %s", err) return bootInfo, err } return c.getBootInfoFromUrl(url) diff --git a/discoveryC/tests/proc/cmdline0 b/discoveryC/tests/proc/cmdline0 index 10fbe787..1c9db3e1 100644 --- a/discoveryC/tests/proc/cmdline0 +++ b/discoveryC/tests/proc/cmdline0 @@ -1 +1 @@ -rootflags=rw mount.usrflags=ro coreos.autologin coreos.config.url=http://172.20.0.1:8080/ignition?uuid=2023e709-39b4-47d7-8905-e8be3e6bc2c6&mac=52-54-00-0d-bd-31 coreos.first_boot coreos.oem.id=pxe \ No newline at end of file +rootflags=rw mount.usrflags=ro flatcar.autologin flatcar.config.url=http://172.20.0.1:8080/ignition?uuid=2023e709-39b4-47d7-8905-e8be3e6bc2c6&mac=52-54-00-0d-bd-31 flatcar.first_boot flatcar.oem.id=pxe diff --git a/discoveryC/tests/proc/cmdline1 b/discoveryC/tests/proc/cmdline1 index c47201d3..fce39e68 100644 --- a/discoveryC/tests/proc/cmdline1 +++ b/discoveryC/tests/proc/cmdline1 @@ -1 +1 @@ -rootflags=rw mount.usrflags=ro coreos.autologin coreos.config.url=http://172.20.0.1:8080/ignition?uuid=ee378e7b-1575-425d-a6d6-e0dadb9f31a0&mac=52-54-00-90-c3-9f coreos.first_boot coreos.oem.id=pxe \ No newline at end of file +rootflags=rw mount.usrflags=ro flatcar.autologin flatcar.config.url=http://172.20.0.1:8080/ignition?uuid=ee378e7b-1575-425d-a6d6-e0dadb9f31a0&mac=52-54-00-90-c3-9f flatcar.first_boot flatcar.oem.id=pxe diff --git a/discoveryC/tests/proc/cmdline2 b/discoveryC/tests/proc/cmdline2 index ecb5b60f..a4cf2c6c 100644 --- a/discoveryC/tests/proc/cmdline2 +++ b/discoveryC/tests/proc/cmdline2 @@ -1 +1 @@ -rootflags=rw mount.usrflags=ro coreos.autologin coreos.config.url=http://172.20.0.1:8080/ignition?uuid=62b58ffd-7960-419a-8359-91def082191a&mac=52-54-00-71-83-ea coreos.first_boot coreos.oem.id=pxe \ No newline at end of file +rootflags=rw mount.usrflags=ro flatcar.autologin flatcar.config.url=http://172.20.0.1:8080/ignition?uuid=62b58ffd-7960-419a-8359-91def082191a&mac=52-54-00-71-83-ea flatcar.first_boot flatcar.oem.id=pxe diff --git a/discoveryC/tests/proc/cmdline3 b/discoveryC/tests/proc/cmdline3 index 25be925e..bf7ab648 100644 --- a/discoveryC/tests/proc/cmdline3 +++ b/discoveryC/tests/proc/cmdline3 @@ -1 +1 @@ -rootflags=rw mount.usrflags=ro coreos.autologin coreos.config.url=http://172.20.0.1:8080/ignition-pxe?uuid=62b58ffd-7960-419a-8359-91def082191a&mac=52-54-00-71-83-ea coreos.first_boot coreos.oem.id=pxe \ No newline at end of file +rootflags=rw mount.usrflags=ro flatcar.autologin flatcar.config.url=http://172.20.0.1:8080/ignition-pxe?uuid=62b58ffd-7960-419a-8359-91def082191a&mac=52-54-00-71-83-ea flatcar.first_boot flatcar.oem.id=pxe diff --git a/docs/api.md b/docs/api.md index 43550eba..64d2e15e 100644 --- a/docs/api.md +++ b/docs/api.md @@ -30,8 +30,8 @@ This is the available routes: "/ignition/version/", "/install-authorization/", "/ipxe", - "/lifecycle/coreos-install", - "/lifecycle/coreos-install//", + "/lifecycle/flatcar-install", + "/lifecycle/flatcar-install//", "/lifecycle/ignition", "/lifecycle/ignition/", "/lifecycle/rolling", diff --git a/docs/enjoliver-architecture.md b/docs/enjoliver-architecture.md index 46946abe..4ece4d95 100644 --- a/docs/enjoliver-architecture.md +++ b/docs/enjoliver-architecture.md @@ -32,7 +32,7 @@ During the lifecycle of the Kubernetes cluster, rolling updates are **fast** and Each node can be re-installed and re-join the cluster. -Each minute, every machine reports the content of `/usr/share/oem/coreos-install.json` to the enjoliver API `lifecycle/ignition/` +Each minute, every machine reports the content of `/usr/share/oem/flatcar-install.json` to the enjoliver API `lifecycle/ignition/` Enjoliver will query matchbox and compare the content of the current ignition report and the desired ignition provided by matchbox. The result will be stored in the database and returned to the machine. diff --git a/docs/usage-development.md b/docs/usage-development.md index 32f71e6e..e9ae579c 100644 --- a/docs/usage-development.md +++ b/docs/usage-development.md @@ -30,7 +30,7 @@ Step-by-step: # Very long: sudo -E make aci - sudo -E make container_linux + sudo -E make flatcar # misc make config diff --git a/enjoliver-agent/README.md b/enjoliver-agent/README.md index 7f536ac1..8f26f53e 100644 --- a/enjoliver-agent/README.md +++ b/enjoliver-agent/README.md @@ -1,7 +1,7 @@ # Enjoliver Agent -The enjoliver agent is a daemon running on each CoreOS container linux node of the Kubernetes cluster. +The enjoliver agent is a daemon running on each Flatcar linux node of the Kubernetes cluster. The purpose of this daemon is provide local information. diff --git a/enjoliver-agent/version_test.go b/enjoliver-agent/version_test.go index 05eafe7e..bcadefcc 100644 --- a/enjoliver-agent/version_test.go +++ b/enjoliver-agent/version_test.go @@ -70,12 +70,12 @@ Features: -TPM +SDJOURNAL t.Errorf("fail to get version: %s", v) } - unameOutput := "4.11.9-coreos\n" + unameOutput := "4.11.9-flatcar\n" v, err = getStringInTable(unameOutput, kernelVersion) if err != nil { t.Errorf(err.Error()) } - if v != "4.11.9-coreos" { + if v != "4.11.9-flatcar" { t.Errorf("fail to get version: %s", v) } @@ -102,7 +102,7 @@ Copyright 2000-2017 Willy Tarreau socatOutput := `[64604.961670] socat[18]: socat by Gerhard Rieger and contributors - see www.dest-unreach.org [64604.962631] socat[18]: socat version 1.7.3.2 on Dec 1 2017 13:26:02 -[64604.963345] socat[18]: running on Linux version #1 SMP Wed Nov 8 08:09:32 UTC 2017, release 4.14.0-rc8-coreos, machine x86_64 +[64604.963345] socat[18]: running on Linux version #1 SMP Wed Nov 8 08:09:32 UTC 2017, release 4.14.0-rc8-flatcar, machine x86_64 [64604.965175] socat[18]: features: [64604.965761] socat[18]: #define WITH_STDIO 1 [64604.966496] socat[18]: #define WITH_FDNUM 1 diff --git a/enjoliver-api/enjoliver.yaml b/enjoliver-api/enjoliver.yaml index 0735bf35..ed9ae71f 100644 --- a/enjoliver-api/enjoliver.yaml +++ b/enjoliver-api/enjoliver.yaml @@ -9,8 +9,8 @@ extra_selectors: {'os': 'installed'} api_uri: 'http://127.0.0.1:5000' #assets_server_uri: 'http://172.20.0.1' -#kernel: '/assets/coreos/serve/coreos_production_pxe.vmlinuz' -#initrd: '/assets/coreos/serve/coreos_production_pxe_image.cpio.gz' +#kernel: '/assets/flatcar/serve/flatcar_production_pxe.vmlinuz' +#initrd: '/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz' matchbox_path: '/var/lib/matchbox' matchbox_uri: 'http://127.0.0.1:8080' @@ -71,8 +71,8 @@ cephtools_image_url: 'enjoliver.local/ceph-tools:latest' etc_hosts: ['172.20.0.1 enjoliver.local'] -coreos_install_base_url: "http://enjoliver.local:5000/assets/coreos" -coreos_install_lock_seconds: 45 +flatcar_install_base_url: "http://enjoliver.local:5000/assets/flatcar" +flatcar_install_lock_seconds: 45 nameservers: ["8.8.8.8", "8.8.4.4"] ntp: ["0.arch.pool.ntp.org", "1.arch.pool.ntp.org", "2.arch.pool.ntp.org", "3.arch.pool.ntp.org"] @@ -82,4 +82,4 @@ vault_polling_sec: 30 disks_ladder_gb: {S: 10, M: 20, L: 30} discovery_fqdn_verify: true -sync_replace_ip_by_fqdn: false \ No newline at end of file +sync_replace_ip_by_fqdn: false diff --git a/enjoliver-api/enjoliver/configs.py b/enjoliver-api/enjoliver/configs.py index b6405b01..7bb0bc34 100644 --- a/enjoliver-api/enjoliver/configs.py +++ b/enjoliver-api/enjoliver/configs.py @@ -98,11 +98,11 @@ def __init__(self, importer=''): self.assets_server_uri = self.config_override("assets_server_uri", None) self.kernel = self.config_override( "kernel", - "/assets/coreos/serve/coreos_production_pxe.vmlinuz" + "/assets/flatcar/serve/flatcar_production_pxe.vmlinuz" ) self.initrd = self.config_override( "initrd", - "/assets/coreos/serve/coreos_production_pxe_image.cpio.gz" + "/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz" ) # Scheduler @@ -198,8 +198,8 @@ def __init__(self, importer=''): "%s/gunicorn.pid" % os.path.dirname(__file__)) self.plan_pid_file = self.config_override("plan_pid_file", "%s/plan.pid" % os.path.dirname(__file__)) - self.coreos_install_base_url = self.config_override("coreos_install_base_url", None) - self.coreos_install_lock_seconds = self.config_override("coreos_install_lock_seconds", 29) + self.flatcar_install_base_url = self.config_override("flatcar_install_base_url", None) + self.flatcar_install_lock_seconds = self.config_override("flatcar_install_lock_seconds", 29) self.nameservers = self.config_override("nameservers", ["8.8.8.8", "8.8.4.4"]) self.ntp = self.config_override("ntp", ["0.arch.pool.ntp.org", diff --git a/enjoliver-api/enjoliver/crud.py b/enjoliver-api/enjoliver/crud.py index cc29b402..26f3a116 100644 --- a/enjoliver-api/enjoliver/crud.py +++ b/enjoliver-api/enjoliver/crud.py @@ -10,7 +10,7 @@ from enjoliver.db import session_commit from enjoliver import tools from enjoliver.model import MachineInterface, Machine, Schedule, ScheduleRoles, LifecycleIgnition, \ - LifecycleCoreosInstall, LifecycleRolling + LifecycleFlatcarInstall, LifecycleRolling logger = logging.getLogger(__name__) @@ -53,11 +53,11 @@ def refresh_lifecycle_ignition(self, up_to_date: bool): self.session.commit() - def refresh_lifecycle_coreos_install(self, success: bool): - lifecycle = self.session.query(LifecycleCoreosInstall).filter( - LifecycleCoreosInstall.machine_id == self.machine.id).first() + def refresh_lifecycle_flatcar_install(self, success: bool): + lifecycle = self.session.query(LifecycleFlatcarInstall).filter( + LifecycleFlatcarInstall.machine_id == self.machine.id).first() if not lifecycle: - lifecycle = LifecycleCoreosInstall( + lifecycle = LifecycleFlatcarInstall( machine_id=self.machine.id, success=success ) @@ -125,9 +125,9 @@ def get_all_updated_status(self): }) return status - def get_coreos_install_status(self, mac: str): + def get_flatcar_install_status(self, mac: str): with session_commit(sess_maker=self.sess_maker) as session: - lci = session.query(LifecycleCoreosInstall)\ + lci = session.query(LifecycleFlatcarInstall)\ .join(Machine)\ .join(MachineInterface)\ .filter(MachineInterface.mac == mac)\ @@ -137,11 +137,11 @@ def get_coreos_install_status(self, mac: str): else: return None - def get_all_coreos_install_status(self): + def get_all_flatcar_install_status(self): life_status_list = [] with session_commit(sess_maker=self.sess_maker) as session: for machine in session.query(Machine)\ - .join(LifecycleCoreosInstall)\ + .join(LifecycleFlatcarInstall)\ .join(MachineInterface)\ .filter(MachineInterface.as_boot == True): @@ -149,9 +149,9 @@ def get_all_coreos_install_status(self): "mac": machine.interfaces[0].mac, "fqdn": machine.interfaces[0].fqdn, "cidrv4": machine.interfaces[0].cidrv4, - "success": machine.lifecycle_coreos_install[0].success, - "created_date": machine.lifecycle_coreos_install[0].created_date, - "updated_date": machine.lifecycle_coreos_install[0].updated_date + "success": machine.lifecycle_flatcar_install[0].success, + "created_date": machine.lifecycle_flatcar_install[0].created_date, + "updated_date": machine.lifecycle_flatcar_install[0].updated_date }) return life_status_list diff --git a/enjoliver-api/enjoliver/generator.py b/enjoliver-api/enjoliver/generator.py index d57e2958..4d9f91a1 100644 --- a/enjoliver-api/enjoliver/generator.py +++ b/enjoliver-api/enjoliver/generator.py @@ -151,10 +151,10 @@ def _boot(self): "kernel": "%s%s" % (uri, ec.kernel), "initrd": ["%s%s" % (uri, ec.initrd)], "cmdline": { - "coreos.config.url": + "flatcar.config.url": "%s/%s?uuid=${uuid}&mac=${net0/mac:hexhyp}" % (self.api_uri, path_for_ignition), - "coreos.first_boot": "", - "coreos.oem.id": "pxe", + "flatcar.first_boot": "", + "flatcar.oem.id": "pxe", "console": "ttyS0 console=ttyS1", } } diff --git a/enjoliver-api/enjoliver/k8s_2t.py b/enjoliver-api/enjoliver/k8s_2t.py index 7acb72ea..57f6f052 100755 --- a/enjoliver-api/enjoliver/k8s_2t.py +++ b/enjoliver-api/enjoliver/k8s_2t.py @@ -47,7 +47,7 @@ def _init_discovery(self): extra_md = { "etc_hosts": EC.etc_hosts, "extra_selectors": extra_selectors, - "coreos_install_base_url": EC.coreos_install_base_url, + "flatcar_install_base_url": EC.flatcar_install_base_url, } if EC.lldp_image_url: logger.debug("adding lldp_image_url: %s" % EC.lldp_image_url) diff --git a/enjoliver-api/enjoliver/model.py b/enjoliver-api/enjoliver/model.py index deb63df9..b84881ff 100644 --- a/enjoliver-api/enjoliver/model.py +++ b/enjoliver-api/enjoliver/model.py @@ -121,11 +121,11 @@ class Healthz(Base): host = Column(String, nullable=True) -class LifecycleCoreosInstall(Base): +class LifecycleFlatcarInstall(Base): """ - After the script 'coreos-install' the discovery machine POST the success / failure to a dedicated Flask route + After the script 'flatcar-install' the discovery machine POST the success / failure to a dedicated Flask route """ - __tablename__ = 'lifecycle_coreos_install' + __tablename__ = 'lifecycle_flatcar_install' id = Column(Integer, primary_key=True, autoincrement=True) created_date = Column(DateTime, default=datetime.datetime.utcnow) @@ -138,7 +138,7 @@ class LifecycleCoreosInstall(Base): class LifecycleIgnition(Base): """ - During the Lifecycle of a Machine, the state of the /usr/share/oem/coreos-install.json is POST to a dedicated Flask + During the Lifecycle of a Machine, the state of the /usr/share/oem/flatcar-install.json is POST to a dedicated Flask route, this table store this event and if the current Machine is up to date """ __tablename__ = 'lifecycle_ignition' @@ -193,7 +193,7 @@ class Machine(Base): schedules = relationship('Schedule') lifecycle_rolling = relationship('LifecycleRolling') - lifecycle_coreos_install = relationship('LifecycleCoreosInstall') + lifecycle_flatcar_install = relationship('LifecycleFlatcarInstall') lifecycle_ignition = relationship('LifecycleIgnition') machine_state = relationship('MachineCurrentState') diff --git a/enjoliver-api/enjoliver/routes.py b/enjoliver-api/enjoliver/routes.py index b24ce1f1..28c625d3 100644 --- a/enjoliver-api/enjoliver/routes.py +++ b/enjoliver-api/enjoliver/routes.py @@ -336,7 +336,7 @@ def require_install_authorization(request_raw_query): type: string """ app.logger.info("%s %s %s" % (request.method, request.remote_addr, request.url)) - if ec.coreos_install_lock_seconds > 0: + if ec.flatcar_install_lock_seconds > 0: lock = cache.get("lock-install") if lock is not None: app.logger.warning("Locked by %s" % lock) @@ -345,7 +345,7 @@ def require_install_authorization(request_raw_query): MachineStates.os_installation_denied ) return Response(response="Locked by %s" % lock, status=403) - cache.set("lock-install", request_raw_query, timeout=ec.coreos_install_lock_seconds) + cache.set("lock-install", request_raw_query, timeout=ec.flatcar_install_lock_seconds) app.logger.info("Granted to %s" % request_raw_query) registry.machine_state.update( @@ -390,33 +390,33 @@ def ipxe(): app.logger.warning("404 for /ipxe") return "404", 404 - @app.route("/lifecycle/coreos-install", methods=["GET"]) - def lifecycle_get_coreos_install_status(): + @app.route("/lifecycle/flatcar-install", methods=["GET"]) + def lifecycle_get_flatcar_install_status(): """ - Lifecycle CoreOS Install - Get all the CoreOS Install status + Lifecycle Flatcar Install + Get all the Flatcar Install status --- tags: - lifecycle responses: 200: - description: CoreOS Install status list + description: Flatcar Install status list schema: type: list """ - return jsonify(crud.FetchLifecycle(sess_maker=sess_maker).get_all_coreos_install_status()) + return jsonify(crud.FetchLifecycle(sess_maker=sess_maker).get_all_flatcar_install_status()) - @app.route("/lifecycle/coreos-install//", methods=["POST"]) - def report_lifecycle_coreos_install(status, request_raw_query): + @app.route("/lifecycle/flatcar-install//", methods=["POST"]) + def report_lifecycle_flatcar_install(status, request_raw_query): """ - Lifecycle CoreOS Install - Report the status of a CoreOS install by MAC + Lifecycle Flatcar Install + Report the status of a Flatcar install by MAC --- tags: - lifecycle responses: 200: - description: CoreOS Install report + description: Flatcar Install report schema: type: dict """ @@ -431,7 +431,7 @@ def report_lifecycle_coreos_install(status, request_raw_query): with session_commit(sess_maker=sess_maker) as session: inject = crud.InjectLifecycle(session, request_raw_query=request_raw_query) - inject.refresh_lifecycle_coreos_install(success) + inject.refresh_lifecycle_flatcar_install(success) registry.machine_state.update( mac=tools.get_mac_from_raw_query(request_raw_query), diff --git a/enjoliver-api/tests/test_api.py b/enjoliver-api/tests/test_api.py index 4f5734ff..d3a3c922 100644 --- a/enjoliver-api/tests/test_api.py +++ b/enjoliver-api/tests/test_api.py @@ -215,7 +215,7 @@ def test_scheduler_08(self): self.assertEqual(1, len(json.loads(r.data.decode()))) def test_lifecycle_01(self): - r = self.app.get("/lifecycle/coreos-install") + r = self.app.get("/lifecycle/flatcar-install") self.assertEqual([], json.loads(r.data.decode())) def test_lifecycle_02(self): @@ -229,9 +229,9 @@ def test_lifecycle_03(self): def test_lifecycle_04(self): rawq = "mac=%s&uuid=%s&os=installed" % ( posts.M01["boot-info"]["mac"].replace(":", "-"), posts.M01["boot-info"]["uuid"]) - r = self.app.post("/lifecycle/coreos-install/success/%s" % rawq) + r = self.app.post("/lifecycle/flatcar-install/success/%s" % rawq) self.assertEqual(200, r.status_code) - r = self.app.get("/lifecycle/coreos-install") + r = self.app.get("/lifecycle/flatcar-install") d = json.loads(r.data.decode()) self.assertEqual(1, len(d)) self.assertTrue(d[0]["success"]) @@ -239,9 +239,9 @@ def test_lifecycle_04(self): def test_lifecycle_04a(self): rawq = "mac=%s&uuid=%s&os=installed" % ( posts.M02["boot-info"]["mac"].replace(":", "-"), posts.M02["boot-info"]["uuid"]) - r = self.app.post("/lifecycle/coreos-install/fail/%s" % rawq) + r = self.app.post("/lifecycle/flatcar-install/fail/%s" % rawq) self.assertEqual(200, r.status_code) - r = self.app.get("/lifecycle/coreos-install") + r = self.app.get("/lifecycle/flatcar-install") d = json.loads(r.data.decode()) self.assertEqual(2, len(d)) self.assertTrue(d[0]["success"]) @@ -282,7 +282,7 @@ def test_lifecycle_07(self): def test_lifecycle_08(self): rawq = "mac=%s&uuid=%s&os=installed" % ( posts.M02["boot-info"]["mac"].replace(":", "-"), posts.M02["boot-info"]["uuid"]) - r = self.app.post("/lifecycle/coreos-install/success/%s" % rawq) + r = self.app.post("/lifecycle/flatcar-install/success/%s" % rawq) self.assertEqual(200, r.status_code) def test_vue_machine(self): diff --git a/enjoliver-api/tests/test_generate_profiles.py b/enjoliver-api/tests/test_generate_profiles.py index b6a35637..e5948a19 100644 --- a/enjoliver-api/tests/test_generate_profiles.py +++ b/enjoliver-api/tests/test_generate_profiles.py @@ -60,14 +60,14 @@ def tearDownClass(cls): def test_01_boot(self): expect = { - 'kernel': '%s/assets/coreos/serve/coreos_production_pxe.vmlinuz' % self.gen.api_uri, - 'initrd': ['%s/assets/coreos/serve/coreos_production_pxe_image.cpio.gz' % self.gen.api_uri], + 'kernel': '%s/assets/flatcar/serve/flatcar_production_pxe.vmlinuz' % self.gen.api_uri, + 'initrd': ['%s/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz' % self.gen.api_uri], 'cmdline': { 'console': 'ttyS0 console=ttyS1', - 'coreos.first_boot': '', - 'coreos.oem.id': 'pxe', - 'coreos.config.url': '%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}' % self.gen.api_uri + 'flatcar.first_boot': '', + 'flatcar.oem.id': 'pxe', + 'flatcar.config.url': '%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}' % self.gen.api_uri } } self.gen._boot() @@ -78,15 +78,15 @@ def test_990_generate(self): expect = { "cloud_id": "", "boot": { - "kernel": "%s/assets/coreos/serve/coreos_production_pxe.vmlinuz" % self.gen.api_uri, + "kernel": "%s/assets/flatcar/serve/flatcar_production_pxe.vmlinuz" % self.gen.api_uri, "initrd": [ - "%s/assets/coreos/serve/coreos_production_pxe_image.cpio.gz" % self.gen.api_uri + "%s/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz" % self.gen.api_uri ], "cmdline": { "console": "ttyS0 console=ttyS1", - "coreos.first_boot": "", - "coreos.oem.id": "pxe", - "coreos.config.url": "%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}" % + "flatcar.first_boot": "", + "flatcar.oem.id": "pxe", + "flatcar.config.url": "%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}" % self.gen.api_uri } }, diff --git a/enjoliver-api/tests/test_model_dbs.py b/enjoliver-api/tests/test_model_dbs.py index 06db154f..450b6ea4 100644 --- a/enjoliver-api/tests/test_model_dbs.py +++ b/enjoliver-api/tests/test_model_dbs.py @@ -356,10 +356,10 @@ def test_35(self): with session_commit(sess_maker=self.sess_maker) as session: rq = "uuid=%s&mac=%s&os=installed" % (posts.M03["boot-info"]["uuid"], posts.M03["boot-info"]["mac"]) i = crud.InjectLifecycle(session, request_raw_query=rq) - i.refresh_lifecycle_coreos_install(True) + i.refresh_lifecycle_flatcar_install(True) f = crud.FetchLifecycle(sess_maker=self.sess_maker) - self.assertTrue(f.get_coreos_install_status(posts.M03["boot-info"]["mac"])) - self.assertEqual(1, len(f.get_all_coreos_install_status())) + self.assertTrue(f.get_flatcar_install_status(posts.M03["boot-info"]["mac"])) + self.assertEqual(1, len(f.get_all_flatcar_install_status())) def test_36(self): with session_commit(sess_maker=self.sess_maker) as session: diff --git a/enjoliver-testsuite/Makefile b/enjoliver-testsuite/Makefile index 1256897b..fe952e37 100644 --- a/enjoliver-testsuite/Makefile +++ b/enjoliver-testsuite/Makefile @@ -65,6 +65,9 @@ fclean: clean gci gc check_euid_it_plans_enjolivage_disk_2_nodes: runtime pytest-3 -x --pdb -v -k TestKVMK8sEnjolivageDisk1 +check_euid_it_plans_lifecycle: runtime + pytest-3 -x --pdb -v -k TestKVMK8SEnjolivageDiskLifecycleLifecycle0 + $(KKK): @echo Run as USER test $(ROOT) diff --git a/enjoliver-testsuite/enjoliver.yaml b/enjoliver-testsuite/enjoliver.yaml index eb16d09d..bfd33527 100644 --- a/enjoliver-testsuite/enjoliver.yaml +++ b/enjoliver-testsuite/enjoliver.yaml @@ -9,8 +9,8 @@ extra_selectors: {'os': 'installed'} api_uri: 'http://127.0.0.1:5000' #assets_server_uri: 'http://172.20.0.1' -#kernel: '/assets/coreos/serve/coreos_production_pxe.vmlinuz' -#initrd: '/assets/coreos/serve/coreos_production_pxe_image.cpio.gz' +#kernel: '/assets/flatcar/serve/flatcar_production_pxe.vmlinuz' +#initrd: '/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz' matchbox_path: '/var/lib/matchbox' matchbox_uri: 'http://127.0.0.1:8080' @@ -71,8 +71,8 @@ cephtools_image_url: 'enjoliver.local/ceph-tools:latest' etc_hosts: ['172.20.0.1 enjoliver.local'] -coreos_install_base_url: "http://enjoliver.local:5000/assets/coreos" -coreos_install_lock_seconds: 45 +flatcar_install_base_url: "http://enjoliver.local:5000/assets/flatcar" +flatcar_install_lock_seconds: 45 nameservers: ["8.8.8.8", "8.8.4.4"] ntp: ["0.arch.pool.ntp.org", "1.arch.pool.ntp.org", "2.arch.pool.ntp.org", "3.arch.pool.ntp.org"] diff --git a/enjoliver-testsuite/test_matchbox/ignition/euid-discovery-no-disk.yaml b/enjoliver-testsuite/test_matchbox/ignition/euid-discovery-no-disk.yaml index 71efceae..204c2580 100644 --- a/enjoliver-testsuite/test_matchbox/ignition/euid-discovery-no-disk.yaml +++ b/enjoliver-testsuite/test_matchbox/ignition/euid-discovery-no-disk.yaml @@ -189,20 +189,20 @@ storage: #done udevadm settle - #coreos-install -d /dev/sda -V current -C stable -i ${NEW_IGNITION} \ - # {{if index . "coreos_install_base_url"}} -b {{.coreos_install_base_url}}{{end}} || { + #flatcar-install -d /dev/sda -V current -C stable -i ${NEW_IGNITION} \ + # {{if index . "flatcar_install_base_url"}} -b {{.flatcar_install_base_url}}{{end}} || { # curl -f -XPOST \ - # "${API_URI}/lifecycle/coreos-install/fail/${QUERY}" + # "${API_URI}/lifecycle/flatcar-install/fail/${QUERY}" # exit 2 #} - curl -f -XPOST "${API_URI}/lifecycle/coreos-install/success/${QUERY}" + curl -f -XPOST "${API_URI}/lifecycle/flatcar-install/success/${QUERY}" sync systemctl reboot fi sleep ${TIMER} done - - path: /etc/coreos/update.conf + - path: /etc/flatcar/update.conf mode: 0644 filesystem: root contents: @@ -220,7 +220,7 @@ storage: "stage1-images": "/usr/lib/rkt/stage1-images" } - - path: /etc/rkt/stage1.d/coreos.json + - path: /etc/rkt/stage1.d/flatcar.json filesystem: root mode: 0644 contents: @@ -229,7 +229,7 @@ storage: "rktKind": "stage1", "rktVersion": "v1", "name": "coreos.com/rkt/stage1-coreos", - "version": "v1.27.0", + "version": "v1.29.0", "location": "/usr/lib/rkt/stage1-images/stage1-coreos.aci" } @@ -242,4 +242,4 @@ passwd: {{ range $element := .ssh_authorized_keys }} - {{$element}} {{end}} -{{end}} \ No newline at end of file +{{end}} diff --git a/enjoliver-testsuite/test_matchbox/ssh_authorized_keys/testing.id_rsa.pub b/enjoliver-testsuite/test_matchbox/ssh_authorized_keys/testing.id_rsa.pub index 51694e51..9decab11 120000 --- a/enjoliver-testsuite/test_matchbox/ssh_authorized_keys/testing.id_rsa.pub +++ b/enjoliver-testsuite/test_matchbox/ssh_authorized_keys/testing.id_rsa.pub @@ -1 +1 @@ -../../testing.id_rsa.pub \ No newline at end of file +/home/core/go/src/github.com/blablacar/enjoliver/enjoliver-testsuite/testing.id_rsa.pub \ No newline at end of file diff --git a/enjoliver-testsuite/testing.id_rsa b/enjoliver-testsuite/testing.id_rsa index 8bc832b8..dadfba8c 100644 --- a/enjoliver-testsuite/testing.id_rsa +++ b/enjoliver-testsuite/testing.id_rsa @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -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 -----END RSA PRIVATE KEY----- diff --git a/enjoliver-testsuite/testing.id_rsa.pub b/enjoliver-testsuite/testing.id_rsa.pub index 113a2039..54356438 100644 --- a/enjoliver-testsuite/testing.id_rsa.pub +++ b/enjoliver-testsuite/testing.id_rsa.pub @@ -1 +1 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4bvIfX2lFvheC98UmvdXX8MkVIQ/kwpKui+fXWptINPXDZPbNztUahBkkhqnNV8Vp8FUb0b+eYJMbxH0nWQrrfxSfppgzab0iv7tWcE7Axj1vXsTUrboGsDecMa9wEjMSbtH0cZhbwnvi/9m+XwPBFzA4g01USK68gKV7b/sGhqQw1pI2VnWnKMsAI24SgsVK5iCrRHIQjMQP/f7AsJJcaBRw24PpGYaACZVYzySAuOhNtn1KaOf03wWgAb6Pak+OBBgnajkNvC3l8YBhOkj7JIyvF4oGMkwk9ZQd8BqBAURTwEQXXslX2KCpINADJiNxKhUnqtR12cOnasj7vvpn core@bbcdss01 +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpxbS7h3m+oSElhZTqkS/9zj40XN/YBFQw0MmV/F11e9Sjos8FHVVF9zD7vx3Cdwadwmd+29q9R1nWsTSfc+ybTWRGd0E9ZHuSavs58pm9Z1zoZ1LPUwPKarTljJi0gN215nteBHY3Vt+PpaKfD8COO8DoQOYiMChPYAu7cLZYDCaRfkeLgj9Dlk/GpjxJ6eJI17gYRRJSFHwIbCoEMlpEKP8tWQ/jBX1SSdFgEvdp3xr6T+TxXHJjMkar/o27/gEUPQFJLQkQvhc/ybDWOYYoThbe+cFyAG/gQrxqsAScYo9jkIFZUKa4sVOysPuYWyyBmeSHZJ4r3Wn1Yh9UaDFh core@bbcdss01 diff --git a/inte/test_api_gunicorn.py b/inte/test_api_gunicorn.py index f85e465c..bdbc725a 100644 --- a/inte/test_api_gunicorn.py +++ b/inte/test_api_gunicorn.py @@ -208,12 +208,12 @@ def test_04_ipxe(self): request.close() expect = "#!ipxe\n" \ "kernel " \ - "%s/assets/coreos/serve/coreos_production_pxe.vmlinuz " \ + "%s/assets/flatcar/serve/flatcar_production_pxe.vmlinuz " \ "console=ttyS0 console=ttyS1 " \ - "coreos.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp} " \ - "coreos.first_boot " \ - "coreos.oem.id=pxe\n" \ - "initrd %s/assets/coreos/serve/coreos_production_pxe_image.cpio.gz \n" \ + "flatcar.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp} " \ + "flatcar.first_boot " \ + "flatcar.oem.id=pxe\n" \ + "initrd %s/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz \n" \ "boot\n" % (gen.profile.api_uri, gen.profile.api_uri, gen.profile.api_uri) self.assertEqual(200, response_code) self.maxDiff = None @@ -240,11 +240,11 @@ def test_05_ipxe_selector(self): response_code = request.status_code request.close() expect = "#!ipxe\n" \ - "kernel %s/assets/coreos/serve/coreos_production_pxe.vmlinuz " \ + "kernel %s/assets/flatcar/serve/flatcar_production_pxe.vmlinuz " \ "console=ttyS0 console=ttyS1 " \ - "coreos.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp} " \ - "coreos.first_boot coreos.oem.id=pxe\n" \ - "initrd %s/assets/coreos/serve/coreos_production_pxe_image.cpio.gz \n" \ + "flatcar.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp} " \ + "flatcar.first_boot flatcar.oem.id=pxe\n" \ + "initrd %s/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz \n" \ "boot\n" % (gen.profile.api_uri, gen.profile.api_uri, gen.profile.api_uri) self.maxDiff = None self.assertEqual(expect, response_body) diff --git a/inte/test_api_simple.py b/inte/test_api_simple.py index 63905b0d..4a197624 100644 --- a/inte/test_api_simple.py +++ b/inte/test_api_simple.py @@ -168,12 +168,12 @@ def test_04_ipxe(self): result = self.app.get('/ipxe') expect = "#!ipxe\n" \ "kernel " \ - "%s/assets/coreos/serve/coreos_production_pxe.vmlinuz " \ + "%s/assets/flatcar/serve/flatcar_production_pxe.vmlinuz " \ "console=ttyS0 console=ttyS1 " \ - "coreos.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp} " \ - "coreos.first_boot " \ - "coreos.oem.id=pxe\n" \ - "initrd %s/assets/coreos/serve/coreos_production_pxe_image.cpio.gz \n" \ + "flatcar.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp} " \ + "flatcar.first_boot " \ + "flatcar.oem.id=pxe\n" \ + "initrd %s/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz \n" \ "boot\n" % (gen.profile.api_uri, gen.profile.api_uri, gen.profile.api_uri) expect = str.encode(expect) self.assertEqual(expect, result.data) @@ -195,10 +195,10 @@ def test_05_ipxe_selector(self): result = self.app.get('/ipxe?mac=%s' % mac) expect = "#!ipxe\n" \ - "kernel %s/assets/coreos/serve/coreos_production_pxe.vmlinuz " \ - "console=ttyS0 console=ttyS1 coreos.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp} " \ - "coreos.first_boot coreos.oem.id=pxe\n" \ - "initrd %s/assets/coreos/serve/coreos_production_pxe_image.cpio.gz \n" \ + "kernel %s/assets/flatcar/serve/flatcar_production_pxe.vmlinuz " \ + "console=ttyS0 console=ttyS1 flatcar.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp} " \ + "flatcar.first_boot flatcar.oem.id=pxe\n" \ + "initrd %s/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz \n" \ "boot\n" % (gen.profile.api_uri, gen.profile.api_uri, gen.profile.api_uri) expect = str.encode(expect) self.assertEqual(expect, result.data) diff --git a/inte/test_matchbox.py b/inte/test_matchbox.py index fdf07af6..695123d4 100644 --- a/inte/test_matchbox.py +++ b/inte/test_matchbox.py @@ -175,16 +175,16 @@ def test_02_ipxe(self): kernel = lines[1].split(" ") kernel_expect = [ 'kernel', - '%s/assets/coreos/serve/coreos_production_pxe.vmlinuz' % self.gen.profile.api_uri, + '%s/assets/flatcar/serve/flatcar_production_pxe.vmlinuz' % self.gen.profile.api_uri, "console=ttyS0", "console=ttyS1", - 'coreos.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}' % self.gen.profile.api_uri, - 'coreos.first_boot', - "coreos.oem.id=pxe"] + 'flatcar.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}' % self.gen.profile.api_uri, + 'flatcar.first_boot', + "flatcar.oem.id=pxe"] self.assertEqual(kernel, kernel_expect) init_rd = lines[2].split(" ") init_rd_expect = ['initrd', - '%s/assets/coreos/serve/coreos_production_pxe_image.cpio.gz' % self.gen.profile.api_uri] + '%s/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz' % self.gen.profile.api_uri] self.assertEqual(init_rd, init_rd_expect) boot = lines[3] @@ -196,8 +196,8 @@ def test_03_assets(self): request.close() self.assertEqual(200, request.status_code) - def test_03_assets_coreos_serve_404(self): - r = requests.get("%s/assets/coreos/serve/404_request.not-here" % self.matchbox_endpoint) + def test_03_assets_flatcar_serve_404(self): + r = requests.get("%s/assets/flatcar/serve/404_request.not-here" % self.matchbox_endpoint) self.assertEqual(404, r.status_code) @@ -262,16 +262,16 @@ def test_02_ipxe(self): kernel = lines[1].split(" ") kernel_expect = [ 'kernel', - '%s/assets/coreos/serve/coreos_production_pxe.vmlinuz' % self.gen.profile.api_uri, + '%s/assets/flatcar/serve/flatcar_production_pxe.vmlinuz' % self.gen.profile.api_uri, "console=ttyS0", "console=ttyS1", - 'coreos.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}' % self.gen.profile.api_uri, - 'coreos.first_boot', - "coreos.oem.id=pxe"] + 'flatcar.config.url=%s/ignition?uuid=${uuid}&mac=${net0/mac:hexhyp}' % self.gen.profile.api_uri, + 'flatcar.first_boot', + "flatcar.oem.id=pxe"] self.assertEqual(kernel, kernel_expect) init_rd = lines[2].split(" ") init_rd_expect = ['initrd', - '%s/assets/coreos/serve/coreos_production_pxe_image.cpio.gz' % self.gen.profile.api_uri] + '%s/assets/flatcar/serve/flatcar_production_pxe_image.cpio.gz' % self.gen.profile.api_uri] self.assertEqual(init_rd, init_rd_expect) boot = lines[3] diff --git a/matchbox/assets/coreos/oem-cloudinit.service b/matchbox/assets/coreos/oem-cloudinit.service deleted file mode 100644 index 13ab5eee..00000000 --- a/matchbox/assets/coreos/oem-cloudinit.service +++ /dev/null @@ -1,6 +0,0 @@ -[Service] -Type=oneshot -ExecStart=/usr/bin/coreos-cloudinit --oem=ec2-compat - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/matchbox/assets/coreos/Makefile b/matchbox/assets/flatcar/Makefile similarity index 81% rename from matchbox/assets/coreos/Makefile rename to matchbox/assets/flatcar/Makefile index ff7605f1..fc31dee1 100644 --- a/matchbox/assets/coreos/Makefile +++ b/matchbox/assets/flatcar/Makefile @@ -1,19 +1,19 @@ -VERSION=1576.5.0 +VERSION=1632.3.0 SERVE=serve -CHANNEL=https://stable.release.core-os.net/amd64-usr -VMLINUZ=coreos_production_pxe.vmlinuz -CPIO=coreos_production_pxe_image.cpio.gz +CHANNEL=https://stable.release.flatcar-linux.net/amd64-usr +VMLINUZ=flatcar_production_pxe.vmlinuz +CPIO=flatcar_production_pxe_image.cpio.gz TXT=version.txt -BZ2=coreos_production_image.bin.bz2 +BZ2=flatcar_production_image.bin.bz2 KERNEL=$(addprefix $(VERSION)/, $(VMLINUZ)) INITRD=$(addprefix $(VERSION)/, $(CPIO)) TEXT_VERSION=$(addprefix $(VERSION)/, $(TXT)) IMAGE=$(addprefix $(VERSION)/, $(BZ2)) -ASC=CoreOS_Image_Signing_Key.asc +ASC=Flatcar_Image_Signing_Key.asc KEY=$(addprefix $(VERSION)/, $(ASC)) GPG=gpg @@ -25,7 +25,7 @@ $(VERSION): mkdir -pv $(VERSION) $(KEY): $(VERSION) - curl -Lf https://coreos.com/security/image-signing-key/$(ASC) -o $(KEY) + curl -Lf https://flatcar-linux.org/security/image-signing-key/$(ASC) -o $(KEY) $(GPG) --logger-fd 1 --import < $(KEY) $(KERNEL): $(KEY) $(VERSION) diff --git a/matchbox/assets/coreos/README.md b/matchbox/assets/flatcar/README.md similarity index 88% rename from matchbox/assets/coreos/README.md rename to matchbox/assets/flatcar/README.md index 20dcce18..c88d02c8 100644 --- a/matchbox/assets/coreos/README.md +++ b/matchbox/assets/flatcar/README.md @@ -10,13 +10,13 @@ sudo ${GOPATH}/src/github.com/blablacar/enjoliver/run_acserver.py & # Build the container linux builder - sudo make -C ${GOPATH}/src/github.com/blablacar/enjoliver/aci/aci-container-linux install + sudo make -C ${GOPATH}/src/github.com/blablacar/enjoliver/aci/aci-flatcar install # Run it inside rkt-fly sudo ${GOPATH}/src/github.com/blablacar/enjoliver/runtime/runtime.rkt run --volume \ enjoliver,kind=host,source=${GOPATH}/src/github.com/blablacar/enjoliver,readOnly=false \ --stage1-path=${GOPATH}/src/github.com/blablacar/enjoliver/runtime/rkt/stage1-fly.aci \ - --insecure-options=all --interactive enjoliver.local/container-linux:latest + --insecure-options=all --interactive enjoliver.local/flatcar:latest # Stop the acserver sudo pkill -F ${GOPATH}/src/github.com/blablacar/enjoliver/runtime/acserver.pid # Or: fg ; ^C @@ -26,4 +26,4 @@ * extract used features in the coreos python script `disk_util` * refactor the script `alter-distribution.sh` -* sign the image with custom key \ No newline at end of file +* sign the image with custom key diff --git a/matchbox/assets/coreos/alter-distribution.sh b/matchbox/assets/flatcar/alter-distribution.sh similarity index 76% rename from matchbox/assets/coreos/alter-distribution.sh rename to matchbox/assets/flatcar/alter-distribution.sh index dc07c156..b28663e8 100755 --- a/matchbox/assets/coreos/alter-distribution.sh +++ b/matchbox/assets/flatcar/alter-distribution.sh @@ -7,9 +7,9 @@ test ${VERSION} test ${COMMIT_ID} cd $(dirname $0) -COREOS_DIRECTORY=$(pwd -P) -ASSETS_DIRECTORY=$(dirname ${COREOS_DIRECTORY}) -export VERSION_DIR=${COREOS_DIRECTORY}/${VERSION} +FLATCAR_DIRECTORY=$(pwd -P) +ASSETS_DIRECTORY=$(dirname ${FLATCAR_DIRECTORY}) +export VERSION_DIR=${FLATCAR_DIRECTORY}/${VERSION} cd ${VERSION_DIR} export USR_A=${VERSION_DIR}/usr-a @@ -19,10 +19,10 @@ export VERSION mkdir -pv {squashfs,initrd} ${USR_A} ${BOOT} ${ROOTFS} -bzip2 -fdk coreos_production_image.bin.bz2 -${COREOS_DIRECTORY}/disk.py rw +bzip2 -fdk flatcar_production_image.bin.bz2 +${FLATCAR_DIRECTORY}/disk.py rw -LOOP=$(losetup --find --show coreos_production_image.bin) +LOOP=$(losetup --find --show flatcar_production_image.bin) partprobe ${LOOP} set +e @@ -34,9 +34,9 @@ set -e mount ${LOOP}p9 ${ROOTFS} mount ${LOOP}p3 ${USR_A} mount ${LOOP}p1 ${BOOT} -gunzip -c --force coreos_production_pxe_image.cpio.gz > coreos_production_pxe_image.cpio +gunzip -c --force flatcar_production_pxe_image.cpio.gz > flatcar_production_pxe_image.cpio cd initrd -cpio -id < ../coreos_production_pxe_image.cpio +cpio -id < ../flatcar_production_pxe_image.cpio cd ../squashfs unsquashfs -no-progress ../initrd/usr.squashfs @@ -55,7 +55,7 @@ _upx_in_fs() { done } -# CWD == ~/matchbox/assets/coreos/${VERSION}/squashfs +# CWD == ~/matchbox/assets/flatcar/${VERSION}/squashfs EXCLUDES="--exclude rootfs/dgr --exclude rootfs/etc --exclude rootfs/tmp --exclude rootfs/run --exclude rootfs/sys" @@ -131,7 +131,7 @@ SOCAT_ACI=$(ls ${ACI_PATH}/socat/socat-*-linux-amd64.aci | head -n 1) tar -C squashfs-root -xvf ${SOCAT_ACI} rootfs/usr/bin --strip 2 ${EXCLUDES} tar -C ${USR_A} -xvf ${SOCAT_ACI} rootfs/usr/bin --strip 2 ${EXCLUDES} -for b in /bin/locksmithctl /bin/coreos-cloudinit +for b in /bin/locksmithctl /bin/flatcar-cloudinit do _upx_in_fs ${b} done @@ -145,14 +145,14 @@ echo -n "{\"release\": \"${VERSION}\", \"alter_timestamp\": \"$(date +%s)\", \"c mkdir -pv ${ROOTFS}/etc/systemd/system/multi-user.target.wants ${ROOTFS}/etc/systemd/system/multi-user.target.requires -cp -v ${COREOS_DIRECTORY}/oem-cloudinit.service ${ROOTFS}/etc/systemd/system/oem-cloudinit.service +cp -v ${FLATCAR_DIRECTORY}/oem-cloudinit.service ${ROOTFS}/etc/systemd/system/oem-cloudinit.service cd ${ROOTFS}/etc/systemd/system/multi-user.target.wants ln -svf /etc/systemd/system/oem-cloudinit.service oem-cloudinit.service cd - -cp -v ${COREOS_DIRECTORY}/coreos-metadata-sshkeys@.service ${ROOTFS}/etc/systemd/system/coreos-metadata-sshkeys@.service +cp -v ${FLATCAR_DIRECTORY}/flatcar-metadata-sshkeys@.service ${ROOTFS}/etc/systemd/system/flatcar-metadata-sshkeys@.service cd ${ROOTFS}/etc/systemd/system/multi-user.target.requires -ln -svf /etc/systemd/system/coreos-metadata-sshkeys@.service coreos-metadata-sshkeys@core.service +ln -svf /etc/systemd/system/flatcar-metadata-sshkeys@.service flatcar-metadata-sshkeys@core.service cd - sync @@ -160,22 +160,22 @@ sync umount ${ROOTFS} umount ${USR_A} -${COREOS_DIRECTORY}/disk_util --disk_layout=base verity --root_hash=${VERSION_DIR}/coreos_production_image_verity.txt ${VERSION_DIR}/coreos_production_image.bin -printf %s "$(cat ${VERSION_DIR}/coreos_production_image_verity.txt)" | \ - dd of=${BOOT}/coreos/vmlinuz-a conv=notrunc seek=64 count=64 bs=1 status=none +${FLATCAR_DIRECTORY}/disk_util --disk_layout=base verity --root_hash=${VERSION_DIR}/flatcar_production_image_verity.txt ${VERSION_DIR}/flatcar_production_image.bin +printf %s "$(cat ${VERSION_DIR}/flatcar_production_image_verity.txt)" | \ + dd of=${BOOT}/flatcar/vmlinuz-a conv=notrunc seek=64 count=64 bs=1 status=none sync umount ${BOOT} losetup -d ${LOOP} -${COREOS_DIRECTORY}/disk.py ro -bzip2 -fzk ${VERSION_DIR}/coreos_production_image.bin -9 +${FLATCAR_DIRECTORY}/disk.py ro +bzip2 -fzk ${VERSION_DIR}/flatcar_production_image.bin -9 -cp -v ${COREOS_DIRECTORY}/coreos-install squashfs-root/bin/coreos-install +cp -v ${FLATCAR_DIRECTORY}/flatcar-install squashfs-root/bin/flatcar-install mksquashfs squashfs-root/ ../initrd/usr.squashfs -noappend -always-use-fragments cd ../initrd -find . | cpio -o -H newc | gzip -9 > ../coreos_production_pxe_image.cpio.gz +find . | cpio -o -H newc | gzip -9 > ../flatcar_production_pxe_image.cpio.gz cd ../ -rm -rf squashfs initrd coreos_production_pxe_image.cpio ${USR_A} +rm -rf squashfs initrd flatcar_production_pxe_image.cpio ${USR_A} diff --git a/matchbox/assets/coreos/aws-upload.sh b/matchbox/assets/flatcar/aws-upload.sh similarity index 88% rename from matchbox/assets/coreos/aws-upload.sh rename to matchbox/assets/flatcar/aws-upload.sh index c443d382..15500e5b 100755 --- a/matchbox/assets/coreos/aws-upload.sh +++ b/matchbox/assets/flatcar/aws-upload.sh @@ -11,15 +11,15 @@ VERSION=$(readlink serve) COMMITID=$(git log --pretty=format:'%h' -n 1) cd ${VERSION} -aws s3 cp coreos_production_image.bin s3://bbc-coreos-container-linux/${VERSION}/${COMMITID}.raw +aws s3 cp flatcar_production_image.bin s3://bbc-flatcar-container-linux/${VERSION}/${COMMITID}.raw cd - cat << EOF > container.json { - "Description": "CoreOS Container Linux ${VERSION}:${COMMITID}", + "Description": "Flatcar Linux ${VERSION}:${COMMITID}", "Format": "raw", "UserBucket": { - "S3Bucket": "bbc-coreos-container-linux", + "S3Bucket": "bbc-flatcar-container-linux", "S3Key": "${VERSION}/${COMMITID}.raw" } } diff --git a/matchbox/assets/coreos/disk.py b/matchbox/assets/flatcar/disk.py similarity index 95% rename from matchbox/assets/coreos/disk.py rename to matchbox/assets/flatcar/disk.py index 87b58c2d..0d9714e4 100755 --- a/matchbox/assets/coreos/disk.py +++ b/matchbox/assets/flatcar/disk.py @@ -31,7 +31,7 @@ def get_current_flag(image_path): if not version: raise EnvironmentError("VERSION environment variable is not fill") - image_path = os.path.join(FILE_DIR, version, "coreos_production_image.bin") + image_path = os.path.join(FILE_DIR, version, "flatcar_production_image.bin") current_flag = get_current_flag(image_path) if current_flag != READ_WRITE and current_flag != READ_ONLY: raise IOError("%s flag at %d is incoherent: %r ; should be %r or %r" % ( diff --git a/matchbox/assets/coreos/disk_layout.json b/matchbox/assets/flatcar/disk_layout.json similarity index 93% rename from matchbox/assets/coreos/disk_layout.json rename to matchbox/assets/flatcar/disk_layout.json index 68b789d1..cf43e190 100644 --- a/matchbox/assets/coreos/disk_layout.json +++ b/matchbox/assets/flatcar/disk_layout.json @@ -26,7 +26,7 @@ "3":{ "label":"USR-A", "uuid":"7130c94a-213a-4e5a-8e26-6cce9662f132", - "type":"coreos-rootfs", + "type":"flatcar-rootfs", "blocks":"2097152", "fs_blocks":"260094", "fs_type":"ext2", @@ -36,7 +36,7 @@ "4":{ "label":"USR-B", "uuid":"e03dd35c-7c2d-4a47-b3fe-27f15780a57c", - "type":"coreos-rootfs", + "type":"flatcar-rootfs", "blocks":"2097152", "fs_blocks":"262144" }, @@ -56,18 +56,18 @@ }, "7":{ "label":"OEM-CONFIG", - "type":"coreos-reserved", + "type":"flatcar-reserved", "blocks":"131072" }, "8":{ "type":"blank", - "label":"coreos-reserved", + "label":"flatcar-reserved", "blocks":"0" }, "9":{ "label":"ROOT", "fs_label":"ROOT", - "type":"coreos-resize", + "type":"flatcar-resize", "blocks":"4427776", "fs_type":"ext4", "mount":"/" @@ -77,7 +77,7 @@ "3":{ "label":"USR-A", "uuid":"7130c94a-213a-4e5a-8e26-6cce9662f132", - "type":"coreos-rootfs", + "type":"flatcar-rootfs", "blocks":"4194304", "fs_blocks":"520188", "fs_type":"ext2", @@ -87,7 +87,7 @@ "4":{ "label":"USR-B", "uuid":"e03dd35c-7c2d-4a47-b3fe-27f15780a57c", - "type":"coreos-rootfs", + "type":"flatcar-rootfs", "blocks":"4194304", "fs_blocks":"520188" }, diff --git a/matchbox/assets/coreos/disk_util b/matchbox/assets/flatcar/disk_util similarity index 99% rename from matchbox/assets/coreos/disk_util rename to matchbox/assets/flatcar/disk_util index af73df64..ad107d92 100755 --- a/matchbox/assets/coreos/disk_util +++ b/matchbox/assets/flatcar/disk_util @@ -426,7 +426,7 @@ def FormatExt(part, device): if 'fs_label' in part: tune_cmd += ['-L', part['fs_label']] - if part['type'] == 'coreos-usr': + if part['type'] == 'flatcar-usr': tune_cmd += ['-U', 'clear', '-T', '20091119110000', '-c', '0', '-i', '0', # Disable auto fsck diff --git a/matchbox/assets/coreos/coreos-install b/matchbox/assets/flatcar/flatcar-install similarity index 93% rename from matchbox/assets/coreos/coreos-install rename to matchbox/assets/flatcar/flatcar-install index 5befd150..a30174b7 100755 --- a/matchbox/assets/coreos/coreos-install +++ b/matchbox/assets/flatcar/flatcar-install @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2013 The CoreOS Authors. All rights reserved. +# Copyright (c) 2013 The Flatcar Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -16,18 +16,18 @@ which gpg >/dev/null || { echo 'Missing gpg!' >&2 ; exit 1 ; } # Everything we do should be user-access only! umask 077 -if grep -q "^ID=coreos$" /etc/os-release; then +if grep -q "^ID=flatcar$" /etc/os-release; then source /etc/os-release - [[ -f /usr/share/coreos/update.conf ]] && source /usr/share/coreos/update.conf - [[ -f /etc/coreos/update.conf ]] && source /etc/coreos/update.conf + [[ -f /usr/share/flatcar/update.conf ]] && source /usr/share/flatcar/update.conf + [[ -f /etc/flatcar/update.conf ]] && source /etc/flatcar/update.conf fi # Fall back on the current stable if os-release isn't useful : ${VERSION_ID:=current} CHANNEL_ID=${GROUP:-stable} -if [[ -e /usr/share/coreos/release ]]; then - BOARD=$(gawk --field-separator '=' '/COREOS_RELEASE_BOARD=/ { print $2 }' /usr/share/coreos/release) +if [[ -e /usr/share/flatcar/release ]]; then + BOARD=$(gawk --field-separator '=' '/FLATCAR_RELEASE_BOARD=/ { print $2 }' /usr/share/flatcar/release) fi BOARD=${BOARD:-"amd64-usr"} @@ -42,9 +42,9 @@ done USAGE="Usage: $0 [-V version] [-d /dev/device] Options: - -d DEVICE Install CoreOS to the given device. + -d DEVICE Install Flatcar to the given device. -V VERSION Version to install (e.g. current) [default: ${VERSION_ID}] - -B BOARD CoreOS board to use [default: ${BOARD}] + -B BOARD Flatcar board to use [default: ${BOARD}] -C CHANNEL Release channel to use (e.g. beta) [default: ${CHANNEL_ID}] -o OEM OEM type to install (e.g. ami) [default: ${OEM_ID:-(none)}] -c CLOUD Insert a cloud-init config to be executed on boot. @@ -55,13 +55,13 @@ Options: -n Copy generated network units to the root partition. -h This ;-) -This tool installs CoreOS on a block device. If you PXE booted CoreOS on a +This tool installs Flatcar on a block device. If you PXE booted Flatcar on a machine then use this tool to make a permanent install. " # Image signing key: # pub 4096R/93D2DCB4 2013-09-06 -# uid [ unknown] CoreOS Buildbot (Offical Builds) +# uid [ unknown] Flatcar Buildbot (Offical Builds) # sub 4096R/74E7E361 2013-09-06 [expired: 2014-09-06] # sub 4096R/E5676EFC 2014-09-08 [expired: 2015-09-08] # sub 4096R/1CB5FA26 2015-08-31 [expires: 2017-08-30] @@ -359,13 +359,13 @@ if [[ -n "${CLOUDINIT}" ]]; then exit 1 fi - if type -P coreos-cloudinit >/dev/null; then - if ! coreos-cloudinit -from-file="${CLOUDINIT}" -validate; then + if type -P flatcar-cloudinit >/dev/null; then + if ! flatcar-cloudinit -from-file="${CLOUDINIT}" -validate; then echo "$0: Cloud config file (${CLOUDINIT}) is not valid." >&2 exit 1 fi else - echo "$0: coreos-cloudinit not found. Could not validate config. Continuing..." >&2 + echo "$0: flatcar-cloudinit not found. Could not validate config. Continuing..." >&2 fi fi @@ -377,9 +377,9 @@ if [[ -n "${IGNITION}" ]]; then fi if [[ -n "${OEM_ID}" ]]; then - IMAGE_NAME="coreos_production_${OEM_ID}_image.bin.bz2" + IMAGE_NAME="flatcar_production_${OEM_ID}_image.bin.bz2" else - IMAGE_NAME="coreos_production_image.bin.bz2" + IMAGE_NAME="flatcar_production_image.bin.bz2" fi # for compatibility with old versions that didn't support channels @@ -389,19 +389,19 @@ if [[ "${VERSION_ID}" =~ ^(alpha|beta|stable)$ ]]; then fi if [[ -z "${BASE_URL}" ]]; then - BASE_URL="https://${CHANNEL_ID}.release.core-os.net/${BOARD}" + BASE_URL="https://${CHANNEL_ID}.release.flatcar-linux.net/${BOARD}" fi # if the version is "current", resolve the actual version number if [[ "${VERSION_ID}" == "current" ]]; then VERSIONTXT_URL="${BASE_URL}/${VERSION_ID}/version.txt" VERSION_ID=$(wget --quiet -O - "${VERSIONTXT_URL}" | \ - gawk --field-separator '=' '/COREOS_VERSION=/ { print $2 }' ||:) + gawk --field-separator '=' '/FLATCAR_VERSION=/ { print $2 }' ||:) if [[ -z "${VERSION_ID}" ]]; then echo "$0: version.txt unavailable: ${VERSIONTXT_URL}" >&2 exit 1 fi - echo "Current version of CoreOS ${CHANNEL_ID} is ${VERSION_ID}" + echo "Current version of Flatcar ${CHANNEL_ID} is ${VERSION_ID}" fi IMAGE_URL="${BASE_URL}/${VERSION_ID}/${IMAGE_NAME}" @@ -419,7 +419,7 @@ if ! wget --spider --quiet "${SIG_URL}"; then fi # Pre-flight checks pass, lets get this party started! -WORKDIR=$(mktemp --tmpdir -d coreos-install.XXXXXXXXXX) +WORKDIR=$(mktemp --tmpdir -d flatcar-install.XXXXXXXXXX) trap "error_output ; rm -rf '${WORKDIR}'" EXIT # Setup GnuPG for verifying the image signature @@ -470,8 +470,8 @@ if [[ -n "${CLOUDINIT}" ]] || [[ -n "${COPY_NET}" ]]; then if [[ -n "${CLOUDINIT}" ]]; then echo "Installing cloud-config..." - mkdir -p "${WORKDIR}/rootfs/var/lib/coreos-install" - cp "${CLOUDINIT}" "${WORKDIR}/rootfs/var/lib/coreos-install/user_data" + mkdir -p "${WORKDIR}/rootfs/var/lib/flatcar-install" + cp "${CLOUDINIT}" "${WORKDIR}/rootfs/var/lib/flatcar-install/user_data" fi if [[ -n "${COPY_NET}" ]]; then @@ -494,8 +494,8 @@ if [[ -n "${IGNITION}" ]]; then trap "error_output ; umount '${WORKDIR}/oemfs' && rm -rf '${WORKDIR}'" EXIT echo "Installing Ignition config ${IGNITION}..." - cp "${IGNITION}" "${WORKDIR}/oemfs/coreos-install.json" - echo 'set linux_append="$linux_append coreos.config.url=oem:///coreos-install.json"' >> "${WORKDIR}/oemfs/grub.cfg" + cp "${IGNITION}" "${WORKDIR}/oemfs/flatcar-install.json" + echo 'set linux_append="$linux_append flatcar.config.url=oem:///flatcar-install.json"' >> "${WORKDIR}/oemfs/grub.cfg" umount "${WORKDIR}/oemfs" trap "error_output ; rm -rf '${WORKDIR}'" EXIT @@ -504,4 +504,4 @@ fi rm -rf "${WORKDIR}" trap - EXIT -echo "Success! CoreOS ${CHANNEL_ID} ${VERSION_ID}${OEM_ID:+ (${OEM_ID})} is installed on ${DEVICE}" +echo "Success! Flatcar ${CHANNEL_ID} ${VERSION_ID}${OEM_ID:+ (${OEM_ID})} is installed on ${DEVICE}" diff --git a/matchbox/assets/coreos/coreos-metadata-sshkeys@.service b/matchbox/assets/flatcar/flatcar-metadata-sshkeys@.service similarity index 62% rename from matchbox/assets/coreos/coreos-metadata-sshkeys@.service rename to matchbox/assets/flatcar/flatcar-metadata-sshkeys@.service index 4931708b..665ac35a 100644 --- a/matchbox/assets/coreos/coreos-metadata-sshkeys@.service +++ b/matchbox/assets/flatcar/flatcar-metadata-sshkeys@.service @@ -1,5 +1,5 @@ [Unit] -Description=CoreOS Metadata Agent (SSH Keys) +Description=Flatcar Metadata Agent (SSH Keys) [Service] Type=oneshot @@ -7,4 +7,4 @@ ExecStart=/usr/bin/coreos-metadata -provider ec2 --ssh-keys=%i [Install] DefaultInstance=core -RequiredBy=multi-user.target \ No newline at end of file +RequiredBy=multi-user.target diff --git a/matchbox/assets/flatcar/oem-cloudinit.service b/matchbox/assets/flatcar/oem-cloudinit.service new file mode 100644 index 00000000..443d0fba --- /dev/null +++ b/matchbox/assets/flatcar/oem-cloudinit.service @@ -0,0 +1,6 @@ +[Service] +Type=oneshot +ExecStart=/usr/bin/flatcar-cloudinit --oem=ec2-compat + +[Install] +WantedBy=multi-user.target diff --git a/matchbox/assets/coreos/role-policy.json b/matchbox/assets/flatcar/role-policy.json similarity index 100% rename from matchbox/assets/coreos/role-policy.json rename to matchbox/assets/flatcar/role-policy.json diff --git a/matchbox/assets/coreos/trust-policy.json b/matchbox/assets/flatcar/trust-policy.json similarity index 100% rename from matchbox/assets/coreos/trust-policy.json rename to matchbox/assets/flatcar/trust-policy.json diff --git a/matchbox/ignition/discovery.yaml b/matchbox/ignition/discovery.yaml index 541369a2..0e1be455 100644 --- a/matchbox/ignition/discovery.yaml +++ b/matchbox/ignition/discovery.yaml @@ -153,7 +153,7 @@ storage: #test -b /dev/sdb || { # echo "We should have at least 2 drives: sda + sdb: exiting to avoid destroying data drive" # ls -l /dev/sd* - # curl -f -XPOST "${API_URI}/lifecycle/coreos-install/fail/${QUERY}" + # curl -f -XPOST "${API_URI}/lifecycle/flatcar-install/fail/${QUERY}" # exit 2 #} @@ -200,20 +200,20 @@ storage: done udevadm settle - coreos-install -d /dev/sda -V current -C stable -i ${NEW_IGNITION} \ - {{if index . "coreos_install_base_url"}} -b {{.coreos_install_base_url}}{{end}} || { + flatcar-install -d /dev/sda -V current -C stable -i ${NEW_IGNITION} \ + {{if index . "flatcar_install_base_url"}} -b {{.flatcar_install_base_url}}{{end}} || { curl -f -XPOST \ - "${API_URI}/lifecycle/coreos-install/fail/${QUERY}" + "${API_URI}/lifecycle/flatcar-install/fail/${QUERY}" exit 2 } - curl -f -XPOST "${API_URI}/lifecycle/coreos-install/success/${QUERY}" + curl -f -XPOST "${API_URI}/lifecycle/flatcar-install/success/${QUERY}" sync systemctl reboot fi sleep ${TIMER} done - - path: /etc/coreos/update.conf + - path: /etc/flatcar/update.conf mode: 0644 filesystem: root contents: @@ -231,7 +231,7 @@ storage: "stage1-images": "/usr/lib/rkt/stage1-images" } - - path: /etc/rkt/stage1.d/coreos.json + - path: /etc/rkt/stage1.d/flatcar.json filesystem: root mode: 0644 contents: @@ -240,7 +240,7 @@ storage: "rktKind": "stage1", "rktVersion": "v1", "name": "coreos.com/rkt/stage1-coreos", - "version": "v1.27.0", + "version": "v1.29.0", "location": "/usr/lib/rkt/stage1-images/stage1-coreos.aci" } @@ -253,4 +253,4 @@ passwd: {{ range $element := .ssh_authorized_keys }} - {{$element}} {{end}} -{{end}} \ No newline at end of file +{{end}} diff --git a/matchbox/ignition/etcd-member-kubernetes-control-plane.yaml b/matchbox/ignition/etcd-member-kubernetes-control-plane.yaml index e996f7a7..5fcbf9a9 100644 --- a/matchbox/ignition/etcd-member-kubernetes-control-plane.yaml +++ b/matchbox/ignition/etcd-member-kubernetes-control-plane.yaml @@ -9,7 +9,7 @@ systemd: enable: false mask: true - - name: coreos-metadata-sshkeys@.service + - name: flatcar-metadata-sshkeys@.service enable: false mask: true @@ -1021,7 +1021,7 @@ storage: "stage1-images": "/usr/lib/rkt/stage1-images" } - - path: /etc/rkt/stage1.d/coreos.json + - path: /etc/rkt/stage1.d/flatcar.json filesystem: root mode: 0644 contents: @@ -1030,7 +1030,7 @@ storage: "rktKind": "stage1", "rktVersion": "v1", "name": "coreos.com/rkt/stage1-coreos", - "version": "v1.27.0", + "version": "v1.29.0", "location": "/usr/lib/rkt/stage1-images/stage1-coreos.aci" } @@ -1114,7 +1114,7 @@ storage: {{end}} {{end}} - - path: /etc/coreos/update.conf + - path: /etc/flatcar/update.conf mode: 0644 filesystem: root contents: @@ -1351,7 +1351,7 @@ storage: curl -f {{.api_uri}}/healthz STATUS=$(curl -f -XPOST "{{.api_uri}}/lifecycle/ignition/{{.request.raw_query}}" \ - -d @/usr/share/oem/coreos-install.json \ + -d @/usr/share/oem/flatcar-install.json \ -H "Content-Type: application/json" \ -w "%{http_code}" -o /dev/null) @@ -1374,8 +1374,8 @@ storage: set -xe - curl -f "{{.api_uri}}/ignition?{{.request.raw_query}}" -o /tmp/coreos-install.json - cat /tmp/coreos-install.json | jq -e . > /dev/null + curl -f "{{.api_uri}}/ignition?{{.request.raw_query}}" -o /tmp/flatcar-install.json + cat /tmp/flatcar-install.json | jq -e . > /dev/null STRATEGY=$(curl -f "{{.api_uri}}/lifecycle/rolling/{{.request.raw_query}}" | jq -re .strategy ) || { exit 0 @@ -1411,11 +1411,11 @@ storage: if [ ${STRATEGY} == "kexec" ] then kexec --reuse-cmdline \ - --append="coreos.first_boot=1 coreos.randomize_disk_guid=${DISK_GUID}" \ + --append="flatcar.first_boot=1 flatcar.randomize_disk_guid=${DISK_GUID}" \ -l /usr/boot/vmlinuz fi - cp -v /tmp/coreos-install.json /usr/share/oem/coreos-install.json + cp -v /tmp/flatcar-install.json /usr/share/oem/flatcar-install.json systemctl ${STRATEGY} diff --git a/matchbox/ignition/kubernetes-node.yaml b/matchbox/ignition/kubernetes-node.yaml index bfe5373d..5a79acde 100644 --- a/matchbox/ignition/kubernetes-node.yaml +++ b/matchbox/ignition/kubernetes-node.yaml @@ -9,7 +9,7 @@ systemd: enable: false mask: true - - name: coreos-metadata-sshkeys@.service + - name: flatcar-metadata-sshkeys@.service enable: false mask: true @@ -461,7 +461,7 @@ storage: "stage1-images": "/usr/lib/rkt/stage1-images" } - - path: /etc/rkt/stage1.d/coreos.json + - path: /etc/rkt/stage1.d/flatcar.json filesystem: root mode: 0644 contents: @@ -470,7 +470,7 @@ storage: "rktKind": "stage1", "rktVersion": "v1", "name": "coreos.com/rkt/stage1-coreos", - "version": "v1.27.0", + "version": "v1.29.0", "location": "/usr/lib/rkt/stage1-images/stage1-coreos.aci" } @@ -520,7 +520,7 @@ storage: {{end}} {{end}} - - path: /etc/coreos/update.conf + - path: /etc/flatcar/update.conf mode: 0644 filesystem: root contents: @@ -599,7 +599,7 @@ storage: set -o pipefail STATUS=$(curl -f -XPOST "{{.api_uri}}/lifecycle/ignition/{{.request.raw_query}}" \ - -d @/usr/share/oem/coreos-install.json \ + -d @/usr/share/oem/flatcar-install.json \ -H "Content-Type: application/json" \ -w "%{http_code}" -o /dev/null) @@ -622,8 +622,8 @@ storage: set -xe - curl -f "{{.api_uri}}/ignition?{{.request.raw_query}}" -o /tmp/coreos-install.json - cat /tmp/coreos-install.json | jq -e . > /dev/null + curl -f "{{.api_uri}}/ignition?{{.request.raw_query}}" -o /tmp/flatcar-install.json + cat /tmp/flatcar-install.json | jq -e . > /dev/null STRATEGY=$(curl -f "{{.api_uri}}/lifecycle/rolling/{{.request.raw_query}}" | jq -re .strategy ) || { exit 0 @@ -659,11 +659,11 @@ storage: if [ ${STRATEGY} == "kexec" ] then kexec --reuse-cmdline \ - --append="coreos.first_boot=1 coreos.randomize_disk_guid=${DISK_GUID}" \ + --append="flatcar.first_boot=1 flatcar.randomize_disk_guid=${DISK_GUID}" \ -l /usr/boot/vmlinuz fi - cp -v /tmp/coreos-install.json /usr/share/oem/coreos-install.json + cp -v /tmp/flatcar-install.json /usr/share/oem/flatcar-install.json systemctl ${STRATEGY} diff --git a/misc/first_boot.txt b/misc/first_boot.txt index ffb68ad2..bbe50950 100644 --- a/misc/first_boot.txt +++ b/misc/first_boot.txt @@ -1,6 +1,6 @@ rootflags=rw mount.usrflags=ro -BOOT_IMAGE=/coreos/vmlinuz-a +BOOT_IMAGE=/flatcar/vmlinuz-a mount.usr=/dev/mapper/usr verity.usr=PARTUUID=7130c94a-213a-4e5a-8e26-6cce9662f132 rootflags=rw @@ -9,7 +9,7 @@ consoleblank=0 root=LABEL=ROOT console=ttyS0,115200n8 console=tty0 -coreos.first_boot=1 -coreos.randomize_disk_guid=00000000-0000-0000-0000-000000000001 -coreos.config.url=oem:///coreos-install.json -verity.usrhash=786d546775394eb9213e5d10c122acba0f55208c84adbd34c1133ddbca870b98 \ No newline at end of file +flatcar.first_boot=1 +flatcar.randomize_disk_guid=00000000-0000-0000-0000-000000000001 +flatcar.config.url=oem:///flatcar-install.json +verity.usrhash=786d546775394eb9213e5d10c122acba0f55208c84adbd34c1133ddbca870b98 diff --git a/misc/other_boot.txt b/misc/other_boot.txt index 91c2796f..9e5d3cd0 100644 --- a/misc/other_boot.txt +++ b/misc/other_boot.txt @@ -1,6 +1,6 @@ rootflags=rw mount.usrflags=ro -BOOT_IMAGE=/coreos/vmlinuz-a +BOOT_IMAGE=/flatcar/vmlinuz-a mount.usr=/dev/mapper/usr verity.usr=PARTUUID=7130c94a-213a-4e5a-8e26-6cce9662f132 rootflags=rw @@ -9,5 +9,5 @@ consoleblank=0 root=LABEL=ROOT console=ttyS0,115200n8 console=tty0 -coreos.config.url=oem:///coreos-install.json -verity.usrhash=786d546775394eb9213e5d10c122acba0f55208c84adbd34c1133ddbca870b98 \ No newline at end of file +flatcar.config.url=oem:///flatcar-install.json +verity.usrhash=786d546775394eb9213e5d10c122acba0f55208c84adbd34c1133ddbca870b98 diff --git a/runtime/Makefile b/runtime/Makefile index 5aebcb6d..ea314b5f 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -22,7 +22,7 @@ DGR=$(DGR_DIR)/dgr DGR_DOWNLOAD_TAR=$(DGR_DIR)/$(DGR_TAR) # RKT -RKT_VERSION=v1.27.0 +RKT_VERSION=v1.29.0 RKT_GITHUB_DOWNLOAD=https://github.com/coreos/rkt/releases/download RKT_TAR=rkt-$(RKT_VERSION).tar.gz RKT_GITHUB=$(RKT_GITHUB_DOWNLOAD)/$(RKT_VERSION)/$(RKT_TAR) diff --git a/runtime/config.py b/runtime/config.py index 4a27de18..021e5aa6 100755 --- a/runtime/config.py +++ b/runtime/config.py @@ -29,7 +29,7 @@ def rkt_stage1_d(path): "rktKind": "stage1", "rktVersion": "v1", "name": "coreos.com/rkt/stage1-coreos", - "version": "v1.27.0", + "version": "v1.29.0", "location": "%s/rkt/stage1-coreos.aci" % path } try: @@ -37,7 +37,7 @@ def rkt_stage1_d(path): except OSError: pass - with open("%s/stage1.d/coreos.json" % path, "w") as f: + with open("%s/stage1.d/flatcar.json" % path, "w") as f: json.dump(data, f) diff --git a/validate.py b/validate.py index d243831b..9a63ac88 100755 --- a/validate.py +++ b/validate.py @@ -35,16 +35,16 @@ def test_enjoliver_agent(self): list_dir = os.listdir(rule) self.assertIn("enjoliver-agent", list_dir) - def test_coreos(self): - rule = "%s/%s/serve" % (self.assets, self.test_coreos.__name__.replace("test_", "")) + def test_flatcar(self): + rule = "%s/%s/serve" % (self.assets, self.test_flatcar.__name__.replace("test_", "")) list_dir = os.listdir(rule) - self.assertIn("coreos_production_image.bin.bz2", list_dir) - self.assertIn("coreos_production_image.bin.bz2.sig", list_dir) - self.assertIn("coreos_production_image_verity.txt", list_dir) - self.assertIn("coreos_production_pxe.vmlinuz", list_dir) - self.assertIn("coreos_production_pxe.vmlinuz.sig", list_dir) - self.assertIn("coreos_production_pxe_image.cpio.gz", list_dir) - self.assertIn("coreos_production_pxe_image.cpio.gz.sig", list_dir) + self.assertIn("flatcar_production_image.bin.bz2", list_dir) + self.assertIn("flatcar_production_image.bin.bz2.sig", list_dir) + self.assertIn("flatcar_production_image_verity.txt", list_dir) + self.assertIn("flatcar_production_pxe.vmlinuz", list_dir) + self.assertIn("flatcar_production_pxe.vmlinuz.sig", list_dir) + self.assertIn("flatcar_production_pxe_image.cpio.gz", list_dir) + self.assertIn("flatcar_production_pxe_image.cpio.gz.sig", list_dir) self.assertIn("version.txt", list_dir) @@ -138,7 +138,7 @@ class TestValidateRuntime(unittest.TestCase): def test_rkt(self): self.assertTrue(os.path.isfile(os.path.join(self.runtime_d, "rkt", "rkt"))) - self.assertTrue(os.path.isfile(os.path.join(self.runtime_d, "stage1.d", "coreos.json"))) + self.assertTrue(os.path.isfile(os.path.join(self.runtime_d, "stage1.d", "flatcar.json"))) self.assertTrue(os.path.isfile(os.path.join(self.runtime_d, "paths.d", "paths.json"))) def test_helm(self):