• 沒有找到結果。

TIBCO Mashery

N/A
N/A
Protected

Academic year: 2022

Share "TIBCO Mashery"

Copied!
319
0
0

加載中.... (立即查看全文)

全文

(1)

Installation and Configuration Guide

Software Release 5.1 May 2019

Updated August 2019

(2)

Important Information

SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.

USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE) OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE” FILE(S) OF THE

SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BE BOUND BY THE SAME.

ANY SOFTWARE ITEM IDENTIFIED AS THIRD PARTY LIBRARY IS AVAILABLE UNDER SEPARATE SOFTWARE LICENSE TERMS AND IS NOT PART OF A TIBCO PRODUCT. AS SUCH, THESE SOFTWARE ITEMS ARE NOT COVERED BY THE TERMS OF YOUR AGREEMENT WITH TIBCO, INCLUDING ANY TERMS CONCERNING SUPPORT, MAINTENANCE, WARRANTIES, AND INDEMNITIES. DOWNLOAD AND USE OF THESE ITEMS IS SOLELY AT YOUR OWN

DISCRETION AND SUBJECT TO THE LICENSE TERMS APPLICABLE TO THEM. BY PROCEEDING TO DOWNLOAD, INSTALL OR USE ANY OF THESE ITEMS, YOU ACKNOWLEDGE THE

FOREGOING DISTINCTIONS BETWEEN THESE ITEMS AND TIBCO PRODUCTS.

This document is subject to U.S. and international copyright laws and treaties. No part of this document may be reproduced in any form without the written authorization of TIBCO Software Inc.

TIBCO and TIBCO Mashery are either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries.

All other product and company names and marks mentioned in this document are the property of their respective owners and are mentioned for identification purposes only.

This software may be available on multiple operating systems. However, not all operating system platforms for a specific software version are released at the same time. Please see the readme.txt file for the availability of this software version on a specific operating system platform.

THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF

MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.

THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE,

INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.

This and other products of TIBCO Software Inc. may be covered by registered patents. Please refer to TIBCO's Virtual Patent Marking document (https://www.tibco.com/patents) for details.

Copyright

©

2006-2019. TIBCO Software Inc. All rights reserved.

(3)

Contents

TIBCO Documentation and Support Services . . . . 10

TIBCO Mashery Local Overview . . . . 11

TIBCO Mashery Local Topology . . . . 12

TIBCO Mashery Local Component Interactions . . . . 13

TIBCO Mashery Local Components . . . .16

Components Overview . . . . 16

NoSQL . . . . 16

Registry . . . . 17

Log Service . . . . 18

Accessing QPM Data by Cluster for Untethered Deployments . . . . 19

SQL DB . . . . 20

Onprem Loader . . . . 23

Cache . . . . 24

Memcache Loader . . . . 26

Traffic Manager . . . . 26

Cluster Manager . . . . 29

Cluster Manager CLI . . . . 29

TML API . . . . 46

Configuration Manager Overview . . . . 47

TIBCO Mashery Local Installer . . . . 48

How to Check for Docker Installation . . . . 48

Installer Overview . . . . 48

Deploying the Installer . . . . 49

Running the Installer . . . . 49

How to Run the Mashery Local 5 Installer on Windows . . . . 53

Building the Docker Images . . . . 54

Build in Jenkins . . . . 58

Deploying the TIBCO Mashery Local Cluster . . . . 60

Stopping the Installer . . . . 60

Customizing the Installer . . . . 61

How the Installer build-docker jenkins Job Works . . . . 62

Modifiable Scripts to build Docker Images . . . . 63

Use Cases . . . . 65

Managing a TIBCO Mashery Local Cluster . . . . 67

Deployment Topologies . . . . 67

Docker Container View of a Single Zone . . . . 68

(4)

Mashery Local Cluster in Kubernetes / Docker Swarm - Single Zone . . . . 69

Mashery Local Cluster in Kubernetes Docker Swarm - Multizone . . . . 70

AWS using Kubernetes . . . . 70

Prerequisites . . . . 70

Planning and Configuring . . . . 71

Creating a Mashery Local Cluster . . . . 75

Verifying a Mashery Local Cluster . . . . 78

Making a Traffic Call . . . . 78

Deleting a Mashery Local Cluster . . . . 78

Clearing the AWS Registry . . . . 79

AWS using Docker Swarm . . . . 79

Prerequisites for Deployment on AWS using Swarm . . . . 79

Planning and Configuring . . . . 79

Creating a Mashery Local Cluster . . . . 79

Creating a Swarm Cluster in AWS . . . . 81

Making a Traffic Call . . . . 84

Deleting a Mashery Local Cluster . . . . 86

Azure using Kubernetes . . . . 86

Prerequisites . . . . 87

Planning and Configuring . . . . 87

Create a TIBCO Mashery Local Cluster . . . . 90

Creating an AKS Cluster . . . . 90

Creating a TIBCO Mashery Local Cluster . . . . 93

Loading and Uploading Docker Images on AKS . . . . 94

Validating a TIBCO Mashery Local Cluster . . . . 94

Making a Traffic Call . . . . 95

Deleting a Mashery Local Cluster . . . . 95

Deleting the Kubernetes Cluster . . . . 95

Azure using OpenShift . . . . 95

Prerequisites . . . . 95

Planning and Configuring . . . . 96

Creating a Mashery Local Cluster . . . . 100

Validating a Mashery Local Cluster . . . . 101

Making a Traffic Call . . . . 101

Deleting a Mashery Local Cluster . . . . 102

Azure using Docker Swarm . . . . 102

Prerequisites for Deployment on Azure using Swarm . . . . 102

Planning and Configuration for a New Cluster on Azure using Swarm . . . . 102

Creating a Mashery Local Cluster . . . . 105

(5)

Verifying a Mashery Local Cluster . . . . 111

Making a Traffic Call . . . . 116

Google Cloud Platform using Kubernetes . . . . 116

Prerequisites . . . . 116

Planning and Configuring . . . . 117

Creating the Kubernetes Cluster on GCP . . . . 120

Loading and Uploading Docker Images on GCP using Kubernetes . . . . 122

Creating the TIBCO Mashery Local Cluster on GCP using Kubernetes . . . . 123

Validating a TIBCO Mashery Local Cluster . . . . 123

Making a Traffic Call . . . . 124

Deleting a Mashery Local Cluster . . . . 124

Deleting the Kubernetes Cluster . . . . 124

On-premises Bare Metal using Swarm . . . . 124

Prerequisites . . . . 124

Planning and Configuring . . . . 124

Deploying a Cluster on On-Premises Bare Metal using Swarm . . . . 126

Creating a Mashery Local Cluster . . . . 128

Validating a Mashery Local Cluster . . . . 129

Making a Traffic Call . . . . 130

