Code Monkey home page Code Monkey logo

Comments (12)

ajeddeloh avatar ajeddeloh commented on September 17, 2024

Fedora CoreOS uses Ignition, so you'll want to add it to the Ignition config.

from coreos-assembler.

dustymabe avatar dustymabe commented on September 17, 2024

Yep. This might help: https://coreos.com/ignition/docs/latest/examples.html#add-users

from coreos-assembler.

cdrage avatar cdrage commented on September 17, 2024

@dustymabe Are there some docs to point to modifying the Ignition file?

In this repo I see that it's hard-coded:

ks_tmp.write("""

I know that you can convert CoreOS Ignition to Cloud Config so originally this is what I did below:

For the original CoreOS, in order to add the cloud configuration I would:

mkdir -p /var/lib/libvirt/images/coreos/$NAME/openstack/latest
touch /var/lib/libvirt/images/coreos/$NAME/openstack/latest/user_data
cat <<EOF > $LIBVIRTDIR/coreos/$NAME/openstack/latest/user_data
#cloud-config

ssh_authorized_keys:
 - $MY_SSH_KEY
 - $SSH

hostname: $NAME

coreos:
    units:
      - name: 10-ens3.network
        content: |
          [Match]
          MACAddress=$MAC

          [Network]
          Address=$IP/24
          Gateway=$GATEWAY
          DNS=$DNS
EOF

Is there a similar procedure for Fedora CoreOS? I'm just at a loss here since I'm unable to find any documentation other than using coreos-assembler run

from coreos-assembler.

arithx avatar arithx commented on September 17, 2024

@cdrage In Container Linux if you passed a Cloud Config for the userdata Ignition would ignore it and enable the coreos-cloudinit systemd unit. In Fedora CoreOS there is no cloud init so you'll have to transition to an Ignition config.

As far as how to pass the userdata that remains the same as it was on Container Linux.

from coreos-assembler.

ajeddeloh avatar ajeddeloh commented on September 17, 2024

Fedora CoreOS does not (and will not) support cloudinit. Ignition is the only way to configure it. The virt-install bit you linked to just writes out the flag file that indicates whether or not it's the first boot (this get's deleted on first boot).

See the Ignition docs for more details. On Container Linux there's the config transpiler that will let you write an easier to read/write yaml file (container linux config) and transpile that to an Ignition config. We haven't built that for Fedora CoreOS yet, but a lot of it will still work anyway (no promises).

from coreos-assembler.

jlebon avatar jlebon commented on September 17, 2024

To put it in more practical terms, if you want to bring up an FCOS VM using qemu directly, you can pass e.g. -fw_cfg name=opt/com.coreos/config,file=myconfig.ign like coreos-assembler run does. If you're on a cloud provider, you'd use the "metadata" feature, e.g. openstack server create --user-data myconfig.ign or aws ec2 run-instances --user-data myconfig.ign, etc...

from coreos-assembler.

dustymabe avatar dustymabe commented on September 17, 2024

Note that coreos-assembler run does support a -i option where you can provide your own ignition config

from coreos-assembler.

cdrage avatar cdrage commented on September 17, 2024

@dustymabe @jlebon @ajeddeloh

Thanks, this helps a lot. Is it safe to say that whatever is listed here: https://coreos.com/ignition/docs/latest/supported-platforms.html is implemented in Fedora CoreOS?

At the moment I'm trying to setup Fedora CoreOS via the kernel parameter coreos.config.url

from coreos-assembler.

dustymabe avatar dustymabe commented on September 17, 2024

coreos.config.url should work for now, but we're planning to change it to ignition.config.url soon. See WIP PR here: coreos/ignition#663

from coreos-assembler.

ajeddeloh avatar ajeddeloh commented on September 17, 2024

We don't build FCOS for many platforms (yet), but Ignition should work on all those that we do build.

from coreos-assembler.

cdrage avatar cdrage commented on September 17, 2024

@ajeddeloh @dustymabe
I'm assuming editing: https://github.com/coreos/fedora-coreos-config/blob/a733e2cfb39cfc55981ad1d37c359665aece7dd3/image.ks#L36 would be the safest way to add the kernel parameters.

from coreos-assembler.

dustymabe avatar dustymabe commented on September 17, 2024

@ajeddeloh @dustymabe
I'm assuming editing: https://github.com/coreos/fedora-coreos-config/blob/a733e2cfb39cfc55981ad1d37c359665aece7dd3/image.ks#L36 would be the safest way to add the kernel parameters.

yes. if you need to add kernel parameters for ignition then you can add them there. You can alternatively crack open the resulting image and add them if that's more convenient for you for some reason. For example use something like virt-edit -a disk.qcow2 -m /dev/sda1 /grub2/grub.cfg and edit the file directly.

from coreos-assembler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.