Set up Kilo: can boot VM but metadata not working yet
diff --git a/cloudlab-compute.yml b/cloudlab-compute.yml
index 10713a0..b84a92c 100644
--- a/cloudlab-compute.yml
+++ b/cloudlab-compute.yml
@@ -44,10 +44,6 @@
 
   tasks:
 
-  - name: Set up extra space on CloudLab nodes
-    shell: /usr/testbed/bin/mkextrafs /var/lib/libvirt/images
-      creates=/var/lib/libvirt/images/lost+found
-
   - name: Install ansible
     apt: name=ansible state=installed
 
diff --git a/cloudlab-hosts b/cloudlab-hosts
index 61919c9..68f772d 100644
--- a/cloudlab-hosts
+++ b/cloudlab-hosts
@@ -1,5 +1,5 @@
 [cloudlab-head]
-ctl.acb-qv8253.xos-pg0.clemson.cloudlab.us
+ctl.install.xos-pg0.clemson.cloudlab.us
 
 [cloudlab-compute]
-cp-1.acb-qv8253.xos-pg0.clemson.cloudlab.us
+cp-1.install.xos-pg0.clemson.cloudlab.us
diff --git a/cloudlab-setup.yml b/cloudlab-setup.yml
index d6a98c5..ccf1179 100644
--- a/cloudlab-setup.yml
+++ b/cloudlab-setup.yml
@@ -16,8 +16,8 @@
   - name: Add Ansible repository
     apt_repository: repo="ppa:ansible/ansible"
 
-  - name: Install older version of Juju due to bug in 1.22
-    apt: name=juju-core
+  - name: Update Ansible cache
+    apt: update_cache=yes
 
   - name: Install packages
     apt: name={{ item }} state=latest
@@ -26,6 +26,7 @@
     - uvtool
     - git
     - bzr
+    - juju-core
 
   - name: Get juju-ansible git repo
     git: repo=https://github.com/cmars/juju-ansible.git
@@ -58,8 +59,6 @@
     sudo: no
     script: scripts/create-vms.sh
 
-#  - pause: prompt="Hit return when all VMs have IP addresses"
-
   - include: tasks/vm-ips.yml
 
   - name: Add VMs to /etc/hosts
@@ -136,16 +135,17 @@
 #  - pause: prompt="Hit return when all services have started successfully"
 
   - name: Set MTU for GRE tunneling
-    shell: "juju set quantum-gateway instance-mtu=1400"
+    shell: "juju set neutron-gateway instance-mtu=1400"
 
+# Disable all HTTPS for time being
   - name: Use HTTPS for keystone authentication
-    shell: 'juju set keystone use-https=yes'
+    shell: 'juju set keystone use-https=no'
 
   - name: Use HTTPS for all service endpoints
-    shell: 'juju set keystone https-service-endpoints=True'
+    shell: 'juju set keystone https-service-endpoints=False'
 
   - name: Use SSL for rabbitmq
-    shell: 'juju set rabbitmq-server ssl=on'
+    shell: 'juju set rabbitmq-server ssl=off'
 
   - name: Add all Juju relations between services
     script: scripts/juju-relations.py
@@ -199,8 +199,8 @@
       dest=/usr/local/src/network-setup.sh
       mode=0644
 
-  - name: Run network setup script
-    shell: ansible nova-cloud-controller -m script -u ubuntu -a "/usr/local/src/network-setup.sh"
+#  - name: Run network setup script
+#    shell: ansible nova-cloud-controller -m script -u ubuntu -a "/usr/local/src/network-setup.sh"
 
   - name: Get public key
     shell: cat {{ ansible_env['PWD'] }}/.ssh/id_rsa.pub
@@ -210,11 +210,15 @@
   sudo: yes
   vars:
     control_net: 192.168.122.0/24
-    gateway: 130.127.133.105
+    gateway: "{{ hostvars['ctl.install.xos-pg0.clemson.cloudlab.us']['ansible_default_ipv4']['address'] }}"
   tasks:
   - name: Install package needed by Juju
     apt: name=python-yaml state=present
 
+  - name: Add key
+    authorized_key: user="{{ ansible_env['SUDO_USER'] }}"
+      key="{{ hostvars['ctl.install.xos-pg0.clemson.cloudlab.us']['sshkey']['stdout'] }}"
+
   - name: Add route via /etc/rc.local
     template: src=templates/etc/rc.local.cloudlab
       dest=/etc/rc.local
