Merge branch 'master' of github.com:open-cloud/xos into feature/diagnostic
diff --git a/xos/configurations/acord/Makefile b/xos/configurations/acord/Makefile
new file mode 100644
index 0000000..5231e79
--- /dev/null
+++ b/xos/configurations/acord/Makefile
@@ -0,0 +1,59 @@
+SETUPDIR:=../setup
+MYIP:=$(shell hostname -i)
+
+cloudlab: common_cloudlab acord
+
+devstack: upgrade_pkgs common_devstack devstack_net_fix acord
+
+acord: ceilometer_dashboard
+ sudo MYIP=$(MYIP) docker-compose up -d
+ bash ../common/wait_for_xos.sh
+ sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
+ sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/base.yaml
+ sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
+ sudo MYIP=$(MYIP) docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/acord/ceilometer.yaml
+
+containers:
+ cd ../../../containers/xos; make devel
+ cd ../../../containers/synchronizer; make
+
+common_cloudlab:
+ make -C ../common -f Makefile.cloudlab
+
+common_devstack:
+ make -C ../common -f Makefile.devstack
+
+ceilometer_dashboard:
+ #NOTE: The below dashboard install scripts assume
+ #clouldlab openstack environment created using "OpenStack" profile
+ #bash install_xos_ceilometer_dashboard.sh
+ #bash install_ceilometer_patch.sh
+
+stop:
+ sudo MYIP=$(MYIP) docker-compose stop
+
+rm: stop
+ sudo MYIP=$(MYIP) docker-compose rm
+
+showlogs:
+ sudo MYIP=$(MYIP) docker-compose logs
+
+ps:
+ sudo MYIP=$(MYIP) docker-compose ps
+
+cleanup: stop rm
+ ./cleanup.sh
+ bash -c "source ../setup/admin-openrc.sh; nova list --all-tenants; neutron net-list"
+
+devstack_net_fix:
+ sudo ../common/devstack/net-fix.sh
+ sudo bash -c "source ../setup/admin-openrc.sh; neutron subnet-update private-subnet --dns-nameservers list=true 8.8.8.8 8.8.4.4"
+
+upgrade_pkgs:
+ sudo pip install httpie --upgrade
+
+rebuild_xos:
+ make -C ../../../containers/xos devel
+
+rebuild_synchronizer:
+ make -C ../../../containers/synchronizer
diff --git a/xos/configurations/acord/ceilometer.yaml b/xos/configurations/acord/ceilometer.yaml
new file mode 100644
index 0000000..874c577
--- /dev/null
+++ b/xos/configurations/acord/ceilometer.yaml
@@ -0,0 +1,249 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Setup CORD-related services -- vOLT, vCPE, vBNG.
+
+imports:
+ - custom_types/xos.yaml
+
+node_types:
+ tosca.nodes.SFlowService:
+ derived_from: tosca.nodes.Root
+ description: >
+ XOS SFlow Collection Service
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ service:
+ type: tosca.capabilities.xos.Service
+ properties:
+ kind:
+ type: string
+ default: generic
+ description: Type of service.
+ view_url:
+ type: string
+ required: false
+ description: URL to follow when icon is clicked in the Service Directory.
+ icon_url:
+ type: string
+ required: false
+ description: ICON to display in the Service Directory.
+ enabled:
+ type: boolean
+ default: true
+ published:
+ type: boolean
+ default: true
+ description: If True then display this Service in the Service Directory.
+ public_key:
+ type: string
+ required: false
+ description: Public key to install into Instances to allows Services to SSH into them.
+ private_key_fn:
+ type: string
+ required: false
+ description: Location of private key file
+ versionNumber:
+ type: string
+ required: false
+ description: Version number of Service.
+ sflow_port:
+ type: integer
+ required: false
+ default: 6343
+ description: sFlow listening port
+ sflow_api_port:
+ type: integer
+ required: false
+ default: 33333
+ description: sFlow publish subscribe api listening port
+
+ tosca.nodes.CeilometerService:
+ derived_from: tosca.nodes.Root
+ description: >
+ XOS Ceilometer Service
+ capabilities:
+ scalable:
+ type: tosca.capabilities.Scalable
+ service:
+ type: tosca.capabilities.xos.Service
+ properties:
+ kind:
+ type: string
+ default: generic
+ description: Type of service.
+ view_url:
+ type: string
+ required: false
+ description: URL to follow when icon is clicked in the Service Directory.
+ icon_url:
+ type: string
+ required: false
+ description: ICON to display in the Service Directory.
+ enabled:
+ type: boolean
+ default: true
+ published:
+ type: boolean
+ default: true
+ description: If True then display this Service in the Service Directory.
+ public_key:
+ type: string
+ required: false
+ description: Public key to install into Instances to allows Services to SSH into them.
+ private_key_fn:
+ type: string
+ required: false
+ description: Location of private key file
+ versionNumber:
+ type: string
+ required: false
+ description: Version number of Service.
+ ceilometer_pub_sub_url:
+ type: string
+ required: false
+ description: REST URL of ceilometer PUB/SUB component
+
+ tosca.nodes.CeilometerTenant:
+ derived_from: tosca.nodes.Root
+ description: >
+ CORD: A Tenant of the Ceilometer Service.
+ properties:
+ kind:
+ type: string
+ default: generic
+ description: Kind of tenant
+
+topology_template:
+ node_templates:
+ service_ceilometer:
+ type: tosca.nodes.CeilometerService
+ requirements:
+ properties:
+ view_url: /admin/ceilometer/ceilometerservice/$id$/
+ kind: ceilometer
+ ceilometer_pub_sub_url: http://10.11.10.1:4455/
+# public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
+# artifacts:
+# pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
+
+# service_sflow:
+# type: tosca.nodes.SFlowService
+# requirements:
+# properties:
+# view_url: /admin/ceilometer/sflowservice/$id$/
+# kind: sflow
+# sflow_port: 6343
+# sflow_api_port: 33333
+
+ Private:
+ type: tosca.nodes.NetworkTemplate
+
+ ceilometer_network:
+ type: tosca.nodes.network.Network.XOS
+ properties:
+ ip_version: 4
+ labels: ceilometer_client_access
+ requirements:
+ - network_template:
+ node: Private
+ relationship: tosca.relationships.UsesNetworkTemplate
+ - owner:
+ node: mysite_ceilometer
+ relationship: tosca.relationships.MemberOfSlice
+ - connection:
+ node: mysite_ceilometer
+ relationship: tosca.relationships.ConnectsToSlice
+
+ mysite:
+ type: tosca.nodes.Site
+
+ trusty-server-multi-nic:
+ type: tosca.nodes.Image
+
+ mysite_ceilometer:
+ description: Ceilometer Proxy Slice
+ type: tosca.nodes.Slice
+ requirements:
+ - ceilometer_service:
+ node: service_ceilometer
+ relationship: tosca.relationships.MemberOfService
+ - site:
+ node: mysite
+ relationship: tosca.relationships.MemberOfSite
+ - default_image:
+ node: trusty-server-multi-nic
+ relationship: tosca.relationships.DefaultImage
+ properties:
+ default_flavor: m1.medium
+ max_instances: 2
+
+# mysite_sflow:
+# description: Slice for sFlow service
+# type: tosca.nodes.Slice
+# requirements:
+# - sflow_service:
+# node: service_sflow
+# relationship: tosca.relationships.MemberOfService
+# - site:
+# node: mysite
+# relationship: tosca.relationships.MemberOfSite
+# properties:
+# default_flavor: m1.small
+# max_instances: 2
+
+ my_ceilometer_tenant:
+ description: Ceilometer Service default Tenant
+ type: tosca.nodes.CeilometerTenant
+ requirements:
+ - provider_service:
+ node: service_ceilometer
+ relationship: tosca.relationships.MemberOfService
+
+ # Virtual machines
+# sflow_service_instance:
+# type: tosca.nodes.Compute
+# capabilities:
+# # Host container properties
+# host:
+# properties:
+# num_cpus: 1
+# disk_size: 10 GB
+# mem_size: 4 MB
+# # Guest Operating System properties
+# os:
+# properties:
+# # host Operating System image properties
+# architecture: x86_64
+# type: linux
+# distribution: Ubuntu
+# version: 14.10
+# requirements:
+# - slice:
+# node: mysite_sflow
+# relationship: tosca.relationships.MemberOfSlice
+
+ Ceilometer:
+ type: tosca.nodes.DashboardView
+ properties:
+ url: template:xosCeilometerDashboard
+ Tenant:
+ type: tosca.nodes.DashboardView
+ properties:
+ no-create: true
+ no-update: true
+ no-delete: true
+
+ padmin@vicci.org:
+ type: tosca.nodes.User
+ properties:
+ firstname: XOS
+ lastname: admin
+ is_admin: true
+ requirements:
+ - tenant_dashboard:
+ node: Tenant
+ relationship: tosca.relationships.UsesDashboard
+ - ceilometer_dashboard:
+ node: Ceilometer
+ relationship: tosca.relationships.UsesDashboard
diff --git a/xos/configurations/acord/ceilometer_pub_sub.tar.gz b/xos/configurations/acord/ceilometer_pub_sub.tar.gz
new file mode 100644
index 0000000..eb88a2b
--- /dev/null
+++ b/xos/configurations/acord/ceilometer_pub_sub.tar.gz
Binary files differ
diff --git a/xos/configurations/acord/cleanup.sh b/xos/configurations/acord/cleanup.sh
new file mode 100755
index 0000000..91d821c
--- /dev/null
+++ b/xos/configurations/acord/cleanup.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+function cleanup_network {
+ NETWORK=$1
+ SUBNETS=`neutron net-show $NETWORK | grep -i subnets | awk '{print $4}'`
+ if [[ $SUBNETS != "" ]]; then
+ PORTS=`neutron port-list | grep -i $SUBNETS | awk '{print $2}'`
+ for PORT in $PORTS; do
+ echo "Deleting port $PORT"
+ neutron port-delete $PORT
+ done
+ fi
+ neutron net-delete $NETWORK
+}
+
+source ../../setup/admin-openrc.sh
+
+echo "Deleting VMs"
+# Delete all VMs
+VMS=$( nova list --all-tenants|grep mysite|awk '{print $2}' )
+for VM in $VMS
+do
+ nova delete $VM
+done
+
+echo "Waiting 5 seconds..."
+sleep 5
+
+cleanup_network lan_network
+cleanup_network wan_network
+cleanup_network mysite_vsg-private
+cleanup_network mysite_vsg-access
+cleanup_network management
+
+echo "Deleting networks"
+# Delete all networks beginning with mysite_
+NETS=$( neutron net-list --all-tenants|grep mysite|awk '{print $2}' )
+for NET in $NETS
+do
+ neutron net-delete $NET
+done
+
+neutron net-delete lan_network || true
+neutron net-delete subscriber_network || true
+neutron net-delete public_network || true
+neutron net-delete hpc_client_network || true
+neutron net-delete ceilometer_network || true
+neutron net-delete management || true
+neutron net-delete mysite_vsg-access || true
diff --git a/xos/configurations/acord/docker-compose.yml b/xos/configurations/acord/docker-compose.yml
new file mode 100644
index 0000000..f40761a
--- /dev/null
+++ b/xos/configurations/acord/docker-compose.yml
@@ -0,0 +1,53 @@
+xos_db:
+ image: xosproject/xos-postgres
+ expose:
+ - "5432"
+
+xos_synchronizer_openstack:
+ command: bash -c "sleep 120; python /opt/xos/synchronizers/openstack/xos-synchronizer.py"
+ image: xosproject/xos-synchronizer-openstack
+ labels:
+ org.xosproject.kind: synchronizer
+ org.xosproject.target: openstack
+ links:
+ - xos_db
+ extra_hosts:
+ - ctl:${MYIP}
+ volumes:
+ - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
+ - ./xos_cord_config:/opt/xos/xos_configuration/xos_cord_config:ro
+ - ../setup:/root/setup:ro
+
+xos_synchronizer_monitoring_channel:
+ image: xosproject/xos-synchronizer-openstack
+ command: bash -c "sleep 120; python /opt/xos/synchronizers/monitoring_channel/monitoring_channel_synchronizer.py -C /opt/xos/synchronizers/monitoring_channel/monitoring_channel_synchronizer_config"
+ labels:
+ org.xosproject.kind: synchronizer
+ org.xosproject.target: monitoring_channel
+ links:
+ - xos_db
+ extra_hosts:
+ - ctl:${MYIP}
+ volumes:
+ - ../setup/id_rsa:/opt/xos/synchronizers/monitoring_channel/monitoring_channel_private_key:ro # private key
+
+
+# FUTURE
+#xos_swarm_synchronizer:
+# image: xosproject/xos-swarm-synchronizer
+# labels:
+# org.xosproject.kind: synchronizer
+# org.xosproject.target: swarm
+
+xos:
+ image: xosproject/xos
+ command: python /opt/xos/manage.py runserver 0.0.0.0:8000 --insecure --makemigrations
+ ports:
+ - "9999:8000"
+ links:
+ - xos_db
+ volumes:
+ - ../setup:/root/setup:ro
+ - ../common/xos_common_config:/opt/xos/xos_configuration/xos_common_config:ro
+ - ./xos_cord_config:/opt/xos/xos_configuration/xos_cord_config:ro
+ - ../setup/id_rsa.pub:/opt/xos/synchronizers/monitoring_channel/monitoring_channel_public_key:ro
diff --git a/xos/configurations/acord/install_ceilometer_patch.sh b/xos/configurations/acord/install_ceilometer_patch.sh
new file mode 100755
index 0000000..77aa05b
--- /dev/null
+++ b/xos/configurations/acord/install_ceilometer_patch.sh
@@ -0,0 +1,26 @@
+if [ -d /usr/lib/python2.7/dist-packages/ceilometer/network/ext_services ]; then
+ echo "Seems VCPE notification listeners are already enabled in ceilometer... so exiting gracefully..."
+ exit 0
+fi
+echo "Verifying if all the required files are present"
+if [ ! -f openstack_ceilometer_patch.tar.gz ] || [ ! -f ceilometer_pub_sub.tar.gz ];
+then
+ echo "File openstack_ceilometer_patch.tar.gz or ceilometer_pub_sub.tar.gz not found"
+ exit 1
+fi
+echo "Copying the ceilometer patch files to /usr/lib/python2.7/dist-packages/ceilometer"
+tar -xzf openstack_ceilometer_patch.tar.gz
+sudo mv ceilometer/network/ext_services /usr/lib/python2.7/dist-packages/ceilometer/network/
+sudo mv ceilometer/network/statistics/onos /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/
+sudo mv /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/__init__.py /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/orig_init.orig_py
+sudo mv ceilometer/network/statistics/__init__.py /usr/lib/python2.7/dist-packages/ceilometer/network/statistics/
+sudo mv ceilometer-2015.1.1.egg-info/entry_points.txt /usr/lib/python2.7/dist-packages/ceilometer-*egg-info/
+sudo mv pipeline.yaml /etc/ceilometer/
+echo "Restarting ceilometer-agent-notification"
+sudo service ceilometer-agent-notification restart
+echo "Restarting ceilometer-agent-central"
+sudo service ceilometer-agent-central restart
+tar -xzf ceilometer_pub_sub.tar.gz
+echo "Starting Ceilometer PUB/SUB service"
+cd ceilometer_pub_sub
+python sub_main.py &
diff --git a/xos/configurations/acord/openstack_ceilometer_patch.tar.gz b/xos/configurations/acord/openstack_ceilometer_patch.tar.gz
new file mode 100644
index 0000000..2c4f02c
--- /dev/null
+++ b/xos/configurations/acord/openstack_ceilometer_patch.tar.gz
Binary files differ
diff --git a/xos/configurations/acord/xos_cord_config b/xos/configurations/acord/xos_cord_config
new file mode 100644
index 0000000..a5448f7
--- /dev/null
+++ b/xos/configurations/acord/xos_cord_config
@@ -0,0 +1,6 @@
+[gui]
+branding_name=CORD
+#branding_css=/static/cord.css
+branding_icon=/static/cord-logo.png
+branding_favicon=/static/cord-favicon.png
+branding_bg=/static/cord-bg.jpg
diff --git a/xos/configurations/common/devstack/local.conf b/xos/configurations/common/devstack/local.conf
index dfcf07b..38cd20c 100644
--- a/xos/configurations/common/devstack/local.conf
+++ b/xos/configurations/common/devstack/local.conf
@@ -4,6 +4,8 @@
DOWNLOAD_DEFAULT_IMAGES=false
IMAGE_URLS="http://www.planet-lab.org/cord/trusty-server-multi-nic.img"
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
+# Append the git branch name if you wish to download ceilometer from a specific branch
+enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer
disable_service n-net
enable_service q-svc
@@ -14,5 +16,16 @@
# Optional, to enable tempest configuration as part of devstack
enable_service tempest
+# Uncomment below lines if you are installing kilo version of ceilometer
+#enable_service ceilometer-acentral
+#enable_service ceilometer-anotification
+#enable_service ceilometer-collector
+#enable_service ceilometer-alarm-singleton
+#enable_service ceilometer-alarm-notifier
+#enable_service ceilometer-alarm-evaluator
+#enable_service ceilometer-api
+#enable_service ceilometer-acompute
+CEILOMETER_BACKEND=mongodb
+
## Neutron options
Q_USE_SECGROUP=False
diff --git a/xos/configurations/common/xos_common_config b/xos/configurations/common/xos_common_config
index f7b335e..76ba747 100644
--- a/xos/configurations/common/xos_common_config
+++ b/xos/configurations/common/xos_common_config
@@ -37,6 +37,7 @@
images_directory=/opt/xos/images
dependency_graph=/opt/xos/model-deps
logfile=/var/log/xos_backend.log
+save_ansible_output=True
[gui]
disable_minidashboard=True
diff --git a/xos/configurations/cord-pod/Makefile b/xos/configurations/cord-pod/Makefile
index 606f106..ff4f258 100644
--- a/xos/configurations/cord-pod/Makefile
+++ b/xos/configurations/cord-pod/Makefile
@@ -1,15 +1,15 @@
.PHONY: xos
-xos: nodes.yaml images.yaml vtn_network_cfg_json virtualbng_json
+xos: nodes.yaml images.yaml
sudo docker-compose up -d
../common/wait_for_xos_port.sh 80
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/setup.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/nodes.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/images.yaml
-vtn:
+vtn: vtn_network_cfg_json
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/vtn-external.yaml
-cord:
+cord: virtualbng_json
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/mgmt-net.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /opt/xos/configurations/common/fixtures.yaml
sudo docker-compose run xos python /opt/xos/tosca/run.py padmin@vicci.org /root/setup/cord-vtn-vsg.yaml
diff --git a/xos/configurations/cord-pod/README.md b/xos/configurations/cord-pod/README.md
index 1824ab6..e9b1327 100644
--- a/xos/configurations/cord-pod/README.md
+++ b/xos/configurations/cord-pod/README.md
@@ -19,39 +19,46 @@
## How to bring up CORD
-Installing a CORD POD requires three steps:
- 1. Installing OpenStack on a cluster
- 2. Setting up the ONOS VTN app and configuring OVS on the nova-compute nodes to be
+Installing a CORD POD involves these steps:
+ 1. Install OpenStack on a cluster
+ 2. Set up the ONOS VTN app and configuring OVS on the nova-compute nodes to be
controlled by VTN
- 3. Bringing up XOS with the CORD services
+ 3. Set up external connectivity for VMs (if not using the CORD fabric)
+ 4. Bring up XOS with the CORD services
-### Installing OpenStack
+### Install OpenStack
Follow the instructions in the [README.md](https://github.com/open-cloud/openstack-cluster-setup/blob/master/README.md)
file of the [open-cloud/openstack-cluster-setup](https://github.com/open-cloud/openstack-cluster-setup/)
repository.
-### Setting up ONOS VTN
+### Set up ONOS VTN
The OpenStack installer above creates a VM called *onos-cord* on the head node.
To bring up ONOS in this VM, log into the head node and run:
```
$ ssh ubuntu@onos-cord
-ubuntu@onos-cord:~$ cd cord; docker-compose up -d
+ubuntu@onos-cord:~$ cd cord; sudo docker-compose up -d
```
-Currently it's also necessary to do some manual configuration on each compute
-node. As root do the following:
- 1. Disable neutron-plugin-openvswitch-agent, if running:
-```
-$ service neutron-plugin-openvswitch-agent stop
-$ echo manual > /etc/init/neutron-plugin-openvswitch-agent.override
-```
- 2. Delete *br-int* and all other bridges from OVS
- 3. Configure OVS to listen for connections from VTN:
-```
-$ ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6641
-```
+### Set up external connectivity for VMs
+
+The CORD fabric is responsible for providing external (Internet) connectivity
+for VMs created on CORD. If you are running on CloudLab (or another development
+environment) and want external connectivity without the fabric, download [this script](https://raw.githubusercontent.com/open-cloud/openstack-cluster-setup/master/scripts/compute-ext-net.sh)
+ and run it as root:
+ ```
+ $ sudo compute-ext-net.sh
+ ```
+
+The script creates a bridge (*databr*) on the node as well as a veth pair
+(*veth0/veth1*). The *veth0* interface is added as a port on *databr* and
+VTN is configured to use *veth1* as its data plane interface. Traffic coming
+from *databr* is NAT'ed to the external network via `iptables`. The configuration
+assumes that *databr* takes the MAC address of *veth0* when it is added as a port
+-- this seems to always be the case (though not sure why).
+
+Note that setting up the full fabric is beyond the scope of this README.
### Bringing up XOS
@@ -62,13 +69,30 @@
ubuntu@xos:~$ cd xos/xos/configurations/cord-pod
```
-Next, put the following files in this directory:
+Next, check that the following files exist in this directory:
* *admin-openrc.sh*: Admin credentials for your OpenStack cloud
* *id_rsa[.pub]*: A keypair that will be used by the various services
* *node_key*: A private key that allows root login to the compute nodes
-Then XOS can be brought up for CORD by running a few 'make' commands:
+They will have been put there for you by the cluster installation scripts.
+
+If your setup uses the CORD fabric, you need to edit `make-vtn-networkconfig-json.sh`
+and `cord-vtn-vsg.yml` as appropriate. Specifically, in
+`make-vtn-networkconfig-json.sh` you need to set these parameters for VTN:
+ * gatewayIp
+ * gatewayMac
+ * PHYPORT
+
+And in `cord-vtn-vsg.yml`:
+ * public_addresses -> properties -> addresses
+ * service_vsg -> properties -> wan_container_gateway_ip
+ * service_vsg -> properties -> wan_container_gateway_mac
+ * service_vsg -> properties -> wan_container_netbits
+
+If you're not using the fabric then the default values should be OK.
+
+XOS can then be brought up for CORD by running a few 'make' commands:
```
ubuntu@xos:~/xos/xos/configurations/cord-pod$ make
ubuntu@xos:~/xos/xos/configurations/cord-pod$ make vtn
diff --git a/xos/configurations/cord-pod/cord-vtn-vsg.yaml b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
index d9fda9b..ac670ca 100644
--- a/xos/configurations/cord-pod/cord-vtn-vsg.yaml
+++ b/xos/configurations/cord-pod/cord-vtn-vsg.yaml
@@ -21,7 +21,7 @@
public_addresses:
type: tosca.nodes.AddressPool
properties:
- addresses: 207.141.192.128/27
+ addresses: 192.168.0.0/24
service_vsg:
type: tosca.nodes.VSGService
@@ -34,9 +34,9 @@
backend_network_label: hpc_client
public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
private_key_fn: /opt/xos/synchronizers/vcpe/vcpe_private_key
- wan_container_gateway_ip: 207.141.192.158
- wan_container_gateway_mac: a4:23:05:34:56:78
- wan_container_netbits: 27
+ wan_container_gateway_ip: 192.168.0.1
+ wan_container_gateway_mac: 02:42:c0:a8:00:01
+ wan_container_netbits: 24
artifacts:
pubkey: /opt/xos/synchronizers/vcpe/vcpe_public_key
diff --git a/xos/configurations/cord-pod/make-vtn-networkconfig-json.sh b/xos/configurations/cord-pod/make-vtn-networkconfig-json.sh
index 5239267..9f64535 100755
--- a/xos/configurations/cord-pod/make-vtn-networkconfig-json.sh
+++ b/xos/configurations/cord-pod/make-vtn-networkconfig-json.sh
@@ -17,8 +17,8 @@
"sshKeyFile": "/root/node_key",
"publicGateways": [
{
- "gatewayIp": "207.141.192.158",
- "gatewayMac": "a4:23:05:34:56:78"
+ "gatewayIp": "192.168.0.1",
+ "gatewayMac": "02:42:c0:a8:00:01"
}
],
"nodes" : [
@@ -41,7 +41,7 @@
echo $NODE
NODEIP=`getent hosts $NODE | awk '{ print $1 }'`
- PHYPORT=mlx0
+ PHYPORT=veth1
# How to set LOCALIP?
LOCALIPNET="192.168.199"
diff --git a/xos/configurations/cord/dataplane/cleanup.sh b/xos/configurations/cord/dataplane/cleanup.sh
index 120454d..91d821c 100755
--- a/xos/configurations/cord/dataplane/cleanup.sh
+++ b/xos/configurations/cord/dataplane/cleanup.sh
@@ -28,7 +28,7 @@
cleanup_network lan_network
cleanup_network wan_network
-cleanup_network mysite_vcpe-private
+cleanup_network mysite_vsg-private
cleanup_network mysite_vsg-access
cleanup_network management
diff --git a/xos/configurations/cord/dataplane/gen-etc-hosts.sh b/xos/configurations/cord/dataplane/gen-etc-hosts.sh
index 6c07ef9..0d49706 100755
--- a/xos/configurations/cord/dataplane/gen-etc-hosts.sh
+++ b/xos/configurations/cord/dataplane/gen-etc-hosts.sh
@@ -15,5 +15,5 @@
$( get_ip mysite_onos_volt flat-lan-1-net) onos_volt
$( get_ip mysite_volt flat-lan-1-net) switch_volt
$( get_ip mysite_clients flat-lan-1-net) client
-$( get_ip mysite_vcpe flat-lan-1-net) vcpe
+$( get_ip mysite_vsg flat-lan-1-net) vcpe
EOF
diff --git a/xos/configurations/cord/dataplane/gen-inventory.sh b/xos/configurations/cord/dataplane/gen-inventory.sh
index 74a5ac8..bacd2dd 100755
--- a/xos/configurations/cord/dataplane/gen-inventory.sh
+++ b/xos/configurations/cord/dataplane/gen-inventory.sh
@@ -17,5 +17,5 @@
switch_volt ansible_ssh_host=$( get_ip mysite_volt flat-lan-1-net) subscriber_ip=$( get_ip mysite_volt subscriber_network) lan_ip=$( get_ip mysite_volt lan_network)
client ansible_ssh_host=$( get_ip mysite_clients flat-lan-1-net) subscriber_ip=$( get_ip mysite_clients subscriber_network)
-vcpe ansible_ssh_host=$( get_ip mysite_vcpe flat-lan-1-net) lan_ip=$( get_ip mysite_vcpe lan_network)
+vcpe ansible_ssh_host=$( get_ip mysite_vsg flat-lan-1-net) lan_ip=$( get_ip mysite_vsg lan_network)
EOF
diff --git a/xos/configurations/opencloud/cdn-syndicate-content.yaml b/xos/configurations/opencloud/cdn-syndicate-content.yaml
new file mode 100644
index 0000000..06dc623
--- /dev/null
+++ b/xos/configurations/opencloud/cdn-syndicate-content.yaml
@@ -0,0 +1,52 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Template for deploying a single server with predefined properties.
+
+imports:
+ - custom_types/xos.yaml
+ - custom_types/cdn.yaml
+
+topology_template:
+ node_templates:
+ HyperCache:
+ type: tosca.nodes.CDNService
+ properties:
+ # HyperCache service must already exist before running this recipe
+ no-create: true
+ no-delete: true
+ no-update: true
+
+ # Setup the Syndicate Devel Service Provider
+
+ main_service_provider:
+ type: tosca.nodes.ServiceProvider
+ requirements:
+ - hpc_service:
+ node: HyperCache
+ relationship: tosca.relationships.MemberOfService
+
+ syndicate_devel:
+ type: tosca.nodes.ContentProvider
+ requirements:
+ - service_provider:
+ node: main_service_provider
+ relationship: tosca.relationships.MemberOfServiceProvider
+
+# http_node2.cs.arizona.edu:
+# type: tosca.nodes.OriginServer
+# requirements:
+# - content_provider:
+# node: syndicate_devel
+# relationship: tosca.relationships.MemberOfContentProvider
+
+ syndicate-devel.opencloud.us:
+ type: tosca.nodes.CDNPrefix
+ requirements:
+ - content_provider:
+ node: syndicate_devel
+ relationship: tosca.relationships.MemberOfContentProvider
+
+# - default_origin_server:
+# node: http_node2.cs.arizona.edu
+# relationship: tosca.relationships.DefaultOriginServer
+
diff --git a/xos/services/ceilometer/models.py b/xos/services/ceilometer/models.py
index 2684097..65bffef 100644
--- a/xos/services/ceilometer/models.py
+++ b/xos/services/ceilometer/models.py
@@ -35,7 +35,7 @@
proxy = True
KIND = CEILOMETER_KIND
- LOOK_FOR_IMAGES=[ "trusty-server-multi-nic-docker", # CloudLab
+ LOOK_FOR_IMAGES=[ #"trusty-server-multi-nic-docker", # CloudLab
"trusty-server-multi-nic",
]
diff --git a/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2 b/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2
index ea5b639..a0ebb0c 100755
--- a/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2
+++ b/xos/synchronizers/monitoring_channel/templates/start-monitoring-channel.sh.j2
@@ -24,9 +24,9 @@
sudo docker pull srikanthvavila/monitoring-channel
if [ -z "$HEADNODEFLATLANIP" ] || [ "$HEADNODEFLATLANIP" == "None" ]
then
- docker run -d --name=$MONITORING_CHANNEL --privileged=true -p $HOST_FORWARDING_PORT_FOR_CEILOMETER:8000 srikanthvavila/monitoring-channel
+ docker run -d --name=$MONITORING_CHANNEL --privileged=true -p $HOST_FORWARDING_PORT_FOR_CEILOMETER:8000 -v /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config:/usr/local/share/ceilometer_proxy_config srikanthvavila/monitoring-channel
else
- docker run -d --name=$MONITORING_CHANNEL --add-host="ctl:$HEADNODEFLATLANIP" --privileged=true -p $HOST_FORWARDING_PORT_FOR_CEILOMETER:8000 srikanthvavila/monitoring-channel
+ docker run -d --name=$MONITORING_CHANNEL --add-host="ctl:$HEADNODEFLATLANIP" --privileged=true -p $HOST_FORWARDING_PORT_FOR_CEILOMETER:8000 -v /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config:/usr/local/share/ceilometer_proxy_config srikanthvavila/monitoring-channel
fi
else
docker start $MONITORING_CHANNEL
@@ -40,7 +40,7 @@
#ifconfig $HPC_IFACE 0.0.0.0
# Now copy ceilometer proxy configuration to container
-cat /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config | docker exec -i $MONITORING_CHANNEL bash -c 'cat > /usr/local/share/ceilometer_proxy_config'
+#cat /usr/local/share/monitoring-channel-{{ unique_id }}_ceilometer_proxy_config | sudo docker exec -i $MONITORING_CHANNEL bash -c 'cat > /usr/local/share/ceilometer_proxy_config'
# Attach to container
docker start -a $MONITORING_CHANNEL
diff --git a/xos/xos/settings.py b/xos/xos/settings.py
index c8b0b07..8764b80 100644
--- a/xos/xos/settings.py
+++ b/xos/xos/settings.py
@@ -209,13 +209,23 @@
}
},
'handlers': {
+ 'file': {
+ 'level': 'DEBUG',
+ 'class': 'logging.FileHandler',
+ 'filename': '/var/log/django_debug.log',
+ },
'mail_admins': {
'level': 'ERROR',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
- }
+ },
},
'loggers': {
+ 'django': {
+ 'handlers': ['file'],
+ 'level': 'DEBUG',
+ 'propagate': True,
+ },
'django.request': {
'handlers': ['mail_admins'],
'level': 'ERROR',