Deleting a Mashery Local Cluster . . . . 130

Deleting the Local Swarm Cluster . . . . 130

Deployment on On-premises VirtualBox using Kubernetes . . . . 131

Prerequisites . . . . 131

Planning and Configuration for a New Cluster on On-premises VirtualBox using Kubernetes . . . . 131

Creating a TIBCO Local Mashery Cluster . . . . 134

Validating a Mashery Local Cluster . . . . 136

Making a Traffic Call . . . . 139

Deleting the Local Kubernetes Cluster . . . . 140

Deployment on On-premises VirtualBox using Swarm . . . . 140

Prerequisites for Deployment on On-premises VirtualBox using Swarm . . . . 140

Planning and Configuration for a New Cluster on On-premises VirtualBox using Swarm . . . . 140

Creating a Swarm Cluster on On-premises VirtualBox . . . . 143

Creating the TIBCO Mashery Local Cluster on On-premises VirtualBox using Swarm . . . . 144

Validating a Mashery Local Cluster . . . . 144

Making a Traffic Call . . . . 146

Deleting a Mashery Local Cluster . . . . 146

Deleting the Local Swarm Cluster . . . . 146

Deployment on On-premises ESX VMWare using Swarm . . . . 146

Prerequisites . . . . 146

(6)

Planning and Configuring . . . . 146

Deploying a Swarm Cluster on On-premises VMWare . . . . 148

Creating a Mashery Local Cluster . . . . 150

Validating a Mashery Local Cluster . . . . 150

Making a Traffic Call . . . . 152

Deleting a Mashery Local Cluster . . . . 152

Deleting the Local Swarm Cluster . . . . 152

Migration to Mashery Local 5x . . . . 153

Migration Prerequisites . . . . 153

Upgrading Mashery Local . . . . 153

Upgrade Script Location . . . . 154

Upgrade Script Syntax . . . . 155

Example of an Upgrade Script Run . . . . 155

Platform Support Matrix . . . . 155

Reconfiguring the Dependent Components on Docker Swarm . . . . 156

Configuration Manager . . . . 158

Installing and Configuring Configuration Manager . . . . 158

Using Mashery Local Configuration Manager . . . . 159

Importing Configuration Data . . . . 159

Editing Configuration Data . . . . 160

Configuring Initializations . . . . 161

Configuring API Definitions and Endpoints . . . . 161

Configuring API Packages and Plans . . . . 171

Configuring Apps and Package Keys . . . . 174

Searching Package Keys . . . . 177

Exporting Configuration Data . . . . 178

Importing Configuration Data into Mashery Local 5.0 Zones . . . . 178

Managing the Configuration Data File . . . . 179

Applying Incremental Configurations . . . . 179

Using the Hello World Example . . . . 179

FAQ and Troubleshooting . . . . 180

Managing a Cluster . . . . 185

Log Management . . . . 185

Viewing Logs . . . . 185

Interacting with Loggers . . . . 186

Enriched Access Logs . . . . 190

Exporting Logs to Different Output Channels . . . . 192

Recipe for File Destination . . . . 193

Recipe for Elasticsearch . . . . 193

(7)

Recipe for HTTP Endpoints . . . . 194

Recipe for Kafka . . . . 195

Recipe for TCP Socket . . . . 196

Recipe for SYSLOG Socket . . . . 197

Recipe for MoM and HTTP . . . . 198

Configuring Mashery Local and Splunk to Support Monitoring . . . . 198

TML Consumer . . . . 203

HTTPS Configuration . . . .206

HTTPS Configuration Overview . . . . 206

HTTPS Server Configuration . . . . 206

HTTPS Client Configuration . . . . 207

HTTPS Endpoint Configuration . . . . 208

Testing the HTTPS Client Call . . . . 209

Troubleshooting HTTPS Problems . . . . 210

Enabling Java SSL Debug Logging . . . . 210

HTTPS Mutual Authentication . . . . 210

Setting up HTTPS Authentication . . . . 211

One-Way HTTPS Client Configuration . . . . 211

Mutual HTTPS Client Configuration . . . . 213

Cluster Manager CLI Commands . . . . 215

Create Certificate . . . . 215

Create Identity . . . . 215

Update Certificate . . . . 216

Update Identity . . . . 216

List Certificates . . . . 216

List Identities . . . . 217

Creating Mutual Authentication . . . . 217

Tethered Mode . . . . 217

Untethered Config Manager Mode . . . . 218

Untethered API Mode . . . . 218

OAuth . . . . 220

Configuring OAuth 2.0 API Access . . . . 220

OAuth Authenticator Service Configuration . . . . 220

Making OAuth 2.0 Calls . . . . 222

OAuth API Supported Methods . . . . 222

Sample Calls . . . . 222

Mashery Local 5.1 OAuth API Compatibility with Mashery Local 4.x . . . . 233

OAuth Token Migration . . . . 234

Structure of Token Migration Utility . . . . 234

(8)

Deploying the OAuth Token Migration Utility . . . . 235

OAuth Token Migration Configuration Properties . . . . 242

Running the OAuth Token Migration Utility . . . . 244

Verifying OAuth Token Migration . . . . 249

OAuth Token Migration FAQs . . . . 250

Troubleshooting OAuth Token Migration Issues . . . . 250

Monitoring Mashery Local Components . . . . 253

Format of Metrics . . . . 253

Resource Monitoring . . . . 253

Component Metrics Monitoring . . . . 259

Traffic Manager Metrics . . . . 259

SQL Container Metrics (MySQL DB) . . . . 267

Diagnostic Recipe and Alerts for MySQL . . . . 271

Cache Container Metrics (Memcached) . . . . 271

Diagnostic Recipe and Alerts for Memcached . . . . 274

NoSQL Container Metrics (Cassandra) . . . . 274

Diagnostic Recipe and Alerts for NoSQL . . . . 279

Onprem Loader Monitoring . . . . 281

Diagnostic Recipe and Alerts for Onprem Loader . . . . 282

Memcache Loader Monitoring . . . . 282

Diagnostic Recipe and Alerts for Memcache Loader . . . . 284

Functional Monitoring . . . . 284

Recipes for ELK . . . . 286

Custom Adapters and Processors . . . . 287

Using the Adapter SDK . . . . 287

Adapter SDK Package . . . . 287

TIBCO Mashery Domain SDK . . . . 287

TIBCO Mashery Infrastructure SDK . . . . 287

SDK Domain Model . . . . 287

Extended Attributes . . . . 289

Pre and Post Processor Extension Points . . . . 290

Listener Pattern . . . . 290

Event Types and Event . . . . 290

Event Listener API . . . . 290

Creating a Custom Authenticator . . . . 290

Implementing and Registering Processors . . . . 294

Downloading the SDK . . . . 294

Implementing the Event Listener . . . . 295

