Coder Social home page Coder Social logo

githubofhuo / fuel-devops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openstack-archive/fuel-devops

0.0 2.0 0.0 2.05 MB

Fuel DevOps tools for managing virtual environments

Home Page: http://openstack.org

License: Apache License 2.0

Python 99.99% Shell 0.01%

fuel-devops's Introduction

fuel-devops

Fuel-Devops is a sublayer between application and target environment(all of supported by libvirt currently).

This application is used for testing purposes like grouping virtual machines to environments, booting KVM VM's locally from the ISO image and over the network via PXE, creating, snapshotting and resuming back the whole environment in single action, create virtual machines with multiple NICs, multiple hard drives and many other customizations with a few lines of code in system tests.

Installation

The installation procedure can be implemented via PyPI in Python virtual environment (suppose you are using Ubuntu 12.04 or Ubuntu 14.04):

Before using it, please install the following required dependencies:

sudo apt-get install git \
postgresql \
postgresql-server-dev-all \
libyaml-dev \
libffi-dev \
python-dev \
python-libvirt \
python-pip \
qemu-kvm \
qemu-utils \
libvirt-bin \
libvirt-dev \
ubuntu-vm-builder \
bridge-utils

sudo apt-get update && sudo apt-get upgrade -y

Install packages needed for building python eggs

sudo apt-get install python-virtualenv libpq-dev libgmp-dev

In case you are using Ubuntu 12.04 let’s update pip and virtualenv, otherwise you can skip this step

sudo pip install pip virtualenv --upgrade
hash -r

Create virtualenv for the devops project

virtualenv --system-site-packages <path>/fuel-devops-venv

Note

Activate virtualenv and install devops package using PyPI.

source  <path>/fuel-devops-venv/bin/activate
pip install git+https://github.com/openstack/fuel-devops.git@<version> --upgrade

Configuration

Basically fuel-devops requires that the following system-wide settings are configured:

  • Default libvirt storage pool is active (called ‘default’)
  • Current user must have permission to run KVM VMs with libvirt
  • PostgreSQL server running with appropriate grants and schema for devops
  • [Optional] Nested Paging is enabled
  • [Optional] Network filter for host bridges should be disabled: http://wiki.libvirt.org/page/Net.bridge-nf-call_and_sysctl.conf.

Usage

Run dos.py -h to see full list of supported actions

Operation commands:
list                Show virtual environments
show                Show VMs in environment
erase               Delete environment
start               Start VMs
destroy             Destroy(stop) VMs
suspend             Suspend VMs
resume              Resume VMs
revert              Apply snapshot to environment
snapshot            Make environment snapshot
sync                Synchronization environment and devops
snapshot-list       Show snapshots in environment
snapshot-delete     Delete snapshot from environment
net-list            Show networks in environment
time-sync           Sync time on all env nodes
revert-resume       Revert, resume, sync time on VMs
version             Show devops version
create              Create a new environment
slave-add           Add a node
slave-change        Change node VCPU and memory config
slave-remove        Remove node from environment
admin-setup         Setup admin node
admin-change        Change admin node VCPU and memory config
node-start          Start node in environment
node-destroy        Destroy (power off) node in environment
node-reset          Reset (restart) node in environment

Use dos.py -h to see help for specific command

positional arguments:
ENV_NAME              environment name

optional arguments:
-h, --help            show this help message and exit
--vcpu VCPU_COUNT     Set node VCPU count
--node-count NODE_COUNT, -C NODE_COUNT
                    How many nodes will be created
--ram RAM_SIZE        Set node RAM size
--net-pool NET_POOL, -P NET_POOL
                    Set ip network pool (cidr)
--iso-path ISO_PATH, -I ISO_PATH
                    Set Fuel ISO path
...

Testing

There are next test targets that can be run to validate the code.

tox -e pep8 - style guidelines enforcement
tox -e py27 - unit and integration testing

fuel-devops's People

Contributors

adanin avatar anaboikina avatar artem-panchenko avatar asledzinskiy avatar bookwar avatar d1mas avatar dis-xcom avatar dkruglov avatar ekorekin avatar fungi avatar gmannos avatar ivankliuk avatar jumpojoy avatar kozhukalov avatar loles avatar maximkulkin avatar mihgen avatar monroid avatar mrasskazov avatar penguinolog avatar prmtl avatar rmoe avatar sergeygalkin avatar tatyankaleontovich avatar teran avatar tyzhnenko avatar vicglarson avatar xarses avatar xdel avatar ykotko avatar

Watchers

 avatar  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.