This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
#mgmt_netid=$(neutron net-create mgmtnet | grep " id " | awk '{ print $4 }') | |
#neutron subnet-create --name mgmtsubnet $mgmt_netid 10.10.0.0/16 | |
mgmt_netid=$(neutron net-show mgmtnet | grep " id " | awk '{ print $4 }') | |
for ((i=1501; i<4501; i=i+2)); do | |
netid1=$(neutron net-create scalenet$i | grep " id " | awk '{ print $4 }') | |
netid2=$(neutron net-create scalenet$(expr $i + 1) | grep " id " | awk '{ print $4 }') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
nova list | grep scalevm | awk '{ print $2 }' | xargs nova delete | |
for p in $(neutron port-list | grep scalemgmtport | awk '{ print $2 }'); do neutron port-delete $p; done | |
for p in $(neutron port-list | grep scaleport | awk '{ print $2 }'); do neutron port-delete $p; done | |
for r in $(neutron router-list | grep scalertr | awk '{ print $2 }'); do for x in $(neutron router-port-list $r | grep subnet_id | awk '{ prin | |
t $9 }' | sed -e 's/"//g' -e 's/,//'); do neutron router-interface-delete $r $x; done; done | |
for x in $(neutron net-list | grep scalenet | awk '{ print $2 }'); do neutron net-delete $x; done | |
for x in $(neutron router-list | grep scalertr | awk '{ print $2 }'); do neutron router-delete $x; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
== net-create == | |
2015-02-03 14:28:14.149 DEBUG [neutron_plugin_contrail.plugins.opencontrail.contrail_plugin] get_network_count(): {u'count': 3} | |
2015-02-03 14:28:14.150 INFO [neutron.quota] Loaded quota_driver: <neutron_plugin_contrail.plugins.opencontrail.quota.driver.QuotaDriver object at 0x3831e50>. | |
2015-02-03 14:28:14.560 DEBUG [neutron_plugin_contrail.plugins.opencontrail.contrail_plugin] create_network(): {u'status': u'ACTIVE', u'router:external': False, u'subnets': [], u'name': u'n10', u'admin_state_up': True, u'tenant_id': u'7acd1c8574a9441e9363e112b58a1f02', u'shared': False, u'contrail:instance_count': 0, u'id': u'cc70388a-515a-4c9c-aae8-5d50faf60b53', u'contrail:fq_name': [u'default-domain', u'admin', u'n10']} | |
== subnet-create == | |
2015-02-03 14:29:51.324 DEBUG [neutron_plugin_contrail.plugins.opencontrail.contrail_plugin] get_network(): filters: {u'name': [u'n10']} data: [{u'shared': False, u'router:external': False, u'id': u'cc70388a-515a-4c9c-aae8-5d50faf60b53', u'tenant_id': u'7acd1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This assumes a single net n1 with 1.1.1.0/24 and vgw1 interface. Can be extended to use a public net and vgw1 on the public net | |
python /opt/contrail/utils/provision_vgw_interface.py --oper create --interface vgw1 --subnets 1.1.1.0/24 --routes 0.0.0.0/0 --vrf default-domain:admin:n1:n1 | |
If you run into error running above script, instead of `import InstanceService` and `import ttypes` use | |
`from contrail_vrouter_api.gen_py.instance_service import InstanceService, ttypes` | |
Now do `ifconfig` and verify `vgw1` is present |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cfgm_common/vnc_kombu.py b/cfgm_common/vnc_kombu.py | |
index fbf637e..d8d5fd5 100644 | |
--- a/cfgm_common/vnc_kombu.py | |
+++ b/cfgm_common/vnc_kombu.py | |
@@ -6,6 +6,7 @@ import amqp.exceptions | |
import kombu | |
import gevent | |
import time | |
+import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
OS_TOKEN=$(keystone token-get | grep " id " | awk '{ print $4 }') | |
NEUTRON_URL=${NEUTRON_URL:-"http://10.84.25.29:9696/"} | |
NOVA_URL=${NOVA_URL:-"http://10.84.25.29:8774/v2/"} | |
TENANT_FLAG=${TENANT_FLAG:-''} | |
#net_id=a89ecda4-15ea-447e-a723-aa5da86a8135 #cassnet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 9dad980977d7e16f108235d832ee10ff27e86475 | |
Author: Hampapur Ajay <[email protected]> | |
Date: Tue Feb 10 11:49:22 2015 -0800 | |
config: Add support for contrail-api workers | |
Change-Id: If20f6a86d556e420eba72c8d3f593867cc0abef9 | |
diff --git a/src/config/api-server/vnc_auth_keystone.py b/src/config/api-server/vnc_auth_keystone.py | |
index b4e15f9..b599634 100644 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== Find count of number of objects in config db obj_uuid_table === | |
cat << EOF | pycassaShell -H 10.84.25.206 -k config_db_uuid -f /dev/stdinprint "Number of rows in obj_uuid_table: %s" %(len(list(OBJ_UUID_TABLE.get_range(column_count=1)))) | |
exit() | |
EOF | |
=== Find count of objects of different types in config db === | |
echo "for r,c in OBJ_FQ_NAME_TABLE.get_range(): print r; print OBJ_FQ_NAME_TABLE.get_count(r)" | pycassaShell -H 10.84.11.2 -k config_db_uuid -f /dev/stdin | |
=== Execute a command for certain duration only === | |
grep -e api -e schema -e snmp <(timeout 20s tcpdump -ni any port 9100 -A -s 1500 | grep "X-Contrail-Useragent") | sort | uniq -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[centos@ip-172-31-34-194 ~]$ cat controller-provisioning | |
sed -i 's/Xss180k/Xss280k/' /etc/cassandra/conf/cassandra-env.sh | |
echo "api-server:api-server" >> /etc/ifmap-server/basicauthusers.properties | |
echo "schema-transformer:schema-transformer" >> /etc/ifmap-server/basicauthusers.properties | |
echo "svc-monitor:svc-monitor" >> /etc/ifmap-server/basicauthusers.properties | |
echo "control-user:control-user-passwd" >> /etc/ifmap-server/basicauthusers.properties | |
sed 's/911%(process_num)01d/5998/' /etc/contrail/supervisord_config_files/contrail-discovery.ini | |
sed -i 's/91%(process_num)02d/8082/' /etc/contrail/supervisord_config_files/contrail-api.ini | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo service keystone stop | |
sudo mkdir -p /var/www/cgi-bin/keystone/ | |
( cat | sudo tee /var/www/cgi-bin/keystone/admin /var/www/cgi-bin/keystone/main ) <<EOF | |
import logging | |
import os | |
from paste import deploy | |
from keystone.openstack.common import gettextutils |
OlderNewer