@@ -222,9 +226,12 @@
     notify:
     - run /etc/rc.local
 
-  - name: Add key
-    authorized_key: user="{{ ansible_env['SUDO_USER'] }}"
-      key="{{ hostvars['ctl.acb-qv8253.xos-pg0.clemson.cloudlab.us']['sshkey']['stdout'] }}"
+  - name: Touch ~/.ssh/config
+    file: path=/var/lib/nova state=directory
+
+  - name: Set up extra space on CloudLab nodes
+    shell: /usr/testbed/bin/mkextrafs /var/lib/nova
+      creates=/var/lib/nova/lost+found
 
   handlers:
   - name: run /etc/rc.local
diff --git a/files/etc/libvirt/hooks/daemon b/files/etc/libvirt/hooks/daemon
index cff3fb7..61a4faf 100644
--- a/files/etc/libvirt/hooks/daemon
+++ b/files/etc/libvirt/hooks/daemon
@@ -13,7 +13,7 @@
     DPORT=$1
     VM=$2
     TOPORT=$3
-    
+
     VMIP=$( getent ahosts $VM|head -1|awk '{print $1}' )
     iptables -t nat -C PREROUTING -p tcp -i $NIC --dport $DPORT -j DNAT --to-destination $VMIP:$TOPORT
     if [ "$?" -ne 0 ]
@@ -29,7 +29,7 @@
     add_port_fwd_rule 4990 keystone 4990
     add_port_fwd_rule 5000 keystone 5000
     add_port_fwd_rule 8774 nova-cloud-controller 8774
-    add_port_fwd_rule 9696 nova-cloud-controller 9696
+    add_port_fwd_rule 9696 neutron-api 9696
     add_port_fwd_rule 9292 glance 9292
     add_port_fwd_rule 8080 openstack-dashboard 80
     add_port_fwd_rule 3128 nagios 80
@@ -37,4 +37,4 @@
 
     # Also flush the filter table before rules re-added
     iptables -F
-fi	
+fi
diff --git a/files/openstack.cfg b/files/openstack.cfg
index 9503b4d..ae83d46 100644
--- a/files/openstack.cfg
+++ b/files/openstack.cfg
@@ -1,17 +1,20 @@
 glance:
-   openstack-origin: "cloud:trusty-icehouse"
+   openstack-origin: "cloud:trusty-kilo"
 keystone:
    admin-password: ""
-   openstack-origin: "cloud:trusty-icehouse"
+   openstack-origin: "cloud:trusty-kilo"
 nova-cloud-controller:
    network-manager: "Neutron"
-   openstack-origin: "cloud:trusty-icehouse"
+   openstack-origin: "cloud:trusty-kilo"
 nova-compute:
    config-flags: "firewall_driver=nova.virt.firewall.NoopFirewallDriver"
-   openstack-origin: "cloud:trusty-icehouse"
+   openstack-origin: "cloud:trusty-kilo"
 ntp:
    source: "ntp.cs.princeton.edu"
 openstack-dashboard:
-   openstack-origin: "cloud:trusty-icehouse"
-quantum-gateway:
-   openstack-origin: "cloud:trusty-icehouse"
+   openstack-origin: "cloud:trusty-kilo"
+neutron-gateway:
+   openstack-origin: "cloud:trusty-kilo"
+neutron-api:
+   openstack-origin: "cloud:trusty-kilo"
+neutron-openvswitch:
diff --git a/scripts/create-vms.sh b/scripts/create-vms.sh
index d56b043..dba3099 100755
--- a/scripts/create-vms.sh
+++ b/scripts/create-vms.sh
@@ -19,7 +19,8 @@
 create-vm keystone 2 4096 40
 create-vm glance 2 4096 160
 create-vm nova-cloud-controller 2 4096 40
-create-vm quantum-gateway 2 4096 40
+create-vm neutron-gateway 2 4096 40
+create-vm neutron-api 2 4096 40
 create-vm openstack-dashboard 1 2048 20
 create-vm ceilometer 1 2048 20
 create-vm nagios 1 2048 20
diff --git a/scripts/juju-compute-relations.py b/scripts/juju-compute-relations.py
index 49d0cdc..535b5d4 100755
--- a/scripts/juju-compute-relations.py
+++ b/scripts/juju-compute-relations.py
@@ -11,6 +11,7 @@
     "nova-compute:amqp rabbitmq-server:amqp",
     "nova-compute glance",
     "nova-compute nova-cloud-controller",