Implementing Lifecycle Callback Handling . . . . 296

(9)

Adding Libraries to Classpath . . . . 297

Deploying Processors to Runtime . . . . 297

Packaging the Custom Processor . . . . 297

Uploading the Custom Processor . . . . 297

How Custom Processors are Updated . . . . 298

Enabling Debugging . . . . 298

Caching Content . . . . 300

Terminating a Call During Processing of an Event . . . . 301

Accessing Package Key EAVs in the Custom Processor . . . . 303

Adapter SDK Usage and Examples . . . . 303

Adapter SDK Development Environment Example Setup . . . . 304

Setting up the Adapter SDK for Maven . . . . 304

Using the Adapter SDK in Mashery Local with Single Processor . . . . 304

Using the Adapter SDK in Mashery Local with Third-Party Libraries . . . . 308

Using the Adapter SDK in Mashery Local with Multiple Processors in One Eclipse Project . . . . 311

Using the Adapter SDK in Mashery Local with Multiple Processors in One Zip Package . . . . 312

Using the Adapter SDK in Mashery Local with Multiple Processors in One Package and Third Party Libraries 314 TIBCO-provided Adapters and Processors . . . . 314

Customer-provided Adapters and Processors . . . . 315

(10)

TIBCO Documentation and Support Services

How to Access TIBCO Documentation

Documentation for TIBCO products is available on the TIBCO Product Documentation website, mainly in HTML and PDF formats.

The TIBCO Product Documentation website is updated frequently and is more current than any other documentation included with the product. To access the latest documentation, visit https://

docs.tibco.com.

Product-Specific Documentation

The following document for this product can be found on the TIBCO Documentation site:

TIBCO Mashery

®

Local Installation and Configuration Guide How to Contact TIBCO Support

You can contact TIBCO Support in the following ways:

For an overview of TIBCO Support, visit http://www.tibco.com/services/support.

For accessing the Support Knowledge Base and getting personalized content about products you are interested in, visit the TIBCO Support portal at https://support.tibco.com.

For creating a Support case, you must have a valid maintenance or support contract with TIBCO.

You also need a user name and password to log in to https://support.tibco.com. If you do not have a user name, you can request one by clicking Register on the website.

How to Join TIBCO Community

TIBCO Community is the official channel for TIBCO customers, partners, and employee subject matter

experts to share and access their collective experience. TIBCO Community offers access to Q&A forums,

product wikis, and best practices. It also offers access to extensions, adapters, solution accelerators, and

tools that extend and enable customers to gain full value from TIBCO products. In addition, users can

submit and vote on feature requests from within the TIBCO Ideas Portal. For a free registration, go to

https://community.tibco.com.

(11)

TIBCO Mashery Local Overview

TIBCO Mashery

®

Local is a cloud-native API gateway that can be deployed within a customer's datacenter or on cloud platforms.

TIBCO Mashery Local supports two deployment options: Untethered, without any external

dependencies, or in a hybrid manner working with TIBCO Cloud

Mashery. When operating in an untethered mode, the Configuration Manager tool can be used to configure API policies, packages and plans, and manage API keys. Logs from TIBCO Mashery Local can be collected and forwarded for downstream reporting and analytics via other externally-available tools. When operating in a hybrid mode, TIBCO Cloud Mashery includes the cloud-hosted Developer Portal, Administration Dashboard, and API Reporting and Analytics.

TIBCO Mashery Local includes commercial support for Project Flogo microgateway. For more information about Project Flogo microgateway, see https://github.com/project- flogo/microgateway.

TIBCO Mashery Local is available to customers for installation in container-based environments.

TIBCO Mashery Local Components include:

NoSQL

Each NoSQL component is a Cassandra Node. Multiple nodes can be deployed as a ring in a Data Center that maps to a TIBCO Mashery Local Zone and Kubernetes Zone. TIBCO Mashery Local relies on Cassandra for data availability across Zones in a TIBCO Mashery Local Cluster.

Registry

The Registry component is responsible for storing the topology of a TIBCO Mashery Local cluster.

Every TIBCO Mashery Local component communicates with the registry so it knows about each components's physical information (host, IP, Container Agent URL), its state, and bindings to resources.

Log

The Log service component provides the data collection services for all TIBCO Mashery Local components. It also provides Log Consumer services to be able to send the logs to various destinations for processing and analytics.

SQL

The SQL component runs a MySQL Database and stores the configuration data related to services, packages, keys, applications and related information.

Cache

The Cache component runs memcaches pools and provides in-memory cache for fast access to configuration and OAuth data.

Traffic Manager

The Traffic Manager component provides the traffic management and OAuth capabilities.

TIBCO Mashery Local components can be deployed in a single zone or multiple zones to form a cluster of components to address scalability, reliability, and high availability requirements. TIBCO Mashery Local relies on Cassandra for data availability within and across Zones.

Definition of a Cluster

"Cluster" means a TIBCO Mashery Local installation with all the necessary Mashery Local components

located at the same physical address (for example, 3307 Hillview Avenue) if being deployed within a

customer's premises; or one region, if being deployed in the cloud. Each TIBCO Mashery Local cluster

includes support for up to 10 Flogo app instances with microgateways.

(12)

