You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Manula Chathurika Thantriwatte <ma...@wso2.com> on 2013/12/11 09:49:33 UTC

CLI implementation with RESTful service

Hi All,

I'm working on $subject and currently you can work on CLI with RESTful
services. I have already push the changes to git. You can use CLI as
following.

First you have to export the STRTOS_URL.
export STRATOS_URL=<https://manula.com:9445>

After that you can login as super tenant.
./stratos.sh -u admin -p admin

Super tenant can do following operations.

1) Add tenant
add-tenant -u admin -f manula -l thantriwatte -p admin123 -d manula.org -e
manula@apache.org -a active

2) Cartridge deployment
cartridge-deployment -p <resource_path>

3) Auto scaling policy deployment
autoscaling-policy-deployment -p <resource_path>

4) Partition deployment
partition-deployment -p <resource_path>

5) Deployment policy deployment
deployment-policy-deployment -p <resource_path>

6) List available cartridges
cartridges

Tenant can do following operations

1) Subscribe to a cartridge
subscribe php <alias> -p <repo password> -r <git repo url> -u <repo user
name>

2) List available cartridges
cartridges

3) List subscribe cartridges
list

4) Subscribe cartridge
unsubscribe <cartridge alias>

Future I'm doing improvements as well. Thoughts are warmly welcome.

Thanks !

-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: CLI implementation with RESTful service

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi Udara,

I have add that requirement. Now it's in testing stage.

Thanks !


On Thu, Dec 12, 2013 at 12:58 PM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi Manula,
>
> How can we provide deployment and autoscaling policies when subscribing.
>
>
> On Thu, Dec 12, 2013 at 12:01 AM, Manula Chathurika Thantriwatte <
> manulac@wso2.com> wrote:
>
>> Hi,
>>
>> @Isuru,
>>
>> Yes. Cartridge subscription support private repo as well. +1 for remane
>> list command.
>>
>> @Reka,
>>
>> First of all tenant has to log by using ./stratos.sh -u username -p
>> password. Then only tenant can subscribe to a cartridge. +1 for tenant
>> login and subscribe to cartridge in the same time. Will do that improvement.
>>
>> Thanks !
>>
>>
>>
>> On Thu, Dec 12, 2013 at 10:23 AM, Reka Thirunavukkarasu <re...@wso2.com>wrote:
>>
>>> Hi Manula,
>>>
>>> Nice work.
>>>
>>>
>>> On Wed, Dec 11, 2013 at 10:24 PM, Isuru Haththotuwa <is...@wso2.com>wrote:
>>>
>>>> Nice work Manula!
>>>>
>>>> Please find some comments and questions in line.
>>>>
>>>>
>>>> On Wed, Dec 11, 2013 at 2:19 PM, Manula Chathurika Thantriwatte <
>>>> manulac@wso2.com> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I'm working on $subject and currently you can work on CLI with RESTful
>>>>> services. I have already push the changes to git. You can use CLI as
>>>>> following.
>>>>>
>>>>> First you have to export the STRTOS_URL.
>>>>> export STRATOS_URL=<https://manula.com:9445>
>>>>>
>>>>> After that you can login as super tenant.
>>>>> ./stratos.sh -u admin -p admin
>>>>>
>>>>> Super tenant can do following operations.
>>>>>
>>>>> 1) Add tenant
>>>>> add-tenant -u admin -f manula -l thantriwatte -p admin123 -d
>>>>> manula.org -e manula@apache.org -a active
>>>>>
>>>>> 2) Cartridge deployment
>>>>> cartridge-deployment -p <resource_path>
>>>>>
>>>>> 3) Auto scaling policy deployment
>>>>> autoscaling-policy-deployment -p <resource_path>
>>>>>
>>>>> 4) Partition deployment
>>>>> partition-deployment -p <resource_path>
>>>>>
>>>>> 5) Deployment policy deployment
>>>>> deployment-policy-deployment -p <resource_path>
>>>>>
>>>>> 6) List available cartridges
>>>>> cartridges
>>>>>
>>>>> Tenant can do following operations
>>>>>
>>>>> 1) Subscribe to a cartridge
>>>>> subscribe php <alias> -p <repo password> -r <git repo url> -u <repo
>>>>> user name>
>>>>>
>>>> Here, the user might need to specify a password as well, if the
>>>> repository is a private one. Does this command support those options as
>>>> well?
>>>>
>>>
>>> How can a tenant login before subscribing to a cartridge? Also, Can we
>>> provide a way for a tenant to login and subscribe in the same command(as
>>> optional) as below:
>>>
>>> subscribe -utennat <tennat username> -ptenant <tenant password> php
>>> <alias> -p <repo password> -r <git repo url> -u <repo user name> -p <repo
>>> password>
>>>
>>> Here -utenant -ptenant should be optional arguments.
>>>
>>>
>>> Thanks,
>>> Reka
>>>
>>>>
>>>>> 2) List available cartridges
>>>>> cartridges
>>>>>
>>>>> 3) List subscribe cartridges
>>>>> list
>>>>>
>>>> IMHO, the command name 'list' is bit ambiguous. Maybe we should use a
>>>> name that is more self-explanatory.
>>>>
>>>>>
>>>>> 4) Subscribe cartridge
>>>>> unsubscribe <cartridge alias>
>>>>>
>>>>> Future I'm doing improvements as well. Thoughts are warmly welcome.
>>>>>
>>>>> Thanks !
>>>>>
>>>>> --
>>>>>  Regards,
>>>>> Manula Chathurika Thantriwatte
>>>>> Software Engineer
>>>>> WSO2 Inc. : http://wso2.com
>>>>> lean . enterprise . middleware
>>>>>
>>>>> email : manulac@wso2.com / manula@apache.org
>>>>> phone : +94 772492511
>>>>> blog : http://manulachathurika.blogspot.com/
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Thanks and Regards,
>>>>
>>>> Isuru H.
>>>> Software Engineer, WSO2 Inc.
>>>> +94 716 358 048* <http://wso2.com/>*
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Reka Thirunavukkarasu
>>> Software Engineer,
>>> WSO2, Inc.:http://wso2.com,
>>> Mobile: +94776442007
>>>
>>>
>>>
>>
>>
>> --
>> Regards,
>> Manula Chathurika Thantriwatte
>> Software Engineer
>> WSO2 Inc. : http://wso2.com
>> lean . enterprise . middleware
>>
>> email : manulac@wso2.com / manula@apache.org
>> phone : +94 772492511
>> blog : http://manulachathurika.blogspot.com/
>>
>>
>>
>>
>
>
> --
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: CLI implementation with RESTful service

