Coder Social home page Coder Social logo

timsimpsonr / reddwarf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openstack/nova

1.0 2.0 1.0 93.12 MB

GitHub Mirror of OpenStack Compute (Nova)

Home Page: https://launchpad.net/nova

License: Apache License 2.0

Python 98.38% Shell 1.46% Perl 0.01% JavaScript 0.14% Ruby 0.02%

reddwarf's Introduction

Reddwarf (Database As A Service)

Preface

Reddwarf is extending the OpenStack Nova to enable Database as a Service.

Get more information and get involved with the OpenStack community.

Getting Started

The information below is set to be run on a VM. Inside 'integration/vagrant' folder is a file called 'VagrantFile'. This is a script that runs with Vagrant (http://www.vagrantup.com) and VirtualBox (http://www.virtualbox.org/). The versions we are currently using are Vagrant version 0.8.7 and Virtualbox 4.1.4 r74291. Please be aware that virtualization must be enabled in your systems BIOS to get virtualbox running with ANY 64b image.

  1. Create a new Folder:

    [nix:~]$ mkdir ~/dev
    [nix:~]$ cd ~/dev
    
  2. (Required) Download the openvz glance image from:

    [nix:~/dev]$ mkdir ~/dev/glanceimg
    [nix:~/dev]$ cd ~/dev/glanceimg
    [nix:~/dev/glanceimg]$ wget http://c629296.r96.cf2.rackcdn.com/debian-squeeze-x86_64-openvz.tar.gz
    
  3. (Required) Define the environment variable for glance images (path to directory of debian-squeeze-x86_64-openvz.tar.gz):

    [nix:~/dev]$ export GLANCEIMAGES=~/dev/glanceimg
    
  4. Fresh check out from github.:

    [nix:~/dev]$ git clone git://github.com/rackspace/reddwarf.git
    
  5. Enter the directory reddwarf/integration/vagrant:

    [nix:~/dev]$ cd reddwarf/integration/vagrant
    
  6. Startup the Virtual Machine with Vagrant:

    [nix:~/dev/reddwarf/integration/vagrant]$ vagrant up
    

Command Downloads the necessary files and starts up a Virtual Box image to start using.

Quick Setup

  1. On your host machine (i.e. do NOT use vagrant ssh to enter it):

    [nix:~/dev/reddwarf/integration/vagrant]$ ./reddwarf-ci vagrantci
    

This automates all the manual steps below in order.

  1. Install dependencies (install)
  2. Build all the required packages (build)
  3. Initialize Nova environemnt (initialize)
  4. Run the CI tests (test)

Manual Setup Reddwarf

  1. This will ssh in to the virtual machine:

    [nix:~/dev/reddwarf/integration/vagrant]$ vagrant ssh
    
  2. This is the home location for vagrant and will have all the files in the integration/vagrant folder:

    [vagrant:~]$ cd /vagrant
    
  3. This will be sure the environment has all the required dependencies installed:

    [vagrant:/vagrant]$ reddwarf-ci install
    
  4. This will build all the packages required to start and run nova. This includes the guest-agent package that will run on the instances that listens for events from the API:

    [vagrant:/vagrant]$ reddwarf-ci build
    
  5. This will clean and prepare the environment to start running nova as a clean setup. You can run this multiple times to refresh the environment:

    [vagrant:/vagrant]$ reddwarf-ci initialize
    

Testing Reddwarf

This is the integration tests for reddwarf that will run a plethora of tests and be sure that everything is setup and working correctly.:

[vagrant:/vagrant]$ reddwarf-ci test

You can run specific groups of tests by specifying the group paramter. The below example shows running just the volume tests:

[vagrant:/vagrant]$ reddwarf-ci test --group=nova.volumes.driver

Starting Up Reddwarf/Nova Manually

  1. Start all the services in a screen session:

    [vagrant:/vagrant]$ reddwarf-ci start
    
  2. Stop all the screen services, also kills all the screen sessions:

    [vagrant:/vagrant]$ reddwarf-ci stop
    

Example Calls/Utilties for Reddwarf/Nova

  1. Open up a new terminal and goto integration/vagrant:

    [nix:~]$ cd ~/dev/reddwarf/integration/vagrant
    
  2. SSH into the vagrant box:

    [nix:~]$ vagrant ssh
    
  3. Go to the source bin directory:

    [vagrant:~]$ cd /src/bin
    
  4. Run reddwarf-cli:

    [vagrant:/src/bin]$ ./reddwarf-cli
    
  5. Authenticate:

    [vagrant:/src/bin]$ ./reddwarf-cli auth login admin admin dbaas
    
  6. Create an instance:

    [vagrant:/src/bin]$ ./reddwarf-cli instance create test 1 flavors/2
    [vagrant:/src/bin]$ ./reddwarf-cli instance list
    [vagrant:/src/bin]$ sudo vzlist
    [vagrant:/src/bin]$ sudo vzctl enter 1
    
  7. Create database:

    [vagrant:/src/bin]$ ./reddwarf-cli database create 1 testdb
    
  8. Create a user:

    [vagrant:/src/bin]$ ./reddwarf-cli user create 1 testuser testpass testdb
    
  9. Login to mysql:

    [vagrant:/src/bin]$ mysql -u testuser -ptestpass -h <ipaddress>
    

reddwarf's People

Contributors

vishvananda avatar hub-cap avatar jk0 avatar tr3buchet avatar xtoddx avatar rnirmal avatar justinsb avatar ameade avatar comstud avatar jkoelker avatar cp16net avatar throughnothing avatar sleepsonthefloor avatar rconradharris avatar slashk avatar edleafe avatar ironcamel avatar imsplitbit avatar tpatil avatar ttx avatar devcamcar avatar corywright avatar anotherjesse avatar annegentle avatar adiantum avatar vpopovsk avatar smoser avatar ryu25ish avatar joshuamckenty avatar yoriksar avatar

Stargazers

Tim Simpson avatar

Watchers

Tim Simpson avatar James Cloos avatar

Forkers

timsimpson

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.