Before follow this post you must setup the Stratos2 Demo in your machine. Please refer the following post
“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 email@example.com password : g
2. Type “sudo bash” to move as a “root” and export following parameters
export STRATOS_ADC_HOST=184.108.40.206 export STRATOS_ADC_PORT=9445
3. Go to extracted CLI folder and run the stratos.sh with username and password
./stratos.sh firstname.lastname@example.org dinuka123 Then you will move to "stratos>"
In Stratos2 demo environment we have cartridge call “php“, now I’m going to subscribe to that cartridge from my tenant email@example.com
4. Now go to above stratos> and follow the command to subscribe to php
stratos> gtsubscribe php sampleapp
Once we done this we can see the created and running php instance in the OpenStack from http://220.127.116.11/syspanel/instances/
At this moment separated php instance is available for my tenant firstname.lastname@example.org 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
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