Posted by Udara Liyanage <ud...@wso2.com>.
Hi Manula,

How can we provide deployment and autoscaling policies when subscribing.


On Thu, Dec 12, 2013 at 12:01 AM, Manula Chathurika Thantriwatte <
manulac@wso2.com> wrote:

> Hi,
>
> @Isuru,
>
> Yes. Cartridge subscription support private repo as well. +1 for remane
> list command.
>
> @Reka,
>
> First of all tenant has to log by using ./stratos.sh -u username -p
> password. Then only tenant can subscribe to a cartridge. +1 for tenant
> login and subscribe to cartridge in the same time. Will do that improvement.
>
> Thanks !
>
>
>
> On Thu, Dec 12, 2013 at 10:23 AM, Reka Thirunavukkarasu <re...@wso2.com>wrote:
>
>> Hi Manula,
>>
>> Nice work.
>>
>>
>> On Wed, Dec 11, 2013 at 10:24 PM, Isuru Haththotuwa <is...@wso2.com>wrote:
>>
>>> Nice work Manula!
>>>
>>> Please find some comments and questions in line.
>>>
>>>
>>> On Wed, Dec 11, 2013 at 2:19 PM, Manula Chathurika Thantriwatte <
>>> manulac@wso2.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I'm working on $subject and currently you can work on CLI with RESTful
>>>> services. I have already push the changes to git. You can use CLI as
>>>> following.
>>>>
>>>> First you have to export the STRTOS_URL.
>>>> export STRATOS_URL=<https://manula.com:9445>
>>>>
>>>> After that you can login as super tenant.
>>>> ./stratos.sh -u admin -p admin
>>>>
>>>> Super tenant can do following operations.
>>>>
>>>> 1) Add tenant
>>>> add-tenant -u admin -f manula -l thantriwatte -p admin123 -d manula.org-e
>>>> manula@apache.org -a active
>>>>
>>>> 2) Cartridge deployment
>>>> cartridge-deployment -p <resource_path>
>>>>
>>>> 3) Auto scaling policy deployment
>>>> autoscaling-policy-deployment -p <resource_path>
>>>>
>>>> 4) Partition deployment
>>>> partition-deployment -p <resource_path>
>>>>
>>>> 5) Deployment policy deployment
>>>> deployment-policy-deployment -p <resource_path>
>>>>
>>>> 6) List available cartridges
>>>> cartridges
>>>>
>>>> Tenant can do following operations
>>>>
>>>> 1) Subscribe to a cartridge
>>>> subscribe php <alias> -p <repo password> -r <git repo url> -u <repo
>>>> user name>
>>>>
>>> Here, the user might need to specify a password as well, if the
>>> repository is a private one. Does this command support those options as
>>> well?
>>>
>>
>> How can a tenant login before subscribing to a cartridge? Also, Can we
>> provide a way for a tenant to login and subscribe in the same command(as
>> optional) as below:
>>
>> subscribe -utennat <tennat username> -ptenant <tenant password> php
>> <alias> -p <repo password> -r <git repo url> -u <repo user name> -p <repo
>> password>
>>
>> Here -utenant -ptenant should be optional arguments.
>>
>>
>> Thanks,
>> Reka
>>
>>>
>>>> 2) List available cartridges
>>>> cartridges
>>>>
>>>> 3) List subscribe cartridges
>>>> list
>>>>
>>> IMHO, the command name 'list' is bit ambiguous. Maybe we should use a
>>> name that is more self-explanatory.
>>>
>>>>
>>>> 4) Subscribe cartridge
>>>> unsubscribe <cartridge alias>
>>>>
>>>> Future I'm doing improvements as well. Thoughts are warmly welcome.
>>>>
>>>> Thanks !
>>>>
>>>> --
>>>>  Regards,
>>>> Manula Chathurika Thantriwatte
>>>> Software Engineer
>>>> WSO2 Inc. : http://wso2.com
>>>> lean . enterprise . middleware
>>>>
>>>> email : manulac@wso2.com / manula@apache.org
>>>> phone : +94 772492511
>>>> blog : http://manulachathurika.blogspot.com/
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Thanks and Regards,
>>>
>>> Isuru H.
>>> Software Engineer, WSO2 Inc.
>>> +94 716 358 048* <http://wso2.com/>*
>>>
>>>
>>>
>>
>>
>> --
>> Reka Thirunavukkarasu
>> Software Engineer,
>> WSO2, Inc.:http://wso2.com,
>> Mobile: +94776442007
>>
>>
>>
>
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manulac@wso2.com / manula@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>


