eviking / sputnik-demo-repo

Demo for a Sputnik-deployed application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Description

This is the repo for deploying a Sputnik demo.

This repository contains the roles, environments and data bags for deploying an Sputnik laptop demonstration application.

Dependencies

The infrastructure.yml, laptop.yml and openstack.yml manifests use spiceweasel or sputnik-cloudlauncher.

gem install sputnik-cloudlauncher

Demo

  1. deploy the Chef infrastructure dependencies with sputnik init infrastructure.yml

  2. launch the demo application on the Dell OpenStack cluster with sputnik launch -c dell-openstack.rb dell-openstack.yml

  3. knife search for Dell OpenStack

  4. Connect to the Dell haproxy node on port 22002 to see the web UI console.

  5. Connect to the Dell haproxy node on port 80 to see the demo-app, refresh a couple of times.

  6. launch the demo application on the Rackspace OpenStack cluster with sputnik launch -c rs-openstack.rb rs-openstack.yml

  7. knife search for Rackspace OpenStack

  8. Connect to the Rackspace haproxy node on port 22002 to see the web UI console.

  9. Connect to the Rackspace haproxy node on port 80 to see the demo-app, refresh a couple of times.

  10. Bump up the version number of the demo-app cookbook in the metadata.rb.

  11. Make a change to the demo-app cookbook.

  12. upload the changes with sputnik init infrastructure.yml

  13. refresh the Dell nodes with

  14. knife ssh "recipe:demo-app AND chef_environment:sputnik" "chef-client"

  15. Connect to the Dell haproxy node on port 80 to see the demo-app, refresh a couple of times.

  16. Connect to the Rackspace haproxy node on port 80 to see the demo-app, refresh a couple of times. Verify it is not updated.

  17. refresh the Rackspace nodes with

  18. knife ssh "recipe:demo-app AND chef_environment:sputnik" "chef-client"

TODO

  1. sputnik destroy
  2. sputnik refresh
  3. Put LXC in there to show off the Sputnik laptop.
  4. Version pinning with environments.

Chef infrastructure

Roles

base

Recipes for every machine deployed. Attempts to use apt::cacher-client.

sputnik-base

Sets up the Sputnik laptop with lxc and apt-cacher-ng (for use by the lxc VMs).

haproxy

The demo application sits behind the software load balancer haproxy.

Cookbooks

With the exception of the demo-app cookbook, the cookbooks used by this repository are all

demo-app

Trivial html page behind apache2 that renders the names of the machines to demonstrate the haproxy integration.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

Demo for a Sputnik-deployed application