README.md in dev-lxc-2.6.2 vs README.md in dev-lxc-2.7.0
- old
+ new
@@ -35,11 +35,11 @@
## Build dev-lxc-platform instance
The dev-lxc tool is used in a system that has been configured by the dev-lxc-platform cookbook.
The easiest way to build a dev-lxc-platform system is to download the dev-lxc-platform repository
-and use Test Kitchen to build a VirtualBox Vagrant instance or an AWS EC2 instance.
+and use Test Kitchen to build an AWS EC2 instance or a VirtualBox Vagrant instance.
Follow the instructions in the [dev-lxc-platform README](https://github.com/jeremiahsnapp/dev-lxc-platform) to build
a dev-lxc-platform instance.
## Login to the dev-lxc-platform instance
@@ -52,27 +52,32 @@
sudo -i
```
When you are logged in as the root user you should automatically enter a [byobu session](http://byobu.co/).
+## Byobu keybindings
+
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).
-The prefix key is set to `Ctrl+o`
+`C-` refers to the keyboard's `Control` key.
+`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.
-Some of the keys that will be most useful to you are:
+The prefix key is set to `C-o`
-* To switch between Byobu sessions
- * OS X - `option-Up`, `option-Down`
- * Linux/Windows - `alt-Up`, `alt-Down`
-* To switch between windows in a session
- * OS X - `option-Left`, `option-Right`
- * Linux/Windows - `alt-Left`, `alt-Right`
-* To switch between panes in a window
- * Linux/OS X/ Windows - `shift-Left`, `shift-Right`, `shift-Up`, `shift-Down`
+Some of the keyboard shortcuts that will be most useful to you are:
+
+* `M-Up`, `M-Down` - switch between Byobu sessions
+* `M-Left`, `M-Right` - switch between windows in a session
+* `shift-Left`, `shift-Right`, `shift-Up`, `shift-Down` - switch between panes in a window
* Windows users using Conemu must first disable "Start selection with Shift+Arrow" in "Mark/Copy" under the "Keys & Macro" settings
+* `C-o C-s` - synchronize panes
+* `C-o z` - zoom into and out of a pane
+* `C-o M-1` - evenly split panes horizontally
+* `C-o M-2` - evenly split panes vertically
+* `M-pageup`, `M-pagedown` - page up/down in scrollback
-Note: `Shift-F2` does not create horizontal splits for Windows users. Use the `Ctrl+o |` key binding instead.
+Note: `Shift-F2` does not create horizontal splits for Windows users. Use the `C-o |` key binding instead.
## Update dev-lxc gem
Run the following command as the instance's root user if you ever need to upgrade the dev-lxc gem inside the dev-lxc-platform instance.
@@ -91,34 +96,16 @@
dev-lxc help
dev-lxc help <subcommand>
```
-### dev-lxc Alias and Subcommands
-
-The dev-lxc command has a `dl` alias for ease of use.
-
-You only have to type enough of a `dev-lxc` subcommand to make it unique.
-
-For example, the following commands are equivalent:
-
-```
-dev-lxc status
-dl st
-```
-
-```
-dev-lxc snapshot
-dl sn
-```
-
### Create Base Container
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.
```
-dl create b-ubuntu-1404
+dev-lxc create b-ubuntu-1404
```
### Create Config File
Create the [dev-lxc.yml config file](docs/configuration.md) for the cluster.
@@ -133,17 +120,17 @@
The following command configures a standalone Chef Server, Supermarket server, Compliance server,
Chef Automate server, and a job dispatch runner.
```
-dl init --chef --compliance --supermarket --automate --runners -f /root/work/clusters/automate/dev-lxc.yml
+dev-lxc init --chef --compliance --supermarket --automate --runners -f /root/work/clusters/automate/dev-lxc.yml
```
We can easily append additional configurations to this file. For example, the following command appends an infrastructure node.
```
-dl init --nodes -a -f /root/work/clusters/automate/dev-lxc.yml
+dev-lxc init --nodes -a -f /root/work/clusters/automate/dev-lxc.yml
```
Edit the dev-lxc.yml file:
* Delete the `reporting` product from the Chef Server config since we will be using Chef Automate's Visibility.
@@ -168,10 +155,28 @@
```
cluster-view /root/work/clusters/automate
```
+### dev-lxc Alias and Subcommands
+
+The dev-lxc command has a `dl` alias for ease of use.
+
+Also, you only have to type enough of a `dev-lxc` subcommand to make it unique.
+
+For example, the following commands are equivalent:
+
+```
+dev-lxc status
+dl st
+```
+
+```
+dev-lxc snapshot
+dl sn
+```
+
### Specifying a Subset of Servers
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.
For example, the following command will show the status of the infrastructure node.
@@ -199,17 +204,15 @@
At this point all of the cluster's servers should be running.
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.
-Since the cluster has a Chef Server you can use the `chef-repo` subcommand to create a chef-repo 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.
+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.
```
dl chef
-cd chef-repo
knife client list
-cd ..
```
Since the cluster has a Chef Automate server you can use the `print-automate-credentials` subcommand to see what the login credentials.
```
@@ -228,12 +231,10 @@
### Use mitmproxy to view HTTP traffic
Run `mitmproxy` in a terminal on the host instance.
-Uncomment the `https_proxy` line in the `chef-repo/.chef/knife.rb` or in a node's `/etc/chef/client.rb` so traffic will be proxied through mitmproxy.
-
-Run chef-client in the node or knife commands from the chef-repo directory and watch the HTTP requests appear in the mitmproxy console.
+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.
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.
### Manage the Cluster