summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/dashboard/rubbos_collector.py63
-rw-r--r--utils/dispatcher/__init__.py22
-rw-r--r--utils/dispatcher/base.py42
-rw-r--r--utils/dispatcher/file.py66
-rw-r--r--utils/dispatcher/func.py70
-rw-r--r--utils/dispatcher/http.py91
-rw-r--r--utils/infra_setup/README.rst68
-rw-r--r--utils/infra_setup/create_instances.sh32
-rw-r--r--utils/infra_setup/index.rst30
-rw-r--r--utils/infra_setup/passwordless_SSH/README.rst30
-rwxr-xr-xutils/infra_setup/passwordless_SSH/set_passwordless_ssh.sh60
-rw-r--r--utils/infra_setup/user_data/p-agent-user-data15
-rw-r--r--utils/infra_setup/user_data/p-master-user-data14
-rw-r--r--utils/infra_setup/vm_dev_setup/README.rst14
-rw-r--r--utils/infra_setup/vm_dev_setup/common.sh70
-rw-r--r--utils/infra_setup/vm_dev_setup/package.conf14
-rwxr-xr-xutils/infra_setup/vm_dev_setup/setup_env.sh140
-rw-r--r--utils/infra_setup/vm_dev_setup/vm_prepare_setup.sh26
-rw-r--r--utils/mongodb/Mongodb_Ubuntu_install.sh32
-rw-r--r--utils/monitor_setup/README.rst34
-rw-r--r--utils/monitor_setup/index.rst30
21 files changed, 0 insertions, 963 deletions
diff --git a/utils/dashboard/rubbos_collector.py b/utils/dashboard/rubbos_collector.py
deleted file mode 100755
index 140700e3..00000000
--- a/utils/dashboard/rubbos_collector.py
+++ /dev/null
@@ -1,63 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd. and others
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-
-import subprocess as subp
-
-
-def exec_shell(cmd):
- out, err = subp.Popen(cmd, stdout=subp.PIPE, shell=True).communicate()
- return out.strip()
-
-
-def get_onetime_data(dir_name):
- cmd = ("grep -in 'remote client nodes' %s/index.html|awk "
- "'{print $5}'|awk -F '<' '{print $1}'" % dir_name)
- client_node_num = int(exec_shell(cmd))
- cmd = ("grep -n 'Number of clients' %s/index.html|awk "
- "'{print $5}'|awk -F '<' '{print $1}'" % dir_name)
- each_client_num = int(exec_shell(cmd))
- total_client = (client_node_num + 1) * each_client_num
-
- cmd = ('grep -n "throughput" %s/stat_client*.html |awk -F "<B>"'
- ' \'{if (FNR%%2==0 && FNR%%4!=0) {printf "%%s\\n", $3}}\'|awk \''
- 'BEGIN{sum=0;}{sum=sum+$1;}END{print sum}\'' % dir_name)
- throughput = int(exec_shell(cmd))
-
- cmd = ('grep -n "Total" %s/stat_client*.html |awk -F "<B>"'
- ' \'{if (FNR==4) {printf "%%s\\n", $4}}\'|awk -F "</B>"'
- ' \'BEGIN{sum=0;}{sum=sum+$1;}END{print sum}\'' % dir_name)
- request = int(exec_shell(cmd))
-
- cmd = ('grep -n "Total" %s/stat_client*.html |awk -F "<B>"'
- ' \'{if (FNR==4) {printf "%%s\\n", $5}}\'|awk -F "</B>"'
- ' \'BEGIN{sum=0;}{sum=sum+$1;}END{print sum}\'' % dir_name)
- error_request = int(exec_shell(cmd))
-
- return total_client, throughput, request, error_request
-
-
-class RubbosCollector(object):
-
- def __init__(self):
- pass
-
- def collect_data(self, data_home):
- cmd = 'ls -l %s |grep ^d|awk \'{print $9}\'' % data_home
- result = []
- for subdir in exec_shell(cmd).split('\n'):
- total_client, throughput, request, error_request = \
- get_onetime_data(data_home + '/' + subdir)
- result.append({'client': total_client,
- 'throughput': throughput,
- 'request': request,
- 'error_request': error_request})
- result.sort(key=lambda x: x['client'])
-
- return result
diff --git a/utils/dispatcher/__init__.py b/utils/dispatcher/__init__.py
deleted file mode 100644
index ccf4db9f..00000000
--- a/utils/dispatcher/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-# liangqi1@huawei.com matthew.lijun@huawei.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-from oslo_config import cfg
-
-import utils.dispatcher.func as func
-
-func.import_modules_from_package("utils.dispatcher")
-
-CONF = cfg.CONF
-opts = [
- cfg.StrOpt('dispatcher',
- default='file',
- help='Dispatcher to store data.'),
-]
-CONF.register_opts(opts)
diff --git a/utils/dispatcher/base.py b/utils/dispatcher/base.py
deleted file mode 100644
index 793d374e..00000000
--- a/utils/dispatcher/base.py
+++ /dev/null
@@ -1,42 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-# liangqi1@huawei.com matthew.lijun@huawei.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-import abc
-import six
-
-import utils.dispatcher.func as func
-
-
-@six.add_metaclass(abc.ABCMeta)
-class Base(object):
-
- def __init__(self, conf):
- self.conf = conf
-
- @staticmethod
- def get_cls(dispatcher_type):
- '''Return class of specified type.'''
- for dispatcher in func.itersubclasses(Base):
- if dispatcher_type == dispatcher.__dispatcher_type__:
- return dispatcher
- raise RuntimeError("No such dispatcher_type %s" % dispatcher_type)
-
- @staticmethod
- def get(config):
- """Returns instance of a dispatcher for dispatcher type.
- """
- return Base.get_cls(config["type"])(config)
-
- @abc.abstractmethod
- def record_result_data(self, data):
- """Recording result data interface."""
-
- @abc.abstractmethod
- def flush_result_data(self):
- """Flush result data into permanent storage media interface."""
diff --git a/utils/dispatcher/file.py b/utils/dispatcher/file.py
deleted file mode 100644
index 6e1df828..00000000
--- a/utils/dispatcher/file.py
+++ /dev/null
@@ -1,66 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-# liangqi1@huawei.com matthew.lijun@huawei.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-import logging
-import json
-
-from oslo_config import cfg
-
-from utils.dispatcher.base import Base as DispatchBase
-
-CONF = cfg.CONF
-opts = [
- cfg.StrOpt('file_path',
- default='/tmp/bottlenecks.out',
- help='Name and the location of the file to record '
- 'data.'),
- cfg.IntOpt('max_bytes',
- default=0,
- help='The max size of the file.'),
- cfg.IntOpt('backup_count',
- default=0,
- help='The max number of the files to keep.'),
-]
-CONF.register_opts(opts, group="dispatcher_file")
-
-
-class FileDispatcher(DispatchBase):
- """Dispatcher class for recording data to a file.
- """
-
- __dispatcher_type__ = "File"
-
- def __init__(self, conf):
- super(FileDispatcher, self).__init__(conf)
- self.log = None
-
- # if the directory and path are configured, then log to the file
- if CONF.dispatcher_file.file_path:
- dispatcher_logger = logging.Logger('dispatcher.file')
- dispatcher_logger.setLevel(logging.INFO)
- # create rotating file handler which logs result
- rfh = logging.handlers.RotatingFileHandler(
- self.conf.get('file_path', CONF.dispatcher_file.file_path),
- maxBytes=CONF.dispatcher_file.max_bytes,
- backupCount=CONF.dispatcher_file.backup_count,
- encoding='utf8')
-
- rfh.setLevel(logging.INFO)
- # Only wanted the data to be saved in the file, not the
- # project root logger.
- dispatcher_logger.propagate = False
- dispatcher_logger.addHandler(rfh)
- self.log = dispatcher_logger
-
- def record_result_data(self, data):
- if self.log:
- self.log.info(json.dumps(data))
-
- def flush_result_data(self):
- pass
diff --git a/utils/dispatcher/func.py b/utils/dispatcher/func.py
deleted file mode 100644
index cb907e5e..00000000
--- a/utils/dispatcher/func.py
+++ /dev/null
@@ -1,70 +0,0 @@
-# Copyright 2013: Mirantis Inc.
-# All Rights Reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-# bottlenecks comment: this is a modified copy of rally/rally/common/utils.py
-
-import os
-import sys
-from oslo_utils import importutils
-
-import utils
-
-
-# Decorator for cli-args
-def cliargs(*args, **kwargs):
- def _decorator(func):
- func.__dict__.setdefault('arguments', []).insert(0, (args, kwargs))
- return func
- return _decorator
-
-
-def itersubclasses(cls, _seen=None):
- """Generator over all subclasses of a given class in depth first order."""
-
- if not isinstance(cls, type):
- raise TypeError("itersubclasses must be called with "
- "new-style classes, not %.100r" % cls)
- _seen = _seen or set()
- try:
- subs = cls.__subclasses__()
- except TypeError: # fails only when cls is type
- subs = cls.__subclasses__(cls)
- for sub in subs:
- if sub not in _seen:
- _seen.add(sub)
- yield sub
- for sub in itersubclasses(sub, _seen):
- yield sub
-
-
-def try_append_module(name, modules):
- if name not in modules:
- modules[name] = importutils.import_module(name)
-
-
-def import_modules_from_package(package):
- """Import modules from package and append into sys.modules
-
- :param: package - Full package name. For example: rally.deploy.engines
- """
- path = [os.path.dirname(utils.__file__), ".."] + package.split(".")
- path = os.path.join(*path)
- for root, dirs, files in os.walk(path):
- for filename in files:
- if filename.startswith("__") or not filename.endswith(".py"):
- continue
- new_package = ".".join(root.split(os.sep)).split("....")[1]
- module_name = "%s.%s" % (new_package, filename[:-3])
- try_append_module(module_name, sys.modules)
diff --git a/utils/dispatcher/http.py b/utils/dispatcher/http.py
deleted file mode 100644
index b06c5a54..00000000
--- a/utils/dispatcher/http.py
+++ /dev/null
@@ -1,91 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-# liangqi1@huawei.com matthew.lijun@huawei.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-import os
-import json
-import logging
-import requests
-
-from oslo_config import cfg
-
-from utils.dispatcher.base import Base as DispatchBase
-
-LOG = logging.getLogger(__name__)
-
-CONF = cfg.CONF
-http_dispatcher_opts = [
- cfg.StrOpt('target',
- default='http://127.0.0.1:8000/results',
- help='The target where the http request will be sent. '
- 'If this is not set, no data will be posted. For '
- 'example: target = http://hostname:1234/path'),
- cfg.IntOpt('timeout',
- default=5,
- help='The max time in seconds to wait for a request to '
- 'timeout.'),
-]
-
-CONF.register_opts(http_dispatcher_opts, group="dispatcher_http")
-
-
-class HttpDispatcher(DispatchBase):
- """Dispatcher class for posting data into a http target.
- """
-
- __dispatcher_type__ = "Http"
-
- def __init__(self, conf):
- super(HttpDispatcher, self).__init__(conf)
- self.headers = {'Content-type': 'application/json'}
- self.timeout = CONF.dispatcher_http.timeout
- self.target = CONF.dispatcher_http.target
- self.raw_result = []
- self.result = {
- "project_name": "bottlenecks",
- "description": "bottlenecks test cases result",
- "pod_name": os.environ.get('NODE_NAME', 'unknown'),
- "installer": os.environ.get('INSTALLER_TYPE', 'unknown'),
- "version": os.environ.get('BOTTLENECKS_VERSION', 'unknown')
- }
-
- def record_result_data(self, data):
- self.raw_result.append(data)
-
- def flush_result_data(self):
- if self.target == '':
- # if the target was not set, do not do anything
- LOG.error('Dispatcher target was not set, no data will'
- 'be posted.')
- return
-
- self.result["details"] = self.raw_result
-
- case_name = ""
- for v in self.raw_result:
- if isinstance(v, dict) and "scenario_cfg" in v:
- case_name = v["scenario_cfg"]["type"]
- break
- if case_name == "":
- LOG.error('Test result : %s' % json.dumps(self.result))
- LOG.error('The case_name cannot be found, no data will be posted.')
- return
-
- self.result["case_name"] = case_name
-
- try:
- LOG.debug('Test result : %s' % json.dumps(self.result))
- res = requests.post(self.target,
- data=json.dumps(self.result),
- headers=self.headers,
- timeout=self.timeout)
- LOG.debug('Test result posting finished with status code'
- ' %d.' % res.status_code)
- except Exception as err:
- LOG.exception('Failed to record result data: %s',
- err)
diff --git a/utils/infra_setup/README.rst b/utils/infra_setup/README.rst
deleted file mode 100644
index 0b6dc40e..00000000
--- a/utils/infra_setup/README.rst
+++ /dev/null
@@ -1,68 +0,0 @@
-..
-.. image:: ../etc/opnfv-logo.png
- :height: 40
- :width: 200
- :alt: OPNFV
- :align: left
-..
-|
-|
-Infra Setup Guide
-==================
-
-This document gives the guide of how to set up the infrastructure for the use of bottlenecks test cases.
-
-Create Instances for the Applications
-=====================================
-
-Firstly, there is a need to set up several instances for the applications which will be installed.
-
-The script create_instances.sh will set up several instances, the parameters used in this script can be obtained according to the following,
-
-Parameter $OPENRC_PATH is the path of where your admin-openrc.sh located, which includes the username and password of your openstack. Other parameters can be obtained under your openstack CLI as listed below,
-
-+-------------+----------------------+
-| parameter | commond line commond |
-+=============+======================+
-| NET_ID | neutron net-list |
-+-------------+----------------------+
-| FLAVOR_TYPE | nova flavor-list |
-+-------------+----------------------+
-| IMAGE_ID | nova image-list |
-+-------------+----------------------+
-| SEC_GROUP | nova secgroup-list |
-+-------------+----------------------+
-
-Add Floating IPs for the Instances
-===================================
-
-Check the available floating IPs
-
-.. code-block:: bash
-
- nova floating-ip-list
-
-Check the status of the instances created
-
-.. code-block:: bash
-
- nova list
-
-If there're no available floating IPs, to create one
-
-.. code-block:: bash
-
- nova floating-ip-create <ext_net_name>
-
-replace <ext_net_name> with the external network in your environment.
-
-Associate the floating IP address with the instance
-
-.. code-block:: bash
-
- nova add-floating-ip <instance name or ID> <allocated_floating_IP>
-
-
-Revision: _sha1_
-
-Build date: |today|
diff --git a/utils/infra_setup/create_instances.sh b/utils/infra_setup/create_instances.sh
deleted file mode 100644
index 5d238c35..00000000
--- a/utils/infra_setup/create_instances.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-# matthew.lijun@huawei.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-#! /usr/bin/env bash
-
-set -e
-
-THIS_DIR=`pwd`
-
-OPENRC_PATH=/opt/
-CREATE_INSTANCE_PATH=$THIS_DIR
-
-INSTANCE_NUM=3
-NET_ID=531c4557-7349-4984-8d5e-cceebb77205f
-FLAVOR_TYPE=m1.small
-IMAGE_ID=7c2f3e2b-cf6e-44ed-83ac-e87712167f9e
-SEC_GROUP=default
-INSTANCE_NAME=example_
-
-source $OPENRC_PATH/admin-openrc.sh
-cd $CREATE_INSTANCE_PATH
-for((count=1;count<=$INSTANCE_NUM;count++))
-do
- INSTANCE_NAME_TMP=${INSTANCE_NAME}${count}
- nova boot --nic net-id=${NET_ID} --flavor=${FLAVOR_TYPE} --image=${IMAGE_ID} --security_group=${SEC_GROUP} ${INSTANCE_NAME_TMP}
-done
diff --git a/utils/infra_setup/index.rst b/utils/infra_setup/index.rst
deleted file mode 100644
index e8b7fc64..00000000
--- a/utils/infra_setup/index.rst
+++ /dev/null
@@ -1,30 +0,0 @@
-.. OPNFV Release Engineering documentation, created by
- sphinx-quickstart on Tue Jun 9 19:12:31 2015.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-.. image:: ../etc/opnfv-logo.png
- :height: 40
- :width: 200
- :alt: OPNFV
- :align: left
-
-Documentation table of contents for infra_setup
-===============================================
-
-Contents:
-
-.. toctree::
- :numbered:
- :maxdepth: 4
-
- README.rst
-
-Indices and tables
-==================
-
-* :ref:`search`
-
-Revision: _sha1_
-
-Build date: |today|
diff --git a/utils/infra_setup/passwordless_SSH/README.rst b/utils/infra_setup/passwordless_SSH/README.rst
deleted file mode 100644
index 46a6aaae..00000000
--- a/utils/infra_setup/passwordless_SSH/README.rst
+++ /dev/null
@@ -1,30 +0,0 @@
-..
-.. image:: ../etc/opnfv-logo.png
- :height: 40
- :width: 200
- :alt: OPNFV
- :align: left
-..
-|
-|
-
-how to use the ssh login passwordless script
-============================================
-
-This script helps configure passwordless SSH between two machines.
-
-SCOPE
-The script itself is nothing more than putting in line the few commands needed to set up this rather simple, if annoying, procedure and should keep
-you focusing on the important stuff rather than remembering syntax details.
-
-USAGE
-You must place this script on the client machine and run it. You can provide two arguments on the command line, the first one is the hostname that will
-accept passwordless login and the second one is the username on that machine.
-
-If the second argument is ommited, the username will default to the username on the client machine and if both arguments are omitted, they will be asked interactively.
-
-
-evision: _sha1_
-
-Build date: |today|
-
diff --git a/utils/infra_setup/passwordless_SSH/set_passwordless_ssh.sh b/utils/infra_setup/passwordless_SSH/set_passwordless_ssh.sh
deleted file mode 100755
index 7968c220..00000000
--- a/utils/infra_setup/passwordless_SSH/set_passwordless_ssh.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#! /bin/bash
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-#this script is copied from https://github.com/guioconnor/Passwordless-SSH.
-#the Bottlenecks project needs to set the machines login each other passwordless, this script is appropriate.
-
-filename="id_rsa"
-path="$HOME/.ssh"
-
-if [ $1 ]
-then
- hostname=$1
- if [ $2 ]
- then
- username=$2
- else
- username="$USER"
- fi
-else
- # Read the host and username to store public key (the host/username accepting passwordless ssh from this computer)
- echo "What host you want to grant passwordless SSH from this computer?"
- read hostname
- echo "What is your username on $hostname? ($USER?)"
- read username
-
- if [ ! $username ]
- then
- username="$USER"
- fi
-fi
-
-
-# Generate rsa files
-if [ -f $path/$filename ]
-then
- echo "RSA key exists on $path/$filename, using existing file"
-else
- ssh-keygen -t rsa -f "$path/$filename"
- echo RSA key pair generated
-fi
-
-echo "We need to log into $hostname as $username to set up your public key (hopefully last time you'll use password from this computer)"
-cat "$path/$filename.pub" | ssh "$hostname" -l "$username" '[ -d .ssh ] || mkdir .ssh; cat >> .ssh/authorized_keys; chmod 700 ~/.ssh; chmod 600 ~/.ssh/authorized_keys'
-status=$?
-
-if [ $status -eq 0 ]
-then
- echo "Set up complete, try to ssh to $host now"
- exit 0
-else
- echo "an error has occured"
- exit 255
-fi
diff --git a/utils/infra_setup/user_data/p-agent-user-data b/utils/infra_setup/user_data/p-agent-user-data
deleted file mode 100644
index 6ec191b8..00000000
--- a/utils/infra_setup/user_data/p-agent-user-data
+++ /dev/null
@@ -1,15 +0,0 @@
-#cloud-config
-
-runcmd:
- - wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
- - sudo dpkg -i puppetlabs-release-trusty.deb
- - sudo apt-get update
- - sudo apt-get -y install puppet
- - sed -i '/^factpath/a basemodulepath=\/etc\/puppet\/modules' /etc/puppet/puppet.conf
- - sed -i '/^factpath/a server=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf
- - sed -i '/^factpath/a runinterval=1d' /etc/puppet/puppet.conf
- - sed -i '/^templatedir/d' /etc/puppet/puppet.conf
- - sed -i 's/START=no/START=yes/g' /etc/default/puppet
- - sed -i '/^\[master\]/a dns_alt_names=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf
-
-final_message: "The system with puppet is finally up, after $UPTIME seconds."
diff --git a/utils/infra_setup/user_data/p-master-user-data b/utils/infra_setup/user_data/p-master-user-data
deleted file mode 100644
index 76087259..00000000
--- a/utils/infra_setup/user_data/p-master-user-data
+++ /dev/null
@@ -1,14 +0,0 @@
-#cloud-config
-
-runcmd:
- - wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
- - sudo dpkg -i puppetlabs-release-trusty.deb
- - sudo apt-get update
- - sudo apt-get -y install puppetserver
- - sed -i '/^factpath/a basemodulepath=\/etc\/puppet\/modules' /etc/puppet/puppet.conf
- - sed -i '/^factpath/a server=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf
- - sed -i '/^factpath/a runinterval=1d' /etc/puppet/puppet.conf
- - sed -i '/^templatedir/d' /etc/puppet/puppet.conf
- - sed -i '/^\[master\]/a dns_alt_names=REPLACED_PUPPET_MASTER_SERVER' /etc/puppet/puppet.conf
-
-final_message: "The system with puppet is finally up, after $UPTIME seconds."
diff --git a/utils/infra_setup/vm_dev_setup/README.rst b/utils/infra_setup/vm_dev_setup/README.rst
deleted file mode 100644
index 49a8f7f1..00000000
--- a/utils/infra_setup/vm_dev_setup/README.rst
+++ /dev/null
@@ -1,14 +0,0 @@
-.. this folder is used to setup env for bottlenecks after ssh into VMs.
-
-how to use the script in this directory
-=======================================
-
-The script vm_setup.sh is used to git clone the bottlenecks code repo
-and download the dependent packages into the Cache from the public IP
-where they stored.
-
-The parameters are defined in package.conf file.
-
-Revision: _sha1_
-
-Build date: |today|
diff --git a/utils/infra_setup/vm_dev_setup/common.sh b/utils/infra_setup/vm_dev_setup/common.sh
deleted file mode 100644
index a3acfe86..00000000
--- a/utils/infra_setup/vm_dev_setup/common.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-set -x
-
-generate_ssh_key() {
- uname -a
- whoami
- if [ ! -d ~/.ssh ]; then
- mkdir ~/.ssh
- fi
-
- chmod 600 ~/.ssh/id_rsa
-
- if [ ! -d /root/.ssh ]; then
- mkdir /root/.ssh
- fi
-
- sudo sed -ie 's/ssh-rsa/\n&/g' /root/.ssh/authorized_keys
- sudo sed -ie '/echo/d' /root/.ssh/authorized_keys
-}
-
-configue_nameserver()
-{
- echo "Bottlenecks: configue nameserver"
- sudo rm /etc/resolv.conf
- sudo echo "nameserver 8.8.8.8" >> /etc/resolv.conf
- sudo echo "nameserver 8.8.4.4" >> /etc/resolv.conf
-
- ping -c 1 www.google.com
-}
-
-install_packages()
-{
- echo "Bottlenecks: install preinstall packages in VM"
- sudo apt-get update
-
- for i in $@; do
- if ! apt --installed list 2>/dev/null |grep "\<$i\>"
- then
- sudo apt-get install -y --force-yes $i
- fi
- done
-}
-
-hosts_config()
-{
- echo "Bottlnecks: hosts config"
- sudo echo "
-$rubbos_benchmark rubbos-benchmark
-$rubbos_client1 rubbos-client1
-$rubbos_client2 rubbos-client2
-$rubbos_client3 rubbos-client3
-$rubbos_client4 rubbos-client4
-$rubbos_control rubbos-control
-$rubbos_httpd rubbos-httpd
-$rubbos_mysql1 rubbos-mysql1
-$rubbos_tomcat1 rubbos-tomcat1
-" >> /etc/hosts
-}
-
-set +x
-
diff --git a/utils/infra_setup/vm_dev_setup/package.conf b/utils/infra_setup/vm_dev_setup/package.conf
deleted file mode 100644
index 6af6152b..00000000
--- a/utils/infra_setup/vm_dev_setup/package.conf
+++ /dev/null
@@ -1,14 +0,0 @@
-TIMEOUT=10
-export PACKAGE_URL=${PACKAGE_URL:-http://artifacts.opnfv.org/bottlenecks}
-
-export BOTTLENECKS_REPO=${BOTTLENECKS_REPO:-https://gerrit.opnfv.org/gerrit/bottlenecks}
-export BOTTLENECKS_REPO_DIR=${BOTTLENECKS_REPO_DIR:-/bottlenecks}
-export RUBBOS_DIR=${RUBBOS_DIR:-$BOTTLENECKS_REPO_DIR/rubbos}
-export RUBBOS_MULINI6_DIR=${RUBBOS_MULINI6_DIR:-$RUBBOS_DIR/rubbos_scripts}
-export RUBBOS_RUN_DIR=${RUBBOS_RUN_DIR:-$BOTTLENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/scripts}
-export RUBBOS_EXE_DIR=${RUBBOS_EXE_DIR:-$BOTTLENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/scripts}
-export RUBBOS_APP_TOOLS_URL=${RUBBOS_APP_TOOLS_URL:-$PACKAGE_URL/rubbos/app_tools.tar.gz}
-export RUBBOS_MULINI6_URL=${RUBBOS_MULINI6_URL:-$PACKAGE_URL/rubbos/rubbosMulini6.tar.gz}
-
-export PreInstall_Packages="git gcc gettext g++ libaio1 libaio-dev make"
-
diff --git a/utils/infra_setup/vm_dev_setup/setup_env.sh b/utils/infra_setup/vm_dev_setup/setup_env.sh
deleted file mode 100755
index db280e77..00000000
--- a/utils/infra_setup/vm_dev_setup/setup_env.sh
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/bin/bash
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-set -x
-
-wait_vm_ok() {
- ip=$1
-
- retry=0
- until timeout 10s ssh $ssh_args ubuntu@$ip "exit" >/dev/null 2>&1
- do
- echo "retry connect rubbos vm ip $ip $retry"
- sleep 1
- let retry+=1
- if [[ $retry -ge $2 ]];then
- echo "rubbos control start timeout !!!"
- #exit 1
- fi
- done
-}
-
-bottlenecks_prepare_env()
-{
- echo "Bottlenecks prepare env"
-
- # configue rubbos control ssh key
- generate_ssh_key
-
- # wait all other VMs ok
- for i in $rubbos_benchmark $rubbos_client1 $rubbos_client2 \
- $rubbos_client3 $rubbos_client4 $rubbos_httpd $rubbos_mysql1 $rubbos_tomcat1
- do
- wait_vm_ok $i 360
- done
-
- # configue other VMs
- for i in $rubbos_benchmark $rubbos_client1 $rubbos_client2 \
- $rubbos_client3 $rubbos_client4 $rubbos_httpd $rubbos_mysql1 $rubbos_tomcat1
- do
- scp $ssh_args -r $SCRIPT_DIR ubuntu@$i:/tmp
- ssh $ssh_args ubuntu@$i "sudo bash $SCRIPT_DIR/vm_prepare_setup.sh" &
- done
-
- # ugly use ssh execute script to fix ubuntu previlege issue
- ssh $ssh_args ubuntu@$rubbos_control "sudo bash $SCRIPT_DIR/vm_prepare_setup.sh"
-
- # test root access
- for i in $rubbos_control $rubbos_benchmark $rubbos_client1 $rubbos_client2 \
- $rubbos_client3 $rubbos_client4 $rubbos_httpd $rubbos_mysql1 $rubbos_tomcat1
- do
- ssh $ssh_args root@$i "uname -a"
- done
-}
-
-git_checkout()
-{
- if sudo git cat-file -e $1^{commit} 2>/dev/null; then
- # branch, tag or sha1 object
- sudo git checkout $1
- else
- # refspec / changeset
- sudo git fetch --tags --progress $2 $1
- sudo git checkout FETCH_HEAD
- fi
-}
-
-bottlenecks_download_repo()
-{
- echo "Bottlenecks: download bottlenecks repo"
-
- sudo git config --global http.sslVerify false
- if [ ! -d $BOTTLENECKS_REPO_DIR ]; then
- sudo git clone $BOTTLENECKS_REPO $BOTTLENECKS_REPO_DIR
- fi
- cd $BOTTLENECKS_REPO_DIR
- sudo git checkout master && sudo git pull
- git_checkout $BOTTLENECKS_BRANCH $BOTTLENECKS_REPO
- cd -
-}
-
-bottlenecks_config_hosts_ip()
-{
- sudo sed -i -e "s/REPLACE_CONTROL_HOST/$rubbos_control/g" \
- -e "s/REPLACE_HTTPD_HOST/$rubbos_httpd/g" \
- -e "s/REPLACE_MYSQL1_HOST/$rubbos_mysql1/g" \
- -e "s/REPLACE_TOMCAT1_HOST/$rubbos_tomcat1/g" \
- -e "s/REPLACE_CLIENT1_HOST/$rubbos_client1/g" \
- -e "s/REPLACE_CLIENT2_HOST/$rubbos_client2/g" \
- -e "s/REPLACE_CLIENT3_HOST/$rubbos_client3/g" \
- -e "s/REPLACE_CLIENT4_HOST/$rubbos_client4/g" \
- -e "s/REPLACE_BENCHMARK_HOST/$rubbos_benchmark/g" \
- $BOTTLENECKS_REPO_DIR/rubbos/rubbos_scripts/1-1-1/set_bottlenecks_rubbos_env.sh
-}
-
-bottlenecks_download_packages()
-{
- echo "Bottlenecks: download rubbos dependent packages from artifacts"
-
- curl --connect-timeout 10 -o /tmp/app_tools.tar.gz $RUBBOS_APP_TOOLS_URL 2>/dev/null
- sudo tar zxf /tmp/app_tools.tar.gz -C $RUBBOS_DIR
- rm -rf /tmp/app_tools.tar.gz
- curl --connect-timeout 10 -o /tmp/rubbosMulini6.tar.gz $RUBBOS_MULINI6_URL 2>/dev/null
- sudo tar zxf /tmp/rubbosMulini6.tar.gz -C $RUBBOS_MULINI6_DIR
- rm -rf /tmp/rubbosMulini6.tar.gz
-}
-
-bottlenecks_rubbos_install_exe()
-{
- echo "Bottlenecks: install and run rubbos"
-
- cd $RUBBOS_RUN_DIR
- sudo ./run.sh
-}
-
-main()
-{
- SCRIPT_DIR=`cd ${BASH_SOURCE[0]%/*};pwd`
-
- ssh_args="-o StrictHostKeyChecking=no -o BatchMode=yes"
- source $SCRIPT_DIR/hosts.conf
- source $SCRIPT_DIR/package.conf
- source $SCRIPT_DIR/common.sh
-
- bottlenecks_prepare_env
- set -x
- bottlenecks_download_repo
- bottlenecks_config_hosts_ip
- bottlenecks_download_packages
- bottlenecks_rubbos_install_exe
-}
-
-main
-set +x
diff --git a/utils/infra_setup/vm_dev_setup/vm_prepare_setup.sh b/utils/infra_setup/vm_dev_setup/vm_prepare_setup.sh
deleted file mode 100644
index 7c8d8481..00000000
--- a/utils/infra_setup/vm_dev_setup/vm_prepare_setup.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bain/bash
-##############################################################################
-# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-main()
-{
- SCRIPT_DIR=`cd ${BASH_SOURCE[0]%/*};pwd`
-
- source $SCRIPT_DIR/package.conf
- source $SCRIPT_DIR/hosts.conf
- source $SCRIPT_DIR/common.sh
-
- hosts_config
- generate_ssh_key
- configue_nameserver $nameserver_ip
- #install_packages $PreInstall_Packages
-}
-
-main
-
diff --git a/utils/mongodb/Mongodb_Ubuntu_install.sh b/utils/mongodb/Mongodb_Ubuntu_install.sh
deleted file mode 100644
index c11921cd..00000000
--- a/utils/mongodb/Mongodb_Ubuntu_install.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-##############################################################################
-# Copyright (c) 2015 Huawei
-# hongbo.tianhongbo@huawei.com
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-#import the public ke used by the package managment system
-sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
-
-#create a list for MangoDB
-#for Ubuntu 12.04
-#echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
-
-#for Ubuntu14.04
-echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
-
-#Reload local pachage database
-sudo apt-get update
-
-#install the MongoDB for the latest stable version
-sudo apt-get install -y mongodb-org
-
-#start MongoDB
-sudo service mongod start
-
-#try test
-# mongo
diff --git a/utils/monitor_setup/README.rst b/utils/monitor_setup/README.rst
deleted file mode 100644
index 2eee5a87..00000000
--- a/utils/monitor_setup/README.rst
+++ /dev/null
@@ -1,34 +0,0 @@
-..
-.. image:: ../etc/opnfv-logo.png
- :height: 40
- :width: 200
- :alt: OPNFV
- :align: left
-..
-|
-|
-Monitor Setup guide
-===================
-
-This document gives the guide of how to set up monitor tools used in Bottlenecks project.
-
-Zabbix
-=========
-
-Zabbix is the ultimate enterprise-level software designed for real-time monitoring of millions of metrics collected from tens of thousands of servers, virtual machines and network devices. Zabbix is Open Source and comes at no cost.
-
-The link https://www.zabbix.com/documentation/2.2/manual/installation/install_from_packages gives the instalation guide of Zabbix in linux servers. After the installation of Zabbix server and agent, there is a need to configure the .conf files
-
-.. code-block:: bash
-
- vim /etc/zabbix/zabbix_agentd.conf
-
- Server=<Server_IP>
- ServerActive=<Server_IP>
- Hostname=<Agent_IP>
-
-To add the Zabbix agent host to be monitored, please click Configuration->Hosts->Create host on the Zabbix server dashboard.
-
-Revision: _sha1_
-
-Build date: |today|
diff --git a/utils/monitor_setup/index.rst b/utils/monitor_setup/index.rst
deleted file mode 100644
index 60ecaba1..00000000
--- a/utils/monitor_setup/index.rst
+++ /dev/null
@@ -1,30 +0,0 @@
-.. OPNFV Release Engineering documentation, created by
- sphinx-quickstart on Tue Jun 9 19:12:31 2015.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-.. image:: ../etc/opnfv-logo.png
- :height: 40
- :width: 200
- :alt: OPNFV
- :align: left
-
-Documentation table of contents for monitor_setup
-=================================================
-
-Contents:
-
-.. toctree::
- :numbered:
- :maxdepth: 4
-
- README.rst
-
-Indices and tables
-==================
-
-* :ref:`search`
-
-Revision: _sha1_
-
-Build date: |today|