Go to file
Alex Crawford ea90e553d1 Merge pull request #282 from crawford/network
network: write network units with user units
2014-12-12 15:12:50 -08:00
config Merge pull request #283 from crawford/validate 2014-12-12 15:05:51 -08:00
datasource Merge pull request #251 from Vladimiroff/master 2014-12-01 14:52:11 -08:00
Documentation Added support for the encoding key in write_files 2014-12-09 17:35:33 -08:00
Godeps bumped version of yaml.v1 2014-12-09 07:49:59 -08:00
initialize Merge pull request #282 from crawford/network 2014-12-12 15:12:50 -08:00
network *: fix warnings from go vet 2014-10-23 11:46:08 -07:00
pkg *: fix warnings from go vet 2014-10-23 11:46:08 -07:00
system Merge pull request #282 from crawford/network 2014-12-12 15:12:50 -08:00
units units: update dependencies 2014-06-27 14:29:59 -07:00
.gitignore style(httpbackoff -> pkg): Adjusts package name to follow convention 2014-05-22 14:37:19 -04:00
.travis.yml travis: Add Go 1.4 as a test target 2014-12-11 15:29:36 -08:00
build style(httpbackoff -> pkg): Adjusts package name to follow convention 2014-05-22 14:37:19 -04:00
CONTRIBUTING.md docs: Update maintainers and contribution guide 2014-09-08 12:55:17 -07:00
coreos-cloudinit_test.go *: add license header to all source files 2014-10-17 15:36:22 -07:00
coreos-cloudinit.go coreos-cloudinit: bump to v1.0.1+git 2014-12-04 16:35:20 -08: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
MAINTAINERS docs: Update maintainers and contribution guide 2014-09-08 12:55:17 -07: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 config/validate: add new config validator 2014-11-12 16:48:57 -08: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