+    "nova-compute neutron-openvswitch",
     "ntp nova-compute",
     "nova-compute nagios",
     "nova-compute nrpe",
@@ -31,7 +32,7 @@
             time.sleep(sleep_interval)
         except:
             pass
-            
+
 def destroyrelations():
     for relation in relations:
         print "Destroying relation %s" % relation
@@ -51,6 +52,6 @@
         destroyrelations()
     else:
         addrelations()
-        
+
 if  __name__ =='__main__':
     main()
diff --git a/scripts/juju-compute-setup.py b/scripts/juju-compute-setup.py
index 0c5ea3c..326eaf3 100755
--- a/scripts/juju-compute-setup.py
+++ b/scripts/juju-compute-setup.py
@@ -7,7 +7,8 @@
 jujuconfig="/usr/local/src/openstack.cfg"
 
 services = {
-    "nova-compute" : "--config=%s cs:~andybavier/trusty/nova-compute" % jujuconfig,
+#    "nova-compute" : "--config=%s cs:~andybavier/trusty/nova-compute" % jujuconfig,
+    "nova-compute" : "--config=%s nova-compute" % jujuconfig,
 }
 
 def get_free_machines(status):
@@ -28,14 +29,14 @@
             free[machine] = mchinfo
 
     return free
-                
+
 
 def deploy(status, service, cmd):
     # Deploy nova-compute to all free machines
     machines = get_free_machines(status)
-    
+
     for (machine, mchinfo) in machines.iteritems():
-        if service in status['services']: 
+        if service in status['services']:
             print "Adding unit %s on %s" % (service, mchinfo['dns-name'])
             subprocess.check_call("juju add-unit --to=%s %s" % (machine, service), shell=True)
         else:
diff --git a/scripts/juju-relations.py b/scripts/juju-relations.py
index 1be59ab..a723395 100755
--- a/scripts/juju-relations.py
+++ b/scripts/juju-relations.py
@@ -13,9 +13,16 @@
              "nova-cloud-controller keystone",
              "glance mysql",
              "glance keystone",
-             "quantum-gateway mysql",
-             "quantum-gateway rabbitmq-server",
-             "quantum-gateway nova-cloud-controller",
+             "neutron-gateway neutron-api",
+             "neutron-gateway:amqp rabbitmq-server:amqp",
+             "neutron-gateway nova-cloud-controller",
+             "neutron-gateway mysql",
+             "neutron-api keystone",
+             "neutron-api neutron-openvswitch",
+             "neutron-api mysql",
+             "neutron-api rabbitmq-server",
+             "neutron-api nova-cloud-controller",
+             "neutron-openvswitch rabbitmq-server",
              "openstack-dashboard keystone",
              "ntp nova-cloud-controller",
              "mysql nagios",
@@ -23,7 +30,7 @@
              "keystone nagios",
              "glance nagios",
              "nova-cloud-controller nagios",
-             "quantum-gateway nagios",
+             "neutron-gateway nagios",
              "openstack-dashboard nagios",
              "nagios nrpe",
              "mysql nrpe",
@@ -31,7 +38,7 @@
              "keystone nrpe",
              "glance nrpe",
              "nova-cloud-controller nrpe",
-             "quantum-gateway nrpe",
+             "neutron-gateway nrpe",
              "openstack-dashboard nrpe",
              "ceilometer mongodb",
              "ceilometer rabbitmq-server",
@@ -55,7 +62,7 @@
             time.sleep(sleep_interval)
         except:
             pass
-            
+
 def destroyrelations():
     for relation in relations:
         print "Destroying relation %s" % relation
@@ -75,6 +82,6 @@
         destroyrelations()
     else:
         addrelations()
-        
+
 if  __name__ =='__main__':
     main()
