RSS

How to use CLI tool to subscribe to the available cartridges in Stratos2 Demo

04 Jan

Before follow this post you must setup the Stratos2 Demo in your machine. Please refer the following post
http://malalanayake.wordpress.com/2013/01/04/stratos2-demo-setup-alpha-with-open-stack/

subscribe” function is one of major features included in the CLI tool. This is use for subscribe to available cartridges in the system.

1. Login to the VM by using username “wso2” password “g

ssh wso2@172.14.0.1
password : g

Then go to the folder “/demo_setup/software” and extract “CLI.tar.gz
cm

2. Type “sudo bash” to move as a “root” and export following parameters

export STRATOS_ADC_HOST=172.14.0.1
export STRATOS_ADC_PORT=9445

cm2

3. Go to extracted CLI folder and run the stratos.sh with username and password

 ./stratos.sh dinuka@stratos.com dinuka123
Then you will move to "stratos>"

cm3

In Stratos2 demo environment we have cartridge call “php“, now I’m going to subscribe to that cartridge from  my tenant dinuka@stratos.com

4. Now go to above stratos> and follow the command to subscribe to php

stratos> gtsubscribe php sampleapp

cm4

Once we done this we can see the created and running php instance in the OpenStack from http://172.14.0.1/syspanel/instances/

op

At this moment separated php instance is available for my tenant dinuka@stratos.com as a sampleapp

5. Lets look how to deploy the sample php file call test.php in to the allocated php server.

once we subscribe to the php cartridge it will create a specific GIT repository.
In above subscription you can see the git repo link as http://git.stratos.com/stratos.com/sampleapp
So what we have to do is we need to take the “git clone” from this location

Before that we have to put the following entries to the /etc/hosts file this should be done in your machine not in the VM
go to your console and follow this command sudo vim /etc/hosts
and put the following entries into the hosts file

172.14.0.1 git.stratos.com
172.14.0.1 sampleapp.php.stratos.com

Now we can make the git clone form http://git.stratos.com/stratos.com/sampleapp
> git clone http://git.stratos.com/stratos.com/sampleapp
username as dinuka@stratos.com dinuka123
cm

Now go to clone repo folder and you can see there are three folders as follows
simplesamlphp sql www
cm

Now you can place the test.php file in to www directory and do the following commands to commit

> git add *
> git commit -a -m "sampleapp commit"
> git push

username dinuka@stratos.com password dinuka123
cm

Go to http://sampleapp.php.stratos.com:8280/ and you can see the committed test.php file and you can access it from the http://sampleapp.php.stratos.com:8280/test.php/

php

php

About these ads
 
Leave a comment

Posted by on January 4, 2013 in Stratos, wso2

 

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: