mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-27 10:19:35 +00:00
bootcfg/storage: Read groups from groups directory
* Split config.yaml files into JSON groups files * Update examples to use folders of mountable groups files * Stop reading groups from a -config config.yaml file * Add RichGroup JSON <-> Protobuf Serialize Group
This commit is contained in:
11
CHANGES.md
11
CHANGES.md
@@ -8,14 +8,17 @@
|
||||
|
||||
#### Changes
|
||||
|
||||
* Change default `-config` path to `/etc/bootcfg.conf`
|
||||
* Rename `Spec` to `Profile`.
|
||||
* Profiles
|
||||
- Rename `Spec` to `Profile`
|
||||
- Move Profiles to JSON files under `/etc/bootcfg/profiles`
|
||||
* Groups
|
||||
- Move Groups to JSON files under `/etc/bootcfg/groups`
|
||||
- Require Group metadata to be valid JSON
|
||||
- Rename groups field `spec` to `profile`
|
||||
- Keep profiles in JSON files under `/etc/bootcfg/profiles`
|
||||
* Discontinue reading groups from the `-config` file. Remove the flag.
|
||||
* Change default `-data-path` to `/etc/bootcfg`
|
||||
* Change default `-assets-path` to `/var/bootcfg`
|
||||
* Remove HTTP `/spec/id` JSON endpoint
|
||||
* Require `metadata` values in the YAML config to be strings, lists of strings, or nested maps of strings. Ignore and log other values.
|
||||
|
||||
#### New Examples
|
||||
|
||||
|
||||
@@ -33,12 +33,12 @@ Alternately, build a Docker image `coreos/bootcfg:latest`.
|
||||
|
||||
Run the binary.
|
||||
|
||||
./bin/bootcfg -address=0.0.0.0:8080 -log-level=debug -data-path examples/ -config examples/etcd-rkt.yaml
|
||||
./bin/bootcfg -address=0.0.0.0:8080 -log-level=debug -data-path examples -assets-path assets
|
||||
|
||||
Run the ACI with rkt on `metal0`.
|
||||
|
||||
sudo rkt --insecure-options=image run --net=metal0:IP=172.15.0.2 --mount volume=assets,target=/var/bootcfg --volume assets,kind=host,source=$PWD/assets --mount volume=data,target=/etc/bootcfg --volume data,kind=host,source=$PWD/examples bootcfg.aci -- -address=0.0.0.0:8080 -log-level=debug -config /etc/bootcfg/etcd-rkt.yaml
|
||||
sudo rkt --insecure-options=image run --net=metal0:IP=172.15.0.2 --mount volume=assets,target=/var/bootcfg --volume assets,kind=host,source=$PWD/assets --mount volume=data,target=/etc/bootcfg --volume data,kind=host,source=$PWD/examples --mount volume=groups,target=/etc/bootcfg/groups --volume groups,kind=host,source=$PWD/examples/groups/etcd bootcfg.aci -- -address=0.0.0.0:8080 -log-level=debug
|
||||
|
||||
Alternately, run the Docker image on `docker0`.
|
||||
|
||||
sudo docker run -p 8080:8080 --rm -v $PWD/examples:/etc/bootcfg:Z -v $PWD/assets:/var/bootcfg:Z coreos/bootcfg:latest -address=0.0.0.0:8080 -log-level=debug -config /etc/bootcfg/etcd-docker.yaml
|
||||
sudo docker run -p 8080:8080 --rm -v $PWD/examples:/etc/bootcfg:Z -v $PWD/assets:/var/bootcfg:Z -v $PWD/examples/groups/etcd:/etc/bootcfg/groups:Z coreos/bootcfg:latest -address=0.0.0.0:8080 -log-level=debug
|
||||
@@ -28,11 +28,11 @@ func metadataHandler() ContextHandler {
|
||||
return
|
||||
}
|
||||
for key, value := range data {
|
||||
fmt.Fprintf(w, "%s=%s\n", strings.ToUpper(key), value)
|
||||
fmt.Fprintf(w, "%s=%v\n", strings.ToUpper(key), value)
|
||||
}
|
||||
attrs := labelsFromRequest(req)
|
||||
for key, value := range attrs {
|
||||
fmt.Fprintf(w, "%s=%s\n", strings.ToUpper(key), value)
|
||||
fmt.Fprintf(w, "%s=%v\n", strings.ToUpper(key), value)
|
||||
}
|
||||
}
|
||||
return ContextHandlerFunc(fn)
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/coreos-baremetal/bootcfg/storage/storagepb"
|
||||
"github.com/coreos/pkg/capnslog"
|
||||
"github.com/satori/go.uuid"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
const (
|
||||
// APIVersion of the config types.
|
||||
APIVersion = "v1alpha1"
|
||||
)
|
||||
|
||||
// Config parse errors.
|
||||
var (
|
||||
ErrIncorrectVersion = errors.New("config: incorrect API version")
|
||||
)
|
||||
|
||||
var log = capnslog.NewPackageLogger("github.com/coreos/coreos-baremetal/bootcfg", "config")
|
||||
|
||||
// Config is a user defined matching of machine groups to profiles.
|
||||
type Config struct {
|
||||
APIVersion string `yaml:"api_version"`
|
||||
// allow YAML source for Groups
|
||||
YAMLGroups []Group `yaml:"groups"`
|
||||
// populate protobuf Groups at parse
|
||||
Groups []*storagepb.Group `yaml:"-"`
|
||||
}
|
||||
|
||||
// A Group associates machines with required tags with a Profile and
|
||||
// metadata. Zero or more machines may match to a machine Group.
|
||||
type Group struct {
|
||||
// Human readable name
|
||||
Name string `yaml:"name"`
|
||||
// Profile id
|
||||
Profile string `yaml:"profile"`
|
||||
// tags required to match the group
|
||||
Requirements map[string]string `yaml:"require"`
|
||||
// Metadata (with restrictions)
|
||||
Metadata map[string]interface{} `yaml:"metadata"`
|
||||
}
|
||||
|
||||
// LoadConfig opens a file and parses YAML data to returns a Config.
|
||||
func LoadConfig(path string) (*Config, error) {
|
||||
data, err := ioutil.ReadFile(os.ExpandEnv(path))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return ParseConfig(data)
|
||||
}
|
||||
|
||||
// ParseConfig parses YAML data and returns a Config.
|
||||
func ParseConfig(data []byte) (*Config, error) {
|
||||
config := new(Config)
|
||||
err := yaml.Unmarshal(data, config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// convert YAML Groups into protobuf Groups
|
||||
config.Groups = make([]*storagepb.Group, 0)
|
||||
for _, ygroup := range config.YAMLGroups {
|
||||
group := &storagepb.Group{
|
||||
Name: ygroup.Name,
|
||||
Profile: ygroup.Profile,
|
||||
Requirements: normalizeMatchers(ygroup.Requirements),
|
||||
}
|
||||
// Id: Generate a random UUID or use the name
|
||||
if ygroup.Name == "" {
|
||||
group.Id = uuid.NewV4().String()
|
||||
} else {
|
||||
group.Id = group.Name
|
||||
}
|
||||
// Metadata: go-yaml unmarshal provides Config.Metadata as a
|
||||
// map[string]interface{}, which unmarshals nested maps as
|
||||
// map[interface{}]interface{}. Walk the metadata, filtering non-string
|
||||
// keys and nested elements.
|
||||
if b, err := json.Marshal(filterValues(ygroup.Metadata)); err == nil {
|
||||
group.Metadata = b
|
||||
} else {
|
||||
return nil, fmt.Errorf("config: cannot marshal metadata %v", err)
|
||||
}
|
||||
config.Groups = append(config.Groups, group)
|
||||
}
|
||||
// validate Config and Groups
|
||||
if err := config.validate(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return config, nil
|
||||
}
|
||||
|
||||
func normalizeMatchers(reqs map[string]string) map[string]string {
|
||||
for key, val := range reqs {
|
||||
switch strings.ToLower(key) {
|
||||
case "mac":
|
||||
if macAddr, err := net.ParseMAC(val); err == nil {
|
||||
// range iteration copy with mutable map
|
||||
reqs[key] = macAddr.String()
|
||||
log.Errorf("normalizing MAC address %s to %s", val, macAddr.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
return reqs
|
||||
}
|
||||
|
||||
// filterValues returns a new map, filtering out key/value pairs whose value
|
||||
// is not a string, []string, or string key'd map. Recurses on interface
|
||||
// values.
|
||||
func filterValues(unknown map[string]interface{}) map[string]interface{} {
|
||||
// copy the map, skipping all disallowed value types
|
||||
m := make(map[string]interface{})
|
||||
for key, v := range unknown {
|
||||
switch val := v.(type) {
|
||||
case string:
|
||||
m[key] = val
|
||||
case []string:
|
||||
m[key] = val
|
||||
case []interface{}:
|
||||
m[key] = filterSlice(val)
|
||||
case map[interface{}]interface{}:
|
||||
m[key] = filterValues(filterNonStringKeys(val))
|
||||
default:
|
||||
log.Errorf("ignoring metadata value %v", val)
|
||||
}
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
// filterSlice returns a new slice, filtering out elements whose keys are not
|
||||
// strings.
|
||||
func filterSlice(unknown []interface{}) []string {
|
||||
s := make([]string, 0, len(unknown))
|
||||
for _, e := range unknown {
|
||||
switch elem := e.(type) {
|
||||
case string:
|
||||
s = append(s, elem)
|
||||
default:
|
||||
log.Errorf("ignoring metadata elem %v", elem)
|
||||
}
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
// filterNonStringKeys returns a new map, filtering out key/value pairs whose
|
||||
// keys are not strings.
|
||||
func filterNonStringKeys(unknown map[interface{}]interface{}) map[string]interface{} {
|
||||
// copy the map, skipping all non-string keys
|
||||
m := make(map[string]interface{})
|
||||
for k, val := range unknown {
|
||||
switch key := k.(type) {
|
||||
case string:
|
||||
m[key] = val
|
||||
default:
|
||||
log.Errorf("ignoring metadata key %v", key)
|
||||
}
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
// validate the group config's API version and reserved tag matchers.
|
||||
func (c *Config) validate() error {
|
||||
if c.APIVersion != APIVersion {
|
||||
return ErrIncorrectVersion
|
||||
}
|
||||
for _, group := range c.YAMLGroups {
|
||||
for key, val := range group.Requirements {
|
||||
switch strings.ToLower(key) {
|
||||
case "mac":
|
||||
macAddr, err := net.ParseMAC(val)
|
||||
if err != nil {
|
||||
return fmt.Errorf("config: invalid MAC address %s", val)
|
||||
}
|
||||
if val != macAddr.String() {
|
||||
return fmt.Errorf("config: normalize MAC address %s to %v", val, macAddr.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/coreos/coreos-baremetal/bootcfg/storage/storagepb"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var validData = `
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: node1
|
||||
profile: worker
|
||||
require:
|
||||
role: worker
|
||||
region: us-central1-a
|
||||
mac: aB:Ab:3d:45:cD:10
|
||||
metadata:
|
||||
a: b
|
||||
c:
|
||||
- d
|
||||
- e
|
||||
f:
|
||||
g:
|
||||
h
|
||||
`
|
||||
|
||||
var validGroups = []*storagepb.Group{
|
||||
&storagepb.Group{
|
||||
Id: "node1",
|
||||
Name: "node1",
|
||||
Profile: "worker",
|
||||
Requirements: map[string]string{
|
||||
"role": "worker",
|
||||
"region": "us-central1-a",
|
||||
"mac": "ab:ab:3d:45:cd:10",
|
||||
},
|
||||
Metadata: []byte(`{"a":"b","c":["d","e"],"f":{"g":"h"}}`),
|
||||
},
|
||||
}
|
||||
|
||||
func TestLoadConfig(t *testing.T) {
|
||||
f, err := ioutil.TempFile("", "config.yaml")
|
||||
assert.Nil(t, err)
|
||||
defer os.Remove(f.Name())
|
||||
f.Write([]byte(validData))
|
||||
|
||||
config, err := LoadConfig(f.Name())
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, "v1alpha1", config.APIVersion)
|
||||
assert.Equal(t, validGroups, config.Groups)
|
||||
// read from file that does not exist
|
||||
config, err = LoadConfig("")
|
||||
assert.Nil(t, config)
|
||||
assert.NotNil(t, err)
|
||||
}
|
||||
|
||||
func TestParseConfig(t *testing.T) {
|
||||
invalidData := `api_version:`
|
||||
invalidYAML := ` tabs tabs tabs`
|
||||
|
||||
cases := []struct {
|
||||
data string
|
||||
expectedGroups []*storagepb.Group
|
||||
expectedErr error
|
||||
}{
|
||||
{validData, validGroups, nil},
|
||||
{invalidData, nil, ErrIncorrectVersion},
|
||||
{invalidYAML, nil, fmt.Errorf("yaml: found character that cannot start any token")},
|
||||
}
|
||||
for _, c := range cases {
|
||||
config, err := ParseConfig([]byte(c.data))
|
||||
assert.Equal(t, c.expectedErr, err)
|
||||
if c.expectedErr == nil {
|
||||
assert.Equal(t, c.expectedGroups, config.Groups)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidate(t *testing.T) {
|
||||
incorrectVersion := &Config{
|
||||
APIVersion: "v1wrong",
|
||||
}
|
||||
invalidMAC := &Config{
|
||||
APIVersion: "v1alpha1",
|
||||
YAMLGroups: []Group{
|
||||
Group{
|
||||
Requirements: map[string]string{
|
||||
"mac": "?:?:?:?",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
nonNormalizedMAC := &Config{
|
||||
APIVersion: "v1alpha1",
|
||||
YAMLGroups: []Group{
|
||||
Group{
|
||||
Requirements: map[string]string{
|
||||
"mac": "aB:Ab:3d:45:cD:10",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
validConfig := &Config{
|
||||
APIVersion: "v1alpha1",
|
||||
YAMLGroups: []Group{
|
||||
Group{
|
||||
Name: "node1",
|
||||
Profile: "worker",
|
||||
Requirements: map[string]string{
|
||||
"role": "worker",
|
||||
"region": "us-central1-a",
|
||||
"mac": "ab:ab:3d:45:cd:10",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
cases := []struct {
|
||||
config *Config
|
||||
expectedErr error
|
||||
}{
|
||||
{validConfig, nil},
|
||||
{incorrectVersion, ErrIncorrectVersion},
|
||||
{invalidMAC, fmt.Errorf("config: invalid MAC address ?:?:?:?")},
|
||||
{nonNormalizedMAC, fmt.Errorf("config: normalize MAC address aB:Ab:3d:45:cD:10 to ab:ab:3d:45:cd:10")},
|
||||
}
|
||||
for _, c := range cases {
|
||||
assert.Equal(t, c.expectedErr, c.config.validate())
|
||||
}
|
||||
}
|
||||
|
||||
func TestFilterSlice(t *testing.T) {
|
||||
s := []interface{}{"a", 3.14, "b", "c"}
|
||||
expected := []string{"a", "b", "c"}
|
||||
filtered := filterSlice(s)
|
||||
assert.Equal(t, expected, filtered)
|
||||
}
|
||||
|
||||
func TestFilterKeys(t *testing.T) {
|
||||
m := map[interface{}]interface{}{
|
||||
"a": "b",
|
||||
3.14: "c",
|
||||
}
|
||||
expected := map[string]interface{}{
|
||||
"a": "b",
|
||||
}
|
||||
filtered := filterNonStringKeys(m)
|
||||
assert.Equal(t, expected, filtered)
|
||||
}
|
||||
|
||||
func TestFilterValues(t *testing.T) {
|
||||
m := map[string]interface{}{
|
||||
"a": "b",
|
||||
"c": 3.14,
|
||||
"d": map[interface{}]interface{}{
|
||||
"e": "f",
|
||||
3.14: "g",
|
||||
"h": []interface{}{"i", "j", "k", 3.14},
|
||||
},
|
||||
"l": true,
|
||||
"m": "true",
|
||||
}
|
||||
expected := map[string]interface{}{
|
||||
"a": "b",
|
||||
"d": map[string]interface{}{
|
||||
"e": "f",
|
||||
"h": []string{"i", "j", "k"},
|
||||
},
|
||||
"m": "true",
|
||||
}
|
||||
filtered := filterValues(m)
|
||||
assert.Equal(t, expected, filtered)
|
||||
}
|
||||
@@ -10,45 +10,53 @@ import (
|
||||
|
||||
// Config initializes a fileStore.
|
||||
type Config struct {
|
||||
Root string
|
||||
Groups []*storagepb.Group
|
||||
Root string
|
||||
}
|
||||
|
||||
// fileStore implements ths Store interface. Queries to the file system
|
||||
// are restricted to the specified directory tree.
|
||||
type fileStore struct {
|
||||
root string
|
||||
groups map[string]*storagepb.Group
|
||||
root string
|
||||
}
|
||||
|
||||
// NewFileStore returns a new memory-backed Store.
|
||||
func NewFileStore(config *Config) Store {
|
||||
groups := make(map[string]*storagepb.Group)
|
||||
for _, group := range config.Groups {
|
||||
groups[group.Id] = group
|
||||
}
|
||||
return &fileStore{
|
||||
root: config.Root,
|
||||
groups: groups,
|
||||
root: config.Root,
|
||||
}
|
||||
}
|
||||
|
||||
// GroupGet returns a machine Group by id.
|
||||
func (s *fileStore) GroupGet(id string) (*storagepb.Group, error) {
|
||||
val, ok := s.groups[id]
|
||||
if !ok {
|
||||
return nil, ErrGroupNotFound
|
||||
data, err := Dir(s.root).readFile(filepath.Join("groups", id+".json"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return val, nil
|
||||
richGroup := new(storagepb.RichGroup)
|
||||
err = json.Unmarshal(data, richGroup)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
group, err := richGroup.ToGroup()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return group, err
|
||||
}
|
||||
|
||||
// GroupList lists all machine Groups.
|
||||
func (s *fileStore) GroupList() ([]*storagepb.Group, error) {
|
||||
groups := make([]*storagepb.Group, len(s.groups))
|
||||
i := 0
|
||||
for _, g := range s.groups {
|
||||
groups[i] = g
|
||||
i++
|
||||
files, err := Dir(s.root).readDir("groups")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
groups := make([]*storagepb.Group, 0, len(files))
|
||||
for _, finfo := range files {
|
||||
name := strings.TrimSuffix(finfo.Name(), filepath.Ext(finfo.Name()))
|
||||
group, err := s.GroupGet(name)
|
||||
if err == nil {
|
||||
groups = append(groups, group)
|
||||
}
|
||||
}
|
||||
return groups, nil
|
||||
}
|
||||
|
||||
@@ -12,14 +12,14 @@ var (
|
||||
ErrProfileNotFound = errors.New("storage: No Profile found")
|
||||
)
|
||||
|
||||
// A Store stores machine Groups and Profiles.
|
||||
// A Store stores machine Groups, Profiles, and Configs.
|
||||
type Store interface {
|
||||
// GroupGet returns a machine Group by id.
|
||||
GroupGet(id string) (*storagepb.Group, error)
|
||||
// GroupList lists all machine Groups.
|
||||
GroupList() ([]*storagepb.Group, error)
|
||||
|
||||
// ProfilePut creates or updates a profile
|
||||
// ProfilePut creates or updates a Profile.
|
||||
ProfilePut(profile *storagepb.Profile) error
|
||||
// ProfileGet gets a profile by id.
|
||||
ProfileGet(id string) (*storagepb.Profile, error)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package storagepb
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net"
|
||||
"sort"
|
||||
"strings"
|
||||
)
|
||||
@@ -28,6 +30,23 @@ func (g *Group) requirementString() string {
|
||||
return strings.Join(reqs, ",")
|
||||
}
|
||||
|
||||
// ToRichGroup converts a Group into a RichGroup suitable for writing and
|
||||
// user manipulation.
|
||||
func (g *Group) ToRichGroup() (*RichGroup, error) {
|
||||
metadata := make(map[string]interface{})
|
||||
err := json.Unmarshal(g.Metadata, &metadata)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &RichGroup{
|
||||
Id: g.Id,
|
||||
Name: g.Name,
|
||||
Profile: g.Profile,
|
||||
Requirements: g.Requirements,
|
||||
Metadata: metadata,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ByReqs defines a collection of Group structs which have a deterministic
|
||||
// sorted order by increasing number of Requirements, then by sorted key/value
|
||||
// strings. For example, a Group with Requirements {a:b, c:d} should be ordered
|
||||
@@ -48,3 +67,46 @@ func (groups ByReqs) Less(i, j int) bool {
|
||||
}
|
||||
return len(groups[i].Requirements) < len(groups[j].Requirements)
|
||||
}
|
||||
|
||||
// RichGroup is a user provided Group definition.
|
||||
type RichGroup struct {
|
||||
// machine readable Id
|
||||
Id string `json:"id,omitempty"`
|
||||
// Human readable name
|
||||
Name string `json:"name,omitempty"`
|
||||
// Profile id
|
||||
Profile string `json:"profile,omitempty"`
|
||||
// tags required to match the group
|
||||
Requirements map[string]string `json:"requirements,omitempty"`
|
||||
// Metadata
|
||||
Metadata map[string]interface{} `json:"metadata,omitempty"`
|
||||
}
|
||||
|
||||
// ToGroup converts a user provided RichGroup into a Group which can be
|
||||
// serialized as a protocol buffer.
|
||||
func (rg *RichGroup) ToGroup() (*Group, error) {
|
||||
metadata, err := json.Marshal(rg.Metadata)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Group{
|
||||
Id: rg.Id,
|
||||
Name: rg.Name,
|
||||
Profile: rg.Profile,
|
||||
Requirements: normalizeSelectors(rg.Requirements),
|
||||
Metadata: metadata,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func normalizeSelectors(selectors map[string]string) map[string]string {
|
||||
for key, val := range selectors {
|
||||
switch strings.ToLower(key) {
|
||||
case "mac":
|
||||
if macAddr, err := net.ParseMAC(val); err == nil {
|
||||
// range iteration copy with mutable map
|
||||
selectors[key] = macAddr.String()
|
||||
}
|
||||
}
|
||||
}
|
||||
return selectors
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ var _ = math.Inf
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
const _ = proto.ProtoPackageIsVersion1
|
||||
|
||||
// Group selects one or more machines and matches them to a Profile.
|
||||
type Group struct {
|
||||
// machine readable Id
|
||||
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
||||
@@ -53,6 +54,7 @@ func (m *Group) GetRequirements() map[string]string {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Profile defines the boot and provisioning behavior of a group of machines.
|
||||
type Profile struct {
|
||||
// profile id
|
||||
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
|
||||
@@ -78,6 +80,7 @@ func (m *Profile) GetBoot() *NetBoot {
|
||||
return nil
|
||||
}
|
||||
|
||||
// NetBoot describes network or PXE boot settings for a machine.
|
||||
type NetBoot struct {
|
||||
// the URL of the kernel image
|
||||
Kernel string `protobuf:"bytes,1,opt,name=kernel" json:"kernel,omitempty"`
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
syntax = "proto3";
|
||||
package storagepb;
|
||||
|
||||
// Group selects one or more machines and matches them to a Profile.
|
||||
message Group {
|
||||
// machine readable Id
|
||||
string id = 1;
|
||||
@@ -14,6 +15,7 @@ message Group {
|
||||
bytes metadata = 5;
|
||||
}
|
||||
|
||||
// Profile defines the boot and provisioning behavior of a group of machines.
|
||||
message Profile {
|
||||
// profile id
|
||||
string id = 1;
|
||||
@@ -27,6 +29,7 @@ message Profile {
|
||||
NetBoot boot = 5;
|
||||
}
|
||||
|
||||
// NetBoot describes network or PXE boot settings for a machine.
|
||||
message NetBoot {
|
||||
// the URL of the kernel image
|
||||
string kernel = 1;
|
||||
|
||||
@@ -13,7 +13,6 @@ import (
|
||||
"github.com/coreos/pkg/flagutil"
|
||||
|
||||
"github.com/coreos/coreos-baremetal/bootcfg/api"
|
||||
"github.com/coreos/coreos-baremetal/bootcfg/config"
|
||||
"github.com/coreos/coreos-baremetal/bootcfg/rpc"
|
||||
"github.com/coreos/coreos-baremetal/bootcfg/server"
|
||||
"github.com/coreos/coreos-baremetal/bootcfg/sign"
|
||||
@@ -30,7 +29,6 @@ func main() {
|
||||
flags := struct {
|
||||
address string
|
||||
rpcAddress string
|
||||
configPath string
|
||||
dataPath string
|
||||
assetsPath string
|
||||
keyRingPath string
|
||||
@@ -40,7 +38,6 @@ func main() {
|
||||
}{}
|
||||
flag.StringVar(&flags.address, "address", "127.0.0.1:8080", "HTTP listen address")
|
||||
flag.StringVar(&flags.rpcAddress, "rpcAddress", "", "RPC listen address")
|
||||
flag.StringVar(&flags.configPath, "config", "/etc/bootcfg.conf", "Path to config file")
|
||||
flag.StringVar(&flags.dataPath, "data-path", "/etc/bootcfg", "Path to data directory")
|
||||
flag.StringVar(&flags.assetsPath, "assets-path", "/var/bootcfg", "Path to static assets")
|
||||
flag.StringVar(&flags.keyRingPath, "key-ring-path", "", "Path to a private keyring file")
|
||||
@@ -72,9 +69,6 @@ func main() {
|
||||
if url, err := url.Parse(flags.address); err != nil || url.String() == "" {
|
||||
log.Fatal("A valid HTTP listen address is required")
|
||||
}
|
||||
if finfo, err := os.Stat(flags.configPath); err != nil || finfo.IsDir() {
|
||||
log.Fatal("A path to a config file is required")
|
||||
}
|
||||
if finfo, err := os.Stat(flags.dataPath); err != nil || !finfo.IsDir() {
|
||||
log.Fatal("A path to a data directory is required")
|
||||
}
|
||||
@@ -101,16 +95,9 @@ func main() {
|
||||
armoredSigner = sign.NewArmoredGPGSigner(entity)
|
||||
}
|
||||
|
||||
// load bootstrap config
|
||||
cfg, err := config.LoadConfig(flags.configPath)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// storage
|
||||
store := storage.NewFileStore(&storage.Config{
|
||||
Root: flags.dataPath,
|
||||
Groups: cfg.Groups,
|
||||
Root: flags.dataPath,
|
||||
})
|
||||
|
||||
bootcfgServer := server.NewServer(&server.Config{
|
||||
|
||||
@@ -8,10 +8,10 @@ These examples network boot and provision VMs into CoreOS clusters using `bootcf
|
||||
| pxe | CoreOS via iPXE | alpha/962.0.0 | RAM | [reference](https://coreos.com/os/docs/latest/booting-with-ipxe.html) |
|
||||
| grub | CoreOS via GRUB2 Netboot | beta/899.6.0 | RAM | NA |
|
||||
| pxe-disk | CoreOS via iPXE, with a root filesystem | alpha/962.0.0 | Disk | [reference](https://coreos.com/os/docs/latest/booting-with-ipxe.html) |
|
||||
| coreos-install | 2-stage Ignition: Install CoreOS, provision etcd cluster | alpha/983.0.0 | Disk | [reference](https://coreos.com/os/docs/latest/installing-to-disk.html) |
|
||||
| etcd-rkt, etcd-docker | Cluster with 3 etcd nodes, 2 proxies | alpha/983.0.0 | RAM | [reference](https://coreos.com/os/docs/latest/cluster-architectures.html) |
|
||||
| k8s-rkt, k8s-docker | Kubernetes cluster with 1 master and 2 workers, TLS-authentication | alpha/983.0.0 | Disk | [reference](https://github.com/coreos/coreos-kubernetes) |
|
||||
| k8s-install | Install Kubernetes cluster with 1 master and 2 workers, TLS | alpha/983.0.0 | Disk | [reference](https://github.com/coreos/coreos-kubernetes) |
|
||||
| etcd, etcd-docker | Cluster with 3 etcd nodes, 2 proxies | alpha/983.0.0 | RAM | [reference](https://coreos.com/os/docs/latest/cluster-architectures.html) |
|
||||
| etcd-install | Install a 3-node etcd cluster to disk | alpha/983.0.0 | Disk | [reference](https://coreos.com/os/docs/latest/installing-to-disk.html) |
|
||||
| k8s, k8s-docker | Kubernetes cluster with 1 master and 2 workers, TLS-authentication | alpha/983.0.0 | Disk | [reference](https://github.com/coreos/coreos-kubernetes) |
|
||||
| k8s-install | Install a Kubernetes cluster to disk (1 master) | alpha/983.0.0 | Disk | [reference](https://github.com/coreos/coreos-kubernetes) |
|
||||
|
||||
## Experimental
|
||||
|
||||
@@ -26,16 +26,16 @@ Get started running the `bootcfg` on your Linux machine to boot clusters of libv
|
||||
|
||||
## SSH Keys
|
||||
|
||||
Most example profiles configure machines with a `core` user and `ssh_authorized_keys`. Add your own key(s) as machine metadata.
|
||||
Most examples allow `ssh_authorized_keys` to be added for the `core` user as machine group metadata.
|
||||
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: default
|
||||
profile: pxe
|
||||
metadata:
|
||||
ssh_authorized_keys:
|
||||
- "ssh-rsa pub-key-goes-here"
|
||||
# /var/lib/bootcfg/groups/default.json
|
||||
{
|
||||
"name": "Example Machine Group",
|
||||
"profile": "pxe",
|
||||
"metadata": {
|
||||
"ssh_authorized_keys": ["ssh-rsa pub-key-goes-here"]
|
||||
}
|
||||
}
|
||||
|
||||
## Kubernetes
|
||||
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: CoreOS Install
|
||||
profile: install-reboot
|
||||
metadata:
|
||||
coreos_channel: alpha
|
||||
coreos_version: 962.0.0
|
||||
ignition_endpoint: http://bootcfg.foo:8080/ignition
|
||||
|
||||
- name: etcd Node 1
|
||||
profile: etcd
|
||||
require:
|
||||
uuid: 16e7d8a7-bfa9-428b-9117-363341bb330b
|
||||
os: installed
|
||||
metadata:
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.21/16
|
||||
ipv4_address: 172.15.0.21
|
||||
fleet_metadata: "role=etcd,name=node1"
|
||||
etcd_name: node1
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
ssh_authorized_keys:
|
||||
|
||||
- name: etcd Node 2
|
||||
profile: etcd
|
||||
require:
|
||||
uuid: 264cd073-ca62-44b3-98c0-50aad5b5f819
|
||||
os: installed
|
||||
metadata:
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.22/16
|
||||
ipv4_address: 172.15.0.22
|
||||
fleet_metadata: "role=etcd,name=node2"
|
||||
etcd_name: node2
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
|
||||
- name: etcd Node 3
|
||||
profile: etcd
|
||||
require:
|
||||
uuid: 39d2e747-2648-4d68-ae92-bbc70b245055
|
||||
os: installed
|
||||
metadata:
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.23/16
|
||||
ipv4_address: 172.15.0.23
|
||||
fleet_metadata: "role=etcd,name=node3"
|
||||
etcd_name: node3
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
|
||||
- name: etcd Proxy
|
||||
profile: etcd-proxy
|
||||
require:
|
||||
os: installed
|
||||
metadata:
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
fleet_metadata: role=etcd-proxy
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
ssh_authorized_keys:
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: PXE Boot to CoreOS
|
||||
profile: pxe
|
||||
metadata:
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: etcd Node 1
|
||||
profile: etcd
|
||||
require:
|
||||
uuid: 16e7d8a7-bfa9-428b-9117-363341bb330b
|
||||
metadata:
|
||||
ipv4_address: 172.17.0.21
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.17.0.1
|
||||
networkd_dns: 172.17.0.3
|
||||
networkd_address: 172.17.0.21/16
|
||||
fleet_metadata: "role=etcd,name=node1"
|
||||
etcd_name: node1
|
||||
etcd_initial_cluster: "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380"
|
||||
|
||||
- name: etcd Node 2
|
||||
profile: etcd
|
||||
require:
|
||||
uuid: 264cd073-ca62-44b3-98c0-50aad5b5f819
|
||||
metadata:
|
||||
ipv4_address: 172.17.0.22
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.17.0.1
|
||||
networkd_dns: 172.17.0.3
|
||||
networkd_address: 172.17.0.22/16
|
||||
fleet_metadata: "role=etcd,name=node2"
|
||||
etcd_name: node2
|
||||
etcd_initial_cluster: "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380"
|
||||
|
||||
- name: etcd Node 3
|
||||
profile: etcd
|
||||
require:
|
||||
uuid: 39d2e747-2648-4d68-ae92-bbc70b245055
|
||||
metadata:
|
||||
ipv4_address: 172.17.0.23
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.17.0.1
|
||||
networkd_dns: 172.17.0.3
|
||||
networkd_address: 172.17.0.23/16
|
||||
fleet_metadata: "role=etcd,name=node3"
|
||||
etcd_name: node3
|
||||
etcd_initial_cluster: "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380"
|
||||
|
||||
- name: default
|
||||
profile: etcd-proxy
|
||||
metadata:
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.17.0.1
|
||||
networkd_dns: 172.17.0.3
|
||||
fleet_metadata: role=etcd-proxy
|
||||
etcd_initial_cluster: "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380"
|
||||
@@ -1,53 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: etcd Node 1
|
||||
profile: etcd
|
||||
require:
|
||||
uuid: 16e7d8a7-bfa9-428b-9117-363341bb330b
|
||||
metadata:
|
||||
ipv4_address: 172.15.0.21
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.21/16
|
||||
fleet_metadata: "role=etcd,name=node1"
|
||||
etcd_name: node1
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
|
||||
- name: etcd Node 2
|
||||
profile: etcd
|
||||
require:
|
||||
uuid: 264cd073-ca62-44b3-98c0-50aad5b5f819
|
||||
metadata:
|
||||
ipv4_address: 172.15.0.22
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.22/16
|
||||
fleet_metadata: "role=etcd,name=node2"
|
||||
etcd_name: node2
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
|
||||
- name: etcd Node 3
|
||||
profile: etcd
|
||||
require:
|
||||
uuid: 39d2e747-2648-4d68-ae92-bbc70b245055
|
||||
metadata:
|
||||
ipv4_address: 172.15.0.23
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.23/16
|
||||
fleet_metadata: "role=etcd,name=node3"
|
||||
etcd_name: node3
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
|
||||
- name: default
|
||||
profile: etcd-proxy
|
||||
metadata:
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
fleet_metadata: role=etcd-proxy
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
5
examples/groups/default.json
Normal file
5
examples/groups/default.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "PXE CoreOS alpha",
|
||||
"name": "PXE CoreOS alpha",
|
||||
"profile": "pxe"
|
||||
}
|
||||
12
examples/groups/etcd-docker/default.json
Normal file
12
examples/groups/etcd-docker/default.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "default",
|
||||
"name": "default",
|
||||
"profile": "etcd-proxy",
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
|
||||
"fleet_metadata": "role=etcd-proxy",
|
||||
"networkd_dns": "172.17.0.3",
|
||||
"networkd_gateway": "172.17.0.1",
|
||||
"networkd_name": "ens3"
|
||||
}
|
||||
}
|
||||
18
examples/groups/etcd-docker/node1.json
Normal file
18
examples/groups/etcd-docker/node1.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "etcd Node 1",
|
||||
"name": "etcd Node 1",
|
||||
"profile": "etcd",
|
||||
"requirements": {
|
||||
"uuid": "16e7d8a7-bfa9-428b-9117-363341bb330b"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
|
||||
"etcd_name": "node1",
|
||||
"fleet_metadata": "role=etcd,name=node1",
|
||||
"ipv4_address": "172.17.0.21",
|
||||
"networkd_address": "172.17.0.21/16",
|
||||
"networkd_dns": "172.17.0.3",
|
||||
"networkd_gateway": "172.17.0.1",
|
||||
"networkd_name": "ens3"
|
||||
}
|
||||
}
|
||||
18
examples/groups/etcd-docker/node2.json
Normal file
18
examples/groups/etcd-docker/node2.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "etcd Node 2",
|
||||
"name": "etcd Node 2",
|
||||
"profile": "etcd",
|
||||
"requirements": {
|
||||
"uuid": "264cd073-ca62-44b3-98c0-50aad5b5f819"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
|
||||
"etcd_name": "node2",
|
||||
"fleet_metadata": "role=etcd,name=node2",
|
||||
"ipv4_address": "172.17.0.22",
|
||||
"networkd_address": "172.17.0.22/16",
|
||||
"networkd_dns": "172.17.0.3",
|
||||
"networkd_gateway": "172.17.0.1",
|
||||
"networkd_name": "ens3"
|
||||
}
|
||||
}
|
||||
18
examples/groups/etcd-docker/node3.json
Normal file
18
examples/groups/etcd-docker/node3.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "etcd Node 3",
|
||||
"name": "etcd Node 3",
|
||||
"profile": "etcd",
|
||||
"requirements": {
|
||||
"uuid": "39d2e747-2648-4d68-ae92-bbc70b245055"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
|
||||
"etcd_name": "node3",
|
||||
"fleet_metadata": "role=etcd,name=node3",
|
||||
"ipv4_address": "172.17.0.23",
|
||||
"networkd_address": "172.17.0.23/16",
|
||||
"networkd_dns": "172.17.0.3",
|
||||
"networkd_gateway": "172.17.0.1",
|
||||
"networkd_name": "ens3"
|
||||
}
|
||||
}
|
||||
10
examples/groups/etcd-install/install.json
Normal file
10
examples/groups/etcd-install/install.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "CoreOS Install",
|
||||
"name": "CoreOS Install",
|
||||
"profile": "install-reboot",
|
||||
"metadata": {
|
||||
"coreos_channel": "alpha",
|
||||
"coreos_version": "983.0.0",
|
||||
"ignition_endpoint": "http://bootcfg.foo:8080/ignition"
|
||||
}
|
||||
}
|
||||
19
examples/groups/etcd-install/node1.json
Normal file
19
examples/groups/etcd-install/node1.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"id": "node1",
|
||||
"name": "etcd Node 1",
|
||||
"profile": "etcd",
|
||||
"requirements": {
|
||||
"uuid": "16e7d8a7-bfa9-428b-9117-363341bb330b",
|
||||
"os": "installed"
|
||||
},
|
||||
"metadata": {
|
||||
"ipv4_address": "172.15.0.21",
|
||||
"networkd_name": "ens3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_address": "172.15.0.21/16",
|
||||
"fleet_metadata": "role=etcd,name=node1",
|
||||
"etcd_name": "node1",
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
}
|
||||
}
|
||||
19
examples/groups/etcd-install/node2.json
Normal file
19
examples/groups/etcd-install/node2.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"id": "node2",
|
||||
"name": "etcd Node 2",
|
||||
"profile": "etcd",
|
||||
"requirements": {
|
||||
"uuid": "264cd073-ca62-44b3-98c0-50aad5b5f819",
|
||||
"os": "installed"
|
||||
},
|
||||
"metadata": {
|
||||
"ipv4_address": "172.15.0.22",
|
||||
"networkd_name": "ens3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_address": "172.15.0.22/16",
|
||||
"fleet_metadata": "role=etcd,name=node2",
|
||||
"etcd_name": "node2",
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
}
|
||||
}
|
||||
19
examples/groups/etcd-install/node3.json
Normal file
19
examples/groups/etcd-install/node3.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"id": "node3",
|
||||
"name": "etcd Node 3",
|
||||
"profile": "etcd",
|
||||
"requirements": {
|
||||
"uuid": "39d2e747-2648-4d68-ae92-bbc70b245055",
|
||||
"os": "installed"
|
||||
},
|
||||
"metadata": {
|
||||
"ipv4_address": "172.15.0.23",
|
||||
"networkd_name": "ens3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_address": "172.15.0.23/16",
|
||||
"fleet_metadata": "role=etcd,name=node3",
|
||||
"etcd_name": "node3",
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
}
|
||||
}
|
||||
15
examples/groups/etcd-install/proxies.json
Normal file
15
examples/groups/etcd-install/proxies.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "etcd Proxy",
|
||||
"name": "etcd Proxy",
|
||||
"profile": "etcd-proxy",
|
||||
"requirements": {
|
||||
"os": "installed"
|
||||
},
|
||||
"metadata": {
|
||||
"networkd_name": "ens3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"fleet_metadata": "role=etcd-proxy",
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
}
|
||||
}
|
||||
12
examples/groups/etcd/default.json
Normal file
12
examples/groups/etcd/default.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"id": "default",
|
||||
"name": "default",
|
||||
"profile": "etcd-proxy",
|
||||
"metadata": {
|
||||
"networkd_name": "ens3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"fleet_metadata": "role=etcd-proxy",
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
}
|
||||
}
|
||||
18
examples/groups/etcd/node1.json
Normal file
18
examples/groups/etcd/node1.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "node1",
|
||||
"name": "etcd Node 1",
|
||||
"profile": "etcd",
|
||||
"requirements": {
|
||||
"uuid": "16e7d8a7-bfa9-428b-9117-363341bb330b"
|
||||
},
|
||||
"metadata": {
|
||||
"ipv4_address": "172.15.0.21",
|
||||
"networkd_name": "ens3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_address": "172.15.0.21/16",
|
||||
"fleet_metadata": "role=etcd,name=node1",
|
||||
"etcd_name": "node1",
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
}
|
||||
}
|
||||
18
examples/groups/etcd/node2.json
Normal file
18
examples/groups/etcd/node2.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "node2",
|
||||
"name": "etcd Node 2",
|
||||
"profile": "etcd",
|
||||
"requirements": {
|
||||
"uuid": "264cd073-ca62-44b3-98c0-50aad5b5f819"
|
||||
},
|
||||
"metadata": {
|
||||
"ipv4_address": "172.15.0.22",
|
||||
"networkd_name": "ens3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_address": "172.15.0.22/16",
|
||||
"fleet_metadata": "role=etcd,name=node2",
|
||||
"etcd_name": "node2",
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
}
|
||||
}
|
||||
18
examples/groups/etcd/node3.json
Normal file
18
examples/groups/etcd/node3.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "node3",
|
||||
"name": "etcd Node 3",
|
||||
"profile": "etcd",
|
||||
"requirements": {
|
||||
"uuid": "39d2e747-2648-4d68-ae92-bbc70b245055"
|
||||
},
|
||||
"metadata": {
|
||||
"ipv4_address": "172.15.0.23",
|
||||
"networkd_name": "ens3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_address": "172.15.0.23/16",
|
||||
"fleet_metadata": "role=etcd,name=node3",
|
||||
"etcd_name": "node3",
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
}
|
||||
}
|
||||
5
examples/groups/grub/default.json
Normal file
5
examples/groups/grub/default.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "GRUB CoreOS alpha",
|
||||
"name": "GRUB CoreOS alpha",
|
||||
"profile": "grub"
|
||||
}
|
||||
26
examples/groups/k8s-docker/node1.json
Normal file
26
examples/groups/k8s-docker/node1.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "Master Node",
|
||||
"name": "Master Node",
|
||||
"profile": "k8s-master",
|
||||
"requirements": {
|
||||
"uuid": "16e7d8a7-bfa9-428b-9117-363341bb330b"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
|
||||
"etcd_name": "node1",
|
||||
"fleet_metadata": "role=etcd,name=node1",
|
||||
"ipv4_address": "172.17.0.21",
|
||||
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
|
||||
"k8s_dns_service_ip": "10.3.0.10",
|
||||
"k8s_etcd_endpoints": "http://172.17.0.21:2379,http://172.17.0.22:2379,http://172.17.0.23:2379",
|
||||
"k8s_pod_network": "10.2.0.0/16",
|
||||
"k8s_service_ip": "10.3.0.1",
|
||||
"k8s_service_ip_range": "10.3.0.0/24",
|
||||
"k8s_version": "v1.1.8_coreos.0",
|
||||
"networkd_address": "172.17.0.21/16",
|
||||
"networkd_dns": "172.17.0.3",
|
||||
"networkd_gateway": "172.17.0.1",
|
||||
"networkd_name": "ens3",
|
||||
"pxe": "true"
|
||||
}
|
||||
}
|
||||
24
examples/groups/k8s-docker/node2.json
Normal file
24
examples/groups/k8s-docker/node2.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": "Worker 1",
|
||||
"name": "Worker 1",
|
||||
"profile": "k8s-worker",
|
||||
"requirements": {
|
||||
"uuid": "264cd073-ca62-44b3-98c0-50aad5b5f819"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
|
||||
"etcd_name": "node2",
|
||||
"fleet_metadata": "role=etcd,name=node2",
|
||||
"ipv4_address": "172.17.0.22",
|
||||
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
|
||||
"k8s_controller_endpoint": "https://172.17.0.21",
|
||||
"k8s_dns_service_ip": "10.3.0.1",
|
||||
"k8s_etcd_endpoints": "http://172.17.0.21:2379,http://172.17.0.22:2379,http://172.17.0.23:2379",
|
||||
"k8s_version": "v1.1.8_coreos.0",
|
||||
"networkd_address": "172.17.0.22/16",
|
||||
"networkd_dns": "172.17.0.3",
|
||||
"networkd_gateway": "172.17.0.1",
|
||||
"networkd_name": "ens3",
|
||||
"pxe": "true"
|
||||
}
|
||||
}
|
||||
24
examples/groups/k8s-docker/node3.json
Normal file
24
examples/groups/k8s-docker/node3.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": "Worker 2",
|
||||
"name": "Worker 2",
|
||||
"profile": "k8s-worker",
|
||||
"requirements": {
|
||||
"uuid": "39d2e747-2648-4d68-ae92-bbc70b245055"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380",
|
||||
"etcd_name": "node3",
|
||||
"fleet_metadata": "role=etcd,name=node3",
|
||||
"ipv4_address": "172.17.0.23",
|
||||
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
|
||||
"k8s_controller_endpoint": "https://172.17.0.21",
|
||||
"k8s_dns_service_ip": "10.3.0.1",
|
||||
"k8s_etcd_endpoints": "http://172.17.0.21:2379,http://172.17.0.22:2379,http://172.17.0.23:2379",
|
||||
"k8s_version": "v1.1.8_coreos.0",
|
||||
"networkd_address": "172.17.0.23/16",
|
||||
"networkd_dns": "172.17.0.3",
|
||||
"networkd_gateway": "172.17.0.1",
|
||||
"networkd_name": "ens3",
|
||||
"pxe": "true"
|
||||
}
|
||||
}
|
||||
10
examples/groups/k8s-install/install.json
Normal file
10
examples/groups/k8s-install/install.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "CoreOS Install",
|
||||
"name": "CoreOS Install",
|
||||
"profile": "install-reboot",
|
||||
"metadata": {
|
||||
"coreos_channel": "alpha",
|
||||
"coreos_version": "983.0.0",
|
||||
"ignition_endpoint": "http://bootcfg.foo:8080/ignition"
|
||||
}
|
||||
}
|
||||
26
examples/groups/k8s-install/node1.json
Normal file
26
examples/groups/k8s-install/node1.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "Master Node",
|
||||
"name": "Master Node",
|
||||
"profile": "k8s-master-install",
|
||||
"requirements": {
|
||||
"os": "installed",
|
||||
"uuid": "16e7d8a7-bfa9-428b-9117-363341bb330b"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
|
||||
"etcd_name": "node1",
|
||||
"fleet_metadata": "role=etcd,name=node1",
|
||||
"ipv4_address": "172.15.0.21",
|
||||
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
|
||||
"k8s_dns_service_ip": "10.3.0.10",
|
||||
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
|
||||
"k8s_pod_network": "10.2.0.0/16",
|
||||
"k8s_service_ip": "10.3.0.1",
|
||||
"k8s_service_ip_range": "10.3.0.0/24",
|
||||
"k8s_version": "v1.1.8_coreos.0",
|
||||
"networkd_address": "172.15.0.21/16",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_name": "ens3"
|
||||
}
|
||||
}
|
||||
24
examples/groups/k8s-install/node2.json
Normal file
24
examples/groups/k8s-install/node2.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": "Worker 1",
|
||||
"name": "Worker 1",
|
||||
"profile": "k8s-worker-install",
|
||||
"requirements": {
|
||||
"os": "installed",
|
||||
"uuid": "264cd073-ca62-44b3-98c0-50aad5b5f819"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
|
||||
"etcd_name": "node2",
|
||||
"fleet_metadata": "role=etcd,name=node2",
|
||||
"ipv4_address": "172.15.0.22",
|
||||
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
|
||||
"k8s_controller_endpoint": "https://172.15.0.21",
|
||||
"k8s_dns_service_ip": "10.3.0.1",
|
||||
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
|
||||
"k8s_version": "v1.1.8_coreos.0",
|
||||
"networkd_address": "172.15.0.22/16",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_name": "ens3"
|
||||
}
|
||||
}
|
||||
24
examples/groups/k8s-install/node3.json
Normal file
24
examples/groups/k8s-install/node3.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": "Worker 2",
|
||||
"name": "Worker 2",
|
||||
"profile": "k8s-worker-install",
|
||||
"requirements": {
|
||||
"os": "installed",
|
||||
"uuid": "39d2e747-2648-4d68-ae92-bbc70b245055"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
|
||||
"etcd_name": "node3",
|
||||
"fleet_metadata": "role=etcd,name=node3",
|
||||
"ipv4_address": "172.15.0.23",
|
||||
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
|
||||
"k8s_controller_endpoint": "https://172.15.0.21",
|
||||
"k8s_dns_service_ip": "10.3.0.1",
|
||||
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
|
||||
"k8s_version": "v1.1.8_coreos.0",
|
||||
"networkd_address": "172.15.0.23/16",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_name": "ens3"
|
||||
}
|
||||
}
|
||||
26
examples/groups/k8s/node1.json
Normal file
26
examples/groups/k8s/node1.json
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "Master Node",
|
||||
"name": "Master Node",
|
||||
"profile": "k8s-master",
|
||||
"requirements": {
|
||||
"uuid": "16e7d8a7-bfa9-428b-9117-363341bb330b"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
|
||||
"etcd_name": "node1",
|
||||
"fleet_metadata": "role=etcd,name=node1",
|
||||
"ipv4_address": "172.15.0.21",
|
||||
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
|
||||
"k8s_dns_service_ip": "10.3.0.10",
|
||||
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
|
||||
"k8s_pod_network": "10.2.0.0/16",
|
||||
"k8s_service_ip": "10.3.0.1",
|
||||
"k8s_service_ip_range": "10.3.0.0/24",
|
||||
"k8s_version": "v1.1.8_coreos.0",
|
||||
"networkd_address": "172.15.0.21/16",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_name": "ens3",
|
||||
"pxe": "true"
|
||||
}
|
||||
}
|
||||
24
examples/groups/k8s/node2.json
Normal file
24
examples/groups/k8s/node2.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": "Worker 1",
|
||||
"name": "Worker 1",
|
||||
"profile": "k8s-worker",
|
||||
"requirements": {
|
||||
"uuid": "264cd073-ca62-44b3-98c0-50aad5b5f819"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
|
||||
"etcd_name": "node2",
|
||||
"fleet_metadata": "role=etcd,name=node2",
|
||||
"ipv4_address": "172.15.0.22",
|
||||
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
|
||||
"k8s_controller_endpoint": "https://172.15.0.21",
|
||||
"k8s_dns_service_ip": "10.3.0.1",
|
||||
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
|
||||
"k8s_version": "v1.1.8_coreos.0",
|
||||
"networkd_address": "172.15.0.22/16",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_name": "ens3",
|
||||
"pxe": "true"
|
||||
}
|
||||
}
|
||||
24
examples/groups/k8s/node3.json
Normal file
24
examples/groups/k8s/node3.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": "Worker 2",
|
||||
"name": "Worker 2",
|
||||
"profile": "k8s-worker",
|
||||
"requirements": {
|
||||
"uuid": "39d2e747-2648-4d68-ae92-bbc70b245055"
|
||||
},
|
||||
"metadata": {
|
||||
"etcd_initial_cluster": "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380",
|
||||
"etcd_name": "node3",
|
||||
"fleet_metadata": "role=etcd,name=node3",
|
||||
"ipv4_address": "172.15.0.23",
|
||||
"k8s_cert_endpoint": "http://bootcfg.foo:8080/assets",
|
||||
"k8s_controller_endpoint": "https://172.15.0.21",
|
||||
"k8s_dns_service_ip": "10.3.0.1",
|
||||
"k8s_etcd_endpoints": "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379",
|
||||
"k8s_version": "v1.1.8_coreos.0",
|
||||
"networkd_address": "172.15.0.23/16",
|
||||
"networkd_dns": "172.15.0.3",
|
||||
"networkd_gateway": "172.15.0.1",
|
||||
"networkd_name": "ens3",
|
||||
"pxe": "true"
|
||||
}
|
||||
}
|
||||
5
examples/groups/pxe-disk/default.json
Normal file
5
examples/groups/pxe-disk/default.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "Partition disk with Root Filesystem for PXE (non-installs)",
|
||||
"name": "Partition disk with Root Filesystem for PXE (non-installs)",
|
||||
"profile": "pxe-disk"
|
||||
}
|
||||
5
examples/groups/pxe/default.json
Normal file
5
examples/groups/pxe/default.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"id": "PXE CoreOS alpha",
|
||||
"name": "PXE CoreOS alpha",
|
||||
"profile": "pxe"
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: GRUB CoreOS alpha
|
||||
profile: grub
|
||||
metadata:
|
||||
ssh_authorized_keys:
|
||||
@@ -1,65 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: Master Node
|
||||
profile: k8s-master
|
||||
require:
|
||||
uuid: 16e7d8a7-bfa9-428b-9117-363341bb330b
|
||||
metadata:
|
||||
ipv4_address: 172.17.0.21
|
||||
pxe: "true"
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.17.0.1
|
||||
networkd_dns: 172.17.0.3
|
||||
networkd_address: 172.17.0.21/16
|
||||
k8s_version: v1.1.8_coreos.0
|
||||
k8s_etcd_endpoints: "http://172.17.0.21:2379,http://172.17.0.22:2379,http://172.17.0.23:2379"
|
||||
k8s_pod_network: 10.2.0.0/16
|
||||
k8s_service_ip_range: 10.3.0.0/24
|
||||
k8s_service_ip: 10.3.0.1
|
||||
k8s_dns_service_ip: 10.3.0.10
|
||||
k8s_cert_endpoint: http://bootcfg.foo:8080/assets
|
||||
fleet_metadata: "role=etcd,name=node1"
|
||||
etcd_name: node1
|
||||
etcd_initial_cluster: "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380"
|
||||
|
||||
- name: Worker 1
|
||||
profile: k8s-worker
|
||||
require:
|
||||
uuid: 264cd073-ca62-44b3-98c0-50aad5b5f819
|
||||
metadata:
|
||||
ipv4_address: 172.17.0.22
|
||||
pxe: "true"
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.17.0.1
|
||||
networkd_dns: 172.17.0.3
|
||||
networkd_address: 172.17.0.22/16
|
||||
k8s_version: v1.1.8_coreos.0
|
||||
k8s_etcd_endpoints: "http://172.17.0.21:2379,http://172.17.0.22:2379,http://172.17.0.23:2379"
|
||||
k8s_controller_endpoint: https://172.17.0.21
|
||||
k8s_dns_service_ip: 10.3.0.1
|
||||
k8s_cert_endpoint: http://bootcfg.foo:8080/assets
|
||||
fleet_metadata: "role=etcd,name=node2"
|
||||
etcd_name: node2
|
||||
etcd_initial_cluster: "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380"
|
||||
|
||||
- name: Worker 2
|
||||
profile: k8s-worker
|
||||
require:
|
||||
uuid: 39d2e747-2648-4d68-ae92-bbc70b245055
|
||||
metadata:
|
||||
ipv4_address: 172.17.0.23
|
||||
pxe: "true"
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.17.0.1
|
||||
networkd_dns: 172.17.0.3
|
||||
networkd_address: 172.17.0.23/16
|
||||
k8s_version: v1.1.8_coreos.0
|
||||
k8s_etcd_endpoints: "http://172.17.0.21:2379,http://172.17.0.22:2379,http://172.17.0.23:2379"
|
||||
k8s_controller_endpoint: https://172.17.0.21
|
||||
k8s_dns_service_ip: 10.3.0.1
|
||||
k8s_cert_endpoint: http://bootcfg.foo:8080/assets
|
||||
fleet_metadata: "role=etcd,name=node3"
|
||||
etcd_name: node3
|
||||
etcd_initial_cluster: "node1=http://172.17.0.21:2380,node2=http://172.17.0.22:2380,node3=http://172.17.0.23:2380"
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: CoreOS Install
|
||||
profile: install-reboot
|
||||
metadata:
|
||||
coreos_channel: alpha
|
||||
coreos_version: 983.0.0
|
||||
ignition_endpoint: http://bootcfg.foo:8080/ignition
|
||||
|
||||
- name: Master Node
|
||||
profile: k8s-master-install
|
||||
require:
|
||||
uuid: 16e7d8a7-bfa9-428b-9117-363341bb330b
|
||||
os: installed
|
||||
metadata:
|
||||
ipv4_address: 172.15.0.21
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.21/16
|
||||
k8s_version: v1.1.8_coreos.0
|
||||
k8s_etcd_endpoints: "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379"
|
||||
k8s_pod_network: 10.2.0.0/16
|
||||
k8s_service_ip_range: 10.3.0.0/24
|
||||
k8s_service_ip: 10.3.0.1
|
||||
k8s_dns_service_ip: 10.3.0.10
|
||||
k8s_cert_endpoint: http://bootcfg.foo:8080/assets
|
||||
fleet_metadata: "role=etcd,name=node1"
|
||||
etcd_name: node1
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
ssh_authorized_keys:
|
||||
|
||||
- name: Worker 1
|
||||
profile: k8s-worker-install
|
||||
require:
|
||||
uuid: 264cd073-ca62-44b3-98c0-50aad5b5f819
|
||||
os: installed
|
||||
metadata:
|
||||
ipv4_address: 172.15.0.22
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.22/16
|
||||
k8s_version: v1.1.8_coreos.0
|
||||
k8s_etcd_endpoints: "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379"
|
||||
k8s_controller_endpoint: https://172.15.0.21
|
||||
k8s_dns_service_ip: 10.3.0.1
|
||||
k8s_cert_endpoint: http://bootcfg.foo:8080/assets
|
||||
fleet_metadata: "role=etcd,name=node2"
|
||||
etcd_name: node2
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
ssh_authorized_keys:
|
||||
|
||||
- name: Worker 2
|
||||
profile: k8s-worker-install
|
||||
require:
|
||||
uuid: 39d2e747-2648-4d68-ae92-bbc70b245055
|
||||
os: installed
|
||||
metadata:
|
||||
ipv4_address: 172.15.0.23
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.23/16
|
||||
k8s_version: v1.1.8_coreos.0
|
||||
k8s_etcd_endpoints: "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379"
|
||||
k8s_controller_endpoint: https://172.15.0.21
|
||||
k8s_dns_service_ip: 10.3.0.1
|
||||
k8s_cert_endpoint: http://bootcfg.foo:8080/assets
|
||||
fleet_metadata: "role=etcd,name=node3"
|
||||
etcd_name: node3
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
ssh_authorized_keys:
|
||||
@@ -1,67 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: Master Node
|
||||
profile: k8s-master
|
||||
require:
|
||||
uuid: 16e7d8a7-bfa9-428b-9117-363341bb330b
|
||||
metadata:
|
||||
ipv4_address: 172.15.0.21
|
||||
pxe: "true"
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.21/16
|
||||
k8s_version: v1.1.8_coreos.0
|
||||
k8s_etcd_endpoints: "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379"
|
||||
k8s_pod_network: 10.2.0.0/16
|
||||
k8s_service_ip_range: 10.3.0.0/24
|
||||
k8s_service_ip: 10.3.0.1
|
||||
k8s_dns_service_ip: 10.3.0.10
|
||||
k8s_cert_endpoint: http://bootcfg.foo:8080/assets
|
||||
fleet_metadata: "role=etcd,name=node1"
|
||||
etcd_name: node1
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
ssh_authorized_keys:
|
||||
|
||||
- name: Worker 1
|
||||
profile: k8s-worker
|
||||
require:
|
||||
uuid: 264cd073-ca62-44b3-98c0-50aad5b5f819
|
||||
metadata:
|
||||
ipv4_address: 172.15.0.22
|
||||
pxe: "true"
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.22/16
|
||||
k8s_version: v1.1.8_coreos.0
|
||||
k8s_etcd_endpoints: "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379"
|
||||
k8s_controller_endpoint: https://172.15.0.21
|
||||
k8s_dns_service_ip: 10.3.0.1
|
||||
k8s_cert_endpoint: http://bootcfg.foo:8080/assets
|
||||
fleet_metadata: "role=etcd,name=node2"
|
||||
etcd_name: node2
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
ssh_authorized_keys:
|
||||
|
||||
- name: Worker 2
|
||||
profile: k8s-worker
|
||||
require:
|
||||
uuid: 39d2e747-2648-4d68-ae92-bbc70b245055
|
||||
metadata:
|
||||
ipv4_address: 172.15.0.23
|
||||
pxe: "true"
|
||||
networkd_name: ens3
|
||||
networkd_gateway: 172.15.0.1
|
||||
networkd_dns: 172.15.0.3
|
||||
networkd_address: 172.15.0.23/16
|
||||
k8s_version: v1.1.8_coreos.0
|
||||
k8s_etcd_endpoints: "http://172.15.0.21:2379,http://172.15.0.22:2379,http://172.15.0.23:2379"
|
||||
k8s_controller_endpoint: https://172.15.0.21
|
||||
k8s_dns_service_ip: 10.3.0.1
|
||||
k8s_cert_endpoint: http://bootcfg.foo:8080/assets
|
||||
fleet_metadata: "role=etcd,name=node3"
|
||||
etcd_name: node3
|
||||
etcd_initial_cluster: "node1=http://172.15.0.21:2380,node2=http://172.15.0.22:2380,node3=http://172.15.0.23:2380"
|
||||
ssh_authorized_keys:
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: Partition disk with Root Filesystem for PXE (non-installs)
|
||||
profile: pxe-disk
|
||||
metadata:
|
||||
ssh_authorized_keys:
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
api_version: v1alpha1
|
||||
groups:
|
||||
- name: PXE CoreOS alpha
|
||||
profile: pxe
|
||||
metadata:
|
||||
ssh_authorized_keys:
|
||||
Reference in New Issue
Block a user