-- 
Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: CLI implementation with RESTful service

Posted by Manula Chathurika Thantriwatte <ma...@wso2.com>.
Hi,

@Isuru,

Yes. Cartridge subscription support private repo as well. +1 for remane
list command.

@Reka,

First of all tenant has to log by using ./stratos.sh -u username -p
password. Then only tenant can subscribe to a cartridge. +1 for tenant
login and subscribe to cartridge in the same time. Will do that improvement.

Thanks !



On Thu, Dec 12, 2013 at 10:23 AM, Reka Thirunavukkarasu <re...@wso2.com>wrote:

> Hi Manula,
>
> Nice work.
>
>
> On Wed, Dec 11, 2013 at 10:24 PM, Isuru Haththotuwa <is...@wso2.com>wrote:
>
>> Nice work Manula!
>>
>> Please find some comments and questions in line.
>>
>>
>> On Wed, Dec 11, 2013 at 2:19 PM, Manula Chathurika Thantriwatte <
>> manulac@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> I'm working on $subject and currently you can work on CLI with RESTful
>>> services. I have already push the changes to git. You can use CLI as
>>> following.
>>>
>>> First you have to export the STRTOS_URL.
>>> export STRATOS_URL=<https://manula.com:9445>
>>>
>>> After that you can login as super tenant.
>>> ./stratos.sh -u admin -p admin
>>>
>>> Super tenant can do following operations.
>>>
>>> 1) Add tenant
>>> add-tenant -u admin -f manula -l thantriwatte -p admin123 -d manula.org-e
>>> manula@apache.org -a active
>>>
>>> 2) Cartridge deployment
>>> cartridge-deployment -p <resource_path>
>>>
>>> 3) Auto scaling policy deployment
>>> autoscaling-policy-deployment -p <resource_path>
>>>
>>> 4) Partition deployment
>>> partition-deployment -p <resource_path>
>>>
>>> 5) Deployment policy deployment
>>> deployment-policy-deployment -p <resource_path>
>>>
>>> 6) List available cartridges
>>> cartridges
>>>
>>> Tenant can do following operations
>>>
>>> 1) Subscribe to a cartridge
>>> subscribe php <alias> -p <repo password> -r <git repo url> -u <repo user
>>> name>
>>>
>> Here, the user might need to specify a password as well, if the
>> repository is a private one. Does this command support those options as
>> well?
>>
>
> How can a tenant login before subscribing to a cartridge? Also, Can we
> provide a way for a tenant to login and subscribe in the same command(as
> optional) as below:
>
> subscribe -utennat <tennat username> -ptenant <tenant password> php
> <alias> -p <repo password> -r <git repo url> -u <repo user name> -p <repo
> password>
>
> Here -utenant -ptenant should be optional arguments.
>
>
> Thanks,
> Reka
>
>>
>>> 2) List available cartridges
>>> cartridges
>>>
>>> 3) List subscribe cartridges
>>> list
>>>
>> IMHO, the command name 'list' is bit ambiguous. Maybe we should use a
>> name that is more self-explanatory.
>>
>>>
>>> 4) Subscribe cartridge
>>> unsubscribe <cartridge alias>
>>>
>>> Future I'm doing improvements as well. Thoughts are warmly welcome.
>>>
>>> Thanks !
>>>
>>> --
>>>  Regards,
>>> Manula Chathurika Thantriwatte
>>> Software Engineer
>>> WSO2 Inc. : http://wso2.com
>>> lean . enterprise . middleware
>>>
>>> email : manulac@wso2.com / manula@apache.org
>>> phone : +94 772492511
>>> blog : http://manulachathurika.blogspot.com/
>>>
>>>
>>>
>>>
>>
>>
>> --
>> Thanks and Regards,
>>
>> Isuru H.
>> Software Engineer, WSO2 Inc.
>> +94 716 358 048* <http://wso2.com/>*
>>
>>
>>
>
>
> --
> Reka Thirunavukkarasu
> Software Engineer,
> WSO2, Inc.:http://wso2.com,
> Mobile: +94776442007
>
>
>


