The following is a take home version of the scenarios demonstrated at the A Tour of OpenStack Deployment Scenarios talk at FOSSCON 2016. Source: http://princessleia.com/presentations/2016/fosscon_2016_deployment_scenarios_script.txt Presentation slides: http://princessleia.com/presentations/2016/fosscon_2016_deployment_scenarios.pdf WARNING: This is for demonstration purposese only. DevStack should not be used for actual OpenStack deployments. = Preparing your environment = Download Ubuntu 14.04.5 server image from http://releases.ubuntu.com/14.04/ubuntu-14.04.5-server-amd64.iso Use your virtualization solution of choice to install Ubuntu server. Specs for your virtual machine have, at minimum, the following allocation: - 64-bit x86 CPU - 4G of RAM - 25G of harddrive space - 2 CPUs For each scenario, once the virtual machine is installed, you want to do updates and reboot. $ sudo apt-get update $ sudo apt-get dist-upgrade $ sudo reboot Then install git and DevStack. We will be using the latest stable release of OpenStack with this demonstration, so we'll then checkout the stable/mitaka branch. $ sudo apt-get install git $ git clone https://git.openstack.org/openstack-dev/devstack $ cd devstack/ $ git checkout stable/mitaka The following are the scenarios I showed during the demonstration. == Public Cloud with metering and object storage == This is the simplest, default out of the box DevStack install possible. It doesn't require anything but the minium configuration. In the devstack/ directory, first create a local.conf with the following: [[local|localrc]] ADMIN_PASSWORD=secret DATABASE_PASSWORD=$ADMIN_PASSWORD RABBIT_PASSWORD=$ADMIN_PASSWORD SERVICE_PASSWORD=$ADMIN_PASSWORD # Enable the Ceilometer devstack plugin enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer.git # Enable the Swift services enable_service s-proxy s-object s-container s-account Then run the stack setup script: $ ./stack.sh Running stack.sh will take some time as it downloads and configures various services and finally launches OpenStack. When it completes, you'll have something like the following output: This is your host IP address: 192.168.122.231 This is your host IPv6 address: ::1 Horizon is now available at http://192.168.122.231/dashboard Keystone is serving at http://192.168.122.231:5000/ The default users are: admin and demo The password: secret 2016-08-01 03:07:42.801 | stack.sh completed in 2246 seconds. See what's running by attaching to the screen session running the daemons: $ screen -r Use the key combination "Ctrl a d" to detatch from this screen session During the tutorial you saw a demonstration of the web UI, Horizon. The commands shown for the command line client are as follows: $ source devstack/openrc $ openstack server list $ openstack flavor list $ openstack image list $ openstack server create --flavor m1.nano \ --image cirros-0.3.4-x86_64-uec \ --security-group default --nic net-id=private \ --availability-zone nova sparrow $ openstack server list $ openstack server show sparrow $ ssh cirros@10.0.0.4 cirros@10.0.0.4's password: cubswin:) $ You can create and modify containers of objects in the web UI as the demo user. The following are some commands you can now use to manipulate object storage on the command line: $ source devstack/openrc $ openstack container list $ openstack container create aquarium $ openstack container list Now, create some objects to put in the container. I've created octopus.txt and fish.jpg $ openstack object create aquarium octopus.txt $ openstack object create aquarium fish.jpg $ openstack object list aquarium $ openstack object show aquarium fish.jpg An object URL will look something like this: http://192.168.122.231:8080/v1/AUTH_d4ad817054c743e0b367346ef37437a8/aquarium/fish.jpg Crafted from the: account/container/object You can now create a block storge device with Cinder, and then attach it to a CirrOS server, format it and mount it: $ source devstack/openrc $ openstack volume list $ openstack volume create --size 1 --availability-zone nova cashew $ openstack volume list $ openstack server list $ openstack server add volume robin cashew $ openstack volume list Log into your instance: $ ssh cirros@10.0.0.4 cirros@10.0.0.4's password: cubswin:) $ sudo fdisk /dev/vdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x112bbcf6. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): Using default response p Partition number (1-4, default 1): Using default value 1 First sector (2048-2097151, default 2048): Using default value 2048 Last sector, +sectors or +size{K,M,G} (2048-2097151, default 2097151): Using default value 2097151 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. $ sudo mkfs.ext2 /dev/vdb1 $ mkdir photos $ sudo mount /dev/vdb1 photos/ $ ls photos/ $ df -h /dev/vdb1 $ sudo umount photos/ $ exit You now have a mounted filesystem on your instance! This can be moved to another instance as needed by unmounting it and then running: $ openstack server remove volume robin cashew And then attach it somewhere else! Finally, metering. Using a tool we enabled called Ceilometer, statistics about your instances, volumes, objects and more are being tracked. Once it's been running for a while (an hour is enough) you can try out some ceilometer commands: $ source devstack/openrc $ ceilometer meter-list $ ceilometer meter-list --query resource=77ac63c3-dab8-46d0-8226-98f4c7e511e4 $ ceilometer sample-list --meter disk.usage --query resource=77ac63c3-dab8-46d0-8226-98f4c7e511e4 $ ceilometer statistics --meter disk.usage --query resource=77ac63c3-dab8-46d0-8226-98f4c7e511e4 $ ceilometer sample-list --meter memory.resident --query resource=77ac63c3-dab8-46d0-8226-98f4c7e511e4 $ ceilometer statistics --meter memory.resident --query resource=77ac63c3-dab8-46d0-8226-98f4c7e511e4 Now that you have Ceilometer collecting data, you can write tools around it to do something with this data, like bill your customers.