README.md in dev-lxc-0.2.5 vs README.md in dev-lxc-0.3.0

- old
+ new

@@ -11,11 +11,11 @@ ### Features 1. LXC 1.0 Containers - Resource efficient servers with fast start/stop times and standard init 2. Btrfs - Efficient storage backend provides fast, lightweight container cloning 3. Dnsmasq - DHCP networking and DNS resolution -4. Base platforms - Containers that are built to resemble a traditional server +4. Base containers - Containers that are built to resemble a traditional server 5. ruby-lxc - Ruby bindings for liblxc 6. YAML - Simple, customizable definition of clusters; No more setting ENV variables 7. Build process closely models online installation documentation Its containers, standard init, networking and build process are designed to be similar @@ -75,54 +75,57 @@ ### Base Containers One of the key things this tool uses is the concept of "base" containers. -`dev-lxc` creates containers with "b-" prepended to the name to distinguish it as -a base container. +`dev-lxc` creates base containers with a "p-", "s-" or "u-" prefix on the name to distinguish it as +a "platform", "shared" or "unique" base container. Base containers are then snapshot cloned using the btrfs filesystem to very quickly -provide lightweight duplicates of the base container that are either used to build +provide a lightweight duplicate of the base container. This clone is either used to build another base container or a container that will actually be run. During a cluster build process the base containers that get created fall into three categories. 1. Platform - The platform base container is the first to get created. + The platform base container is the first to get created and is identified by the + "p-" prefix on the container name. `DevLXC#create_base_platform` controls the creation of a platform base container. - This container provides the chosen OS platform and version (e.g. b-ubuntu-1404). + This container provides the chosen OS platform and version (e.g. p-ubuntu-1404). A typical LXC container has minimal packages installed so `dev-lxc` makes sure that the same packages used in Chef's [bento boxes](https://github.com/opscode/bento) are installed to provide a more typical server environment. A few additional packages are also installed. - Once this platform base container is created there is rarely a need to delete it. + *Once this platform base container is created there is rarely a need to delete it.* 2. Shared - The shared base container is the second to get created. + The shared base container is the second to get created and is identified by the + "s-" prefix on the container name. `DevLXC::ChefServer#create_base_server` controls the creation of a shared base container. Chef packages that are common to all servers in a Chef cluster, such as Chef server, opscode-reporting and opscode-push-jobs-server are installed using `dpkg` or `rpm`. Note the manage package will not be installed at this point since it is not common to all servers (i.e. it does not get installed on backend servers). The name of this base container is built from the names and versions of the Chef packages that - get installed which makes this base container easy to be reused by another cluster that is + get installed which makes this base container easy to be reused by another cluster that is configured to use the same Chef packages. - Since no configuration actually happens yet there is rarely a need to delete this container. + *Since no configuration actually happens yet there is rarely a need to delete this container.* 3. Unique - The unique base container is the last to get created. + The unique base container is the last to get created and is identified by the + "u-" prefix on the container name. `DevLXC::ChefServer#create` controls the creation of a unique base container. Each unique Chef server (e.g. standalone, backend or frontend) is created. @@ -163,11 +166,11 @@ dev-lxc create The initial creation of platform base containers can take awhile so let's go ahead and start creating an Ubuntu 12.04 base container now. - dev-lxc create b-ubuntu-1404 + dev-lxc create p-ubuntu-1404 ### Cluster Config Files dev-lxc uses a yaml configuration file to define a cluster. @@ -175,20 +178,20 @@ dev-lxc cluster init `dev-lxc cluster init tier` generates the following file: - base_platform: b-ubuntu-1404 + platform_container: p-ubuntu-1404 topology: tier api_fqdn: chef-tier.lxc mounts: - /dev-shared dev-shared packages: - server: /dev-shared/chef-packages/cs/chef-server-core_12.0.1-1_amd64.deb -# reporting: /dev-shared/chef-packages/cs/reporting/opscode-reporting_1.2.3-1_amd64.deb -# push-jobs-server: /dev-shared/chef-packages/cs/push-jobs-server/opscode-push-jobs-server_1.1.6-1_amd64.deb -# manage: /dev-shared/chef-packages/cs/manage/opscode-manage_1.6.2-1_amd64.deb + server: /dev-shared/chef-packages/cs/chef-server-core_12.0.3-1_amd64.deb + # reporting: /dev-shared/chef-packages/reporting/opscode-reporting_1.2.3-1_amd64.deb + # push-jobs-server: /dev-shared/chef-packages/push-jobs-server/opscode-push-jobs-server_1.1.6-1_amd64.deb + # manage: /dev-shared/chef-packages/manage/opscode-manage_1.9.0-1_amd64.deb servers: be-tier.lxc: role: backend ipaddress: 10.0.3.202 bootstrap: true @@ -304,9 +307,17 @@ org and user. Show the status of the cluster. dev-cluster status + +Create a local chef-repo with appropriate knife.rb and pem files. +This makes it easy to use knife. + + dev-lxc cluster chef-repo + cd chef-repo + knife ssl fetch + knife client list Stop the cluster's servers. dev-lxc cluster stop