Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • v2.28.0
  • v2.27.0
  • v2.25.1
  • v2.24.3
  • v2.26.0
  • v2.24.2
  • v2.25.0
  • v2.24.1
  • v2.22.2
  • v2.23.3
  • v2.24.0
  • v2.23.2
  • v2.23.1
  • v2.23.0
  • v2.22.1
  • v2.22.0
  • v2.21.0
  • v2.20.0
  • v2.19.1
  • v2.18.2
21 results

fcos.md

Blame
    • spaced's avatar
      9c3b573f
      Cleanup fedora coreos with crio container (#5887) · 9c3b573f
      spaced authored
      * fix upgrade of crio on fcos
      - update documents
      
      * install conntrack required by kube-proxy
      - like commit 48c41bcb
      
      * enable fedora modular repo for crio
      
      * allow to override crio configuration
      - set cgroup manager same to kubelet_cgroup_driver if defined
      - path of seccomp_profile depends on distribution
      
      * allow to override crio configuration
      - fix path for ubuntu
      
      * allow to override crio configuration
      - fix cni path for fcos
      Cleanup fedora coreos with crio container (#5887)
      spaced authored
      * fix upgrade of crio on fcos
      - update documents
      
      * install conntrack required by kube-proxy
      - like commit 48c41bcb
      
      * enable fedora modular repo for crio
      
      * allow to override crio configuration
      - set cgroup manager same to kubelet_cgroup_driver if defined
      - path of seccomp_profile depends on distribution
      
      * allow to override crio configuration
      - fix path for ubuntu
      
      * allow to override crio configuration
      - fix cni path for fcos

    Fedora CoreOS

    Tested with stable version 31.20200223.3.0.

    Because package installation with rpm-ostree requires a reboot, playbook may fail while bootstrap. Restart playbook again.

    Containers

    Tested with

    • docker
    • crio

    docker

    OS base packages contains docker.

    cri-o

    To use cri-o disable docker service with ignition:

    #workaround, see https://github.com/coreos/fedora-coreos-tracker/issues/229
    systemd:
      units:
        - name: docker.service
          enabled: false
          contents: |
            [Unit]
            Description=disable docker
    
            [Service]
    
            [Install]
            WantedBy=multi-user.target

    Network

    calico

    To use calico create sysctl file with ignition:

    files:
        - path: /etc/sysctl.d/reverse-path-filter.conf
          contents:
            inline: |
              net.ipv4.conf.all.rp_filter=1

    libvirt setup

    Prepare

    Prepare ignition and serve via http (a.e. python -m http.server )

    {
      "ignition": {
         "version": "3.0.0"
      },
    
      "passwd": {
        "users": [
          {
            "name": "ansibleUser",
            "sshAuthorizedKeys": [
              "ssh-rsa ..publickey.."
            ],
            "groups": [ "wheel" ]
          }
        ]
      }
    }

    create guest

    fcos_version=31.20200223.3.0
    kernel=https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/${fcos_version}/x86_64/fedora-coreos-${fcos_version}-live-kernel-x86_64
    initrd=https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/${fcos_version}/x86_64/fedora-coreos-${fcos_version}-live-initramfs.x86_64.img
    ignition_url=http://mywebserver/fcos.ign
    kernel_args="ip=dhcp rd.neednet=1 console=tty0 coreos.liveiso=/ console=ttyS0 coreos.inst.install_dev=/dev/sda coreos.inst.stream=stable coreos.inst.ignition_url=${ignition_url}"
    sudo virt-install --name ${machine_name} --ram 4048 --graphics=none --vcpus 2 --disk size=20 \
                    --network bridge=virbr0 \
                    --install kernel=${kernel},initrd=${initrd},kernel_args_overwrite=yes,kernel_args="${kernel_args}"