VIFIB DESCENTRALIZED CLOUD COMPUTING

SlapOS is a decentralized Cloud Computing technology that can automate the deployment and configuration of applications in a heterogeneous environment.

Agenda

  1. Prerequisites
  2. Access Theia
  3. Add title Parameter
  4. Update Md5sum    
  5.  Validation
 

Prerequisites

  1. A Theia Runner: HowTo Request A Theia Runner 
  2. Prepare For The Deployment of Software on Theia 
  3. Supply A Software And Request An Instance On Theia Runner

Access Theia

You can access the Theia using the url and logging in with username and password.

Locate instance_html5as.cfg.in

Locate instance_html5as.cfg.in to add title parameter.

Add title Parameter

Add title into [publish-connection-information], so it can be published while inspecting the connection parameters.

title = Title ${slap-parameter:title}! 

Add [slap-parameter] section with title, so we can customize the title while requesting the instance.  

Update Md5sum

Any buildout.cfg files downloaded by Buildout must have a corresponding MD5 sum. This is done for security and to enforce strict stability of the software release overtime.

Since we modified intance_html5as.cfg.in to have a title parameter, the MD5 sum should be updated to software.cfg.

After located intance_html5as.cfg ($ cd ~/srv/project/slapos/software/html5as-base/), you can run:

$ md5sum instance_html5as.cfg.in

to get MD5 sum of the file. Then copy the hash into [instance_html5as] section in software.cfg to replace the old md5sum.

  

Run Request Script

Since we modified intance_html5as.cfg.in to have a title parameter, the instance will be  re-instantiated by auto-running. You are supposed to retrieve the log of slapos node instance

$ tail -fn 100  ~/srv/runner/var/log/slapos-node-instance.log

Once it's instantiated successfully, you can inspect the connection parameters by rerunning the request script:

$ cd ~/srv/project/slapos/software/html5as-base/
$ . ../../request-html5as-base.sh 

The connection parameters with 'title': 'Title couscous!' are expected.

You can also verify the server_url by

$ curl http://[2001:67c:1254:45:a9d5::dd2e]:8081

Hello World! will be displayed. 

  

Update Parameter in Request Script

To pass on the parameters to the requesting instance, we rely on --parameters key='value' of slapos request command.

Open the request script and add the parameter:

slapos request $sofware_name'_1' $software_release_uri --parameters title='John Doe'

  

Re-run Request Script

To pass on the parameter, we are supposed to request the instance again by rerunning the request script:

$ cd ~/srv/project/slapos/software/html5as-base/
$ . ../../request-html5as-base.sh 

As you can see, the connection parameters are still the previous ones, because to apply the modification, the instance will be re-instantiated by auto-running. You are supposed to retrieve the log of slapos node instance

$ tail -fn 100  ~/srv/runner/var/log/slapos-node-instance.log

  

The parameter is taken into account

To inspect the modification of connection parameters, we are supposed to run the requesting script again:

$ cd ~/srv/project/slapos/software/html5as-base/
$ . ../../request-html5as-base.sh 

As you can see from the output,  the value of 'title' parameter has been changed form 'Title couscous!' to 'Title John Doe!'.

You can also verify the server_url by curl, for example: 

curl http://[2001:67c:1254:45:a9d5::dd2e]:8081

Hello World! will be displayed. 

 

If you have questions, you can also refer to the Commit.