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.

76 lines
1.8 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. ## libvirt setup
  27. ### Prepare
  28. Prepare ignition and serve via http (a.e. python -m SimpleHTTPServer )
  29. ```json
  30. {
  31. "ignition": {
  32. "version": "3.0.0"
  33. },
  34. "passwd": {
  35. "users": [
  36. {
  37. "name": "adi",
  38. "passwordHash": "$1$.RGu8J4x$U7uxcOg/eotTEIRxhk62I0",
  39. "sshAuthorizedKeys": [
  40. "ssh-rsa ..fillyouruser"
  41. ],
  42. "groups": [ "wheel" ]
  43. }
  44. ]
  45. }
  46. }
  47. ```
  48. ### create guest
  49. ```shell script
  50. fcos_version=31.20200223.3.0
  51. kernel=https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/${fcos_version}/x86_64/fedora-coreos-${fcos_version}-live-kernel-x86_64
  52. initrd=https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/${fcos_version}/x86_64/fedora-coreos-${fcos_version}-live-initramfs.x86_64.img
  53. ignition_url=http://mywebserver/fcos.ign
  54. 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}"
  55. sudo virt-install --name ${machine_name} --ram 4048 --graphics=none --vcpus 2 --disk size=20 \
  56. --network bridge=virbr0 \
  57. --install kernel=${kernel},initrd=${initrd},kernel_args_overwrite=yes,kernel_args="${kernel_args}"
  58. ```