-- 
Regards,
Manula Chathurika Thantriwatte
Software Engineer
WSO2 Inc. : http://wso2.com
lean . enterprise . middleware

email : manulac@wso2.com / manula@apache.org
phone : +94 772492511
blog : http://manulachathurika.blogspot.com/

Re: CLI implementation with RESTful service

Posted by Reka Thirunavukkarasu <re...@wso2.com>.
Hi Manula,

Nice work.


On Wed, Dec 11, 2013 at 10:24 PM, Isuru Haththotuwa <is...@wso2.com> wrote:

> Nice work Manula!
>
> Please find some comments and questions in line.
>
>
> On Wed, Dec 11, 2013 at 2:19 PM, Manula Chathurika Thantriwatte <
> manulac@wso2.com> wrote:
>
>> Hi All,
>>
>> I'm working on $subject and currently you can work on CLI with RESTful
>> services. I have already push the changes to git. You can use CLI as
>> following.
>>
>> First you have to export the STRTOS_URL.
>> export STRATOS_URL=<https://manula.com:9445>
>>
>> After that you can login as super tenant.
>> ./stratos.sh -u admin -p admin
>>
>> Super tenant can do following operations.
>>
>> 1) Add tenant
>> add-tenant -u admin -f manula -l thantriwatte -p admin123 -d manula.org-e
>> manula@apache.org -a active
>>
>> 2) Cartridge deployment
>> cartridge-deployment -p <resource_path>
>>
>> 3) Auto scaling policy deployment
>> autoscaling-policy-deployment -p <resource_path>
>>
>> 4) Partition deployment
>> partition-deployment -p <resource_path>
>>
>> 5) Deployment policy deployment
>> deployment-policy-deployment -p <resource_path>
>>
>> 6) List available cartridges
>> cartridges
>>
>> Tenant can do following operations
>>
>> 1) Subscribe to a cartridge
>> subscribe php <alias> -p <repo password> -r <git repo url> -u <repo user
>> name>
>>
> Here, the user might need to specify a password as well, if the repository
> is a private one. Does this command support those options as well?
>

