Code Monkey home page Code Monkey logo

avocado-azure's Introduction

avocado-azure

Avocado Azure is an avocado plugin that lets you run avocado tests on Microsoft Azure Virtual Machine instances. v1.1: for WALinuxAgent-2.0.16-1

Must tools on host: python2.6+ avocado avocado-vt azure-xplat-cli v1.10.0 brewkoji-1.13.1 nodejs0.10+ wget virtualization packages(python-virtinst libvirt bridge-utils virt-manager qemu-kvm-tools virt-viewer virt-v2v virt-install qemu-img) tcping rpm-build

Must tools on guest: nmap tcpdump fio iperf3

Installation

  1. Install git, wget, nmap, tcpdump, tcping

    1). vi /etc/yum.repos.d/rhel7.repo

     [rhel7]
     name=rhel7
     baseurl=[RHEL-7 repo]
     enabled=1
     gpgcheck=0
    

    2). yum -y install git wget nmap tcpdump

    3). Install tcping:

     i). wget http://ftp.nluug.nl/os/Linux/distr/archlinux/community/os/x86_64/tcping-1.3.5-4-x86_64.pkg.tar.xz
    
     ii). xz -d tcping-1.3.5-4-x86_64.pkg.tar.xz
    
     iii). tar -xvf tcping-1.3.5-4-x86_64.pkg.tar
    
     iv). mv usr/bin/tcping /usr/bin/
    
  2. Install virtualization packages:

    yum -y install kvm python-virtinst libvirt bridge-utils virt-manager qemu-kvm-tools virt-viewer virt-v2v virt-install qemu-img

    systemctl start libvirtd

    systemctl enable libvirtd

  3. Install brew:

    1). vi /etc/yum.repos.d/rhpkg.repo

     [rhpkg]
     name=rhpkg for Red Hat Enterprise Linux $releasever
     baseurl=[brewkoji repo]
     enabled=1
     gpgcheck=0
    

    2). yum -y install brewkoji

  4. Install azure-cli:

    1). install nodejs, nmap: (Install nodejs 0.10. Current version: nodejs-0.10.46-1nodesource.el7.centos.x86_64)

     i). curl --silent --location https://rpm.nodesource.com/setup | bash -
    
     ii). yum -y install nodejs
    

    2). install azure-cli:

     npm install -g azure-cli
    
    • If want to install spefic azure-cli version:

      i). Uninstall previously version:

        npm uninstall azure-cli โ€“g
      

      ii). Download specific version souce code:

        wget https://github.com/Azure/azure-xplat-cli/archive/<branch-name>.zip
      
        (e.g.) wget https://github.com/Azure/azure-xplat-cli/archive/v0.10.0-May2016.zip
      

      iii). unzip v0.10.0-May2016.zip

      iv). npm install -g

  5. Install Avocado:

    1). pre-install packages:

     yum install -y git gcc python-devel python-pip libvirt-devel libyaml-devel redhat-rpm-config xz-devel
    
     * For RHEL7 there's no python-pip and libyaml-devel packages in repo:
    
     wget https://bootstrap.pypa.io/get-pip.py
    
     python get-pip.py        
    

    2). Download souce code from github

     avocado: git clone git://github.com/avocado-framework/avocado.git
    
     avocado-vt: git clone git://github.com/avocado-framework/avocado-vt.git
    

    3). Install avocado and avocado-vt:

     cd avocado
    
     pip install -r requirements.txt --upgrade  
    
     python setup.py develop
    
     cd avocado-vt
    
     pip install -r requirements.txt --upgrade  
    
     python setup.py develop
    
     * For RHEL-7: 
    
         i). pip install pexpect
    
         ii). wget ftp://195.220.108.108/linux/epel/7/x86_64/p/p7zip-15.09-9.el7.x86_64.rpm
    
             rpm -ivh p7zip-15.09-9.el7.x86_64.rpm
    

    4). Check:

     avocado vt-bootstrap --vt-type qemu
    
     If miss some packages, we need to install them ourselves. 
    

    5). Configuration:

     i). mv <avocado path>/etc/avocado /etc/
    
     ii). vi /etc/avocado/avocado.conf
    
  6. Disable firewall and selinux:

    1). disable firewall:

     systemctl stop firewalld
    
     systemctl disable firewalld
    

    2). close selinux:

     setenforce 0
    

Usage

  1. Fill in comfig.yaml with your accounts.

  2. Edit the cases list in cfg/cases.yaml.

  3. Run "python run.py"

  4. "new_rhel_detect.py" is used to detect the latest RHEL build and run avocado-azure automatically. You can add this script into crontab.

avocado-azure's People

Contributors

yuxisun1217 avatar

Watchers

 avatar

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.