macaw platform

cfxDimensions Platform services management:

'macaw platform' command is used to deploy and manage cfxDimensions platform services. Run the below command to view available CLI options.
1
macaw platform --help
2
usage: platform [--insecure] [-h] [--debug] {} ...
3
4
Manage the Macaw Platform
5
6
positional arguments:
7
{} commands
8
dbinit Initialize the platform database
9
add-service-host Add extra service vm
10
resource-profile Manages the resource profile operations
11
access-key-gen Generate an access-keyfor a user
12
status Status of the macaw Platform
13
start Start the macaw Platform Containers
14
stop Stop the macaw Platform Containers
15
install Install the macaw platform containers
16
generate-certs Generate certificates for hosts belonging to this
17
installation
18
remove-stopped-containers
19
Remove platform containers that have exited
20
rolling-update Upgrade the platform services to a new version
21
22
optional arguments:
23
--insecure Ignore SSL certificate issues when communicating with
24
various hosts
25
-h, --help show this help message and exit
26
--debug Enable debug logs for the CLI operations
Copied!
'macaw platform install' command is used to deploy/install cfxDimensions platform services. Run the below command to view the available options.
1
macaw platform install --help
2
usage: platform install [-h] --tag TAG [--refresh-auth] [--service SERVICES]
3
4
optional arguments:
5
-h, --help show this help message and exit
6
--tag TAG Tag to be pulled from the Docker registry
7
--refresh-auth Refresh Authentication to Docker Registry.
8
--service SERVICES Restrict the scope of the command to specific service
Copied!
Run the below command to initialize MariaDB database (MariaDB service was deployed part of cfxDimensions infrastructure service installation). This step is a pre-requisite before installing cfxDimensions platform services.
(Note: Below shown tag name is a sample for a reference only, for actual tag name, please contact CloudFabrix support/sales team.)
1
macaw platform dbinit --tag macaw-2.2.17
Copied!
Run the below command to deploy all cfxDimensions platform services. (Note: Below shown tag name is a sample for a reference only, for actual tag name, please contact CloudFabrix support/sales team.)
1
macaw platform install --tag macaw-2.2.17
Copied!
Run the below command to install a specific cfxDimensions platform service. Below are the supported/available platform services. (Note: Below shown tag name is a sample for a reference only, for actual tag, please contact CloudFabrix support/sales team.)
  • service-registry
  • notification-manager
  • identity
  • provisioner
  • user-preferences
  • locker
  • console-ui
1
macaw platform install --service service-registry --tag macaw-2.2.17
Copied!
Upgrading the cfxDimensions platform services: Run the below command to upgrade all platform services. (Note: Below shown tag name is a sample for a reference only, for actual tag, please contact CloudFabrix support/sales team.)
Warning: It is a disruptive operation, please take a full backup of your data before you perform this operation on a Production environment. Also, stop the platform services using 'macaw platform stop' command first before executing the upgrade command.
1
macaw platform rolling-update --tag macaw-2.2.18
Copied!
Deleting the cfxDimensions platform services: Run the below command to delete all cfxDimensions platform services.
Warning: It is a disruptive operation, please take a full backup of your data before you perform this operation on a Production environment.
1
macaw platform stop --remove-container
Copied!
Run the below command to delete a specific cfxDimensions platform service. Below are the list of platform services.
  • service-registry
  • notification-manager
  • identity
  • provisioner
  • user-preferences
  • locker
  • console-ui
Warning: It is a disruptive operation, please take a full backup of your data before you perform this operation on a Production environment.
1
macaw platform stop --service <service-name> --remove-container
Copied!
Run the below commands to start/stop cfxDimensions platform services.
1
macaw platform start
2
macaw platform stop
Copied!
Run the below commands to start/stop a specific cfxDimensions platform service.
1
macaw platform start --service <service-name>
2
macaw platform stop --service <service-name>
Copied!
Delete older or previous version of Platform Service: Run the below command to clean up the platform service images.
1
macaw platform remove-stopped-containers
Copied!

Generate self-signed certificates: Self-signed certificates are used for cfxDimensions infrastructure, platform services and for macaw CLI as well. This manual step is not usually needed as it will be run automatically during 'macaw setup' execution.
1
macaw platform generate-certs
Copied!
For additional options, run the below command.
1
macaw platform generate-certs --help
2
usage: platform generate-certs [-h] [--dir CERT_ROOT_DIR] [--overwrite]
3
4
optional arguments:
5
-h, --help show this help message and exit
6
--dir CERT_ROOT_DIR The directory where the certificates will be generated
7
--overwrite Overwrite the certificates if they already exist
Copied!

Accessing cfxDimensions Platform APIs from CLI:

Macaw CLI provides an ability to call cfxDimensions Platform service APIs which allows user to query/configure/update/provision/de-provision application services. It is also used to execute any automated scripts if/when needed.
Below step is a pre-requisite to execute API calls from CLI.
Run the below command to generate an API key for Platform admin user and the generated key is stored inside platform.cfg file which will be used while making API calls from CLI.
Use --insecure option as shown below when the cfxDimensions platform is NOT deployed with CA signed certificates. --insecure option works with self-signed certificates which are installed by default during cfxDimensions platform setup and configuration.
1
macaw platform --insecure access-key-gen --user [email protected] --password macaw1234 --store-config
Copied!
1
macaw platform access-key-gen --help
2
3
usage: macaw platform access-key-gen [-h] [--debug] --user USER --password
4
PASSWORD [--store-config]
5
6
optional arguments:
7
-h, --help show this help message and exit
8
--debug Enable debug logs
9
--user USER User for whom the access-key is to be generated
10
--password PASSWORD Password to use for login during access-key generation
11
--store-config Store the generated access key into the platform
12
configuration
13
Copied!