dev-lxc 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +17 -17
- data/CHANGELOG.md +317 -313
- data/Gemfile +4 -4
- data/LICENSE +201 -201
- data/README.md +287 -279
- data/Rakefile +1 -1
- data/bin/dev-lxc +9 -9
- data/dev-lxc.gemspec +26 -26
- data/docs/adhoc_clusters.md +22 -22
- data/docs/base_containers.md +44 -44
- data/docs/configuration.md +203 -203
- data/docs/dev-lxc_version_2.md +10 -10
- data/docs/manage_multiple_clusters.md +30 -30
- data/docs/usage.md +187 -187
- data/lib/dev-lxc/cli.rb +434 -434
- data/lib/dev-lxc/cluster.rb +1211 -1211
- data/lib/dev-lxc/container.rb +123 -123
- data/lib/dev-lxc/server.rb +197 -197
- data/lib/dev-lxc/version.rb +3 -3
- data/lib/dev-lxc.rb +118 -118
- metadata +2 -2
data/docs/adhoc_clusters.md
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
### Adhoc Clusters
|
2
|
-
|
3
|
-
dev-lxc can also manage an adhoc cluster of servers.
|
4
|
-
|
5
|
-
An adhoc cluster is just a set of managed servers cloned from the specified base
|
6
|
-
container. The servers have SSH server running, a "dev-lxc" user with "dev-lxc" password and
|
7
|
-
passwordless sudo access.
|
8
|
-
|
9
|
-
This is particularly useful when you want to use something else, such as chef-provisioning,
|
10
|
-
to configure the servers.
|
11
|
-
|
12
|
-
The number of servers, their names and their IP addresses can be changed to fit your
|
13
|
-
particular requirements.
|
14
|
-
|
15
|
-
```
|
16
|
-
mkdir -p /root/work/clusters/delivery
|
17
|
-
cd /root/work/clusters/delivery
|
18
|
-
dev-lxc init --adhoc > dev-lxc.yml
|
19
|
-
# edit dev-lxc.yml to have enough adhoc servers for a delivery cluster
|
20
|
-
cluster-view
|
21
|
-
dl up
|
22
|
-
```
|
1
|
+
### Adhoc Clusters
|
2
|
+
|
3
|
+
dev-lxc can also manage an adhoc cluster of servers.
|
4
|
+
|
5
|
+
An adhoc cluster is just a set of managed servers cloned from the specified base
|
6
|
+
container. The servers have SSH server running, a "dev-lxc" user with "dev-lxc" password and
|
7
|
+
passwordless sudo access.
|
8
|
+
|
9
|
+
This is particularly useful when you want to use something else, such as chef-provisioning,
|
10
|
+
to configure the servers.
|
11
|
+
|
12
|
+
The number of servers, their names and their IP addresses can be changed to fit your
|
13
|
+
particular requirements.
|
14
|
+
|
15
|
+
```
|
16
|
+
mkdir -p /root/work/clusters/delivery
|
17
|
+
cd /root/work/clusters/delivery
|
18
|
+
dev-lxc init --adhoc > dev-lxc.yml
|
19
|
+
# edit dev-lxc.yml to have enough adhoc servers for a delivery cluster
|
20
|
+
cluster-view
|
21
|
+
dl up
|
22
|
+
```
|
data/docs/base_containers.md
CHANGED
@@ -1,44 +1,44 @@
|
|
1
|
-
### Base Containers
|
2
|
-
|
3
|
-
The container that is used as the base container for a cluster's containers must exist before
|
4
|
-
the cluster can be built. The cluster's containers are cloned from the base container using
|
5
|
-
the btrfs filesystem to very quickly provide a lightweight duplicate of the container.
|
6
|
-
|
7
|
-
This container provides the chosen OS platform and version (e.g. b-ubuntu-1404).
|
8
|
-
|
9
|
-
A typical LXC container has minimal packages installed so `dev-lxc` makes sure that the
|
10
|
-
same packages used in Chef's [bento boxes](https://github.com/opscode/bento) are
|
11
|
-
installed to provide a more typical server environment.
|
12
|
-
A few additional packages are also installed.
|
13
|
-
|
14
|
-
Base containers have openssh-server installed and running with unique SSH Host Keys.
|
15
|
-
|
16
|
-
Base containers have a "dev-lxc" user with "dev-lxc" password and passwordless sudo.
|
17
|
-
|
18
|
-
*Once this base container is created there is rarely a need to delete it.*
|
19
|
-
|
20
|
-
### Create a dev-lxc Base Container
|
21
|
-
|
22
|
-
dev-lxc is able to create base containers that have openssh-server installed and running with unique SSH Host Keys.
|
23
|
-
|
24
|
-
dev-lxc base containers have a "dev-lxc" user with "dev-lxc" password and passwordless sudo.
|
25
|
-
|
26
|
-
You can see a menu of base containers that `dev-lxc` can create by using the following command.
|
27
|
-
|
28
|
-
```
|
29
|
-
dev-lxc create-base-container
|
30
|
-
```
|
31
|
-
|
32
|
-
The initial creation of base containers can take awhile so let's go ahead and start creating
|
33
|
-
an Ubuntu 14.04 container now.
|
34
|
-
|
35
|
-
```
|
36
|
-
dev-lxc create-base-container b-ubuntu-1404
|
37
|
-
```
|
38
|
-
|
39
|
-
Note: It is possible to pass additional arguments to the underlying LXC create command.
|
40
|
-
For example:
|
41
|
-
|
42
|
-
```
|
43
|
-
dev-lxc create-base-container b-ubuntu-1404 -o -- '--no-validate --keyserver http://my.key.server.com'
|
44
|
-
```
|
1
|
+
### Base Containers
|
2
|
+
|
3
|
+
The container that is used as the base container for a cluster's containers must exist before
|
4
|
+
the cluster can be built. The cluster's containers are cloned from the base container using
|
5
|
+
the btrfs filesystem to very quickly provide a lightweight duplicate of the container.
|
6
|
+
|
7
|
+
This container provides the chosen OS platform and version (e.g. b-ubuntu-1404).
|
8
|
+
|
9
|
+
A typical LXC container has minimal packages installed so `dev-lxc` makes sure that the
|
10
|
+
same packages used in Chef's [bento boxes](https://github.com/opscode/bento) are
|
11
|
+
installed to provide a more typical server environment.
|
12
|
+
A few additional packages are also installed.
|
13
|
+
|
14
|
+
Base containers have openssh-server installed and running with unique SSH Host Keys.
|
15
|
+
|
16
|
+
Base containers have a "dev-lxc" user with "dev-lxc" password and passwordless sudo.
|
17
|
+
|
18
|
+
*Once this base container is created there is rarely a need to delete it.*
|
19
|
+
|
20
|
+
### Create a dev-lxc Base Container
|
21
|
+
|
22
|
+
dev-lxc is able to create base containers that have openssh-server installed and running with unique SSH Host Keys.
|
23
|
+
|
24
|
+
dev-lxc base containers have a "dev-lxc" user with "dev-lxc" password and passwordless sudo.
|
25
|
+
|
26
|
+
You can see a menu of base containers that `dev-lxc` can create by using the following command.
|
27
|
+
|
28
|
+
```
|
29
|
+
dev-lxc create-base-container
|
30
|
+
```
|
31
|
+
|
32
|
+
The initial creation of base containers can take awhile so let's go ahead and start creating
|
33
|
+
an Ubuntu 14.04 container now.
|
34
|
+
|
35
|
+
```
|
36
|
+
dev-lxc create-base-container b-ubuntu-1404
|
37
|
+
```
|
38
|
+
|
39
|
+
Note: It is possible to pass additional arguments to the underlying LXC create command.
|
40
|
+
For example:
|
41
|
+
|
42
|
+
```
|
43
|
+
dev-lxc create-base-container b-ubuntu-1404 -o -- '--no-validate --keyserver http://my.key.server.com'
|
44
|
+
```
|
data/docs/configuration.md
CHANGED
@@ -1,203 +1,203 @@
|
|
1
|
-
### dev-lxc.yml Config Files
|
2
|
-
|
3
|
-
dev-lxc uses a YAML configuration file named `dev-lxc.yml` to define a cluster.
|
4
|
-
|
5
|
-
The `init` command generates sample config files for various server types.
|
6
|
-
|
7
|
-
Let's generate a config for a cluster with a standalone Chef Server, Supermarket server,
|
8
|
-
Compliance server, Chef Automate server, job dispatch runner and an infrastructure node.
|
9
|
-
|
10
|
-
```
|
11
|
-
dev-lxc init --chef --compliance --supermarket --automate --runners --nodes > dev-lxc.yml
|
12
|
-
```
|
13
|
-
|
14
|
-
The contents of `dev-lxc.yml` should look like this.
|
15
|
-
|
16
|
-
```
|
17
|
-
# enable_build_snapshots automatically makes container snapshots at key times during the build process
|
18
|
-
# default value is `true`
|
19
|
-
#enable_build_snapshots: true
|
20
|
-
|
21
|
-
# base_container must be the name of an existing container
|
22
|
-
base_container: b-ubuntu-1404
|
23
|
-
|
24
|
-
# memory_per_server sets the maximum amount of user memory (including file cache) for each server.
|
25
|
-
# dev-lxc will set the `memory.limit_in_bytes` cgroup for each server to apply this limit.
|
26
|
-
# If no units are specified, the value is interpreted as bytes.
|
27
|
-
# You can use suffixes to represent larger units
|
28
|
-
# The default behavior is that no limit is set.
|
29
|
-
#memory_per_server: 4G
|
30
|
-
|
31
|
-
# list any host directories you want mounted into the servers
|
32
|
-
#mounts:
|
33
|
-
# - /root/work root/work
|
34
|
-
|
35
|
-
# list any SSH public keys you want added to /home/dev-lxc/.ssh/authorized_keys
|
36
|
-
#ssh-keys:
|
37
|
-
# - /root/work/clusters/id_rsa.pub
|
38
|
-
|
39
|
-
# DHCP reserved (static) IPs must be selected from the IP range 10.0.3.150 - 254
|
40
|
-
|
41
|
-
chef-server:
|
42
|
-
users: # a user's password will be the same as its username
|
43
|
-
- mary-admin
|
44
|
-
- joe-user
|
45
|
-
orgs:
|
46
|
-
demo:
|
47
|
-
admins:
|
48
|
-
- mary-admin
|
49
|
-
non-admins:
|
50
|
-
- joe-user
|
51
|
-
servers:
|
52
|
-
chef.lxc:
|
53
|
-
ipaddress: 10.0.3.203
|
54
|
-
products:
|
55
|
-
chef-server:
|
56
|
-
manage:
|
57
|
-
push-jobs-server:
|
58
|
-
reporting:
|
59
|
-
|
60
|
-
compliance:
|
61
|
-
admin_user: admin # the password will be the same as the username
|
62
|
-
servers:
|
63
|
-
compliance.lxc:
|
64
|
-
ipaddress: 10.0.3.205
|
65
|
-
products:
|
66
|
-
compliance:
|
67
|
-
|
68
|
-
supermarket:
|
69
|
-
servers:
|
70
|
-
supermarket.lxc:
|
71
|
-
ipaddress: 10.0.3.206
|
72
|
-
products:
|
73
|
-
supermarket:
|
74
|
-
|
75
|
-
automate:
|
76
|
-
servers:
|
77
|
-
automate.lxc:
|
78
|
-
ipaddress: 10.0.3.200
|
79
|
-
products:
|
80
|
-
delivery:
|
81
|
-
license_path: /path/for/automate.lxc
|
82
|
-
chef_org: delivery
|
83
|
-
enterprise_name: demo-ent
|
84
|
-
|
85
|
-
runners:
|
86
|
-
servers:
|
87
|
-
runner-1.lxc:
|
88
|
-
products:
|
89
|
-
chefdk: # downloaded only
|
90
|
-
|
91
|
-
nodes:
|
92
|
-
chef_server_url: https://chef.lxc/organizations/demo
|
93
|
-
validation_client_name: demo-validator
|
94
|
-
# comment out or remove the validation_key path to use chef-server keys generated by dev-lxc
|
95
|
-
validation_key: # /path/for/ORG-validator.pem
|
96
|
-
servers:
|
97
|
-
node-1.lxc:
|
98
|
-
products:
|
99
|
-
chef:
|
100
|
-
```
|
101
|
-
|
102
|
-
The dev-lxc.yml config file is very customizable. You can add or remove mounts, products or servers,
|
103
|
-
change ip addresses, server names, the base_container and more.
|
104
|
-
|
105
|
-
As you can see there are six server types represented by six servers.
|
106
|
-
|
107
|
-
1. chef-server - chef.lxc
|
108
|
-
2. compliance - compliance.lxc
|
109
|
-
3. supermarket - supermarket.lxc
|
110
|
-
4. automate - automate.lxc
|
111
|
-
5. runners - runner-1.lxc
|
112
|
-
6. nodes - node-1.lxc
|
113
|
-
|
114
|
-
#### Global Settings
|
115
|
-
|
116
|
-
The global settings used by each of the server types are `enable_build_snapshots`, the `base_container`, `memory_per_server`, a list of `mounts` and a list of `ssh-keys`. These settings are described in the config comments.
|
117
|
-
|
118
|
-
Be sure to set `base_container` in the `dev-lxc.yml` to an existing container's name.
|
119
|
-
This container will be cloned to create each container in the cluster.
|
120
|
-
If you don't already have a container to use as a `base_container` then you can follow the instructions in the
|
121
|
-
[Create a dev-lxc Base Container section](https://github.com/jeremiahsnapp/dev-lxc#create-a-dev-lxc-base-container) to create one.
|
122
|
-
|
123
|
-
#### Server Specific Settings
|
124
|
-
|
125
|
-
It is possible to define different values for `enable_build_snapshots`, `base_container`, `memory_per_server`, `mounts` or `ssh-keys` for a particular server type or even for a particular server as you can see in the following snippet.
|
126
|
-
|
127
|
-
```
|
128
|
-
nodes:
|
129
|
-
base_container: b-ubuntu-1404
|
130
|
-
servers:
|
131
|
-
node-1.lxc:
|
132
|
-
base_container: b-centos-6
|
133
|
-
node-2.lxc:
|
134
|
-
```
|
135
|
-
|
136
|
-
IP addresses from the range 10.0.3.150 - 254 can be assigned to the servers. If an IP address
|
137
|
-
is not specified then a dynamic IP address is assigned when the server starts.
|
138
|
-
|
139
|
-
#### mixlib-install Library Automatically Manages a Cache of Product Packages
|
140
|
-
|
141
|
-
dev-lxc uses the [mixlib-install](https://github.com/chef/mixlib-install) library to download Chef products
|
142
|
-
to a cache in `/var/dev-lxc` in the host instance. This cache is automatically mounted into each server when it starts.
|
143
|
-
|
144
|
-
A list of Chef products to be installed can be defined for each server
|
145
|
-
using [product names that mixlib-install understands](https://github.com/chef/mixlib-install/blob/master/PRODUCT_MATRIX.md).
|
146
|
-
|
147
|
-
The channel and version of the product can be defined also.
|
148
|
-
|
149
|
-
Channel can be `current`, `stable` or `unstable` with `stable` as the default.
|
150
|
-
Version can be `latest` or a version number with `latest` as the default.
|
151
|
-
|
152
|
-
For example, the following specifies the `current` channel and version `0.16.1` of the `chefdk` product.
|
153
|
-
|
154
|
-
```
|
155
|
-
nodes:
|
156
|
-
servers:
|
157
|
-
node-1.lxc:
|
158
|
-
products:
|
159
|
-
chefdk:
|
160
|
-
channel: current
|
161
|
-
version: 0.16.1
|
162
|
-
```
|
163
|
-
|
164
|
-
The `package_source` setting can be used to specify a package file on disk.
|
165
|
-
|
166
|
-
```
|
167
|
-
nodes:
|
168
|
-
servers:
|
169
|
-
node-1.lxc:
|
170
|
-
products:
|
171
|
-
chefdk:
|
172
|
-
package_source: /root/chefdk_0.16.1-1_amd64.deb
|
173
|
-
```
|
174
|
-
|
175
|
-
#### Chef Server Orgs/Users
|
176
|
-
|
177
|
-
When defining a Chef Server you can include organizations and users that will be automatically created and associated accordingly.
|
178
|
-
|
179
|
-
#### Automatic Integration Between Servers
|
180
|
-
|
181
|
-
dev-lxc knows how to automatically configure Chef Server standalone, Chef Server tier topology,
|
182
|
-
Chef Server HA 2.0 as well as Chef Automate, Chef Client, Analytics, Compliance and Supermarket.
|
183
|
-
|
184
|
-
If a Chef Automate server, Compliance server, Analytics server or Supermarket server is defined in the same config file as
|
185
|
-
a Chef Server then each server will automatically be integrated with that Chef Server.
|
186
|
-
|
187
|
-
If a node server with Chef Client or Chef DK installed is defined in the same config file as
|
188
|
-
a Chef Server then the Chef Client will automatically be configured to use that Chef Server.
|
189
|
-
|
190
|
-
Alternatively, values for `chef_server_url`, `validation_client_name` and `validation_key` can
|
191
|
-
be set in the config file either for all nodes or for each individual node.
|
192
|
-
|
193
|
-
```
|
194
|
-
nodes:
|
195
|
-
chef_server_url: https://chef.lxc/organizations/demo
|
196
|
-
validation_client_name: demo-validator
|
197
|
-
# comment out or remove the validation_key path to use chef-server keys generated by dev-lxc
|
198
|
-
validation_key: # /path/to/org/validation/key
|
199
|
-
servers:
|
200
|
-
node-1.lxc:
|
201
|
-
products:
|
202
|
-
chef:
|
203
|
-
```
|
1
|
+
### dev-lxc.yml Config Files
|
2
|
+
|
3
|
+
dev-lxc uses a YAML configuration file named `dev-lxc.yml` to define a cluster.
|
4
|
+
|
5
|
+
The `init` command generates sample config files for various server types.
|
6
|
+
|
7
|
+
Let's generate a config for a cluster with a standalone Chef Server, Supermarket server,
|
8
|
+
Compliance server, Chef Automate server, job dispatch runner and an infrastructure node.
|
9
|
+
|
10
|
+
```
|
11
|
+
dev-lxc init --chef --compliance --supermarket --automate --runners --nodes > dev-lxc.yml
|
12
|
+
```
|
13
|
+
|
14
|
+
The contents of `dev-lxc.yml` should look like this.
|
15
|
+
|
16
|
+
```
|
17
|
+
# enable_build_snapshots automatically makes container snapshots at key times during the build process
|
18
|
+
# default value is `true`
|
19
|
+
#enable_build_snapshots: true
|
20
|
+
|
21
|
+
# base_container must be the name of an existing container
|
22
|
+
base_container: b-ubuntu-1404
|
23
|
+
|
24
|
+
# memory_per_server sets the maximum amount of user memory (including file cache) for each server.
|
25
|
+
# dev-lxc will set the `memory.limit_in_bytes` cgroup for each server to apply this limit.
|
26
|
+
# If no units are specified, the value is interpreted as bytes.
|
27
|
+
# You can use suffixes to represent larger units - k or K for kilobytes, m or M for megabytes, and g or G for gigabytes.
|
28
|
+
# The default behavior is that no limit is set.
|
29
|
+
#memory_per_server: 4G
|
30
|
+
|
31
|
+
# list any host directories you want mounted into the servers
|
32
|
+
#mounts:
|
33
|
+
# - /root/work root/work
|
34
|
+
|
35
|
+
# list any SSH public keys you want added to /home/dev-lxc/.ssh/authorized_keys
|
36
|
+
#ssh-keys:
|
37
|
+
# - /root/work/clusters/id_rsa.pub
|
38
|
+
|
39
|
+
# DHCP reserved (static) IPs must be selected from the IP range 10.0.3.150 - 254
|
40
|
+
|
41
|
+
chef-server:
|
42
|
+
users: # a user's password will be the same as its username
|
43
|
+
- mary-admin
|
44
|
+
- joe-user
|
45
|
+
orgs:
|
46
|
+
demo:
|
47
|
+
admins:
|
48
|
+
- mary-admin
|
49
|
+
non-admins:
|
50
|
+
- joe-user
|
51
|
+
servers:
|
52
|
+
chef.lxc:
|
53
|
+
ipaddress: 10.0.3.203
|
54
|
+
products:
|
55
|
+
chef-server:
|
56
|
+
manage:
|
57
|
+
push-jobs-server:
|
58
|
+
reporting:
|
59
|
+
|
60
|
+
compliance:
|
61
|
+
admin_user: admin # the password will be the same as the username
|
62
|
+
servers:
|
63
|
+
compliance.lxc:
|
64
|
+
ipaddress: 10.0.3.205
|
65
|
+
products:
|
66
|
+
compliance:
|
67
|
+
|
68
|
+
supermarket:
|
69
|
+
servers:
|
70
|
+
supermarket.lxc:
|
71
|
+
ipaddress: 10.0.3.206
|
72
|
+
products:
|
73
|
+
supermarket:
|
74
|
+
|
75
|
+
automate:
|
76
|
+
servers:
|
77
|
+
automate.lxc:
|
78
|
+
ipaddress: 10.0.3.200
|
79
|
+
products:
|
80
|
+
delivery:
|
81
|
+
license_path: /path/for/automate.lxc
|
82
|
+
chef_org: delivery
|
83
|
+
enterprise_name: demo-ent
|
84
|
+
|
85
|
+
runners:
|
86
|
+
servers:
|
87
|
+
runner-1.lxc:
|
88
|
+
products:
|
89
|
+
chefdk: # downloaded only
|
90
|
+
|
91
|
+
nodes:
|
92
|
+
chef_server_url: https://chef.lxc/organizations/demo
|
93
|
+
validation_client_name: demo-validator
|
94
|
+
# comment out or remove the validation_key path to use chef-server keys generated by dev-lxc
|
95
|
+
validation_key: # /path/for/ORG-validator.pem
|
96
|
+
servers:
|
97
|
+
node-1.lxc:
|
98
|
+
products:
|
99
|
+
chef:
|
100
|
+
```
|
101
|
+
|
102
|
+
The dev-lxc.yml config file is very customizable. You can add or remove mounts, products or servers,
|
103
|
+
change ip addresses, server names, the base_container and more.
|
104
|
+
|
105
|
+
As you can see there are six server types represented by six servers.
|
106
|
+
|
107
|
+
1. chef-server - chef.lxc
|
108
|
+
2. compliance - compliance.lxc
|
109
|
+
3. supermarket - supermarket.lxc
|
110
|
+
4. automate - automate.lxc
|
111
|
+
5. runners - runner-1.lxc
|
112
|
+
6. nodes - node-1.lxc
|
113
|
+
|
114
|
+
#### Global Settings
|
115
|
+
|
116
|
+
The global settings used by each of the server types are `enable_build_snapshots`, the `base_container`, `memory_per_server`, a list of `mounts` and a list of `ssh-keys`. These settings are described in the config comments.
|
117
|
+
|
118
|
+
Be sure to set `base_container` in the `dev-lxc.yml` to an existing container's name.
|
119
|
+
This container will be cloned to create each container in the cluster.
|
120
|
+
If you don't already have a container to use as a `base_container` then you can follow the instructions in the
|
121
|
+
[Create a dev-lxc Base Container section](https://github.com/jeremiahsnapp/dev-lxc#create-a-dev-lxc-base-container) to create one.
|
122
|
+
|
123
|
+
#### Server Specific Settings
|
124
|
+
|
125
|
+
It is possible to define different values for `enable_build_snapshots`, `base_container`, `memory_per_server`, `mounts` or `ssh-keys` for a particular server type or even for a particular server as you can see in the following snippet.
|
126
|
+
|
127
|
+
```
|
128
|
+
nodes:
|
129
|
+
base_container: b-ubuntu-1404
|
130
|
+
servers:
|
131
|
+
node-1.lxc:
|
132
|
+
base_container: b-centos-6
|
133
|
+
node-2.lxc:
|
134
|
+
```
|
135
|
+
|
136
|
+
IP addresses from the range 10.0.3.150 - 254 can be assigned to the servers. If an IP address
|
137
|
+
is not specified then a dynamic IP address is assigned when the server starts.
|
138
|
+
|
139
|
+
#### mixlib-install Library Automatically Manages a Cache of Product Packages
|
140
|
+
|
141
|
+
dev-lxc uses the [mixlib-install](https://github.com/chef/mixlib-install) library to download Chef products
|
142
|
+
to a cache in `/var/dev-lxc` in the host instance. This cache is automatically mounted into each server when it starts.
|
143
|
+
|
144
|
+
A list of Chef products to be installed can be defined for each server
|
145
|
+
using [product names that mixlib-install understands](https://github.com/chef/mixlib-install/blob/master/PRODUCT_MATRIX.md).
|
146
|
+
|
147
|
+
The channel and version of the product can be defined also.
|
148
|
+
|
149
|
+
Channel can be `current`, `stable` or `unstable` with `stable` as the default.
|
150
|
+
Version can be `latest` or a version number with `latest` as the default.
|
151
|
+
|
152
|
+
For example, the following specifies the `current` channel and version `0.16.1` of the `chefdk` product.
|
153
|
+
|
154
|
+
```
|
155
|
+
nodes:
|
156
|
+
servers:
|
157
|
+
node-1.lxc:
|
158
|
+
products:
|
159
|
+
chefdk:
|
160
|
+
channel: current
|
161
|
+
version: 0.16.1
|
162
|
+
```
|
163
|
+
|
164
|
+
The `package_source` setting can be used to specify a package file on disk.
|
165
|
+
|
166
|
+
```
|
167
|
+
nodes:
|
168
|
+
servers:
|
169
|
+
node-1.lxc:
|
170
|
+
products:
|
171
|
+
chefdk:
|
172
|
+
package_source: /root/chefdk_0.16.1-1_amd64.deb
|
173
|
+
```
|
174
|
+
|
175
|
+
#### Chef Server Orgs/Users
|
176
|
+
|
177
|
+
When defining a Chef Server you can include organizations and users that will be automatically created and associated accordingly.
|
178
|
+
|
179
|
+
#### Automatic Integration Between Servers
|
180
|
+
|
181
|
+
dev-lxc knows how to automatically configure Chef Server standalone, Chef Server tier topology,
|
182
|
+
Chef Server HA 2.0 as well as Chef Automate, Chef Client, Analytics, Compliance and Supermarket.
|
183
|
+
|
184
|
+
If a Chef Automate server, Compliance server, Analytics server or Supermarket server is defined in the same config file as
|
185
|
+
a Chef Server then each server will automatically be integrated with that Chef Server.
|
186
|
+
|
187
|
+
If a node server with Chef Client or Chef DK installed is defined in the same config file as
|
188
|
+
a Chef Server then the Chef Client will automatically be configured to use that Chef Server.
|
189
|
+
|
190
|
+
Alternatively, values for `chef_server_url`, `validation_client_name` and `validation_key` can
|
191
|
+
be set in the config file either for all nodes or for each individual node.
|
192
|
+
|
193
|
+
```
|
194
|
+
nodes:
|
195
|
+
chef_server_url: https://chef.lxc/organizations/demo
|
196
|
+
validation_client_name: demo-validator
|
197
|
+
# comment out or remove the validation_key path to use chef-server keys generated by dev-lxc
|
198
|
+
validation_key: # /path/to/org/validation/key
|
199
|
+
servers:
|
200
|
+
node-1.lxc:
|
201
|
+
products:
|
202
|
+
chef:
|
203
|
+
```
|
data/docs/dev-lxc_version_2.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
# dev-lxc 2.0 is Available
|
2
|
-
|
3
|
-
Here are some of the new features which provide a significantly simplified and streamlined usage.
|
4
|
-
|
5
|
-
* mixlib-install library is used to automatically manage a cache of product packages
|
6
|
-
* Genuine container snapshot management (make as many snapshots as you want)
|
7
|
-
* New "nodes" server type which auto configures nodes for a Chef Server in the same cluster
|
8
|
-
* Removed all xc-... bash functions because the new "nodes" server type replaces this functionality
|
9
|
-
* Able to build Chef Server HA 2.0 cluster using chef-backend
|
10
|
-
* Updated and simplified READMEs
|
1
|
+
# dev-lxc 2.0 is Available
|
2
|
+
|
3
|
+
Here are some of the new features which provide a significantly simplified and streamlined usage.
|
4
|
+
|
5
|
+
* mixlib-install library is used to automatically manage a cache of product packages
|
6
|
+
* Genuine container snapshot management (make as many snapshots as you want)
|
7
|
+
* New "nodes" server type which auto configures nodes for a Chef Server in the same cluster
|
8
|
+
* Removed all xc-... bash functions because the new "nodes" server type replaces this functionality
|
9
|
+
* Able to build Chef Server HA 2.0 cluster using chef-backend
|
10
|
+
* Updated and simplified READMEs
|
@@ -1,30 +1,30 @@
|
|
1
|
-
### Maintain Uniqueness Across Multiple Clusters
|
2
|
-
|
3
|
-
The default cluster configs are already designed to be unique from each other but as you build
|
4
|
-
more clusters you have to maintain uniqueness across the YAML config files for the following items.
|
5
|
-
|
6
|
-
* Server names, `api_fqdn` and `analytics_fqdn`
|
7
|
-
|
8
|
-
Server names should really be unique across all clusters.
|
9
|
-
|
10
|
-
Even when cluster A is shutdown, if cluster B uses the same server names when it is created it
|
11
|
-
will use the already existing servers from cluster A.
|
12
|
-
|
13
|
-
`api_fqdn` and `analytics_fqdn` uniqueness only matters when clusters with the same `api_fqdn`
|
14
|
-
and `analytics_fqdn` are running.
|
15
|
-
|
16
|
-
If cluster B is started with the same `api_fqdn` or `analytics_fqdn` as an already running cluster A,
|
17
|
-
then cluster B will overwrite cluster A's DNS resolution of `api_fqdn` or `analytics_fqdn`.
|
18
|
-
|
19
|
-
* IP Addresses
|
20
|
-
|
21
|
-
IP addresses uniqueness only matters when clusters with the same IP's are running.
|
22
|
-
|
23
|
-
If cluster B is started with the same IP's as an already running cluster A, then cluster B
|
24
|
-
will overwrite cluster A's DHCP reservation of the IP's but dnsmasq will still refuse to
|
25
|
-
assign the IP's to cluster B because they already in use by cluster A. dnsmasq then assigns
|
26
|
-
random IP's from the DHCP pool to cluster B leaving it in an unexpected state.
|
27
|
-
|
28
|
-
The `dev-lxc-platform` creates the IP range 10.0.3.150 - 254 for DHCP reserved IP's.
|
29
|
-
|
30
|
-
Use unique IP's from that range when configuring clusters.
|
1
|
+
### Maintain Uniqueness Across Multiple Clusters
|
2
|
+
|
3
|
+
The default cluster configs are already designed to be unique from each other but as you build
|
4
|
+
more clusters you have to maintain uniqueness across the YAML config files for the following items.
|
5
|
+
|
6
|
+
* Server names, `api_fqdn` and `analytics_fqdn`
|
7
|
+
|
8
|
+
Server names should really be unique across all clusters.
|
9
|
+
|
10
|
+
Even when cluster A is shutdown, if cluster B uses the same server names when it is created it
|
11
|
+
will use the already existing servers from cluster A.
|
12
|
+
|
13
|
+
`api_fqdn` and `analytics_fqdn` uniqueness only matters when clusters with the same `api_fqdn`
|
14
|
+
and `analytics_fqdn` are running.
|
15
|
+
|
16
|
+
If cluster B is started with the same `api_fqdn` or `analytics_fqdn` as an already running cluster A,
|
17
|
+
then cluster B will overwrite cluster A's DNS resolution of `api_fqdn` or `analytics_fqdn`.
|
18
|
+
|
19
|
+
* IP Addresses
|
20
|
+
|
21
|
+
IP addresses uniqueness only matters when clusters with the same IP's are running.
|
22
|
+
|
23
|
+
If cluster B is started with the same IP's as an already running cluster A, then cluster B
|
24
|
+
will overwrite cluster A's DHCP reservation of the IP's but dnsmasq will still refuse to
|
25
|
+
assign the IP's to cluster B because they already in use by cluster A. dnsmasq then assigns
|
26
|
+
random IP's from the DHCP pool to cluster B leaving it in an unexpected state.
|
27
|
+
|
28
|
+
The `dev-lxc-platform` creates the IP range 10.0.3.150 - 254 for DHCP reserved IP's.
|
29
|
+
|
30
|
+
Use unique IP's from that range when configuring clusters.
|