Skip to content

Instantly share code, notes, and snippets.

View rm-you's full-sized avatar

Adam Harwell rm-you

  • Yahoo!
  • Bellingham, WA
View GitHub Profile
@rm-you
rm-you / devstack-setup.sh
Last active August 29, 2015 14:16
Devstack setup script for Neutron-LBaaS + Barbican + Octavia
#!/bin/bash
# Set up the packages we need
apt-get update
apt-get install libffi-dev libssl-dev git vim libxml2-dev libsqlite3-dev libxslt1-dev -y
# Clone the repos we need
git clone https://github.com/openstack/barbican.git /tmp/barbican
git clone https://github.com/openstack-dev/devstack.git /tmp/devstack
@rm-you
rm-you / new_barbican_devstack.sh
Last active September 4, 2015 20:09
Devstack Barbican (New)
#!/bin/bash
# Set up the packages we need
apt-get update
apt-get install git vim -y
# Clone the devstack repo
git clone https://github.com/openstack-dev/devstack.git /tmp/devstack
cat <<EOF > /tmp/devstack/localrc
anonymous
anonymous / gist:f59d96918f3103ad5651
Created February 5, 2016 06:09
octavia curl command help
# Create a loadbalancer:
curl -X POST -H Content-type:application/json -d '{"name": "test_lb", "vip": {"ip_address": "10.0.0.3", "port_id": "92a345db-3ba6-42b3-85ad-7fb5193c43d5", "subnet_id": "47a12b70-c436-4f2b-b2bf-d0518627c31f"}}' http://localhost:9876/v1/loadbalancers
# Get loadbalancer list (do this until pending create is no longer pending...):
curl http://localhost:9876/v1/loadbalancers
# get listeners:
curl http://localhost:9876/v1/loadbalancers/0fb3aa47-2d88-4c51-85dc-0e997c876f5a/listeners
# create listener:
#!/bin/bash
export OCTAVIA_DIR=/opt/stack/octavia
# Out with the old
OLD_IMAGE=$(glance image-list | awk '/ amphora-x64-haproxy / {print $2}')
glance image-delete $OLD_IMAGE
sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 $OCTAVIA_DIR/diskimage-create/amphora-x64-haproxy.qcow2