dev-lxc 3.0.0 → 3.1.0
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/CHANGELOG.md +9 -0
- data/README.md +22 -37
- data/docs/adhoc_clusters.md +3 -3
- data/docs/byobu_keybindings.md +22 -0
- data/docs/configuration.md +1 -1
- data/docs/mitmproxy.md +1 -1
- data/example-clusters/README.md +37 -0
- data/example-clusters/automate_dev-lxc.yml +83 -0
- data/example-clusters/chef-backend_dev-lxc.yml +69 -0
- data/example-clusters/tier_dev-lxc.yml +70 -0
- data/lib/dev-lxc/cli.rb +1 -1
- data/lib/dev-lxc/cluster.rb +7 -3
- data/lib/dev-lxc/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 418e5d84f4cd828da09f766360fb63e68ff52fc6
|
|
4
|
+
data.tar.gz: eb420a6d8a3fcc30a9ec84e1a43ae63f7b8ea063
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 71955db99c7af24fdf4ee602e61d5bb669a95500a58baa95d36a8be2a4fd2ebd51894a95bcc315349f0e7308cfe401df8713c85270b49c0d9cd2caba4120a3ed
|
|
7
|
+
data.tar.gz: 1a3114175737f4e9396d82cd7ce9924e88705ad42a59d9b05a4741e26c1015a2b29f848885853e9b42b023941c4f35c8e985d2950e6589a4bfd49a4721843e2e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# dev-lxc Change Log
|
|
2
2
|
|
|
3
|
+
## 3.1.0 (2017-03-08)
|
|
4
|
+
|
|
5
|
+
* Add example dev-lxc.yml files
|
|
6
|
+
* Change product name from 'delivery' to 'automate'
|
|
7
|
+
* Minor cleanup in adhoc_clusters docs
|
|
8
|
+
* Move byobu keybindings docs to its own file
|
|
9
|
+
* Minor improvements to README
|
|
10
|
+
* Minor updates about how to use tinyproxy or mitmproxy
|
|
11
|
+
|
|
3
12
|
## 3.0.0 (2017-03-06)
|
|
4
13
|
|
|
5
14
|
* Rename `dev-lxc` binary to `dl`
|
data/README.md
CHANGED
|
@@ -40,7 +40,7 @@ The easiest way to build a dev-lxc-platform system is to download the dev-lxc-pl
|
|
|
40
40
|
and use Test Kitchen to build an AWS EC2 instance or a VirtualBox Vagrant instance.
|
|
41
41
|
|
|
42
42
|
Follow the instructions in the [dev-lxc-platform README](https://github.com/jeremiahsnapp/dev-lxc-platform) to build
|
|
43
|
-
a dev-lxc-platform instance.
|
|
43
|
+
a dev-lxc-platform instance. It takes about 7 minutes to build the dev-lxc-platform instance.
|
|
44
44
|
|
|
45
45
|
## Login to the dev-lxc-platform instance
|
|
46
46
|
|
|
@@ -54,28 +54,7 @@ sudo -i
|
|
|
54
54
|
|
|
55
55
|
When you are logged in as the root user you should automatically enter a [byobu session](http://byobu.co/).
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Byobu makes it easy to manage multiple terminal windows and panes. You can press `F1` to get help which includes a [list of keybindings](http://manpages.ubuntu.com/manpages/wily/en/man1/byobu.1.html#contenttoc8).
|
|
60
|
-
|
|
61
|
-
`C-` refers to the keyboard's `Control` key.
|
|
62
|
-
`M-` refers to the keyboard's `Meta` key which is the `Alt` key on a PC keyboard and the `Option` key on an Apple keyboard.
|
|
63
|
-
|
|
64
|
-
The prefix key is set to `C-o`
|
|
65
|
-
|
|
66
|
-
Some of the keyboard shortcuts that will be most useful to you are:
|
|
67
|
-
|
|
68
|
-
* `M-Up`, `M-Down` - switch between Byobu sessions
|
|
69
|
-
* `M-Left`, `M-Right` - switch between windows in a session
|
|
70
|
-
* `shift-Left`, `shift-Right`, `shift-Up`, `shift-Down` - switch between panes in a window
|
|
71
|
-
* Windows users using Conemu must first disable "Start selection with Shift+Arrow" in "Mark/Copy" under the "Keys & Macro" settings
|
|
72
|
-
* `C-o C-s` - synchronize panes
|
|
73
|
-
* `C-o z` - zoom into and out of a pane
|
|
74
|
-
* `C-o M-1` - evenly split panes horizontally
|
|
75
|
-
* `C-o M-2` - evenly split panes vertically
|
|
76
|
-
* `M-pageup`, `M-pagedown` - page up/down in scrollback
|
|
77
|
-
|
|
78
|
-
Note: `Shift-F2` does not create horizontal splits for Windows users. Use the `C-o |` key binding instead.
|
|
57
|
+
See [byobu keybindings](docs/byobu_keybindings.md) to learn some byobu basics.
|
|
79
58
|
|
|
80
59
|
## Update dev-lxc gem
|
|
81
60
|
|
|
@@ -92,9 +71,9 @@ chef gem update dev-lxc
|
|
|
92
71
|
|
|
93
72
|
`dl` is the dev-lxc command line tool.
|
|
94
73
|
|
|
95
|
-
`
|
|
74
|
+
`dl` subcommands and some options can be auto-completed by pressing the `Tab` key.
|
|
96
75
|
|
|
97
|
-
You only have to type enough of a `
|
|
76
|
+
You only have to type enough of a `dl` subcommand to make it unique.
|
|
98
77
|
|
|
99
78
|
For example, the following commands are equivalent:
|
|
100
79
|
|
|
@@ -140,7 +119,7 @@ Copy your delivery.license file to the `/root/clusters` directory.
|
|
|
140
119
|
|
|
141
120
|
### cluster-view
|
|
142
121
|
|
|
143
|
-
Run the `cluster-view` command to create a Byobu
|
|
122
|
+
Run the `cluster-view` command to create a Byobu session specifically for this cluster.
|
|
144
123
|
|
|
145
124
|
```
|
|
146
125
|
cluster-view /root/clusters/automate
|
|
@@ -169,7 +148,9 @@ At this point all of the cluster's servers should be running.
|
|
|
169
148
|
|
|
170
149
|
Since the cluster has a Chef Server and an infrastructure node dev-lxc made sure it configured the node's chef-client for the Chef Server so it is easy to converge the node.
|
|
171
150
|
|
|
172
|
-
You can use the `attach` subcommand to login to
|
|
151
|
+
You can use the `attach` subcommand to login to a server as the root user.
|
|
152
|
+
|
|
153
|
+
For example, the following commands should attach to node-1.lxc, start a chef-client run and exit the node.
|
|
173
154
|
|
|
174
155
|
```
|
|
175
156
|
dl attach node
|
|
@@ -191,30 +172,30 @@ Since the cluster has a Chef Automate server you can use the `print-automate-cre
|
|
|
191
172
|
dl print
|
|
192
173
|
```
|
|
193
174
|
|
|
194
|
-
If you enabled
|
|
175
|
+
If you enabled local port forwarding for port 8888 in your workstation's SSH config file and configured your web browser to use `127.0.0.1:8888` for HTTP and HTTPS proxies as described in the [dev-lxc-platform README.md](https://github.com/jeremiahsnapp/dev-lxc-platform) then you should be able to browse from your workstation to any server that has a web interface using its FQDN.
|
|
195
176
|
|
|
196
|
-
|
|
177
|
+
For example, browse to https://automate.lxc and login with the credentials provided by `dl print-automate-credentials`.
|
|
197
178
|
|
|
198
|
-
|
|
179
|
+
### Manage the Cluster
|
|
199
180
|
|
|
200
|
-
|
|
181
|
+
Let's stop the servers before restoring and creating snapshots.
|
|
201
182
|
|
|
202
183
|
```
|
|
203
184
|
dl halt
|
|
204
185
|
```
|
|
205
186
|
|
|
206
|
-
You can restore
|
|
187
|
+
You can restore a specific snapshot by name if you desire.
|
|
188
|
+
|
|
189
|
+
For example, the following command restores the Chef Automate server to the state right after its package was installed but before it was configured.
|
|
207
190
|
|
|
208
191
|
```
|
|
209
|
-
dl snapshot -r
|
|
192
|
+
dl snapshot automate -r snap0
|
|
210
193
|
```
|
|
211
194
|
|
|
212
|
-
You
|
|
213
|
-
|
|
214
|
-
For example, you could restore the Chef Automate server to the state right after its package was installed but before it was configured.
|
|
195
|
+
You can restore the most recent snapshot of all the servers.
|
|
215
196
|
|
|
216
197
|
```
|
|
217
|
-
dl snapshot
|
|
198
|
+
dl snapshot -r
|
|
218
199
|
```
|
|
219
200
|
|
|
220
201
|
You can create snapshots with or without a comment.
|
|
@@ -239,6 +220,10 @@ dl destroy
|
|
|
239
220
|
|
|
240
221
|
For more in-depth documentation please see the pages in the [docs folder](docs).
|
|
241
222
|
|
|
223
|
+
## Example dev-lxc.yml files
|
|
224
|
+
|
|
225
|
+
See the files in [example-clusters](example-clusters).
|
|
226
|
+
|
|
242
227
|
## Contributing
|
|
243
228
|
|
|
244
229
|
1. Fork it
|
data/docs/adhoc_clusters.md
CHANGED
|
@@ -13,8 +13,8 @@ The number of servers, their names and their IP addresses can be changed to fit
|
|
|
13
13
|
particular requirements.
|
|
14
14
|
|
|
15
15
|
```
|
|
16
|
-
mkdir -p /root/clusters/
|
|
17
|
-
dl init --adhoc > /root/clusters/
|
|
18
|
-
cluster-view /root/clusters/
|
|
16
|
+
mkdir -p /root/clusters/adhoc
|
|
17
|
+
dl init --adhoc > /root/clusters/adhoc/dev-lxc.yml
|
|
18
|
+
cluster-view /root/clusters/adhoc
|
|
19
19
|
dl up
|
|
20
20
|
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
## byobu keybindings
|
|
2
|
+
|
|
3
|
+
byobu makes it easy to manage multiple terminal windows and panes. You can press `F1` to get help which includes a [list of keybindings](http://manpages.ubuntu.com/manpages/wily/en/man1/byobu.1.html#contenttoc8).
|
|
4
|
+
|
|
5
|
+
`C-` refers to the keyboard's `Control` key.
|
|
6
|
+
`M-` refers to the keyboard's `Meta` key which is the `Alt` key on a PC keyboard and the `Option` key on an Apple keyboard.
|
|
7
|
+
|
|
8
|
+
The prefix key is set to `C-o`
|
|
9
|
+
|
|
10
|
+
Some of the keyboard shortcuts that will be most useful to you are:
|
|
11
|
+
|
|
12
|
+
* `M-Up`, `M-Down` - switch between byobu sessions
|
|
13
|
+
* `M-Left`, `M-Right` - switch between windows in a session
|
|
14
|
+
* `shift-Left`, `shift-Right`, `shift-Up`, `shift-Down` - switch between panes in a window
|
|
15
|
+
* Windows users using Conemu must first disable "Start selection with Shift+Arrow" in "Mark/Copy" under the "Keys & Macro" settings
|
|
16
|
+
* `C-o C-s` - synchronize panes
|
|
17
|
+
* `C-o z` - zoom into and out of a pane
|
|
18
|
+
* `C-o M-1` - evenly split panes horizontally
|
|
19
|
+
* `C-o M-2` - evenly split panes vertically
|
|
20
|
+
* `M-pageup`, `M-pagedown` - page up/down in scrollback
|
|
21
|
+
|
|
22
|
+
Note: `Shift-F2` does not create horizontal splits for Windows users. Use the `C-o |` key binding instead.
|
data/docs/configuration.md
CHANGED
data/docs/mitmproxy.md
CHANGED
|
@@ -4,4 +4,4 @@ Run `mitmproxy` in a terminal on the host instance.
|
|
|
4
4
|
|
|
5
5
|
Uncomment the `https_proxy` line in the chef-repo's `.chef/knife.rb` or in a node's `/etc/chef/client.rb` so traffic from knife commands or chef-client runs will be proxied through mitmproxy making the HTTP requests visible in the mitmproxy console.
|
|
6
6
|
|
|
7
|
-
If you
|
|
7
|
+
If you enabled local port forwarding for port 8080 in your workstation's SSH config file and configured your web browser to use `127.0.0.1:8080` for HTTP and HTTPS proxies as described in the [dev-lxc-platform README.md](https://github.com/jeremiahsnapp/dev-lxc-platform) then you should be able to see the HTTP requests appear in the mitmproxy console.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
The files in this directory are working examples of cluster dev-lxc.yml files. You can upload them to separate directories in your dev-lxc-platform instance, rename each file to `dev-lxc.yml` and run `dl up` to build each cluster.
|
|
2
|
+
|
|
3
|
+
### automate
|
|
4
|
+
|
|
5
|
+
The [automate_dev-lxc.yml](example-clusters/automate_dev-lxc.yml) file was created using the following command.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
dl init --chef --compliance --supermarket --automate --runners --nodes
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Cluster build time: 19 minutes
|
|
12
|
+
|
|
13
|
+
### chef-backend
|
|
14
|
+
|
|
15
|
+
The [chef-backend_dev-lxc.yml](example-clusters/chef-backend_dev-lxc.yml) file was created using the following command.
|
|
16
|
+
|
|
17
|
+
The nodes' `chef_server_url` hostname was changed to `chef-ha.lxc` and the node's hostname was changed to `node-1-ha.lxc`.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
dl init --chef-backend --nodes
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Cluster build time: 12 minutes
|
|
24
|
+
|
|
25
|
+
### tier
|
|
26
|
+
|
|
27
|
+
The [tier_dev-lxc.yml](example-clusters/tier_dev-lxc.yml) file was created using the following command.
|
|
28
|
+
|
|
29
|
+
The `reporting` product was uncommented for `chef-be.lxc` and `chef-fe1.lxc`.
|
|
30
|
+
|
|
31
|
+
The nodes' `chef_server_url` hostname was changed to `chef-tier.lxc` and the node's hostname was changed to `node-1-tier.lxc`.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
dl init --chef-tier --analytics --nodes
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Cluster build time: 14 minutes
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# enable_build_snapshots automatically makes container snapshots at key times during the build process
|
|
2
|
+
# default value is `true`
|
|
3
|
+
#enable_build_snapshots: true
|
|
4
|
+
|
|
5
|
+
# base_container must be the name of an existing container
|
|
6
|
+
base_container: b-ubuntu-1404
|
|
7
|
+
|
|
8
|
+
# memory_per_server sets the maximum amount of user memory (including file cache) for each server.
|
|
9
|
+
# dev-lxc will set the `memory.limit_in_bytes` cgroup for each server to apply this limit.
|
|
10
|
+
# If no units are specified, the value is interpreted as bytes.
|
|
11
|
+
# You can use suffixes to represent larger units - k or K for kilobytes, m or M for megabytes, and g or G for gigabytes.
|
|
12
|
+
# The default behavior is that no limit is set.
|
|
13
|
+
#memory_per_server: 4G
|
|
14
|
+
|
|
15
|
+
# list any host directories you want mounted into the servers
|
|
16
|
+
#mounts:
|
|
17
|
+
# - /root/clusters root/clusters
|
|
18
|
+
|
|
19
|
+
# list any SSH public keys you want added to /home/dev-lxc/.ssh/authorized_keys
|
|
20
|
+
#ssh-keys:
|
|
21
|
+
# - /root/clusters/id_rsa.pub
|
|
22
|
+
|
|
23
|
+
# DHCP reserved (static) IPs must be selected from the IP range 10.0.3.150 - 254
|
|
24
|
+
|
|
25
|
+
chef-server:
|
|
26
|
+
users: # a user's password will be the same as its username
|
|
27
|
+
- mary-admin
|
|
28
|
+
- joe-user
|
|
29
|
+
orgs:
|
|
30
|
+
demo:
|
|
31
|
+
admins:
|
|
32
|
+
- mary-admin
|
|
33
|
+
non-admins:
|
|
34
|
+
- joe-user
|
|
35
|
+
servers:
|
|
36
|
+
chef.lxc:
|
|
37
|
+
ipaddress: 10.0.3.203
|
|
38
|
+
products:
|
|
39
|
+
chef-server:
|
|
40
|
+
manage:
|
|
41
|
+
push-jobs-server:
|
|
42
|
+
# reporting:
|
|
43
|
+
|
|
44
|
+
compliance:
|
|
45
|
+
admin_user: admin # the password will be the same as the username
|
|
46
|
+
servers:
|
|
47
|
+
compliance.lxc:
|
|
48
|
+
ipaddress: 10.0.3.205
|
|
49
|
+
products:
|
|
50
|
+
compliance:
|
|
51
|
+
|
|
52
|
+
supermarket:
|
|
53
|
+
servers:
|
|
54
|
+
supermarket.lxc:
|
|
55
|
+
ipaddress: 10.0.3.206
|
|
56
|
+
products:
|
|
57
|
+
supermarket:
|
|
58
|
+
|
|
59
|
+
automate:
|
|
60
|
+
servers:
|
|
61
|
+
automate.lxc:
|
|
62
|
+
ipaddress: 10.0.3.200
|
|
63
|
+
products:
|
|
64
|
+
automate:
|
|
65
|
+
license_path: ../delivery.license
|
|
66
|
+
chef_org: delivery
|
|
67
|
+
enterprise_name: demo-ent
|
|
68
|
+
|
|
69
|
+
runners:
|
|
70
|
+
servers:
|
|
71
|
+
runner-1.lxc:
|
|
72
|
+
products:
|
|
73
|
+
chefdk: # downloaded only
|
|
74
|
+
|
|
75
|
+
nodes:
|
|
76
|
+
chef_server_url: https://chef.lxc/organizations/demo
|
|
77
|
+
validation_client_name: demo-validator
|
|
78
|
+
# comment out or remove the validation_key path to use chef-server keys generated by dev-lxc
|
|
79
|
+
validation_key: # /path/for/ORG-validator.pem
|
|
80
|
+
servers:
|
|
81
|
+
node-1.lxc:
|
|
82
|
+
products:
|
|
83
|
+
chef:
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# enable_build_snapshots automatically makes container snapshots at key times during the build process
|
|
2
|
+
# default value is `true`
|
|
3
|
+
#enable_build_snapshots: true
|
|
4
|
+
|
|
5
|
+
# base_container must be the name of an existing container
|
|
6
|
+
base_container: b-ubuntu-1404
|
|
7
|
+
|
|
8
|
+
# memory_per_server sets the maximum amount of user memory (including file cache) for each server.
|
|
9
|
+
# dev-lxc will set the `memory.limit_in_bytes` cgroup for each server to apply this limit.
|
|
10
|
+
# If no units are specified, the value is interpreted as bytes.
|
|
11
|
+
# You can use suffixes to represent larger units - k or K for kilobytes, m or M for megabytes, and g or G for gigabytes.
|
|
12
|
+
# The default behavior is that no limit is set.
|
|
13
|
+
#memory_per_server: 4G
|
|
14
|
+
|
|
15
|
+
# list any host directories you want mounted into the servers
|
|
16
|
+
#mounts:
|
|
17
|
+
# - /root/clusters root/clusters
|
|
18
|
+
|
|
19
|
+
# list any SSH public keys you want added to /home/dev-lxc/.ssh/authorized_keys
|
|
20
|
+
#ssh-keys:
|
|
21
|
+
# - /root/clusters/id_rsa.pub
|
|
22
|
+
|
|
23
|
+
# DHCP reserved (static) IPs must be selected from the IP range 10.0.3.150 - 254
|
|
24
|
+
|
|
25
|
+
chef-backend:
|
|
26
|
+
api_fqdn: chef-ha.lxc
|
|
27
|
+
users: # a user's password will be the same as its username
|
|
28
|
+
- mary-admin
|
|
29
|
+
- joe-user
|
|
30
|
+
orgs:
|
|
31
|
+
demo:
|
|
32
|
+
admins:
|
|
33
|
+
- mary-admin
|
|
34
|
+
non-admins:
|
|
35
|
+
- joe-user
|
|
36
|
+
servers:
|
|
37
|
+
chef-backend1.lxc:
|
|
38
|
+
ipaddress: 10.0.3.208
|
|
39
|
+
role: backend
|
|
40
|
+
leader: true
|
|
41
|
+
products:
|
|
42
|
+
chef-backend:
|
|
43
|
+
chef-backend2.lxc:
|
|
44
|
+
ipaddress: 10.0.3.209
|
|
45
|
+
role: backend
|
|
46
|
+
products:
|
|
47
|
+
chef-backend:
|
|
48
|
+
chef-backend3.lxc:
|
|
49
|
+
ipaddress: 10.0.3.210
|
|
50
|
+
role: backend
|
|
51
|
+
products:
|
|
52
|
+
chef-backend:
|
|
53
|
+
chef-frontend1.lxc:
|
|
54
|
+
ipaddress: 10.0.3.211
|
|
55
|
+
role: frontend
|
|
56
|
+
bootstrap: true
|
|
57
|
+
products:
|
|
58
|
+
chef-server:
|
|
59
|
+
manage:
|
|
60
|
+
|
|
61
|
+
nodes:
|
|
62
|
+
chef_server_url: https://chef-ha.lxc/organizations/demo
|
|
63
|
+
validation_client_name: demo-validator
|
|
64
|
+
# comment out or remove the validation_key path to use chef-server keys generated by dev-lxc
|
|
65
|
+
validation_key: # /path/for/ORG-validator.pem
|
|
66
|
+
servers:
|
|
67
|
+
node-1-ha.lxc:
|
|
68
|
+
products:
|
|
69
|
+
chef:
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# enable_build_snapshots automatically makes container snapshots at key times during the build process
|
|
2
|
+
# default value is `true`
|
|
3
|
+
#enable_build_snapshots: true
|
|
4
|
+
|
|
5
|
+
# base_container must be the name of an existing container
|
|
6
|
+
base_container: b-ubuntu-1404
|
|
7
|
+
|
|
8
|
+
# memory_per_server sets the maximum amount of user memory (including file cache) for each server.
|
|
9
|
+
# dev-lxc will set the `memory.limit_in_bytes` cgroup for each server to apply this limit.
|
|
10
|
+
# If no units are specified, the value is interpreted as bytes.
|
|
11
|
+
# You can use suffixes to represent larger units - k or K for kilobytes, m or M for megabytes, and g or G for gigabytes.
|
|
12
|
+
# The default behavior is that no limit is set.
|
|
13
|
+
#memory_per_server: 4G
|
|
14
|
+
|
|
15
|
+
# list any host directories you want mounted into the servers
|
|
16
|
+
#mounts:
|
|
17
|
+
# - /root/clusters root/clusters
|
|
18
|
+
|
|
19
|
+
# list any SSH public keys you want added to /home/dev-lxc/.ssh/authorized_keys
|
|
20
|
+
#ssh-keys:
|
|
21
|
+
# - /root/clusters/id_rsa.pub
|
|
22
|
+
|
|
23
|
+
# DHCP reserved (static) IPs must be selected from the IP range 10.0.3.150 - 254
|
|
24
|
+
|
|
25
|
+
chef-server:
|
|
26
|
+
topology: tier
|
|
27
|
+
api_fqdn: chef-tier.lxc
|
|
28
|
+
users: # a user's password will be the same as its username
|
|
29
|
+
- mary-admin
|
|
30
|
+
- joe-user
|
|
31
|
+
orgs:
|
|
32
|
+
demo:
|
|
33
|
+
admins:
|
|
34
|
+
- mary-admin
|
|
35
|
+
non-admins:
|
|
36
|
+
- joe-user
|
|
37
|
+
servers:
|
|
38
|
+
chef-be.lxc:
|
|
39
|
+
ipaddress: 10.0.3.201
|
|
40
|
+
role: backend
|
|
41
|
+
bootstrap: true
|
|
42
|
+
products:
|
|
43
|
+
chef-server:
|
|
44
|
+
push-jobs-server:
|
|
45
|
+
# reporting:
|
|
46
|
+
chef-fe1.lxc:
|
|
47
|
+
ipaddress: 10.0.3.202
|
|
48
|
+
role: frontend
|
|
49
|
+
products:
|
|
50
|
+
chef-server:
|
|
51
|
+
manage:
|
|
52
|
+
push-jobs-server:
|
|
53
|
+
# reporting:
|
|
54
|
+
|
|
55
|
+
analytics:
|
|
56
|
+
servers:
|
|
57
|
+
analytics.lxc:
|
|
58
|
+
ipaddress: 10.0.3.204
|
|
59
|
+
products:
|
|
60
|
+
analytics:
|
|
61
|
+
|
|
62
|
+
nodes:
|
|
63
|
+
chef_server_url: https://chef-tier.lxc/organizations/demo
|
|
64
|
+
validation_client_name: demo-validator
|
|
65
|
+
# comment out or remove the validation_key path to use chef-server keys generated by dev-lxc
|
|
66
|
+
validation_key: # /path/for/ORG-validator.pem
|
|
67
|
+
servers:
|
|
68
|
+
node-1-tier.lxc:
|
|
69
|
+
products:
|
|
70
|
+
chef:
|
data/lib/dev-lxc/cli.rb
CHANGED
data/lib/dev-lxc/cluster.rb
CHANGED
|
@@ -695,7 +695,7 @@ module DevLXC
|
|
|
695
695
|
when 'compliance'
|
|
696
696
|
configure_compliance(server) if installed_products.include?('compliance')
|
|
697
697
|
when 'automate'
|
|
698
|
-
configure_automate(server) if installed_products.include?('delivery')
|
|
698
|
+
configure_automate(server) if installed_products.include?('automate') || installed_products.include?('delivery')
|
|
699
699
|
when 'nodes'
|
|
700
700
|
# Allow servers time to generate SSH Server Host Keys
|
|
701
701
|
sleep 5
|
|
@@ -803,7 +803,8 @@ module DevLXC
|
|
|
803
803
|
FileUtils.cp(validation_key, "#{server.container.config_item('lxc.rootfs')}/etc/chef/") if File.exists?(validation_key)
|
|
804
804
|
end
|
|
805
805
|
|
|
806
|
-
client_rb = %Q(#
|
|
806
|
+
client_rb = %Q(# uncomment the following proxy lines to send traffic through mitmproxy
|
|
807
|
+
#http_proxy 'http://10.0.3.1:8080'
|
|
807
808
|
#https_proxy 'http://10.0.3.1:8080'
|
|
808
809
|
|
|
809
810
|
chef_server_url '#{chef_server_url}'
|
|
@@ -1030,7 +1031,10 @@ ssl_verify_mode :verify_none
|
|
|
1030
1031
|
end
|
|
1031
1032
|
|
|
1032
1033
|
def create_knife_config(fqdn, dot_chef_path)
|
|
1033
|
-
knife_rb = %Q(#
|
|
1034
|
+
knife_rb = %Q(# uncomment the following proxy lines to send traffic through a proxy
|
|
1035
|
+
# mitmproxy uses port 8080
|
|
1036
|
+
# tinyproxy uses port 8888
|
|
1037
|
+
#http_proxy 'http://127.0.0.1:8080'
|
|
1034
1038
|
#https_proxy 'http://127.0.0.1:8080'
|
|
1035
1039
|
|
|
1036
1040
|
username = "CHANGEME"
|
data/lib/dev-lxc/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dev-lxc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jeremiah Snapp
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-03-
|
|
11
|
+
date: 2017-03-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -98,11 +98,16 @@ files:
|
|
|
98
98
|
- dev-lxc.gemspec
|
|
99
99
|
- docs/adhoc_clusters.md
|
|
100
100
|
- docs/base_containers.md
|
|
101
|
+
- docs/byobu_keybindings.md
|
|
101
102
|
- docs/configuration.md
|
|
102
103
|
- docs/dev-lxc_version_2.md
|
|
103
104
|
- docs/manage_multiple_clusters.md
|
|
104
105
|
- docs/mitmproxy.md
|
|
105
106
|
- docs/usage.md
|
|
107
|
+
- example-clusters/README.md
|
|
108
|
+
- example-clusters/automate_dev-lxc.yml
|
|
109
|
+
- example-clusters/chef-backend_dev-lxc.yml
|
|
110
|
+
- example-clusters/tier_dev-lxc.yml
|
|
106
111
|
- lib/dev-lxc.rb
|
|
107
112
|
- lib/dev-lxc/cli.rb
|
|
108
113
|
- lib/dev-lxc/cluster.rb
|