rancher/coreos-cloudinit

Name: coreos-cloudinit

Owner: Rancher

Description: null

Created: 2015-02-19 19:02:22.0

Updated: 2016-07-01 17:36:58.0

Pushed: 2017-02-22 23:01:19.0

Homepage: null

Size: 1966

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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:

ud-config

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

s:
name: core
passwd: $1$allJZawX$00S5T756I5PGdQga5qhqv1

e_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:

in/bash

 '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…

ud-config
os:
etcd:
    addr: $public_ipv4:4001
    peer-addr: $private_ipv4:7001

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

ud-config
os:
etcd:
    addr: 203.0.113.29:4001
    peer-addr: 192.0.2.13:7001

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.