Coder Social home page Coder Social logo

flatcar / coreos-cloudinit Goto Github PK

View Code? Open in Web Editor NEW
17.0 13.0 10.0 2.35 MB

Simple configuration tool for Flatcar Container Linux

Home Page: https://github.com/flatcar/flatcar/issues

License: Apache License 2.0

Shell 0.29% Go 99.71%
flatcar cloud-init provision

coreos-cloudinit's Introduction

NOTE: This project overlaps in purpose with Ignition which is where most active development is taking place. However, the Flatcar Container Linux team also continues to support and maintain this project to maintain compatibility with cloudinit based environments.

coreos-cloudinit enables a user to customize Flatcar Container Linux machines by providing either a cloud-config document or an executable script through user-data.

Configuration with cloud-config

A subset of the official cloud-config spec is implemented by coreos-cloudinit. Additionally, several Flatcar-specific options have been implemented to support interacting with unit files, bootstrapping etcd clusters, and more. All supported cloud-config parameters are documented here.

The following is an example cloud-config document:

#cloud-config

coreos:
    units:
      - name: etcd.service
        command: start

users:
  - name: core
    passwd: $1$allJZawX$00S5T756I5PGdQga5qhqv1

write_files:
  - path: /etc/resolv.conf
    content: |
        nameserver 192.0.2.2
        nameserver 192.0.2.3

Executing a Script

coreos-cloudinit supports executing user-data as a script instead of parsing it as a cloud-config document. Make sure the first line of your user-data is a shebang and coreos-cloudinit will attempt to execute it:

#!/bin/bash

echo 'Hello, world!'

user-data Field Substitution

coreos-cloudinit will replace the following set of tokens in your user-data with system-generated values.

Token Description
$public_ipv4 Public IPv4 address of machine
$private_ipv4 Private IPv4 address of machine

These values are determined by Flatcar Container Linux based on the given provider on which your machine is running. Read more about provider-specific functionality in the Flatcar Container Linux OEM documentation.

For example, submitting the following user-data...

#cloud-config
coreos:
    etcd:
        addr: $public_ipv4:4001
        peer-addr: $private_ipv4:7001

...will result in this cloud-config document being executed:

#cloud-config
coreos:
    etcd:
        addr: 203.0.113.29:4001
        peer-addr: 192.0.2.13:7001

Bugs

Please use the Flatcar Container Linux issue tracker to report all bugs, issues, and feature requests.

coreos-cloudinit's People

Contributors

bcwaldon avatar brianredbeard avatar c4milo avatar chexxor avatar cnelson avatar crawford avatar eyakubovich avatar gabriel-samfira avatar glevand avatar iaguis avatar jepio avatar jonboulle avatar jrcs avatar kayrus avatar krnowak avatar marineam avatar mdlayher avatar mwhooker avatar nat-henderson avatar philips avatar polvi avatar pothos avatar richardmarshall avatar robszumski avatar sayanchowdhury avatar sethp avatar sigma avatar t-lo avatar tormath1 avatar vladimiroff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.