diff --git a/scripts/juju-setup.py b/scripts/juju-setup.py
index ca5cbfe..d56368c 100755
--- a/scripts/juju-setup.py
+++ b/scripts/juju-setup.py
@@ -8,15 +8,19 @@
 
 # Assumption: VMs have same hostname as service that runs inside
 machines = ["mysql", "rabbitmq-server", "keystone", "glance", "nova-cloud-controller",
-            "quantum-gateway", "openstack-dashboard", "ceilometer", "nagios"]
+            "neutron-gateway", "openstack-dashboard", "ceilometer", "nagios", "neutron-api"]
 
 services = {
     "mysql" : "mysql",
     "rabbitmq-server" : "rabbitmq-server",
     "keystone" : "--config=%s keystone" % jujuconfig,
     "glance" : "--config=%s glance" % jujuconfig,
-    "nova-cloud-controller" : "--config=%s cs:~andybavier/trusty/nova-cloud-controller" % jujuconfig,
-    "quantum-gateway" : "--config=%s cs:~andybavier/trusty/quantum-gateway" % jujuconfig,
+#    "nova-cloud-controller" : "--config=%s cs:~andybavier/trusty/nova-cloud-controller" % jujuconfig,
+#    "quantum-gateway" : "--config=%s cs:~andybavier/trusty/quantum-gateway" % jujuconfig,
+    "nova-cloud-controller" : "--config=%s nova-cloud-controller" % jujuconfig,
+    "neutron-gateway" : "--config=%s neutron-gateway" % jujuconfig,
+    "neutron-api" : "--config=%s neutron-api" % jujuconfig,
+    "neutron-openvswitch" : "--config=%s neutron-openvswitch" % jujuconfig,
     "openstack-dashboard" : "--config=%s openstack-dashboard" % jujuconfig,
     "nagios" : "nagios",
     "mongodb" : "mongodb",   # deploy to ceilometer machine
diff --git a/tasks/vm-ips.yml b/tasks/vm-ips.yml
index 519535f..8406a7a 100644
--- a/tasks/vm-ips.yml
+++ b/tasks/vm-ips.yml
@@ -17,8 +17,8 @@
 - shell: uvt-kvm ip nova-cloud-controller
   register: novacc_ip
 
-- shell: uvt-kvm ip quantum-gateway
-  register: quantum_ip
+- shell: uvt-kvm ip neutron-gateway
+  register: neutron_ip
 
 - shell: uvt-kvm ip openstack-dashboard
   register: horizon_ip
@@ -27,4 +27,7 @@
   register: nagios_ip
 
 - shell: uvt-kvm ip ceilometer
-  register: ceilometer_ip
\ No newline at end of file
+  register: ceilometer_ip
+
+- shell: uvt-kvm ip neutron-api
+  register: neutron_api_ip
diff --git a/templates/admin-openrc.sh.j2 b/templates/admin-openrc.sh.j2
index 260f035..8baeebf 100644
--- a/templates/admin-openrc.sh.j2
+++ b/templates/admin-openrc.sh.j2
@@ -1,5 +1,5 @@
 export OS_USERNAME=admin
 export OS_PASSWORD={{ keystone_password.stdout }}
 export OS_TENANT_NAME=admin
-export OS_AUTH_URL=https://{{ keystone_ip.stdout }}:5000/v2.0
+export OS_AUTH_URL=http://{{ keystone_ip.stdout }}:5000/v2.0
 export OS_REGION_NAME=RegionOne
diff --git a/templates/etc/ansible/hosts.j2 b/templates/etc/ansible/hosts.j2
index 742a35a..007b456 100644
--- a/templates/etc/ansible/hosts.j2
+++ b/templates/etc/ansible/hosts.j2
@@ -8,7 +8,8 @@
 keystone
 glance
 nova-cloud-controller
-quantum-gateway
+neutron-gateway
 openstack-dashboard
 ceilometer
 nagios
+neutron-api
diff --git a/templates/etc/hosts.j2 b/templates/etc/hosts.j2
index f153b6e..b095c5c 100644
--- a/templates/etc/hosts.j2
+++ b/templates/etc/hosts.j2
@@ -6,10 +6,11 @@
 {{ keystone_ip.stdout }} keystone
 {{ glance_ip.stdout }} glance
 {{ novacc_ip.stdout }} nova-cloud-controller
-{{ quantum_ip.stdout }} quantum-gateway
+{{ neutron_ip.stdout }} neutron-gateway
 {{ horizon_ip.stdout }} openstack-dashboard
 {{ ceilometer_ip.stdout }} ceilometer
 {{ nagios_ip.stdout }} nagios
+{{ neutron_api_ip.stdout}} neutron-api
 
 # The following lines are desirable for IPv6 capable hosts
 ::1     localhost ip6-localhost ip6-loopback