dev-lxc 2.6.2 → 2.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +40 -39
- data/docs/usage.md +1 -2
- data/lib/dev-lxc/cli.rb +1 -1
- data/lib/dev-lxc/cluster.rb +2 -2
- data/lib/dev-lxc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8e0e276b0a71f81db3d3e2c9ce69f30f248273e
|
4
|
+
data.tar.gz: dc862739ae2bc74fbf31cebcfabec2e908320c76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71f30ee18b6f27a0e6d1dde77024e110e6fc91f37509ae5b6f7b938472b1d1a19eef5bb72d58051313bbd99e7dfb7d15292d07ecf258d467aeba34b1ccc76871
|
7
|
+
data.tar.gz: ae7596695df5c5a63b876c5ccdcef354205564118aba80a3e7ae54d6754675230902b2f17dd77f4c21a63db7a85124d8e6677a6d4e97bc7d4b0ce460c7bc9f62
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -37,7 +37,7 @@ Additional dev-lxc related documentation can be found in the [docs folder](docs)
|
|
37
37
|
The dev-lxc tool is used in a system that has been configured by the dev-lxc-platform cookbook.
|
38
38
|
|
39
39
|
The easiest way to build a dev-lxc-platform system is to download the dev-lxc-platform repository
|
40
|
-
and use Test Kitchen to build
|
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
43
|
a dev-lxc-platform instance.
|
@@ -54,23 +54,28 @@ 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
|
+
## Byobu keybindings
|
58
|
+
|
57
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).
|
58
60
|
|
59
|
-
|
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`
|
60
65
|
|
61
|
-
Some of the
|
66
|
+
Some of the keyboard shortcuts that will be most useful to you are:
|
62
67
|
|
63
|
-
*
|
64
|
-
|
65
|
-
|
66
|
-
* To switch between windows in a session
|
67
|
-
* OS X - `option-Left`, `option-Right`
|
68
|
-
* Linux/Windows - `alt-Left`, `alt-Right`
|
69
|
-
* To switch between panes in a window
|
70
|
-
* Linux/OS X/ Windows - `shift-Left`, `shift-Right`, `shift-Up`, `shift-Down`
|
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
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
|
72
77
|
|
73
|
-
Note: `Shift-F2` does not create horizontal splits for Windows users. Use the `
|
78
|
+
Note: `Shift-F2` does not create horizontal splits for Windows users. Use the `C-o |` key binding instead.
|
74
79
|
|
75
80
|
## Update dev-lxc gem
|
76
81
|
|
@@ -93,30 +98,12 @@ dev-lxc help
|
|
93
98
|
dev-lxc help <subcommand>
|
94
99
|
```
|
95
100
|
|
96
|
-
### dev-lxc Alias and Subcommands
|
97
|
-
|
98
|
-
The dev-lxc command has a `dl` alias for ease of use.
|
99
|
-
|
100
|
-
You only have to type enough of a `dev-lxc` subcommand to make it unique.
|
101
|
-
|
102
|
-
For example, the following commands are equivalent:
|
103
|
-
|
104
|
-
```
|
105
|
-
dev-lxc status
|
106
|
-
dl st
|
107
|
-
```
|
108
|
-
|
109
|
-
```
|
110
|
-
dev-lxc snapshot
|
111
|
-
dl sn
|
112
|
-
```
|
113
|
-
|
114
101
|
### Create Base Container
|
115
102
|
|
116
103
|
The [base container](docs/base_containers.md) used for the cluster's containers must be created first. Let's use Ubuntu 14.04 for the base container.
|
117
104
|
|
118
105
|
```
|
119
|
-
|
106
|
+
dev-lxc create b-ubuntu-1404
|
120
107
|
```
|
121
108
|
|
122
109
|
### Create Config File
|
@@ -135,13 +122,13 @@ The following command configures a standalone Chef Server, Supermarket server, C
|
|
135
122
|
Chef Automate server, and a job dispatch runner.
|
136
123
|
|
137
124
|
```
|
138
|
-
|
125
|
+
dev-lxc init --chef --compliance --supermarket --automate --runners -f /root/work/clusters/automate/dev-lxc.yml
|
139
126
|
```
|
140
127
|
|
141
128
|
We can easily append additional configurations to this file. For example, the following command appends an infrastructure node.
|
142
129
|
|
143
130
|
```
|
144
|
-
|
131
|
+
dev-lxc init --nodes -a -f /root/work/clusters/automate/dev-lxc.yml
|
145
132
|
```
|
146
133
|
|
147
134
|
Edit the dev-lxc.yml file:
|
@@ -170,6 +157,24 @@ See the [usage docs](docs/usage.md) for more information about how to close/kill
|
|
170
157
|
cluster-view /root/work/clusters/automate
|
171
158
|
```
|
172
159
|
|
160
|
+
### dev-lxc Alias and Subcommands
|
161
|
+
|
162
|
+
The dev-lxc command has a `dl` alias for ease of use.
|
163
|
+
|
164
|
+
Also, you only have to type enough of a `dev-lxc` subcommand to make it unique.
|
165
|
+
|
166
|
+
For example, the following commands are equivalent:
|
167
|
+
|
168
|
+
```
|
169
|
+
dev-lxc status
|
170
|
+
dl st
|
171
|
+
```
|
172
|
+
|
173
|
+
```
|
174
|
+
dev-lxc snapshot
|
175
|
+
dl sn
|
176
|
+
```
|
177
|
+
|
173
178
|
### Specifying a Subset of Servers
|
174
179
|
|
175
180
|
Many dev-lxc subcommands can act on a subset of the cluster's servers by specifying a regular expression that matches the desired server names.
|
@@ -201,13 +206,11 @@ At this point all of the cluster's servers should be running.
|
|
201
206
|
|
202
207
|
If you enabled dynamic forwarding (SOCKS v5) in your workstation's SSH config file and configured a web browser to use the SOCKS v5 proxy as described in the dev-lxc-platform README.md then you should be able to browse from your workstation to any dev-lxc server that has a web interface using its FQDN.
|
203
208
|
|
204
|
-
Since the cluster has a Chef Server you can use the `chef-repo` subcommand to create a chef
|
209
|
+
Since the cluster has a Chef Server you can use the `chef-repo` subcommand to create a `.chef` directory in the host instance that contains a knife.rb and all of the keys for the users and org validator clients that are defined in dev-lxc.yml. This makes it very easy to use tools such as knife or berkshelf.
|
205
210
|
|
206
211
|
```
|
207
212
|
dl chef
|
208
|
-
cd chef-repo
|
209
213
|
knife client list
|
210
|
-
cd ..
|
211
214
|
```
|
212
215
|
|
213
216
|
Since the cluster has a Chef Automate server you can use the `print-automate-credentials` subcommand to see what the login credentials.
|
@@ -230,9 +233,7 @@ Since the cluster has a Chef Server and an infrastructure node dev-lxc made sure
|
|
230
233
|
|
231
234
|
Run `mitmproxy` in a terminal on the host instance.
|
232
235
|
|
233
|
-
Uncomment the `https_proxy` line in the
|
234
|
-
|
235
|
-
Run chef-client in the node or knife commands from the chef-repo directory and watch the HTTP requests appear in the mitmproxy console.
|
236
|
+
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.
|
236
237
|
|
237
238
|
If you configured your workstation's SSH config file with LocalForward as described in dev-lxc-platform's README then you should be able to configure the web browser to use "127.0.0.1 8080" for HTTP and HTTPS proxies and watch the HTTP requests appear in the mitmproxy console.
|
238
239
|
|
data/docs/usage.md
CHANGED
@@ -104,7 +104,7 @@ dev-lxc print-automate-credentials
|
|
104
104
|
|
105
105
|
### Create chef-repo
|
106
106
|
|
107
|
-
Create a
|
107
|
+
Create a `.chef` directory in the current directory with appropriate knife.rb and pem files.
|
108
108
|
|
109
109
|
Use the `-p` option to also get pivotal.pem and pivotal.rb files.
|
110
110
|
|
@@ -117,7 +117,6 @@ dev-lxc chef-repo
|
|
117
117
|
Now you can easily use knife to access the cluster.
|
118
118
|
|
119
119
|
```
|
120
|
-
cd chef-repo
|
121
120
|
knife client list
|
122
121
|
```
|
123
122
|
|
data/lib/dev-lxc/cli.rb
CHANGED
@@ -314,7 +314,7 @@ nodes:
|
|
314
314
|
container.attach(attach_opts) { system(shell) }
|
315
315
|
end
|
316
316
|
|
317
|
-
desc "chef-repo", "Creates a chef
|
317
|
+
desc "chef-repo", "Creates a '.chef' directory in the current directory using files from the cluster's backend /root/chef-repo/.chef"
|
318
318
|
option :config, :desc => "Specify a cluster's YAML config file. `./dev-lxc.yml` will be used by default"
|
319
319
|
option :force, :aliases => "-f", :type => :boolean, :desc => "Overwrite any existing knife.rb or pivotal.rb files"
|
320
320
|
option :pivotal, :aliases => "-p", :type => :boolean, :desc => "Also copy pivotal.rb and pivotal.pem"
|
data/lib/dev-lxc/cluster.rb
CHANGED
@@ -1092,7 +1092,7 @@ ssl_verify_mode :verify_none
|
|
1092
1092
|
|
1093
1093
|
def chef_repo(force=false, pivotal=false)
|
1094
1094
|
chef_server_dot_chef_path = "/root/chef-repo/.chef"
|
1095
|
-
dot_chef_path = "
|
1095
|
+
dot_chef_path = ".chef"
|
1096
1096
|
|
1097
1097
|
if @config['chef-server'][:bootstrap_backend]
|
1098
1098
|
chef_server = get_server(@config['chef-server'][:bootstrap_backend])
|
@@ -1124,7 +1124,7 @@ ssl_verify_mode :verify_none
|
|
1124
1124
|
end
|
1125
1125
|
end
|
1126
1126
|
|
1127
|
-
if File.exists?("
|
1127
|
+
if File.exists?("#{dot_chef_path}/knife.rb") && ! force
|
1128
1128
|
puts "Skipping knife.rb because it already exists in `#{dot_chef_path}`"
|
1129
1129
|
else
|
1130
1130
|
create_knife_config(chef_server_fqdn, dot_chef_path)
|
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: 2.
|
4
|
+
version: 2.7.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-
|
11
|
+
date: 2017-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|