This is a static archive of the previous Open Grid Forum GridForge content management system saved from host forge.ogf.org file /sf/wiki/do/viewPage/projects.occi-wg/wiki/ScenarioSet2 at Sun, 06 Nov 2022 12:20:17 GMT SourceForge : View Wiki Page: ScenarioSet2

Project Home

Tracker

Documents

Tasks

Source Code

Discussions

File Releases

Wiki

Project Admin

Web Site
Search Wiki Pages Project: occi-wg     Wiki > ScenarioSet2 > View Wiki Page
wiki2474: ScenarioSet2

Open Issues

  • renderings need to be aligned to current model

Scenario Set 2

Create a Network (/network/776-234-212). This is a private C-Class network whose IPs are managed by DHCP. OCCI defaults required here! This network is a virtual network, for example implemented as either a hypervisor managed virtual network or one managed by a switch via VLAN ids.
POST /network HTTP/1.1
Host: example.com
Authorization: Basic xxxxxxxxxxxxxxxxxxx
User-Agent: occi-client/1.0 (linux) libcurl/7.19.4 OCCI/1.0
Category: network; scheme="http://purl.org/occi/kind#"; label="Network Resource"
Category: private; scheme="http://purl.org/occi/visibility#"; label="Private visibility"
Content-Length: 63
occi.network.address=192.168.1.0/24
occi.network.allocation=dhcp


HTTP/1.1 202 Accepted
Server: occi-server/1.0 (linux) OCCI/1.0
Date: Wed, 27 Jan 2010 17:26:42 GMT
Location: /jobs/0098
Content-Length: 0

GET /jobs/0098 HTTP/1.1
Host: example.comAuthorization: Basic xxxxxxxxxxxxxxxxxxxUser-Agent: occi-client/1.0 (linux) libcurl/7.19.4 OCCI/1.0
Content-Length: 0


HTTP/1.1 301 Found
Server: occi-server/1.0 (linux) OCCI/1.0
Date: Wed, 27 Jan 2010 17:30:42 GMT
Location: /network/776-234-212
occi.status.state: completed
occi.status.progress: 100
occi.status.message: "Resource is now available"
Content-Length: 0

Create a Compute (/compute/776-234-212)- The DB node, private compute node

POST /compute HTTP/1.1
Host: example.comAuthorization: Basic xxxxxxxxxxxxxxxxxxx
User-Agent: occi-client/1.0 (linux) libcurl/7.19.4 OCCI/1.0
Category: compute; scheme="http://purl.org/occi/kind#"; label="Compute Resource"
Category: mysql-ubuntu; scheme="http://purl.org/occi/template#"; label="MySQL, Ubuntu"
Content-Length: 0


HTTP/1.1 202 Accepted 
Server: occi-server/1.0 (linux) OCCI/1.0
Date: Wed, 27 Jan 2010 17:26:42 GMT
Location: /jobs/7765
Content-Length: 0


GET /jobs/7765 HTTP/1.1
Host: example.comAuthorization: Basic xxxxxxxxxxxxxxxxxxx
User-Agent: occi-client/1.0 (linux) libcurl/7.19.4 OCCI/1.0
Content-Length: 0

HTTP/1.1 301 Found
Server: occi-server/1.0 (linux) OCCI/1.0
Date: Wed, 27 Jan 2010 17:30:42 GMT
Location: /compute/776-234-212
occi.status.state: completed
occi.status.progress: 100
occi.status.message: "Resource is now available"
Content-Length: 0

Attach a network link to the compute. Suggestion: this call should return back a representation of any subordinate resources created, in this case a network link.

POST /compute/787-787-787 HTTP/1.1
Link: </network/776-234-212>; rel="http://purl.org/occi/link#networklink"; title="Default Private Connection";

At this stage we do not know the URL to the network link resource. Let's retrieve that from the compute resource.

