From c62ea4485b56de69dfdf87c7cc9b4ee1d64a7d4f Mon Sep 17 00:00:00 2001 From: Prakash B Hegade Date: Thu, 30 Apr 2015 09:26:47 +0530 Subject: [PATCH 1/4] Update CentOSBridgeVZAdapter.py adding nameserver variable as a vm argument --- src/adapters/CentOSBridgeVZAdapter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/adapters/CentOSBridgeVZAdapter.py b/src/adapters/CentOSBridgeVZAdapter.py index 6550cc8..0b48b52 100644 --- a/src/adapters/CentOSBridgeVZAdapter.py +++ b/src/adapters/CentOSBridgeVZAdapter.py @@ -382,6 +382,7 @@ def get_vm_spec(): vm_set_args = " --netif_add eth0,,,," + settings.SUBNET_BRIDGE + \ " --ram " + ram + \ " --swap " + swap + \ + " --nameserver " + settings.get_adapter_nameserver() + \ " --onboot yes" + \ " --save" From 4b68af5e96f86ddf8702cc019a1ee3089f3916bb Mon Sep 17 00:00:00 2001 From: Prakash B Hegade Date: Thu, 30 Apr 2015 09:32:49 +0530 Subject: [PATCH 2/4] Update README.org Updated specific settings for bridge adapter in readme --- README.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.org b/README.org index da5017d..e7602d5 100644 --- a/README.org +++ b/README.org @@ -77,6 +77,17 @@ machine on which the ADS services are running. If the ip address of your base machine is 10.2.58.XXX, SUBNET = ["10.2.58.12/28"] +*** Settings Specific CentOSBrdigeVZAdapter +Following are the specific settings for the bridge adapter. Edit the file +=ovpl/src/adapters/settings.py= to set the following: + 1. Update the SUBNET_BRIDGE name with name of the bridge which is + internal to private network + + 2. In the function get_adapter_nameserver(), update the variable + NAME_SERVER from 'inherit' to the IP of the name server in the + network. + + *** Settings for AWSAdapter If using AWSAdapter, copy =src/adapters/sample_aws_config.py= to =src/adapters/aws_config.py=, and edit the values accordingly. See From fe38431ddb7e4913b0c6676c126891c9d2a89f10 Mon Sep 17 00:00:00 2001 From: Prakash B Hegade Date: Thu, 30 Apr 2015 09:46:04 +0530 Subject: [PATCH 3/4] Create understanding-labspec.org Adding a document to understand and edit the labspec --- docs/understanding-labspec.org | 177 +++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 docs/understanding-labspec.org diff --git a/docs/understanding-labspec.org b/docs/understanding-labspec.org new file mode 100644 index 0000000..617aa71 --- /dev/null +++ b/docs/understanding-labspec.org @@ -0,0 +1,177 @@ +#+Title: Working with labspec.json +#+Author: Prakash B. H. +#+Date: 28 April 2015 + +* Introduction +This document details out on how to complete the labspec.json in the +process of deploying the lab. + +* Assumptions +The integration engineer is aware of various levels of integration, +has the lab source code and is aware of all the technology and tools +used for the lab development. + +* JavaScript Object Notation (JSON) +JSON is a lightweight data-interchange format which is easy for humans +to read and write as well easy for machines to parse and +generate. JSON is a text format that is completely language +independent but uses conventions that are familiar to programmers of +the C-family of languages. + +JSON is built on two structures: + + A collection of name/value pairs. In various languages, this is + realized as an object, record, struct, dictionary, hash table, + keyed list, or associative array. + + An ordered list of values. In most languages, this is realized + as an array, vector, list, or sequence. + +More information about JSON can be found in the [[http://www.json.org/][official +documentation]]. + +* Completing the Template +The description below explains how to populate the =labspec.json= +template. For simplicity it is break down into several parts. + +The first section in the template covers the build requirements for +the lab. It covers the lab build requirements like architecture, OS, +OS version, service pack and other details. Build operation can be +viewed as build, the configuration, operations to be carried out pre +build and post build. Only the required values can be filled inside +the template. The fields with unknown or no values can be left empty. +#+begin_src example +"lab": { + "build_requirements": { + "platform": { + "arch": "", + "build_steps": { + "build": [], + "configure": [], + "post_build": [], + "pre_build": [], + "status": [] + }, + "installer": [], + "os": "", + "osVersion": "", + "service_pack": "" + } + }, +#+end_src + +The example below demonstrates one sample of populating the template. +Information relating to =OS= details are mentioned and well explains +that build is carried out by running =make= file present in =src= and +there is no operation in configure as well as no operations pre and post +builds. +#+begin_src example +"lab": { + "build_requirements": { + "platform": { + "arch": "i386", + "build_steps": { + "build": ["make -C ../src"], + "configure": [], + "post_build": [], + "pre_build": [], + "status": [] + }, + "installer": [], + "os": "ubuntu", + "osVersion": "12", + "service_pack": "" + } + }, +#+end_src + + +Section next covers the information about the lab developers. Any +number of lab developers information can be sequentially appended +using the same template. All the available information can be provided +and remaining cab be left empty. +#+begin_src example +"description": { + "developer": [ + { + "contact": { + "alternate_email": "", + "email": "", + "mobile_number": "", + "office_number": "" + }, + "department": "", + "institute": "", + "name": "", + "organization": "", + "role": "", + "title": "", + "web": "" + }, +#+end_src + +The next section requires the lab information covering the discipline, +lab id, name and other details relating to the lab. +#+begin_src example +"discipline": [ + "" + ], + "id": "", + "integration_level": , + "name": "", + "server-side": , + "status": "", + "type": "" +#+end_src + +A sample completed template for a computer programming lab can be seen +below: +#+begin_src example +"discipline": [ + "Computer Science & Engineering" + ], + "id": "cse02", + "integration_level": 5, + "name": "Computer Programming", + "server-side": true, + "status": "Released", + "type": "" +#+end_src + +The last part of the template covers all the runtime requirements. A +sample completed template is provided below along with few completed +entries. The name value pairs are self explanatory and can be +populated as per the lab requirements. +#+begin_src example + "runtime_requirements": { + "platform": { + "arch": "i386", + "hosting": "dedicated", + "installer": ["sudo apt-get update", + "sudo apt-get install -y php5 apache2"], + "lab_actions": { + "backup": [], + "clean": [], + "init": ["cp -r ../build/* /var/www/","mv /var/www/index.html index.html.default" + ], + "pause": [], + "publish": [], + "restore": [], + "resume": [], + "shutdown": ["service apache2 stop"], + "start": ["service apache2 start"], + "stats": [], + "stop": [] + }, + "memory": { + "max_required": "2gb", + "min_required": "256mb" + }, + "os": "ubuntu", + "osVersion": "12", + "servicepack": "", + "storage": { + "min_required": "10gb" + } + } + } + }, +#+end_src From 7d080b5eaef53fb83a1f3c529241c5cfb21411cc Mon Sep 17 00:00:00 2001 From: Prakash B Hegade Date: Thu, 30 Apr 2015 09:50:30 +0530 Subject: [PATCH 4/4] Update README.org associated specific public/private name to ads server ip's --- README.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index e7602d5..f2b9166 100644 --- a/README.org +++ b/README.org @@ -25,7 +25,7 @@ Execute the following steps, to configure and then run ADS as a service: machine on which the ADS services are running. #+begin_src example "LOGSERVER_CONFIGURATION": { - "SERVER_IP": "ads-server-ip", + "SERVER_IP": "ads-server-private-ip", }, #+end_src @@ -41,7 +41,7 @@ machine on which the ADS services are running. + Change APP_URL field and put the URL where the application is hosted. #+begin_src example - "APP_URL": "http://ads-server-ip:8080", + "APP_URL": "http://ads-server-public-ip:8080", #+end_src + Copy =config/sample_authorized_users.py= to =config/authorized_users.py=,