Any installation spanning across multiple regions in the cloud (or multiple physical addresses if within customer's premises) are counted as separate Clusters.

TIBCO Mashery Local Topology

The following image represents the TIBCO Mashery Local topology:

(13)

TIBCO Mashery Local Component Interactions

The following image represents the interactions between the TIBCO Mashery Local components:

(14)
(15)
(16)

TIBCO Mashery Local Components

The following sections describe TIBCO Mashery Local (TML) components in more detail.

Components Overview

NoSQL

Registry

Log

SQL

Cache

Traffic Manager

Cluster Manager

TML API

Configuration Manager

Components Overview

Each TIBCO Mashery Local component has:

a container agent that provides access to the component and interacts with the registry on its behalf.

one or more managed processes that are started by the container agent. These provide the services and functionality of a TIBCO Mashery Local component.

The container agent is responsible for:

starting the managed processes within a TIBCO Mashery Local component.

interacting with the registry to provide properties, resource bindings and report status on the TIBCO Mashery Local component.

NoSQL

What's Inside

Cassandra Node

(17)

Services

Cassandra DB Service Resource Dependencies

LogProducer Binding

Registry Binding Properties

Name Default Value Comment

auto_binding ON When turned ON, logservice urls will be auto- discovered and bound to the TIBCO Mashery Local component.

logserviceURL log-set-0.log-

svc.default.svc.cluster.loc al

Logservice url to connect to process the logs.

Registry

Overview

The Registry component of TIBCO Mashery Local 5.0 acts as a common service accessible to the other TIBCO Mashery Local components to discover other TIBCO Mashery Local component services, such as:

The host/port of the service

The properties of the TIBCO Mashery Local components

The bindings of the TIBCO Mashery Local components The registry also outlines the Cluster-wide topology, including:

Cluster

Zones

(18)

TIBCO Mashery Local components

Properties and bindings of the TIBCO Mashery Local components The Registry has following core characteristics:

Redundantly available through the cluster

Works with the persistence layer (for example, Cassandra) to maintain a "current snapshot" of the cluster-wide topology.

Provides fine-grained REST APIs for each of the TIBCO Mashery Local components; for example, Cache, SQL DB, Traffic Manager. This includes:

Creation of TIBCO Mashery Local components

Listing of TIBCO Mashery Local components

Updates to TIBCO Mashery Local components

Receiving status and heartbeats from TIBCO Mashery Local components

In Mashery Local 5.0, the Registry is run as part of a Jetty process alongside the Cassandra process inside the NoSQL TIBCO Mashery Local component container. The proximity to Cassandra enables the Registry process to access Cassandra over 127.0.0.1:9042 host/port.

What's Inside

Java and Jetty Registry implementation.

Services Registry Service

Resource Dependencies

Log Producer Binding

Log Service

What's Inside

td-agent/fluentd

(19)

Services

Log Producer Service

Log Consumer Service Resource Dependencies

Log Consumers

Registry Binding Configuration Properties

Name Default Value Comments

api_key Only needed for "Tethered" setup.

api_secret Only needed for "Tethered" setup.

td_agent_output_

channelType DEFAULT

(always enabled) Set this property if you need to send access logs to other destinations. Accepted values are DEFAULT,

ELASTICSEARCH, KAFKA, HTTP and TCP. Changing to anything other than DEFAULT requires additional properties:

Property Name / Default Value

td_agent_out_elasticsearch_host / NULL

td_agent_out_elasticsearch_port / NULL

td_agent_out_elasticsearch_index / $ {TAG}

td_agent_out_http_URI / NULL

td_agent_out_kafka_brokers / NULL

td_agent_out_kafka_topic / ${TAG}

td_agent_out_tcp_host / NULL

td_agent_out_tcp_port / NULL mom_host https://api-

mom.mashery.co m

Only needed for "Tethered" setup.

Accessing QPM Data by Cluster for Untethered Deployments

QPM, or Queries per Month, is the total count of all Traffic/API calls made in a month. It includes all requests regardless of response status.

QPM Implementation

1. Every API request gets captured as an access log.

2. Each access log is transferred to the log service.

3. Every time the log service encounters an in-coming access log, it increments the counter.

(20)

The counters are stored in the log pod/container at

/mnt/data/trafficmanager

. 4. At the turn of every 1 hour, on the zeroeth minute, the counter is written to a disk.

This is similar to cron setting of

0 * * * *

. 5. The counter is then reset to 0 for the counts of the next hour.

How to find the QPM

To find the total count of queries for a given month, a convenient script is available on the log pod/

container at

/opt/mashery/containeragent/bin/getCounts.sh

.

You'll need to provide the

-t| -time mm-yyyy

parameter to execute the script successfully.

Usage:

getCounts.sh -t|--time mm-yyyy example: getCounts.sh -t 04-2019 or

example: getCounts.sh --time 04-2019

Example execution of getCounts.shgetCounts.sh

/opt/mashery/containeragent/bin/getCounts.sh -t 04-2019

Output:

Counting total number of access logs 234

Finished counting of access logs

How to Check Compliance using QPM Implementation

1. Run the following command (for Docker Swarm) on each Log Pod/Container:

docker exec -it <containerid> /opt/mashery/containeragent/bin/getCounts.sh <mm- yyyy>Exampledocker exec -it <containerid> /opt/mashery/containeragent/bin/

getCounts.sh 04-2019

2. Add up the output for each of the pods.

QPM = LogService1_Total+LogService2_total....+LogService*n*_total

SQL DB

(21)

What's Inside

MySQL DB

SQL DB Loader Services

SQL DB Service

Resource Dependencies

MOM Binding

Log Producer Binding

Registry Binding Properties

Name Default Value Comment

api_Key api key needed to connect to MOM HOST in TIBCO

Cloud

Mashery.

api_Secret api password needed to connect to MOM HOST in

TIBCO Cloud

Mashery.

auto_binding ON When turned ON, logservice urls will be auto- discovered and bound to the TIBCO Mashery Local component.

data_directory /var/lib/mysql The path to the MySQL data directory. Only the last component of the path name is created if it does not exist; the parent directory must already exist or an error occurs.

dimdataLogService

URL log-set-0-0.log-

svc-0.default.svc.cl uster.local

expire_logs_days 30 Specifies the number of days before automatic removal of binary log files.

innodb_buffer_pool

_size 128M The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data.

key_buffer_size 16M It is the size of the buffer used for index blocks. The key buffer is also known as the key cache.

mysql_bin mysql-bin Specifies the base name to use for binary log files.

mysql_log_error /var/log/

mysqld.log Option to determine whether the default error log

destination is the console or a file, and, if a file, the file

name.

(22)

Name Default Value Comment mysql_log_error_ver

bosity 1 The verbosity for handling events intended for the

error log, as filtered by the log_filter_internal error log filter component, which is enabled by default.

logserviceURL log-set-0.log- svc.default.svc.clus ter.local

Logservice url to connect to process the logs.

max_allowed_packe

t 16777216 Maximum packet length to send to or receive from

server.

max_binlog_size 1073741824 If a write to the binary log causes the current log file size to exceed the value of this variable, the server rotates the binary logs (closes the current file and opens the next one). The minimum value is 4096 bytes.

The maximum and default value is 1GB.

mom_host https://api-

mom.mashery.com MOM host to connect to sync data from TIBCO Cloud

Mashery.

mom_connect_timeo

ut 30000 Sets a specified timeout value, in milliseconds, to be used when opening a communications link to MOM referenced by a URLConnection.

mom_read_timeout 120000 Sets the read timeout to MOM url to a specified timeout, in milliseconds. A non-zero value specifies the timeout when reading from Input stream when a connection is established to MOM. If the timeout expires before there is data available for read, a java.net.SocketTimeoutException is raised.

plugin_load validate_password.

so This option tells the server to load the named plugins at startup. If multiple --plugin-load options are given, only the last one is used.

query_cache_size 8M This system variable was removed in MySQL 8.0.3.

server_id 1234567890 Specifies the server ID. This variable is set by the -- server-id option. The server_id system variable is set to 1 by default. The server can be started with this default ID, but when binary logging is enabled, an informational message is issued if you did not specify a server ID explicitly using the --server-id option.

syncInterval 15 Sync Interval used to sync tokens.

Starting with Mashery Local 5.0, OAuth tokens are not synced with TIBCO Cloud Mashery.

table_open_cache 1000 The number of open tables for all threads. Increasing

this value increases the number of file descriptors that

mysqld requires.

(23)

Specifying a password for MySQL database deployed with Docker

At the time of Mashery Local installation, you can specify your own password for a MySQL database deployed with Docker. Specify the password in the following file:

docker-deploy/set-user- variables.sh

. Change the MySQL password before running

compose.sh.

Onprem Loader

The Onprem Loader is a program that syncs with TIBCO Cloud Mashery and loads data into the on- premises database in Mashery Local. The sync process syncs the following SQL data:

Developer classes

Packages

Services

HttpsClientSecurity

The following diagram describes the components for scheduling Onprem Loader jobs to storing data objects to the database.

The cron jobs execute the Onprem Loader script periodically. A full sync happens every 1 hour; a partial sync happens every 15 minutes.

The timing for cron jobs is not configurable.

(24)

For information on monitoring the Onprem Loader, see Onprem Loader Monitoring.

Cache

What's Inside

Memcached Pools

Memcached Loader Services

Cache Service

Resource Dependencies

SQL DB Binding

NoSQL DB Binding

Log Producer Binding

Registry Binding Configuration Properties

Name Default Value Comments

auto_binding ON When turned ON, sql, logservice urls will be auto- discovered and bound to the TIBCO Mashery Local component.

content_cachesize 384 Cache size for memcache Content Pool content_maxconn 10240 Max connection for memcache Content Pool content_options -o modern Options for memcache Content Pool

content_port 11213 Port for memcache Content Pool

content_user nobody User for memcache Content Pool

(25)

Name Default Value Comments

count_cachesize 256 Cache size for memcache Count Pool count_maxconn 10240 Max connection for memcache Count Pool count_options -o modern Options for memcache Count Pool

count_port 11212 Port for memcache Count Pool count_user nobody User for memcache Count Pool logserviceURL log-set-0.log-

svc.default.sv c.cluster.local

Logservice url to connect to process the logs.

mem_cachesize 384 Cache size for memcache Pool mem_maxconn 10240 Max connection for memcache Pool mem_options -o modern Options for memcache Pool

mem_port 11211 Port for memcache Pool

mem_user nobody User for memcache Pool

packager_cachesize 128 Cache size for memcache Packager Pool packager_maxconn 10240 Max connection for memcache Packager Pool packager_options -o modern Options for memcache Packager Pool

packager_port 11215 Port for memcache Packager Pool packager_user nobody User for memcache Packager Pool services_cachesize 128 Cache size for memcache Service Pool services_maxconn 10240 Max connection for memcache Service Pool services_options -o modern Options for memcache Service Pool

services_port 11214 Port for memcache Service Pool services_user nobody User for memcache Service Pool

sqlURL mysql-

set-0.mysql- svc.default.sv c.cluster.local

MYSQL url to connect to load data from

updateddevclass 10 Sync dev classes updated in the last X minutes. X is the

value of this property.

(26)

Name Default Value Comments updatedhttpsclients

ecurity 30 Sync https client security information updated in the last X minutes. X is the value of this property.

updatedmapi 10 Sync mapi's updated in the last X minutes. X is the value of this property.

updatedpackager 30 Sync packager's updated in the last X minutes. X is the value of this property.

updatedservice 10 Sync services updated in the last X minutes. X is the value of this property.

Memcache Loader

The Memcache Loader is a program that updates the following in the different Memcache pools:

Mapis

Developer classes

Packages

Services

HttpClientSecurity

The following diagram describes the components for scheduling Memache Loader jobs to storing data objects to memcache pools.

The cron jobs execute the Memcache Loader script periodically. A full sync happens every 1 hour; a partial sync happens every 15 minutes.

The timing for cron jobs is not configurable.

For information on monitoring the Memcache Loader, see Memcache Loader Monitoring.

Traffic Manager

(27)

What's Inside

Java and Jetty Traffic Manager

OAuth Services

Traffic Manager Service

OAuth Service

Resource Dependencies

SQL DB Binding

NoSQL Binding

Cache Binding

Log Producer Binding

Registry Binding Properties

Name Default Value Comments

auto_binding ON When turned ON, sql, cache and logservice urls will be auto-discovered and bound to the TIBCO Mashery Local component.

http_conn_manager_

max_total 256 Caps the maximum supported backend client connections at any given time.

jetty_acceptqueuesiz

e 10 (256 in

code) Jetty Queue size.

jetty_maxidletime 18000 (30000

in code) Jetty Maximum Idle time.

(28)

Name Default Value Comments jetty_pool_maxthrea

ds 500 (500 in

code) Maximum number of jetty threads to be running logserviceURL log-

set-0-0.log- svc-0.default.s vc.cluster.loca l

Logservice URL is used to communicate with logservice component which processes the Traffic Manager logs.

mail_protocol smtp TCP/IP protocol used in sending and receiving e-mail.

mail_smtp_host The SMTP server to connect to.

mail_smtp_passwor

d Password to connect to SMTP.

mail_smtp_port The SMTP server port to connect to, if the connect() method doesn't explicitly specify one. Defaults to 25.

mail_smtp_user Default user name for SMTP.

mail_smtps_host The SMTPS server to connect to.

mail_smtps_passwor

d Password to connect to SMTPS.

mail_smtps_port The SMTPS server port to connect to, if the connect() method doesn't explicitly specify one. Defaults to 465.

mail_smtps_user Default user name for SMTPS.

max_uri_len_for_acc

esslog 2048 This property is used to limit the maximum length of uri data being written to the access log.

java_security_negati

ve_cache_lookups 0 Specified in java.security to indicate the caching policy for unsuccessful name lookups from the name service. The value is specified as integer to indicate the number of seconds to cache the failure for unsuccessful lookups.

java_security_cache_

lookups 0 Specified in java.security to indicate the caching policy for successful name lookups from the name service. The value is specified as integer to indicate the number of seconds to cache the successful lookup.

nosqlURL cass-

set-0.cass- svc.default.sv c.cluster.local

NoSQL URL is used to communicate with registry service.

oauth_http_enabled TRUE OAuth HTTP is enabled by default.

oauth_http_port 9083 HTTP port for OAuth.

(29)

Name Default Value Comments

oauth_https_enabled TRUE OAuth HTTPS is enabled by default.

oauth_https_port 8083 HTTPS port for OAuth.

sqlURL mysql-

set-0.mysql- svc.default.sv c.cluster.local

SQL URL is used to communicate with the SQL component to get the data.

vmargs "-d64 \n-

Xmx1024m" VM arguments that typically change the behavior of the Java Virtual Machine (JVM). Here, Xmx argument allows the Java heap to grow.

Cluster Manager

The Cluster Manager component provides a Topology Manager CLI that accesses the registry to report on the Cluster components, their states, bindings, and properties.

Cluster Manager CLI

Cluster Manager CLI is a command-line utility that works with the Mashery Local 5.0 registry API to:

Get all Clusters: `clustermanager list clusters`

Use one of the clusters: `clustermanager use cluster <cluster-id>`

Get all Zones: `clustermanager list zones`

Use one of the zones: `clustermanager use zone <zone-id>`

Get all nodes of different types in a zone: `clustermanager list nodes --type=<node-type>` or get all nodes in a zone: `clustermanager list nodes`

The following are valid node types:

The Cluster Manager CLI is a binary that is aware of its own Cluster and Zone context.

The CLI container is also aware of how many "initial" set of components form the cluster:

How many zones in the cluster

How many NoSQL, SQL, Cache, Log Service, TrafficManager (TM) components in each zone

The Cassandra Data Centers (DCs) and the replication factor

The registry URL

The CLI acts as the client to the following set of services:

1. The Registry APIs

The CLI uses the Registry for most of its operations such as:

Listing of Clusters

Listing of Zones in a cluster

Listing of Components in a zone

Listing of Config properties for a Component ID

Listing of Config properties for all components of a Component Type in the zone, e.g. common

properties across all SQL components in the zone

(30)

Listing of Config properties for all components of a Component Type in the cluster, e.g. common properties across all SQL components across all the zones in a cluster

Setting config properties on component/zone/cluster

Listing of Resource Bindings for a Component ID

Setting of Resource Bindings for all components of a Component Type in the zone, e.g. bind all TMs in a zone to a specific SQL component in the zone

2. The Agent APIs

The CLI uses the Agent APIs for some of its operations that affect the lifecycle of the Agent.

Set new config property - The CLI sets the Agent state to "UNSATISFIED" thereby causing the Agent to go through its lifecycle again.

Set new resource binding - The CLI sets the Agent state to "UNSATISFIED" thereby causing the Agent to go through its lifecycle again.

Set log level.

Set log sync interval.

Set verbose logging.

3. Certificate Management Local APIs

Lists certificates/identities.

Sets certificates/identities with new certificates.

CLI Commands Valid Usage:

Valid Cluster Manager Usage

[root@cm-deploy-0-856b6c784c-x278w builder]# clustermanager A command-line application to manage the Mashery 5.0 topology Usage:

clustermanager [command]

Available Commands:

deploy Deploy Mashery cluster topology help Help about any command

inspect Inspect the cluster deployment or configs of components in a zone list List of [clusters|zones|components|loggers|config|bindings|identities|

certificates] in the topology

set Set configuration, bindings, loggers, logsyncinterval, identities &

trust certificates in the topology

use Use available cluster or zone

version Print the version number of clustermanager CLI Flags:

-h, --help help for clustermanager

Use "clustermanager [command] --help" for more information about a command.

[root@cm-deploy-0-856b6c784c-x278w builder]# alias cm=clustermanager

Command Help:

Cluster Manager Help

[root@cm-deploy-0-856b6c784c-x278w builder]# cm --help

A command-line application to manage the Mashery 5.0 topology Usage:

clustermanager [command]

Available Commands:

(31)

deploy Deploy Mashery cluster topology help Help about any command

inspect Inspect the cluster deployment or configs of components in a zone list List of [clusters|zones|components|loggers|config|bindings|identities|

certificates] in the topology

set Set configuration, bindings, loggers, logsyncinterval, identities &

trust certificates in the topology

use Use available cluster or zone

version Print the version number of clustermanager CLI Flags:

-h, --help help for clustermanager

Use "clustermanager [command] --help" for more information about a command.

Command Specific Help:

Cluster Manager Command Specific Help

[root@cm-deploy-0-856b6c784c-x278w builder]# cm deploy --help Deploy Mashery cluster topology using the deployment file Usage:

clustermanager deploy [flags]

Flags:

--file string path to the cluster deployment descriptor file -h, --help help for deploy

[root@cm-deploy-0-856b6c784c-x278w builder]# cm inspect --help Inspect the cluster deployment or configs of components in a zone Usage:

clustermanager inspect [flags]

clustermanager inspect [command]

Available Commands:

cluster Inspect the cluster

configs Inspect configs in a cluster Flags:

-h, --help help for inspect

Use "clustermanager inspect [command] --help" for more information about a command.

[root@cm-deploy-0-856b6c784c-x278w builder]# cm list --help

List of [clusters|zones|components|loggers|config|bindings|identities|certificates]

in the topology Usage:

clustermanager list [flags]

clustermanager list [command]

Aliases:

list, ls

Available Commands:

bindings List of resource bindings of a specific component

certificates List of trust certificates available for the cluster & zone clusters List of clusters in the topology

components List of Tibco Mashery Components in a zone

config List of configuration settings for a specific component identities List of identities available for the cluster & zone loggers List of loggers available for a specific component zones List of zones in a cluster

Flags:

-h, --help help for list

[root@cm-deploy-0-856b6c784c-x278w builder]# cm set --help

(32)

Set configuration, bindings, loggers, logsyncinterval, identities & trust certificates in the topology

Usage:

clustermanager set [flags]

clustermanager set [command]

Available Commands:

binding Set resource binding for a component

certificate Set certificate in the scope of a cluster/zone

config Set configuration property in the scope of a cluster/zone/

component

identity Set identity in the scope of a cluster/zone

loglevel Set log level in the scope of a cluster/zone/component

logsyncinterval Set log sync interval in minutes [range 1-59] in the scope of a cluster/zone

verboselog Set verbose log for traffic manager(s) in the scope of a cluster/

zone/component Flags:

-h, --help help for set

[root@cm-deploy-0-856b6c784c-x278w builder]# cm use -h Use available cluster or zone in the topology

Usage:

clustermanager use [flags]

clustermanager use [command]

Available Commands:

cluster Use available cluster

zone Use available zone in a cluster Flags:

-h, --help help for use

[root@cm-deploy-0-856b6c784c-x278w builder]# cm version -h All software has versions. This is Cluster Manager CLI's Usage:

clustermanager version [flags]

Version

Command:clustermanager version

Command Objective: To get the current version of the Cluster Manager Command Usage:

Version

[root@a9fc970f406e bin]# clustermanager version Mashery Cluster Manager v1.0

Deploy

Command: clustermanager deploy

Command Objective:To deploy a cluster topology using a deployment file Command Help:

Deploy Help

[root@a9fc970f406e bin]# clustermanager deploy --help Deploy Mashery cluster topology using the deployment file Usage:

clustermanager deploy [flags]

(33)

Flags:

--file string path to the cluster deployment descriptor file -h, --help help for deploy

Command Valid Usage:

Deploy Valid Usage

[root@a9fc970f406e bin]# clustermanager deploy Creating the deployment..

2018/11/20 23:23:03 Deploying {

"clusterName": "SampleCluster", "zoneNames": [

{

"name": "local"

} ],

"tmCount": 2, "dsCount": 1, "oauthCount": 1, "cacheCount": 1, "sqlCount": 1, "logCount": 1, "nosqlCount": 1 }

Successfully created the deployment for cluster [SampleCluster]

Use

Command: clustermanager use

Command Objective: To allow the user to select the scope of subsequent operations. Valid scopes are Cluster

Command Help:

Use Help

[root@b6caa48479da builder]# clustermanager use --help Use available cluster or zone in the topology

Usage:

clustermanager use [flags]

clustermanager use [command]

Available Commands:

cluster Use available cluster

zone Use available zone in a cluster Flags:

-h, --help help for use

Command Valid Usage:

Select Cluster Scope

[root@cm-deploy-0-856b6c784c-x278w builder]# cm use cluster 8d6f22d1-8797-43d6-9f54-57533ab1d560

Using cluster [Tibco Mashery Local Reference Cluster]

Select Zone Scope

[root@cm-deploy-0-856b6c784c-x278w builder]# cm use zone 535db9aa-e58c-4939-9b14- e4e5746f3b44

Using cluster [Tibco Mashery Local Reference Cluster]

Using Zone [local]

Command Invalid Usage:

Invalid Usage: Select Cluster Scope

[root@cm-deploy-0-856b6c784c-x278w builder]# cm use cluster Tibco No matching cluster found: Tibco

(34)

Invalid Usage: Select Zone Scope

[root@cm-deploy-0-856b6c784c-x278w builder]# cm use zone local No matching zone found: local

Registry APIs List

Command: clustermanager list Command Help:

List Help

[root@b6caa48479da builder]# clustermanager list --help

List of [clusters|zones|components|loggers|config|bindings|identities|certificates]

in the topology Usage:

clustermanager list [flags]

clustermanager list [command]

Aliases:

list, ls

Available Commands:

bindings List of resource bindings of a specific component

certificates List of trust certificates available for the cluster & zone clusters List of clusters in the topology

components List of Tibco Mashery Components in a zone

config List of configuration settings for a specific component identities List of identities available for the cluster & zone loggers List of loggers available for a specific component zones List of zones in a cluster

Flags:

-h, --help help for list

Subcommand: clustermanager list clusters

Subcommand Objective: To list all the available clusters.

The default list display format is "table Subcommand Help:

List Clusters Help

[root@b6caa48479da builder]# clustermanager list clusters --help List of clusters in the topology

Usage:

clustermanager list clusters [flags]

Flags:

-h, --help help for clusters

Subcommand Valid Usage:

List of Clusters

[root@cm-deploy-0-856b6c784c-x278w builder]# cm list clusters Cluster ID Cluster Name

--- --- 8d6f22d1-8797-43d6-9f54-57533ab1d560 Tibco Mashery Gat...

Note: The cluster name displays the leading 20 characters of the Cluster name and truncates the rest in table display.

The display format can be changed to "json".

(35)

List of Clusters (JSON output)

[root@cm-deploy-0-856b6c784c-x278w builder]# TMG_CLI_OUTPUT=json eval 'cm ls clusters'

[ {

"clusterId": "8d6f22d1-8797-43d6-9f54-57533ab1d560", "name": "Tibco Mashery Local Reference Cluster", "createdTime": ""

} ]

Subcommand: clustermanager list zones

Subcommand Objective: To list all the available zones in the selected cluster. This command executes successfully only after selecting one of the available clusters via "use" command. (Please refer to "use"

command section for details.) Subcommand Help:

List Zones Help

[root@b6caa48479da builder]# clustermanager list zones --help List of zones in a cluster in the topology

Usage:

clustermanager list zones [flags]

Flags:

-h, --help help for zones

Subcommand Valid Usage:

List of Zones

[root@cm-deploy-0-856b6c784c-x278w builder]# cm ls zones Using cluster [Tibco Mashery Local Reference Cluster]

Zone ID Zone Name

--- --- 535db9aa-e58c-4939-9b14-e4e5746f3b44 local

Subcommand: clustermanager list components

Subcommand Objective: To list all the available components in a zone.

Subcommand Help:

List Components Help

[root@b6caa48479da builder]# clustermanager list components --help List of Tibco Mashery Components in a zone a cluster in the topology Usage:

clustermanager list components [flags]

Flags:

--clusterId string cluster ID of the component

--componentType string type of the component, valid types [sql, nosql, cache, trafficmanager, logservice]

-h, --help help for components --zoneId string zone ID of the component

Subcommand Valid Usage:

List of Components in a zone

[root@cm-deploy-0-856b6c784c-x278w builder]# cm ls components Using cluster [Tibco Mashery Local Reference Cluster]

Using Zone [local]

Component ID Component Type Component Name Component Status Component Host Component Agent Port Component Service Port(s)

--- --- --- --- --- ---

---

(36)

5c01c72c-11a8-4bed-ba8f-2421bc931499 sql sql ACTIVE 10.244.1.5 9080 3306

20580ccd-13b1-4662-8827-e07cf3fce567 nosql nosql ACTIVE 10.244.1.2 9080 9042

b30b7141-29dc-4c6f-9bf6-fc0317e6f32e cache cache ACTIVE 10.244.1.6 9080

11212,11211,11213,11214,11215,11216

a08bba64-8a39-4fa6-9fba-4d99e82816e4 trafficmanager tm ACTIVE 10.244.1.7 9080 8080

ce22559e-d6b7-4501-8575-e83fa45f91a2 logservice log ACTIVE 10.244.1.4 9080 24224

Subcommand: clustermanager list config

Subcommand Objective: To list component configuration properties Subcommand Help:

List Component Properties Configuration Help

[root@cm-deploy-0-856b6c784c-x278w builder]# cm ls config --help

List of configuration settings for a specific component in the topology Usage:

clustermanager list config [flags]

Flags:

--all get all the configs from agent --clusterId string cluster ID of the component --componentId string ID of the component

--componentType string type of the component, valid types [sql, nosql, cache, trafficmanager, logservice]

-h, --help help for config

--zoneId string zone ID of the component

Subcommand Valid Usage:

Response prior to setting the configuration properties for a given component:

Empty Property Response

[root@cm-deploy-0-856b6c784c-x278w builder]# cm ls config --componentId 5c01c72c-11a8-4bed-ba8f-2421bc931499 --componentType sql

clusterId [8d6f22d1-8797-43d6-9f54-57533ab1d560] and zoneId [535db9aa- e58c-4939-9b14-e4e5746f3b44]

No settings found for the given componentId [5c01c72c-11a8-4bed-ba8f-2421bc931499]

of type [sql]

Response after setting the configuration properties for a given component:

Valid Property List Response

[root@cm-deploy-0-856b6c784c-x278w builder]# cm ls config --componentId 5c01c72c-11a8-4bed-ba8f-2421bc931499 --componentType sql

clusterId [8d6f22d1-8797-43d6-9f54-57533ab1d560] and zoneId [535db9aa- e58c-4939-9b14-e4e5746f3b44]

Using cluster name [Tibco Mashery Local Reference Cluster]

Using Zone name [local]

Using Component ID [5c01c72c-11a8-4bed-ba8f-2421bc931499] of type [sql]

Property Value Handler Is Encoded? File Destination

--- --- --- --- ---

DUMMY_KEY DUMMY_VAL false

List All Config Properties

[root@cm-deploy-0-67548f4d56-j5j45 builder]# cl ls config --componentId 27b445c3-6656-4548-aff1-30ff84d83ec9 --componentType sql --all

clusterId [3a199dba-c433-4a45-aec6-41983eccb3e8] and zoneId [a81a9fa1-834b-409d-9042-9b405c32a83e]

Agent config files are stored under /root/config-27b445c3-6656-4548- aff1-30ff84d83ec9.zip

Using cluster name [Tibco Mashery Local Example Cluster]

Using Zone name [Tibco Mashery Local Example Zone]

(37)

Using Component ID [27b445c3-6656-4548-aff1-30ff84d83ec9] of type [sql]

Property Value Handler Is Encoded? File Destination

--- --- --- --- ---

apiKey testkey123 string false /etc/mashery/proxy.json

apiSecret testsecret345 string false /etc/proxy.json

If no configs are set for a component using CLI then registry won't be having any configs and you will see following message.

No settings found for the given componentId

<your_component_id > of type <your_component_type>

Subcommand: clustermanager list bindings

Subcommand Objective: To list Resource Bindings used by a component.

Subcommand Help:

Help for listing Resource Bindings for a Component

[root@cm-deploy-0-856b6c784c-x278w builder]# cm ls bindings --help

List of other components that a given component is using as its resource binding dependency

Usage:

clustermanager list bindings [flags]

Flags:

--clusterId string cluster ID of the component --componentId string ID of the component

--componentType string type of the component, valid types [sql, nosql, cache, trafficmanager, logservice]

-h, --help help for bindings

--resourceType string type of resource binding, valid types [sql, nosql, cache, trafficmanager, logservice]

--zoneId string zone ID of the component

Subcommand Valid Usage:

List All the Resource Bindings of a Component

[root@cm-deploy-0-856b6c784c-x278w builder]# cm ls bindings --componentId

a08bba64-8a39-4fa6-9fba-4d99e82816e4 --componentType trafficmanager --resourceType sql

clusterId [8d6f22d1-8797-43d6-9f54-57533ab1d560] and zoneId [535db9aa- e58c-4939-9b14-e4e5746f3b44]

Using cluster name [Tibco Mashery Local Reference Cluster]

Using Zone name [local]

Using Component ID [a08bba64-8a39-4fa6-9fba-4d99e82816e4] of type [trafficmanager]

ComponentID Status

--- --- 5c01c72c-11a8-4bed-ba8f-2421bc931499 connected

[root@cm-deploy-0-856b6c784c-x278w builder]# cm ls bindings --componentId

a08bba64-8a39-4fa6-9fba-4d99e82816e4 --componentType trafficmanager --resourceType cache

clusterId [8d6f22d1-8797-43d6-9f54-57533ab1d560] and zoneId [535db9aa- e58c-4939-9b14-e4e5746f3b44]

Using cluster name [Tibco Mashery Local Reference Cluster]

Using Zone name [local]

Using Component ID [a08bba64-8a39-4fa6-9fba-4d99e82816e4] of type [trafficmanager]

ComponentID Status

--- --- b30b7141-29dc-4c6f-9bf6-fc0317e6f32e connected

(38)

Set

Command: clustermanager set

Command Objective: To update the existing component with various parameters.

Command Help:

Set Configuration Setting Help:

Set Config Help

[root@b6caa48479da builder]# clustermanager set config --help Set configuration property in the scope of a cluster/zone/component Usage:

clustermanager set config [flags]

Flags:

--clusterId string cluster ID of the component --componentId string ID of the component

--componentType string type of the component, valid types [sql, nosql, cache, trafficmanager, logservice]

-h, --help help for config --prop string Config property name --value string Config property value --zoneId string zone ID of the component

Set Resource Binding Help:

Set Resource Binding Help

[root@cm-deploy-0-856b6c784c-x278w builder]# cm set binding --help Set resource binding for a component

Usage:

clustermanager set binding [flags]

Flags:

--clusterId string cluster ID of the component --componentId string ID of the component

--componentType string type of the component, valid types [sql, nosql, cache, trafficmanager, logservice]

-h, --help help for binding

--resourceId string ID of the resource binding

--resourceType string type of resource binding, valid types [sql, nosql, cache, trafficmanager, logservice]

--zoneId string zone ID of the component

[root@cm-deploy-0-856b6c784c-x278w builder]# cm set binding --componentId

a08bba64-8a39-4fa6-9fba-4d99e82816e4 --componentType trafficmanager --resourceId 5c01c72c-11a8-4bed-ba8f-2421bc931499--resourceType sql

Updating the TML after the change

Successfully updated the TML component a08bba64-8a39-4fa6-9fba-4d99e82816e4 for components of type trafficmanager

Successfully set the resource binding for the the component a08bba64-8a39-4fa6-9fba-4d99e82816e4 of type trafficmanager

Set Verbose Logging Help:

Set Verbose Logging Help

[root@37268c01c6dd builder]# cm set verbose -h

Set verbose log for traffic manager(s) in the scope of a cluster/zone/component Usage:

clustermanager set verboselog [flags]

Aliases:

verboselog, verbose

參考文獻

相關文件

[ Composite ] → Tree [ Composite ] receives a significance order of fields and classifies the input list first by the most significant field, and for each bucket classifies the

•The PROC directive declares a procedure with an optional list of named parameters. an optional list of

Search the portion of List preceding TestEntry for TargetValue, and report the result of that search if (TargetValue &gt; TestEntry):. Search the portion of List following

As a Key Learning Area, English Language Education seeks to develop students’ English language proficiency for study, work and leisure; provide them with opportunities for

(b) reviewing the positioning of VPET in the higher education system in Hong Kong, exploring the merits of developing professional vocational qualifications at the degree

Based on “The Performance Indicators for Hong Kong Schools – Evidence of Performance” published in 2002, a suggested list of expected evidence of performance is drawn up for

220V 50 Hz single phase A.C., variable stroke control, electrical components and cabling conformed to the latest B.S.S., earthing through 3 core supply cable.. and 2,300 r.p.m.,

In the following table we list trigonometric substitutions that are effective for the given radical expressions because of the specified trigonometric identities....