From 147371456102d6ae57b01f43b46cab0ea7484d4b Mon Sep 17 00:00:00 2001 From: Petr Schreiber Date: Tue, 15 May 2018 13:33:04 +0200 Subject: [PATCH] docs: fixing typos in ReadMe.MD --- README.md | 67 ++++++++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 1537b4a..f3dd9ac 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,14 @@ [![License](license-apache-2.svg)](https://github.com/AVGTechnologies/lab_manager/blob/master/LICENSE) -Lab Manager -=========== +# Lab Manager +Service providing REST API for various cloud providers. -Web Application providing uniform API to several cloud providers (Vsphere, Azure, ovirt, ...) +## Status +The solution is currently in development. -Endpoints ---------- +The only supported cloud provider at the moment is _vmWare vSphere_. +## Endpoints ``` GET /computes POST /computes @@ -23,46 +24,32 @@ GET /computes/:id/snapshots/:id POST /computes/:id/snapshots/:id/revert ``` -Status ------- +## Development -**This app is in develomplent - Not production ready** - -Development ------------ - -##setup - - #create/modify config/database.yml - #create/modify config/lab_manager.yml - rake db:setup - - -##run app - - rerun rackup +### Setup environment +* you will need Linux dev machine with Ruby 2.2.2 +* create file `config/database.yml` based on adjusted `config/database.yml.example` +* create file `config/lab_manager.yml` based on adjusted `config/lab_manager.yml.example` +* run `rake db:setup` +### Run app +* please run command `rerun rackup` (you can install reran globally by: `rvm @global do gem install rerun`) +### Example usage +#### Create & poweron virtual machine (compute unit) +`curl -i -H 'Content-Type: application/json' --data '{"provider_name":"v_sphere","image":"TA_8x64"}' localhost:21000/computes/` +It returns id of the created compute. -##example usage -``` -#create & poweron virtual machine (compute unit) -curl -i -H 'Content-Type: application/json' --data '{"provider_name":"v_sphere","image":"TA_8x64"}' localhost:21000/computes/ -#it returns id of the created compute - -#destroy compute with id 1 -curl -i -X DELETE localhost:21000/computes/9 - -#create & poweron virtual machine with custom name -curl -i -H 'Content-Type: application/json' --data '{"provider_name":"v_sphere","image":"TA_8x64", "create_vm_options": {"name":"fooooooooo"}}' localhost:21000/computes/ +#### Destroy compute with id 1 +`curl -i -X DELETE localhost:21000/computes/1` -#create & poweron virtual machine in custom folder it must exist in advance -curl -i -H 'Content-Type: application/json' --data '{"provider_name":"v_sphere","image":"TA_8x64", "create_vm_options": {"dest_folder":"foo/bar/baz"}}' localhost:21000/computes/ +#### Create & power on virtual machine with custom name +`curl -i -H 'Content-Type: application/json' --data '{"provider_name":"v_sphere","image":"TA_8x64", "create_vm_options": {"name":"fooooooooo"}}' localhost:21000/computes/` -#create & poweron full clone -curl -i -H 'Content-Type: application/json' --data '{"provider_name":"v_sphere","image":"TA_8x64", "create_vm_options": {"linked_clone":false}}' localhost:21000/computes/ +#### Create & power on virtual machine in custom folder +The folder must exist in advance! +`curl -i -H 'Content-Type: application/json' --data '{"provider_name":"v_sphere","image":"TA_8x64", "create_vm_options": {"dest_folder":"foo/bar/baz"}}' localhost:21000/computes/` - - -``` +#### Create & power on full clone +`curl -i -H 'Content-Type: application/json' --data '{"provider_name":"v_sphere","image":"TA_8x64", "create_vm_options": {"linked_clone":false}}' localhost:21000/computes/`