sudo apt-get –y install curl
echo "127.0.0.1 $(hostname)" >> /etc/hosts
In this example, an instance was launched with flavor 80G. installation didn't consume much of the disk. When snapshot was created without below steps its size was 80G (since openstack has raw in _base and snapshot creates with that raw size). By doing below (pull ing from _base to disk, qcow2 without the raw backing file reduces size of snapshot). | |
root@a6s15:/var/lib/nova/instances/ed719037-2e00-4c4c-90f9-924578f93b80# qemu-img info disk | |
image: disk | |
file format: qcow2 | |
virtual size: 80G (85899345920 bytes) | |
disk size: 77M | |
cluster_size: 65536 | |
** backing file: /var/lib/nova/instances/_base/1d043087def843d5e081c1e2c3ea6ca1e4278547 ** | |
Format specific information: |
root@ci-upgrade-scale-prototype:~# vi scale-setup-script-contrail.py | |
#!/usr/bin/python | |
import os | |
import uuid | |
from vnc_api import vnc_api | |
lib = vnc_api.VncApi('admin', 'secret123', 'scale-project-2', '127.0.0.1', '8082', '/') | |
proj_obj = lib.project_read(fq_name=['default-domain', 'scale-project-2']) |
# Mainline | |
(OPENSTACK=${OPENSTACK:-juno}; \ | |
rm -rf latest-packages; \ | |
mkdir latest-packages; \ | |
BRANCH=mainline; \ | |
LATEST_PATH=/github-build/${BRANCH}/2619/ubuntu-14-04/${OPENSTACK}/artifacts/; \ | |
TGZ_PACKAGES='contrail-installer-package*.tgz,contrail-install-packages*.tgz,contrail-packages*.tgz,contrail-openstack-packages*.tgz'; \ | |
scp hajay@10.84.5.31:${LATEST_PATH}/\{${TGZ_PACKAGES}\} latest-packages/; \ | |
BUILD=$(ls latest-packages/contrail-packages*.tgz | cut -d / -f 2 | sed -r 's/contrail-packages_(.*).tgz/\1/'); \ | |
for x in $(ls latest-packages/*.tgz); do tar xvfz $x -C latest-packages/; rm $x; done; \ |
#!/bin/bash | |
set -x | |
sed -i 's/from xml.sax.saxutils import escape\, unescape/from xml.sax.saxutils import escape as s_esc\, unescape as s_unesc/g' /usr/lib/python2.7/dist-packages/cfgm_common/imid.py | |
cat << EOF >> /usr/lib/python2.7/dist-packages/cfgm_common/imid.py | |
def escape(string): | |
return s_esc(string, entities={'"':'"', "'": "'"}) | |
def unescape(string): | |
return s_unesc(string, entities={'"':'"', "'": "'"}) |
#!/bin/bash | |
# E.g. (OPENSTACK=juno CONTRAIL=R2.20 BUILD=102-juno bash -x all-in-one-openstack-trusty-mainline) | |
set -x | |
# Inputs from user with defaults | |
OPENSTACK=${OPENSTACK:-juno} | |
CONTRAIL=${CONTRAIL:-mainline} | |
BUILD=${BUILD} | |
VROUTER_INTF=${VROUTER_INTF:-eth0} |
#!/usr/bin/python | |
# | |
# Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. | |
# | |
"""Contrail Cluster Join Operations.""" | |
# Example: python join.py --zk_index 2 --new_node 1.1.1.5 --roles database | |
# python join.py --my_zk_index 2 --my_ip 1.1.1.5 | |
# --other_nodes_ip 1.1.1.4 --other_nodes_name c1 --other_nodes_zk_indexes 1 | |
# python join.py --my_zk_index 3 --my_ip 1.1.1.6 |
cat << EOF | pycassaShell -H localhost -k config_db_uuid -f /dev/stdin > /tmp/cassandra-out-$(date +%Y%m%d-%H%M%S) | |
for r,c in OBJ_UUID_TABLE.get_range(column_count=10000000, include_timestamp=True): | |
print r,c | |
for r,c in OBJ_FQ_NAME_TABLE.get_range(column_count=10000000, include_timestamp=True): | |
print r,c | |
exit() | |
EOF |
# REPLACE localhost with DB-IP %s/localhost/<IP>/g | |
#assume obj_fq_name_table keys as utf8; | |
#assume obj_fq_name_table comparator as utf8; | |
#assume obj_fq_name_table validator as utf8; | |
#assume obj_uuid_table keys as utf8; | |
#assume obj_uuid_table comparator as utf8; | |
#assume obj_uuid_table validator as utf8; | |
LOG_FILE=repl-check.out.$(date +%Y%m%d-%H%M%S) |
# save contents to ~/.screenrc | |
#apt-get install screen | |
#screen -S <session-name> | |
# will create new screen session with <session-name> | |
#`d | |
# to exit | |
#screen -x <session-name> | |
# to connect back with share mode | |
#`c | |
# to create new window |