You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.0 KiB

  1. # Fedora CoreOS
  2. Tested with stable version 31.20200223.3.0.
  3. Because package installation with `rpm-ostree` requires a reboot, playbook may fail while bootstrap.
  4. Restart playbook again.
  5. ## Containers
  6. Tested with
  7. - docker
  8. - crio
  9. ### docker
  10. OS base packages contains docker.
  11. ### cri-o
  12. To use `cri-o` disable docker service with ignition:
  13. ```yaml
  14. #workaround, see https://github.com/coreos/fedora-coreos-tracker/issues/229
  15. systemd:
  16. units:
  17. - name: docker.service
  18. enabled: false
  19. contents: |
  20. [Unit]
  21. Description=disable docker
  22. [Service]
  23. [Install]
  24. WantedBy=multi-user.target
  25. ```
  26. ## Network
  27. ### calico
  28. To use calico create sysctl file with ignition:
  29. ```yaml
  30. files:
  31. - path: /etc/sysctl.d/reverse-path-filter.conf
  32. contents:
  33. inline: |
  34. net.ipv4.conf.all.rp_filter=1
  35. ```
  36. ## libvirt setup
  37. ### Prepare
  38. Prepare ignition and serve via http (a.e. python -m http.server )
  39. ```json
  40. {
  41. "ignition": {
  42. "version": "3.0.0"
  43. },
  44. "passwd": {
  45. "users": [
  46. {
  47. "name": "ansibleUser",
  48. "sshAuthorizedKeys": [
  49. "ssh-rsa ..publickey.."
  50. ],
  51. "groups": [ "wheel" ]
  52. }
  53. ]
  54. }
  55. }
  56. ```
  57. ### create guest
  58. ```shell script
  59. fcos_version=31.20200223.3.0
  60. kernel=https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/${fcos_version}/x86_64/fedora-coreos-${fcos_version}-live-kernel-x86_64
  61. initrd=https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/${fcos_version}/x86_64/fedora-coreos-${fcos_version}-live-initramfs.x86_64.img
  62. ignition_url=http://mywebserver/fcos.ign
  63. 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}"
  64. sudo virt-install --name ${machine_name} --ram 4048 --graphics=none --vcpus 2 --disk size=20 \
  65. --network bridge=virbr0 \
  66. --install kernel=${kernel},initrd=${initrd},kernel_args_overwrite=yes,kernel_args="${kernel_args}"
  67. ```