User Tools

Site Tools


k8s:linux_vm:set_up_flatcar-linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
k8s:linux_vm:set_up_flatcar-linux [2023/10/19 15:49] admink8s:linux_vm:set_up_flatcar-linux [2023/11/14 22:43] (current) admin
Line 22: Line 22:
  
 Upload a version of flatcar_production_vmware_ova_image.vmdk to one of the VM hosts. Instead of [current](https://stable.release.flatcar-linux.net/amd64-usr/current/) it might be better to upload Upload a version of flatcar_production_vmware_ova_image.vmdk to one of the VM hosts. Instead of [current](https://stable.release.flatcar-linux.net/amd64-usr/current/) it might be better to upload
-a [previous stable release](https://stable.release.flatcar-linux.net/amd64-usr/) and check that updating works. For example [3033.2.0](https://stable.release.flatcar-linux.net/amd64-usr/3033.2.0/)+a [previous stable release](https://stable.release.flatcar-linux.net/amd64-usr/) and check that updating works. For example [3510.2.8](https://stable.release.flatcar-linux.net/amd64-usr/3510.2.8/)
 Remove any disks. Add the `flatcar_production_vmware_ova_image.vmdk` as the first disk (system, sda) and add a second thin provisionen 230 GB disk (container ephemeral, sdb). Remove any disks. Add the `flatcar_production_vmware_ova_image.vmdk` as the first disk (system, sda) and add a second thin provisionen 230 GB disk (container ephemeral, sdb).
  
Line 42: Line 42:
 ```yaml ```yaml
 variant: flatcar variant: flatcar
-version: 1.1.0+version: 1.0.0
 passwd: passwd:
   users:   users:
Line 54: Line 54:
 storage: storage:
   filesystems:   filesystems:
-    - device: /dev/disk/by-label/OEM 
-      format: btrfs 
-      label: OEM 
-      path: /usr/share/oem 
     - device: /dev/sdb     - device: /dev/sdb
       format: xfs       format: xfs
       wipe_filesystem: true       wipe_filesystem: true
       label: cont-ephemer       label: cont-ephemer
-      with_mount_unit: true 
-      path: /var/lib/rancher 
   files:   files:
-    - path: /usr/share/oem 
-      mode: 0644 
-      contents: 
-        inline: | 
-          set oem_id="vmware" # or something else like 
-          set linux_append="" 
     - path: /etc/hostname     - path: /etc/hostname
-      filesystem: root 
       mode: 0644       mode: 0644
       contents:       contents:
         inline: acdh-clusterx         inline: acdh-clusterx
 +      overwrite: true
     # change IP and MAC addresses for other nodes!     # change IP and MAC addresses for other nodes!
     - path: /etc/systemd/network/10-ens1.network     - path: /etc/systemd/network/10-ens1.network
Line 86: Line 74:
           Address=10.3.6.xx/24           Address=10.3.6.xx/24
           Gateway=10.3.6.1           Gateway=10.3.6.1
-          DNS=192.168.1.250+          DNS=192.168.1.1
           Domains=servants.priv           Domains=servants.priv
-          NTP=192.168.1.250+#          NTP=192.168.1.250
     - path: /etc/systemd/network/10-ens2.network     - path: /etc/systemd/network/10-ens2.network
       contents:       contents:
Line 98: Line 86:
           Address=10.6.16.xx/24           Address=10.6.16.xx/24
     - path: /etc/flatcar/update.conf     - path: /etc/flatcar/update.conf
-      content:+      contents:
         inline: |         inline: |
           REBOOT_STRATEGY="reboot"           REBOOT_STRATEGY="reboot"
           LOCKSMITHD_REBOOT_WINDOW_START="Thu 04:00"           LOCKSMITHD_REBOOT_WINDOW_START="Thu 04:00"
           LOCKSMITHD_REBOOT_WINDOW_LENGTH="1h"           LOCKSMITHD_REBOOT_WINDOW_LENGTH="1h"
 +      overwrite: true
 systemd: systemd:
   units:   units:
-    # Ensure docker starts automatically instead of being socket-activated 
-    - name: docker.socket 
-      enabled: false 
     - name: update-engine.service     - name: update-engine.service
       enabled: true       enabled: true
Line 114: Line 100:
     - name: systemd-timesyncd.service     - name: systemd-timesyncd.service
       enabled: true       enabled: true
-    - name: docker.service +    - name: var-lib-rancher.mount 
-      enabled: false+      enabled: true 
 +      contents: | 
 +        [Unit] 
 +        Description=Mount ephemeral to /var/lib/rancher 
 +        Before=local-fs.target 
 +        [Mount] 
 +        What=/dev/disk/by-label/cont-ephemer 
 +        Where=/var/lib/rancher 
 +        Type=xfs 
 +        [Install] 
 +        WantedBy=local-fs.target
 ``` ```
  
Line 149: Line 145:
 qemu-img create -f qcow2 -F qcow2 -b flatcar_production_qemu_image.img flatcar-linux1.qcow2 qemu-img create -f qcow2 -F qcow2 -b flatcar_production_qemu_image.img flatcar-linux1.qcow2
 chown libvirt-qemu:kvm flatcar_production_qemu_image.img flatcar-linux1.qcow2 chown libvirt-qemu:kvm flatcar_production_qemu_image.img flatcar-linux1.qcow2
 +```
 +Create the configuration (use the YAML from above)
 +```bash
 +cat acdh-clusterx.yaml | podman run --rm -i quay.io/coreos/butane:latest > /var/lib/libvirt/qemu/nvram/flatcar-linuxX-provision-ign_VARS.fd
 +sudo chown libvirt-qemu:kvm /var/lib/libvirt/qemu/nvram/flatcar-linuxX-provision-ign_VARS.fd
 +```
 +Create the virutal machine, 2 disks, the qcow2 and a rancher partition of about 20GB  
 +At the end add the following XML
 +```xml
 +  <qemu:commandline xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
 +    <qemu:arg value='-fw_cfg'/>
 +    <qemu:arg value='name=opt/org.flatcar-linux/config,file=/var/lib/libvirt/qemu/nvram/flatcar-linuxX-provision-ign_VARS.fd'/>
 +  </qemu:commandline>
 ``` ```
k8s/linux_vm/set_up_flatcar-linux.1697723380.txt.gz · Last modified: by admin