How can a tenant login before subscribing to a cartridge? Also, Can we
provide a way for a tenant to login and subscribe in the same command(as
optional) as below:

subscribe -utennat <tennat username> -ptenant <tenant password> php <alias>
-p <repo password> -r <git repo url> -u <repo user name> -p <repo password>

Here -utenant -ptenant should be optional arguments.


Thanks,
Reka

>
>> 2) List available cartridges
>> cartridges
>>
>> 3) List subscribe cartridges
>> list
>>
> IMHO, the command name 'list' is bit ambiguous. Maybe we should use a name
> that is more self-explanatory.
>
>>
>> 4) Subscribe cartridge
>> unsubscribe <cartridge alias>
>>
>> Future I'm doing improvements as well. Thoughts are warmly welcome.
>>
>> Thanks !
>>
>> --
>>  Regards,
>> Manula Chathurika Thantriwatte
>> Software Engineer
>> WSO2 Inc. : http://wso2.com
>> lean . enterprise . middleware
>>
>> email : manulac@wso2.com / manula@apache.org
>> phone : +94 772492511
>> blog : http://manulachathurika.blogspot.com/
>>
>>
>>
>>
>
>
> --
> Thanks and Regards,
>
> Isuru H.
> Software Engineer, WSO2 Inc.
> +94 716 358 048* <http://wso2.com/>*
>
>
>


-- 
Reka Thirunavukkarasu
Software Engineer,
WSO2, Inc.:http://wso2.com,
Mobile: +94776442007

Re: CLI implementation with RESTful service

Posted by Isuru Haththotuwa <is...@wso2.com>.
Nice work Manula!

Please find some comments and questions in line.


On Wed, Dec 11, 2013 at 2:19 PM, Manula Chathurika Thantriwatte <
manulac@wso2.com> wrote:

> Hi All,
>
> I'm working on $subject and currently you can work on CLI with RESTful
> services. I have already push the changes to git. You can use CLI as
> following.
>
> First you have to export the STRTOS_URL.
> export STRATOS_URL=<https://manula.com:9445>
>
> After that you can login as super tenant.
> ./stratos.sh -u admin -p admin
>
> Super tenant can do following operations.
>
> 1) Add tenant
> add-tenant -u admin -f manula -l thantriwatte -p admin123 -d manula.org-e
> manula@apache.org -a active
>
> 2) Cartridge deployment
> cartridge-deployment -p <resource_path>
>
> 3) Auto scaling policy deployment
> autoscaling-policy-deployment -p <resource_path>
>
> 4) Partition deployment
> partition-deployment -p <resource_path>
>
> 5) Deployment policy deployment
> deployment-policy-deployment -p <resource_path>
>
> 6) List available cartridges
> cartridges
>
> Tenant can do following operations
>
> 1) Subscribe to a cartridge
> subscribe php <alias> -p <repo password> -r <git repo url> -u <repo user
> name>
>
Here, the user might need to specify a password as well, if the repository
is a private one. Does this command support those options as well?

>
> 2) List available cartridges
> cartridges
>
> 3) List subscribe cartridges
> list
>
IMHO, the command name 'list' is bit ambiguous. Maybe we should use a name
that is more self-explanatory.

>
> 4) Subscribe cartridge
> unsubscribe <cartridge alias>
>
> Future I'm doing improvements as well. Thoughts are warmly welcome.
>
> Thanks !
>
> --
> Regards,
> Manula Chathurika Thantriwatte
> Software Engineer
> WSO2 Inc. : http://wso2.com
> lean . enterprise . middleware
>
> email : manulac@wso2.com / manula@apache.org
> phone : +94 772492511
> blog : http://manulachathurika.blogspot.com/
>
>
>
>


-- 
Thanks and Regards,

Isuru H.
Software Engineer, WSO2 Inc.
+94 716 358 048* <http://wso2.com/>*