How to deploy my own tools directly on CoreOS

I have several tools that need to be directly deployed on CoreOS, involving the /usr directory, but the /usr directory is read-only. How can I deploy them?

In addition, I have some questions about configuration synchronization:

  1. If a CoreOS node is destroyed and rebuilt, how can I synchronize the old node’s configuration to the new node?
  2. Can configuration be synchronized between CoreOS nodes in a k8s cluster?
  3. If a node is upgraded, how is the configuration synchronized?

Hello @jackchan-x and welcome to :fedora: !

I’d recommend checking out the FAQ section of the Fedora CoreOS Documentation if you haven’t already.

1 Like

You can deploy binaries in /usr/local/bin which is writable on the nodes.

There is no specific configuration sync mechanism in Fedora CoreOS. You get want you configured in the Ignition config. If you update the config and re-provision a node then you will get the updated config.

Otherwise you need another mechanisms to update the node configs.

1 Like

Thank you for your reply. I have already read the documentation and FAQ, and only found this : “The directory /etc may be changed by deployments, but will not override user-made changes.” Since /var is shared, there is no need for synchronization. However, each deployment has its own /etc. If I modify the configuration in the /etc of the old deployment, how can the changes be synchronized to the new deployment?

Thanks. I’m also reading the Bottlerocket documentation and found that Bottlerocket has a data-store component, which can solve the configs synchronization during node upgrades. However, I haven’t seen any mechanism for configuration synchronization between nodes.

According to the OSTree docs, each deployment has its own writable copy of the configuration store /etc. On upgrade, OSTree will perform a basic 3-way diff, and apply any local changes to the new copy, while leaving the old untouched.

1 Like

Deployment here means “version of the OS on a system”. When you edit a file in /etc, the change will stick on system update and will not be reverted.

Thanks. I think I should read the OSTree documentation to learn about the 3-way merge mechanism.

1 Like


Here are some links in case you haven’t found them yet:

Hello, I have read the 3-way merge code in OSTree, and I think the actual effect of the 3-way merge is the same as overlayfs mounting. Is that correct?