Go to file
Alex Crawford 033c8d352f feat(network): Add support for hwaddress
Currently only supports the ether mode of hwaddress. No immediate plans
to support ax25, ARCnet, or netrom.
2014-06-14 21:30:14 -07:00
datasource feat(config-drive): Add support for reading user-data from config-drive 2014-06-02 14:58:57 -07:00
Documentation fix(doc): Correct spacing in cloud-config.md 2014-06-02 16:49:44 -07:00
initialize fix(systemd): EnableUnitFile unit name rather than absolute destination 2014-05-26 15:16:24 -07:00
network feat(network): Add support for hwaddress 2014-06-14 21:30:14 -07:00
pkg fix(pkg): simplify exponential backoff to avoid overflows 2014-05-29 11:11:18 -07:00
system fix(network): Take down all interfaces properly 2014-06-13 20:53:59 -07:00
third_party add(netlink): import dotcloud/docker/pkg/netlink 2014-06-02 15:31:30 -07:00
units feat(systemd): Update the systemd unit files to use configdrive 2014-06-02 18:43:22 -07:00
.gitignore style(httpbackoff -> pkg): Adjusts package name to follow convention 2014-05-22 14:37:19 -04:00
.travis.yml chore(travis): Adds travis yaml file and badge in README 2014-05-16 17:09:59 -04:00
build style(httpbackoff -> pkg): Adjusts package name to follow convention 2014-05-22 14:37:19 -04:00
CONTRIBUTING.md chore(contributing): clean up CONTRIBUTING.md and split out DCO 2014-04-04 10:40:37 -07:00
coreos-cloudinit.go chore(coreos-cloudinit): bump to 0.7.4+git 2014-06-03 14:14:47 -07:00
cover feat(tests): add cover script 2014-05-10 01:42:57 -07:00
DCO chore(contributing): clean up CONTRIBUTING.md and split out DCO 2014-04-04 10:40:37 -07:00
LICENSE feat(*): initial commit 2014-01-19 12:25:11 -08:00
NOTICE feat(*): initial commit 2014-01-19 12:25:11 -08:00
README.md chore(travis): Adds travis yaml file and badge in README 2014-05-16 17:09:59 -04:00
test test(interfaces): Add tests for network conversion 2014-06-02 15:31:27 -07:00

coreos-cloudinit Build Status

coreos-cloudinit enables a user to customize CoreOS 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 CoreOS-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 CoreOS based on the given provider on which your machine is running. Read more about provider-specific functionality in the CoreOS 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