GET /compute/776-234-212 HTTP/1.1
Authorization: Basic xxxxxxxxxxxxxxxxxxx
User-Agent: occi-client/1.0 (linux) libcurl/7.19.4 OCCI/1.0
Host: example.comAccept: */*

HTTP/1.1 200 OK 
Server: occi-server/1.0 (linux) OCCI/1.0
Date: Wed, 27 Jan 2010 17:26:40 GMT
Category: compute; scheme="http://purl.org/occi/kind#"; label="Compute Resource"
Category: mysql-ubuntu; scheme="http://purl.org/occi/template#"; label="MySQL, Ubuntu"
Link: </compute/345-345-345/default>; rel="http://purl.org/occi/link#networklink"; title="Default Private Connection";
Link: </compute/345-345-345;start>; class="action"; rel="http://purl.org/occi/action#start"; title="Start"
Link: </compute/345-345-345;stop>; class="action"; rel="http://purl.org/occi/action#stop"; title="Stop"
Link: </compute/345-345-345;reboot>; class="action"; rel="http://purl.org/occi/action#reboot"; title="Reboot"
Link: </compute/345-345-345;suspend>; class="action"; rel="http://purl.org/occi/action#suspend"; title="Suspend"
summary="This VM runs a mysql instance, serving my personal wordpress blog"
occi.compute.architecture=x64
occi.compute.cores=1
occi.compute.hostname=776-234-212.provider.com
occi.compute.speed=2.4
occi.compute.memory=4
occi.compute.status=active

By default the connection is down so attach the compute to the network with a private IP

POST /compute/345-345-345/default;up HTTP/1.1
Authorization: Basic xxxxxxxxxxxxxxxxxxx
Server: occi-server/1.0 (linux) OCCI/1.0
Date: Wed, 27 Jan 2010 17:28:40 GMT

HTTP/1.1 202 Accepted 
Server: occi-server/1.0 (linux) OCCI/1.0
Date: Wed, 27 Jan 2010 17:27:42 GMT
Location: /jobs/9987
Content-Length: 0

At this stage a private c-class network and a compute instances are running. The next stage is to create another compute instance to run the web server, attach it to the private network so the web server can access the DB service. Finally the web server compute instance must be connected to the public internet.

Create a compute instance to act as web server

POST /compute HTTP/1.1
Host: example.comAuthorization: Basic xxxxxxxxxxxxxxxxxxx
User-Agent: occi-client/1.0 (linux) libcurl/7.19.4 OCCI/1.0
Category: compute; scheme="http://purl.org/occi/kind#"; label="Compute Resource"
Category: apache-ubuntu; scheme="http://purl.org/occi/template#"; label="Apache, Ubuntu"
Content-Length: 0


HTTP/1.1 202 Accepted
Server: occi-server/1.0 (linux) OCCI/1.0
Date: Wed, 27 Jan 2010 17:26:42 GMT
Location: /jobs/5564

Eventually the server (/compute/444-444-444) is provisioned and the client now instructs the compute instance to be connected to the private network

POST /compute/444-444-444 HTTP/1.1
Link: </network/776-234-212>; rel="http://purl.org/occi/link#networklink"; title="Default Private Connection";

By now we have web server and DB compute instances communicating over a private c-class network. We now need to make the web server available on the public internet.

POST /compute/444-444-444 HTTP/1.1
Link: </network/776-234-212>; rel="http://purl.org/occi/link#networklink"; title="Default Public Connection";

Errrrrrrr.... how to do this?

Review:
  • amazon - gives a private and public address by default
  • rackspace - public ip by default
  • cloudcentral - you must attach public ip
  • elastichosts - you can create a network, you can attach public ip

should networks be configurable? should you be able to create? Suggestion: Introduce a new attribute to Network "occi.network.visibility" an enum of {private,public}. The create a public Network that allocates public IPs and only connect one VM to it.

POST /network HTTP/1.1
Host: example.comAuthorization: Basic xxxxxxxxxxxxxxxxxxxUser-Agent: occi-client/1.0 (linux) libcurl/7.19.4 OCCI/1.0Category: network; scheme="http://purl.org/occi/kind#"; label="Public Network Resource"
Content-Length: 63
occi.network.visibility=public

 




The Open Grid Forum Contact Webmaster | Report a problem | GridForge Help
This is a static archive of the previous Open Grid Forum GridForge content management system saved from host forge.ogf.org file /sf/wiki/do/viewPage/projects.occi-wg/wiki/ScenarioSet2 at Sun, 06 Nov 2022 12:20:20 GMT