Installing RancherOS on disk with iPXE

I am trying to automate the installation of the RancherOS on a virtual machine.
The route I took involves booting the RancherOS via iPXE (which works fine) with a custom cloud-config file (generated by Foreman) and after running the ros install command.
I’m not sure how to automatically call the ros install command during iPXE boot; I looked at: and I’m thinking to run a command via a container like they does, but how to ensure that the container starts only once and not at every boot?
Is there any better way to automate the RancherOS install?

Thank you,

1 Like

I’m using a simple cloud config like that:

  - path: /opt/rancher/bin/install.yml
    permissions: "0700"
    content: |
      hostname: rancher-os
        - ... 
  - path: /opt/rancher/bin/
    permissions: "0700"
    content: |
      echo Y | sudo ros install -f -c /opt/rancher/bin/install.yml -d /dev/sda

Yep, that’s cloud config inside cloud config. The outer one is used only during first boot to install to disk. The inner one is used after install.