|
Automation |
Top Previous Next |
|
NOTE FOR AN UP-TO-DATE SCRIPT AND API GUIDE, PLEASE REFER TO THE NCLIGUIDE LOCATED AT: http://www.ngasi.com/ngasihelp/ncliguide/index.html
Automation: You can run scripts or use the JAVA API to automate certain administrative tasks for NGASI AppServer Manager using the NGASI Command Line Interface (NCLI). Please refer to http://www.ngasi.com for download and documentation on NCLI.
This is ideal for automating account activation, etc. The following are some of the commands and associated scripts:
Add Group:
Below are example scripts for creating User Groups:
Add Private JVM Runtime Group: /usr/ngasi/apiclient/bin/ncli.sh -command=addgroup -name=pjvm -owner=admin -maxMemory=256m -maxjvms=1 -user=admin -password=coolgeek -url=http://localhost:8666
Add SaaS Group: /usr/ngasi/apiclient/bin/ncli.sh -command=addgroup -name=saas -owner=admin -maxMemory=2048m -maxjvms=10 -user=admin -password=coolgeek -url=http://localhost:8666
Add Reseller Group: /usr/ngasi/apiclient/bin/ncli.sh -command=addgroup -name=reseller -owner=admin -maxMemory=64m -webhosting=10 -user=admin -password=coolgeek -url=http://localhost:8666
Add VPS Group: /usr/ngasi/apiclient/bin/ncli.sh -command=addgroup -name=vps256 -owner=admin -maxMemory=256m -maxjvms=1 -user=admin -password=coolgeek -url=http://localhost:8666
For Windows refer to the equivalent scripts under: /usr/ngasi/apiclient/bin/ncli.bat
Refer to the scripts for additional parameters.
Add User:
Add Private JVM Account: /usr/ngasi/apiclient/bin/ncli.sh -command=addaccount -group=plan1 account=demo -user=admin -password=coolgeek -url=http://localhost:8666
Add VPS Account: /usr/ngasi/apiclient/bin/ncli.sh -command=addaccount -group=vps256 -account=root -vpsid=45678 -user=admin -password=coolgeek -url=http://localhost:8666
Add Remote Server Account: /usr/ngasi/apiclient/bin/ncli.sh -command=addaccount -group=vps256 -account=root -remoteserverid=dev1 -user=admin -password=coolgeek -url=http://localhost:8666
For Windows refer to the equivalent scripts under: /usr/ngasi/apiclient/bin/ncli.bat
Refer to the NCLI manual and scripts for additional parameters.
Remove User:
Remove Account: /usr/ngasi/apiclient/bin/ncli.sh -command=removeaccount account=demo -user=admin -password=coolgeek -url=http://localhost:8666
For Windows refer to the equivalent scripts under: /usr/ngasi/apiclient/bin/ncli.bat
Refer to the scripts for additional parameters.
|