Cloud Web Portal - command line interface [ CLI ]

Cloud Web Portal Gem is used to trigger commands that facilitate the cloud web portal platform deployment through command line. This Gem-plugin provides full API usage through command line [ CLI ] and helps users to execute commands locally.

Installation of Gem

Follow the below commands to install

Install it yourself as:

$ gem install cwp

Or

git clone git@sysgit01.lab.services.ingenico.com:nhd/cloud_web_portal_cli.git

cd cloud_web_portal_cli

rake install

NOTE: If there is an error in rake install please install the below rake Gem.

gem install rake

Or

Add this line to your application's Gemfile:

gem 'cwp'

And then execute:

$ bundle 

Commands & Usage Example

Help

cwp help

This command gives full list of help document and commands list with description.

Deploy Platform

cwp deploy [ ARGUMENTS ]

This command is used to deploy a platform on cloud web portal.

*** ARGUMENTS EXAMPLE ***

a ] Arguments Could be a config_path from user uploading file with YAML contents as follows:

cwp deploy config_path=custom_file_path

b ] Arguments could be configuration parameters passed manually as follows:

cwp deploy reference_name=xxx instance=yyy compute_resource=equador organization=Indecomm blueprint=/home/user/Desktop/blue_pass.yaml login=nagendra password=******* url="http://example.com"

c ] Configuration parameters can be set in one of the below paths 1 ] "/etc/cwp.conf" 2 ] "HOME_DIR/user/.cwp/cwp.conf" 3 ] "CURRENT_DIRECTORY/cwp.conf"

Configuiration parameters file format

parameters:
 blueprint: "/home/user/Desktop/blueprint.yaml"
 reference_name: dev
 baseline: "xxx"
 instance: "yyy"
 compute_resource: "equador"
 organization: "Indecomm"
 login: "nagendra"
 password: "*******"
 url: "http://example.com"

Check Status Of Platform

cwp status [ ARGUMENTS ]

cwp status env=dev-001 login=nagendra password=******

[ NOTE ] configuration parameters can be set as the same way mentioned in cwp deploy command.

Check Status Of Platform with WAIT

cwp wait [ ARGUMENTS ]

cwp wait status=completed env=dev-001 login=nagendra password=******

[ TIMEOUT ] additional configuration parameter can be passed to ovverride timeout

cwp wait [ ARGUMENT ] timeout= [ 3h or 30m or 3d ]

Timeout in hours, minutes and days [ DEFAULT is set to 2 hours if timeout parameter is not passed ]

[ NOTE ] configuration parameters can be set as the same way mentioned in cwp deploy command.

Error Codes

error status is 0 when status=installed error status is 1 when status=failed timeout status 2 hours status=timeout

Delete Platform

This command is used to delete a platform that is deployed.

cwp delete [ ARGUMENTS ]

cwp delete env=dev-001 login=nagendra password=******

[ NOTE ] configuration parameters can be set as the same way mentioned in cwp deploy command.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.