Code Monkey home page Code Monkey logo

cloud_test's Introduction

Cloud_Test

Cloud_Test is a testing tool with very simple test suites. It can be used on AWS.

Screenshot

N/A

Setting up

Donwload script

Download the source code from github:

git clone https://github.com/SCHEN2015/Cloud_Test.git

Install library

ec2 script is built on top of boto/boto3 and some other libraries then, first of all, install them using pip:

sudo pip install boto boto3

#
# If 'pip' is not installed on your machine, try with:
# sudo easy_install pip
#

sudo pip install paramiko awscli

#
# If 'paramiko' compile failed, try with:
# sudo yum install gcc libffi-devel python-devel openssl-devel
#

In most case it is enough but if you are running Mountain Lion you might need to export the variable as follow:

export PYTHONPATH=/usr/bin/python2.7
export PYTHONPATH=${PYTHONPATH}:$HOME/code/python/boto
change the python version according to your own.

Create AWS configuration file

Once installed, you should create an AWS configuration file with credentials and default settings such as preferred region:

aws configure

This command also be used for updating AWS configurations.

Create and edit the configuration file for cloud_test

Cloud_Test uses a property file in order to load default settings i.e. username, default pem file, default region, etc. Therefore, you must edit configuration file:

vi ~/.ec2cfg.json

# This file should be like this:

{
    "DEFAULT_REGION": "us-west-2",

    "DEFAULT_USER_NAME": "ec2-user",
    "PEM": {
        "us-east-1": "/home/cheshi/.pem/us-east-1-cheshi.pem",
        "us-west-2": "/home/cheshi/.pem/us-west-2-cheshi.pem",
        "ap-northeast-1": "/home/cheshi/.pem/ap-northeast-1-cheshi.pem"
    },

    "SECONDARY_VOLUME_DEVICE": "/dev/xvdf"
}

Update the configuration file for test cases

Configuration for all cases

$ cd Cloud_Test/test_suites
$ vi default_configure.json 
{
    "CASE_ID": "RHEL7-00000",
    "LOG_SAVE_PATH": "/home/cheshi/workspace/rhel76-test-outputs/",

    "REGION": "us-west-2",
    "USER_NAME": "ec2-user",

    "IMAGE_ID": "ami-0301fe4c5f34e405b",
    "SUBNET_ID": "subnet-f0e15896",
    "SECURITY_GROUP_IDS": [
        "sg-33e9174e"
    ],

    "INSTANCE_TYPE_LIST": [
        "t2.micro"
    ]
}

Configuration for a specified case (overwrite default)

$ cd Cloud_Test/test_suites/RHEL7-93100
$ vi configure.json
{
    "CASE_ID": "RHEL7-93100",

    "IMAGE_ID": "ami-0301fe4c5f34e405b",

    "INSTANCE_TYPE_LIST": [
                "r5.large",
                "z1d.large"
    ]
}

Usage

# List all available test cases
$ ls -d Cloud_Test/test_suites/RHEL*
RHEL7-87117  RHEL7-87122  RHEL7-87306  RHEL7-88713
RHEL7-87119  RHEL7-87124  RHEL7-87311  RHEL7-93100

# Do some configuration
$ cd Cloud_Test/test_suites/RHEL7-88713
$ vi configure.json
......

$ ./run.py
......

Check results

$ ./test_suites/utils/summary.sh /home/cheshi/workspace/rhel76-test-outputs/RHEL7-88713/
** VMSize       DiskType   I/OMode    BS     IODepth   Format    BW(KB/s)     IOPS
** m4.16xlarge  st1        write      1024k  1         raw       544608       531
** m4.16xlarge  st1        read       1024k  1         raw       551688       538
** m4.16xlarge  sc1        write      1024k  1         raw       274766       268
** m4.16xlarge  sc1        read       1024k  1         raw       273452       267
** m4.16xlarge  io1        randwrite  256k   1         raw       338706       1323
** m4.16xlarge  io1        randwrite  16k    1         raw       219207       13700
** m4.16xlarge  io1        randread   256k   1         raw       340829       1331
** m4.16xlarge  io1        randread   16k    1         raw       331893       20743
** m4.16xlarge  gp2        randwrite  256k   1         raw       168891       659
** m4.16xlarge  gp2        randwrite  16k    1         raw       164945       10309
** m4.16xlarge  gp2        randread   256k   1         raw       169929       663
** m4.16xlarge  gp2        randread   16k    1         raw       165946       10371

cloud_test's People

Contributors

dependabot[bot] avatar schrht avatar yuhuijiang avatar yuxisun1217 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

cloud_test's Issues

Waiting instance state become running failed

Waiting instance state become running failed.
Following message in log. Block testing.

3. Waiting instance state become running
Failed!
----------
Waiter InstanceRunning failed: Waiter encountered a terminal failure state 
----------

Cannot install gcc with beta version of RHEL.

While doing gcc installation in RHEL7.5 Beta, we encountered the following issue:

Error: Package: glibc-2.17-196.el7_4.2.i686 (rhui-REGION-rhel-server-releases)
           Requires: glibc-common = 2.17-196.el7_4.2
           Installed: glibc-common-2.17-220.el7.x86_64 (@rhel-debug)
               glibc-common = 2.17-220.el7
           Available: glibc-common-2.17-55.el7.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-55.el7
           Available: glibc-common-2.17-55.el7_0.1.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-55.el7_0.1
           Available: glibc-common-2.17-55.el7_0.3.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-55.el7_0.3
           Available: glibc-common-2.17-55.el7_0.5.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-55.el7_0.5
           Available: glibc-common-2.17-78.el7.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-78.el7
           Available: glibc-common-2.17-105.el7.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-105.el7
           Available: glibc-common-2.17-106.el7_2.1.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-106.el7_2.1
           Available: glibc-common-2.17-106.el7_2.4.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-106.el7_2.4
           Available: glibc-common-2.17-106.el7_2.6.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-106.el7_2.6
           Available: glibc-common-2.17-106.el7_2.8.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-106.el7_2.8
           Available: glibc-common-2.17-157.el7.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-157.el7
           Available: glibc-common-2.17-157.el7_3.1.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-157.el7_3.1
           Available: glibc-common-2.17-157.el7_3.2.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-157.el7_3.2
           Available: glibc-common-2.17-157.el7_3.4.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-157.el7_3.4
           Available: glibc-common-2.17-157.el7_3.5.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-157.el7_3.5
           Available: glibc-common-2.17-196.el7.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-196.el7
           Available: glibc-common-2.17-196.el7_4.2.x86_64 (rhui-REGION-rhel-server-releases)
               glibc-common = 2.17-196.el7_4.2
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.