How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the...

21
TIBCO Software Inc. Global Headquarters 3307 Hillview Avenue Palo Alto, CA 94304 Tel: +1 650-846-1000 Toll Free: 1 800-420-8450 Fax: +1 650-846-1005 www.tibco.com TIBCO fuels digital business by enabling better decisions and faster, smarter actions through the TIBCO Connected Intelligence Cloud. From APIs and systems to devices and people, we interconnect everything, capture data in real time wherever it is, and augment the intelligence of your business through analytical insights. Thousands of customers around the globe rely on us to build compelling experiences, energize operations, and propel innovation. Learn how TIBCO makes digital smarter at www.tibco.com. How to Configure TIBCO ® ActiveSpaces 4 on Amazon EKS This document describes how to configure and run TIBCO ActiveSpaces v4 in an Amazon Elastic Container Service for Kubernetes (Amazon EKS). Version 1.1 May 2020 Updated for AS 4.4 and FTL 6.4

Transcript of How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the...

Page 1: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

TIBCO Software Inc.

Global Headquarters

3307 Hillview Avenue

Palo Alto, CA 94304

Tel: +1 650-846-1000

Toll Free: 1 800-420-8450

Fax: +1 650-846-1005

www.tibco.com

TIBCO fuels digital business by enabling better decisions and faster, smarter actions through the TIBCO Connected Intelligence Cloud. From APIs and systems to devices and people, we interconnect everything, capture data in real time wherever it is, and augment the intelligence of your business through analytical insights. Thousands of customers around the globe rely on us to build compelling experiences, energize operations, and propel innovation. Learn how TIBCO makes digital smarter at www.tibco.com.

How to Configure TIBCO® ActiveSpaces 4 on Amazon EKS This document describes how to configure and run TIBCO ActiveSpaces v4 in an Amazon Elastic Container Service for Kubernetes (Amazon EKS).

Version 1.1 May 2020 Updated for AS 4.4 and FTL 6.4

Page 2: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 2

Copyright Notice COPYRIGHT© 2020 TIBCO Software Inc. All rights reserved.

Trademarks TIBCO, the TIBCO logo, TIBCO FTL, and TIBCO ActiveSpaces 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.

Content Warranty The information in this document is subject to change without notice. THIS DOCUMENT IS PROVIDED "AS IS" AND TIBCO MAKES NO WARRANTY, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO ALL WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. TIBCO Software Inc. shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance or use of this material.

For more information, please contact:

TIBCO Software Inc. 3303 Hillview Avenue Palo Alto, CA 94304 USA

Page 3: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 3

Table of Contents

1 Overview ........................................................................................................................................ 5 1.1 AWS/AS4 Architecture ........................................................................................................................ 5 1.2 Supported Versions ............................................................................................................................. 5 1.3 Prerequisites ....................................................................................................................................... 5 1.4 Prepare Local Environment ................................................................................................................. 6 1.5 Prepare Preliminary AWS Account and Kubernetes Configuration .................................................... 6

2 AWS EKS Setup ............................................................................................................................... 8 2.1 Create a New Elastic Container Service for Kubernetes (EKS) ............................................................ 8 2.2 Configuring AWS ECR Container Registry .......................................................................................... 10 2.3 Tag and Push the Docker Images to ECR ........................................................................................... 11

3 Configuring ActiveSpaces 4 in EKS ............................................................................................... 12 3.1 Configuring AS4 for Kubernetes ........................................................................................................ 12

3.1.1 Load Balancer Configuration ........................................................................................................ 12 3.1.2 Applying the LB and Storage configurations in Kubernetes .......................................................... 14 3.1.3 AS4 configuration ......................................................................................................................... 14

3.2 Stopping or Deleting the AS4 processes ........................................................................................... 18

4 Accessing and Testing AS4 ........................................................................................................... 19 4.1 Accessing AS4 internally .................................................................................................................... 19 4.2 Monitoring ActiveSpaces .................................................................................................................. 20

Page 4: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 4

Table of Figures FIGURE 1 - EKSCTL INPUTS ........................................................................................................................................................ 8 FIGURE 2 - EKS CLUSTER CREATION USING EKSCTL ......................................................................................................................... 9 FIGURE 3 - KUBECTL RESULTS .................................................................................................................................................... 9 FIGURE 4 - KUBECTL GET NODES .............................................................................................................................................. 10 FIGURE 5 - CREATE ECR REGISTRIES ......................................................................................................................................... 10 FIGURE 6 - GET ECR LOGIN .................................................................................................................................................... 11 FIGURE 7 - TAG AND PUSH AS4 DOCKER IMAGES ....................................................................................................................... 11 FIGURE 8 – TIBDG-EKS-LB.YAML EXAMPLE ................................................................................................................................. 14 FIGURE 9 - EXAMPLE OF AS4 STORAGE AND LB PODS RUNNING IN EKS .......................................................................................... 14 FIGURE 10 - TIBDG-EKS.YAML EXAMPLE .................................................................................................................................... 17 FIGURE 11 - RUNNING AS4 ENVIRONMENT ............................................................................................................................... 18 FIGURE 12 - TO STOP AND START THE AS4 STATEFULSETS ............................................................................................................ 18 FIGURE 13 - ACCESS TIBDG EXAMPLE ....................................................................................................................................... 19 FIGURE 14 - ACCESS OPERATIONS APP EXAMPLE ......................................................................................................................... 20 FIGURE 15 - FTL MONITOR-START EXAMPLE .............................................................................................................................. 20 FIGURE 16 - IMPORTING THE AS4 DASHBOARDS ......................................................................................................................... 20 FIGURE 17 - ACTIVESPACES GIRD ACTIVITY DASHBOARD .............................................................................................................. 21

Page 5: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 5

1 Overview

This document will outline how to configure the TIBCO ActiveSpaces® v4 in a Kubernetes cluster on AWS. The Kubernetes cluster will be built using Amazon’s Elastic Container Service for Kubernetes (EKS). Running TIBCO AS4 on Amazon Web Services (AWS) involves:

• Configuring the Amazon Elastic Container Service for Kubernetes (EKS) for TIBCO ActiveSpaces.

• Configuring the Amazon Elastic Container Registry (ECR) for the Docker® image registry, and hosting the AS4.4 and FTL6.4 Docker images in ECR.

• Configuring and creating Kubernetes containers based on the Docker images for the individual components

1.1 AWS/AS4 Architecture

Using this document, the following architecture can be created: • One (1) VPC • EKS cluster • ECR Registry for all containers • ELB (Kubernetes) for external access to the Realm Services and the AS4 Proxies. • One (1) AS4 Copyset • Two (2) AS4 Nodes (1 – replica set) • Three (3) AS4 Statekeepers • Two (2) AS4 Proxies • Three (3) FTL Servers

1.2 Supported Versions

The steps described in this document are supported for the following versions of the products and components involved:

• TIBCO ActiveSpaces 4.4.0 • TIBCO FTL 6.4.0 • Docker Community/Enterprise Edition should be most recent version. For the Enterprise

edition, this should be 1.13.1 • Kubernetes 1.14 or newer

1.3 Prerequisites

The reader of this document must be familiar with:

• Docker concepts • Amazon AWS console, AWS CLI, and eksctl

Page 6: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 6

• Kubernetes installation and administration • Kubernetes CLI, kubectl • TIBCO AS4 and FTL6 installation and configuration • All necessary downloads discussed in the next section • The appropriate TIBCO Messaging license(s).

1.4 Prepare Local Environment

The following infrastructure should already be in place:

• A local Linux or macOS machine equipped for building Docker images • The following software must already be downloaded to the Linux or macOS machine

equipped for building Docker images. Note: All software must be for Linux!

• TIBCO ActiveSpaces v4.4 and FTL v6.4 Docker images which are part of the TIBCO AS4 and FTL6 installation packages. The Enterprise Edition or the Community Edition can be used. Download the EE from edelivery.tibco.com , and the CE at https://www.tibco.com/products/messaging-event-processing

• The tibdg_eks_files.zip. The zip file contains all of the necessary Kubernetes build files. Download from https://community.tibco.com/wiki/tibcor-messaging-article-links-quick-access

• Create a directory, place tibdg_eks_files.zip in the directory. • Unzip tibdg_eks_files.zip. • Unzip the ActiveSpaces and FTL installation packages, and take note of the location of the

/docker-images location.

1.5 Prepare Preliminary AWS Account and Kubernetes Configuration

Use the following to prepare the preliminary environment to install ActiveSpaces 4 on EKS.

In general, follow the Getting Started EKS User Guide to create a new Kubernetes cluster.

• An AWS account is required. If necessary, create one at http://aws.amazon.com and follow the on-screen instructions.

• Use the region selector in the navigation bar to choose the AWS Region to deploy AS4 in EKS. This documentation will refer to us-east-1. Note: Currently, not all AWS regions and Availability Zones (AZ) support EKS. As of February 2020, the following AWS regions support EKS: US EU AP N. Virginia (us-east-1) Ireland (eu-west-1) Singapore (ap-southeast-1) Ohio (us-east-2) Frankfurt (eu-central-1) Tokyo (ap-northeast-1) Oregon (us-west-2) Stockholm (eu-north-1) Sydney (ap-southeast-2) Montreal (ca-central-1) London (eu-west-2) Seoul (ap-northeast-2)

Page 7: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 7

Sao Paulo (sa-east-1) Paris (eu-west-3) Mumbai (ap-south-1) Bahrain (me-south-1) Hong Kong (ap-east-1)

• Install and configure Amazon AWS CLI on the workstation used. Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain the appropriate AWS key, secret key, profile, and region. Export the following environmental variable: export AWS_SDK_LOAD_CONFIG=1 when the default AIM Role is not used.

• Install Docker on the workstation to build the component images.

• Install the kubectl command-line tool to manage and deploy applications to Kubernetes in AWS from a workstation.

• Install the eksctl command line tool to configure AWS EKS. Note: if configuring EKS through the AWS console, this step is not necessary.

Page 8: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 8

2 AWS EKS Setup

2.1 Create a New Elastic Container Service for Kubernetes (EKS)

A new Kubernetes cluster must be created in EKS. There are now just a few steps necessary to create the Kubernetes cluster in EKS. Follow the Getting Started EKS User Guide to create a new Kubernetes cluster. Cluster can be created via the AWS console or with eksctl. Note: Creating the EKS cluster via eksctl is highly recommended. This following will be based on using eksctl. Note: If AWS account has multiple roles or there are multiple clusters, it is recommended that the AWS CLI be used, and the –profile=XXX is used to ensure the correct permissions/roles are used.

• Install eksctl following the AWS documentation, if not already installed. • Create the new EKS cluster. The following example shows the minimum inputs. The

names, number of nodes, zones, EC2 instance size can all be adjusted to meet the requirements of the environment. It will take several minutes for the cluster to be created.

Note: Read through the eksctl documentation. There are other parameters which can be used, such as using an Ubuntu kernel, rather than the default Amazon2 – Linux kernel, or if the nodes should be “managed”.

eksctl create cluster \ -n as4eks \ (1) -r us-east-1 \ (2) --zones us-east-1a,us-east-1b,us-east-1c \ (3) --nodegroup-name as4-workers \ (4) -t t3.xlarge \ (5) --nodes 8 \ (6) --nodes-min 4 \ (7) --nodes-max 10 \ (8) --node-volume-size 20 \ (9)

--vpc-cidr x.x.x./x (10) Figure 1 - eksctl inputs

(1): The name of the EKS Cluster (2): The AWS region where the EKS cluster will be built (3): The AWS Zones. This can be increased to fit requirements. Verify the AZ has the resources first. (4): The Node Group name for the nodes (workers) (5): The EC2 instance size. A larger instance can be used to fit the requirements. Note: If the size of the tibdgnode containers is increased, it is highly recommended to increase the EC2 instance size. (6): The number of cluster nodes. Eight (8) is recommended.

Page 9: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 9

(7): The minimum number of nodes. A minimum of Four (4). (8): The maximum number of nodes. Ten (10) is recommended. Can be increased for auto scaling in the production environment. (9): The volume size (GB) of each node. Not used for AS4 persisted data. Can be small. (10): The CIDR of the VPC to use. If not included, eksctl will choose.

Figure 2 - EKS cluster creation using eksctl

o To check on the status of the creation of the cluster, use:

> aws eks describe-cluster --name as4eks --region us-east-1 --query cluster.status

o Test the configuration before continuing. Use kubectl get svc. The results should be similar to the following. Cluster-IP can be different:

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 172.20.0.1 <none> 443/TCP 11m

Figure 3 - Kubectl results

Page 10: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 10

If a Kubernetes cluster is not shown, resolve any issues before continuing. If there are issues, it is usually a Kubernetes/AWS permissions/IAM role issue.

o To verify all of the nodes have been created, use kubectl get nodes. All eight nodes should be Ready.

NAME STATUS ROLES AGE VERSION ip-10-1-0-203.ec2.internal Ready <none> 6m36s v1.14.8-eks-b8860f ip-10-1-16-215.ec2.internal Ready <none> 6m41s v1.14.8-eks-b8860f ip-10-1-34-164.ec2.internal Ready <none> 6m40s v1.14.8-eks-b8860f ip-10-1-41-205.ec2.internal Ready <none> 6m36s v1.14.8-eks-b8860f ip-10-1-7-211.ec2.internal Ready <none> 6m38s v1.14.8-eks-b8860f ip-10-1-78-71.ec2.internal Ready <none> 6m39s v1.14.8-eks-b8860f ip-10-1-84-116.ec2.internal Ready <none> 6m39s v1.14.8-eks-b8860f ip-10-1-88-244.ec2.internal Ready <none> 6m39s v1.14.8-eks-b8860f

Figure 4 - Kubectl get nodes

2.2 Configuring AWS ECR Container Registry

The AWS Elastic Container Registry (ECR) must be configured to host the TIBCO FTL/AS4 Docker images. Use this section to create the necessary ECR registries. Seven (7) Docker images need to be tagged and pushed to ECR. All images can be in the same registry, or separated in to individual registries. This document will create one registry for AS4, and one registry for FTL. Load the the TIBCO AS4/FTL Docker images into the local Docker registry.

• Change directory to the directory where the AS4/FTL Docker images are located. • Load the the Docker images in the local registry:

docker load -i as-tibdg-4.4.0.dockerimage.xz docker load -i as-tibdgnode-4.4.0.dockerimage.xz docker load -i as-tibdgkeeper-4.4.0.dockerimage.xz docker load -i as-tibdgproxy-4.4.0.dockerimage.xz docker load -i as-tibdgadmind-4.4.0.dockerimage.xz docker load -i ftl-tibftlserver.dockerimage.xz docker load –i as-operations-4.4.0.dockerimage.xz

New ECR registry(s) must be created to host the EMS Docker image(s).

• Create two new ECR registries named AS4 and FTL in AWS. The registry can be created via the AWS CLI or via the console. Please note the URL of your ECR repository (e.g. 123456789012.dkr.ecr.us-east-1.amazonaws.com).

Ø > aws ecr create-repository --repository-name ftl --region us-east-1

Ø > aws ecr create-repository --repository-name as4 --region us-

east-1 Figure 5 - Create ECR Registries

Page 11: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 11

• Retrieve the login command to use to authenticate your Docker client with AWS registry. Adjust AWS region and access keys created in the previous step.

Ø > $(aws ecr get-login --no-include-email --region us-east-1) Figure 6 - Get ECR login

2.3 Tag and Push the Docker Images to ECR

Once the Docker images are loaded, the images can be tagged and pushed to ECR.

• Tag the image and push each of the Docker images to the ECR repository. Use following as an example. Replace the URL of the appropriate repository account ID instead of 123456789012. Do the same for each of the Seven (7) images.

> docker tag as-tibdg:4.4.0 123456789012.dkr.ecr.us-east-1.amazonaws.com/as4:tibdg

Figure 7 - Tag and Push AS4 Docker images

• Push the EMS Docker images to ECR. Use the following as an example. Replace 123456789012 with the appropriate repository account ID. > docker push 123456789012.dkr.ecr.us-east-1.amazonaws.com/as4:tibdg

Page 12: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 12

3 Configuring ActiveSpaces 4 in EKS

After the FTL6 and AS4 Docker images are pushed to ECR, Kubernetes can be configured to run the AS4/FTL6 containers.

3.1 Configuring AS4 for Kubernetes

There are different templates used for different components of the EKS configuration. The tibdg-eks.yaml template is the main AS4/FTL6 K8 template. The tibdg-eks-lb.yaml is used to configure the K8 services, and tibdg-eks-storage.yaml is used to create the required persisted storage. The tibdg-eks-storage.yaml file will create the persisted storage as AWS GP2 EBS storage for all components except for the AS Nodes, which will get higher performing IO EBS storage . See the AWS documentation for further details.

3.1.1 Load Balancer Configuration Following, is the tibdg_eks_files/tibdg-eks-lb.yaml used to configure the load balancers. There are three load balancers created for the environment. The only change required is for the trusted IP range. The trusted IP range will determine what IP addresses can connect to the load balancer, and should be configured. NOTE: The load balancer file must be configured and applied first. No other changes should be made or than the trusted IP range! If port number changes are made, the port changes must also be made in the tibdg-eks yaml file. It will take a few minutes for all of the load balancers to be created.

apiVersion: v1 kind: Service metadata: labels: name: ftlserverlb name: ftlserverlb spec: externalTrafficPolicy: Cluster ports: - name: realm nodePort: 30084 port: 30080 targetPort: 30080 protocol: TCP - name: admind nodePort: 30085 port: 30081 targetPort: 30081 protocol: TCP - name: ftl

Page 13: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 13

nodePort: 30086 port: 30083 targetPort: 30083 protocol: TCP selector: com.tibco.datagrid.service: ftlservers sessionAffinity: None type: LoadBalancer loadBalancerSourceRanges: - <your trusted IP range in the form of 0.0.0.0/0> (1) status: loadBalancer: {} --- apiVersion: v1 kind: Service metadata: labels: app: tibdg name: proxy-0-lb name: proxy-0-lb spec: externalTrafficPolicy: Cluster ports: - name: proxy-0 nodePort: 30087 port: 30086 targetPort: 8555 protocol: TCP selector: com.tibco.datagrid.service: tibdgproxy sessionAffinity: None type: LoadBalancer loadBalancerSourceRanges: - <your trusted IP range in the form of 0.0.0.0/0> (1) status: loadBalancer: {} --- apiVersion: v1 kind: Service metadata: labels: app: tibdg name: proxy-1-lb name: proxy-1-lb spec: externalTrafficPolicy: Cluster ports: - name: proxy-1 nodePort: 30088 port: 30087 targetPort: 8555 protocol: TCP selector:

Page 14: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 14

com.tibco.datagrid.service: tibdgproxy sessionAffinity: None type: LoadBalancer loadBalancerSourceRanges: - <your trusted IP range in the form of 0.0.0.0/0> (1) status: loadBalancer: {}

Figure 8 – tibdg-eks-lb.yaml Example

(1): The trusted IP address range to connect to the load balancer.

3.1.2 Applying the LB and Storage configurations in Kubernetes Once the tibdg-eks-lb yaml file has been updated, this file, along with the storage yaml file can be applied using kubectl to EKS. Use kubectl apply –f tibdg-eks-storage.yaml,tibdg-eks-lb.yaml to apply both files. Use kubectl get storageclass,svc to verify the storage classes and load balancers are available. Do not continue until the load balancers have been assigned an External IP address as shown in the following example. These IP addresses are required for the tibdg-eks yaml file.

Figure 9 - Example of AS4 storage and LB pods running in EKS

3.1.3 AS4 configuration Once there are load balancer IP addresses for the proxies, the main configuration file tibdg-eks.yaml can be configured. The only changes required is to the proxy_client_listen_external_host for proxy-0 and proxy-1 and the ECR image for each container. Note: The example shown is not the entire file, but does show an example of the changes required. --- # This is used to populate the grid configuration. apiVersion: v1 kind: ConfigMap metadata: name: tibdg-conf labels:

Page 15: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 15

app: tibdg data: ftl.yaml: | globals: core.servers: ftlserver-0: ftlserver-0.ftlservers:30080 ftlserver-1: ftlserver-1.ftlservers:30080 ftlserver-2: ftlserver-2.ftlservers:30080 servers: ftlserver-0: - realm: ftl: ftlserver-0.ftlservers:30083 data: /data/ftlserver_0_data ftlserver-1: - realm: ftl: ftlserver-1.ftlservers:30083 data: /data/ftlserver_1_data ftlserver-2: - realm: ftl: ftlserver-2.ftlservers:30083 data: /data/ftlserver_2_data services: realm: {} conf.tibdg: | grid create copyset_size=2 proxy_client_listen_port=8555 copyset create cs-01 node create --copyset cs-01 --dir /data/cs-01-node-0 cs-01-node-0 node create --copyset cs-01 --dir /data/cs-01-node-1 cs-01-node-1 keeper create --dir /data/keeper-0 keeper-0 keeper create --dir /data/keeper-1 keeper-1 keeper create --dir /data/keeper-2 keeper-2 proxy create proxy_mirroring_listen_port=8556 proxy_client_listen_external_host=<External IP Address for the Proxy 0 LB> proxy_client_listen_external_port=30087 proxy-0 (1) proxy create proxy_mirroring_listen_port=8557 proxy_client_listen_external_host=<External IP Address for the Proxy 1 LB> proxy_client_listen_external_port=30088 proxy-1 (1) table create t1 key long column create t1 value string ... --- # Sets up an in-cluster DNS entry for each ftl-server, and an entry for ftlservers containing all three. apiVersion: v1 kind: Service metadata: name: ftlservers labels: com.tibco.datagrid.service: ftlservers app: tibdg spec: clusterIP: None

Page 16: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 16

ports: - name: http port: 30080 - name: ftl port: 30083 selector: com.tibco.datagrid.service: ftlservers ... --- apiVersion: apps/v1 kind: StatefulSet metadata: name: ftlserver labels: com.tibco.datagrid.service: ftlservers app: tibdg spec: serviceName: ftlservers replicas: 3 selector: matchLabels: com.tibco.datagrid.service: ftlservers template: metadata: labels: com.tibco.datagrid.service: ftlservers app: tibdg spec: containers: - name: ftlservers image: <Your ECR Registry for the the FTLServer>/ftlserver (2) imagePullPolicy: Always args: - '-c' - '/config/ftl.yaml' - '-n' - '$(POD_NAME)' ports: - name: realm-http containerPort: 30080 - name: realm-ftl containerPort: 30083 env: - name: POD_NAME valueFrom: fieldRef: fieldPath: metadata.name volumeMounts: - mountPath: /config name: config-pv - mountPath: /data

Page 17: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 17

name: ftl-server-pv volumes: - name: config-pv configMap: name: tibdg-conf volumeClaimTemplates: - metadata: name: ftl-server-pv spec: accessModes: - ReadWriteOnce storageClassName: as4-gp2 resources: requests: storage: 2Gi

Figure 10 - tibdg-eks.yaml Example

(1): The proxy_client_listen_external_host for proxy-0 and proxy-1. Insert the value of the External IP for the matching load balancer.. An example would be a20984e5a96b8e881kd4k33f62833-1476430161.us-east-1.elb.amazonaws.com. (2): The name and location of the Elastic Container Repository (ECR) where the FTL/AS4 Docker containers are located. Ensure the proper permissions are set. The image maybe something different than shown, depending on how it was tagged in Docker. Note: If port numbers or other changes are made, the port number changes must also be made in the tibdb-eks-lb yaml file. If is not recommended to make other changes unless, you are very familiar with Kubernetes. After making the necessary modifications, use kubectl apply –f tibdg-eks.yaml to apply the configuration to Kubernetes. Note: This will take a few minutes, and there will be some pod restarts. This is normal. Use kubectl get pods to get the status pf the pods. Wait until all pods are running, and the tibdgconfig pod is completed before continuing. NAME READY STATUS RESTARTS AGE admind-0 1/1 Running 0 70m cs-01-node-0 1/1 Running 4 70m cs-01-node-1 1/1 Running 3 70m ftlserver-0 1/1 Running 0 70m ftlserver-1 1/1 Running 0 69m ftlserver-2 1/1 Running 0 69m keeper-0 1/1 Running 4 70m keeper-1 1/1 Running 3 70m keeper-2 1/1 Running 2 69m proxy-0 1/1 Running 5 70m proxy-1 1/1 Running 4 70m tibdgconfig-job-gpmcx 0/1 Completed 1 70m

Page 18: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 18

Figure 11 - Running AS4 environment

3.2 Stopping or Deleting the AS4 processes

To stop all of the processes without deleting them, use the kubectl scale operation to set its number of replicas to 0. For example: > kubectl scale --replicas=0 statefulset proxy,keeper,cs-01-node,ftlserver

To start the process again, set its number of replicas back to their original values. Node is two, keeper is three, proxy is two, admind is one and ftlserver is three. For example: > kubectl scale --replicas=3 statefulset keeper

Figure 12 - To Stop and Start the AS4 Statefulsets

To delete the all of the statefulsets and service entirely, use the kubectl delete operation: kubectl delete –f tibdg-eks.yaml,tibdg-eks-lb.yaml,tibdg-eks-storage.yaml All of the corresponding pods and statefulsets, and storage classes, and LB services will be deleted. The PVC and PV will not be deleted, nor will the corresponding data. To delete the data, PV, and PVC, use the following: Kubectl delete pvc,pv --all

Page 19: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 19

4 Accessing and Testing AS4

This section will outline testing ActiveSpaces 4 running in EKS. Access can be tested internally and externally.

4.1 Accessing AS4 internally

Testing access internally can be done by trying to access tibdg and running the operations sample application. The External IP Address the ftlserverlb is all that is need. Use: docker run --rm as-tibdg:4.4.0 –r http://<external IP of RS LB>:30080 status. Substitute the location of the as-tibdg:4.4.0 for your Docker registry, and your Realm Server LB external address.

Figure 13 - Access Tibdg example

To test with the operations apps. Use the following: docker run -it as-operations:4.4.0 –r http://<external IP of RS LB>:30080

Page 20: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 20

Figure 14 - Access Operations app example

4.2 Monitoring ActiveSpaces

AS4 can be monitored utilizing the FTL6.4/AS4.4 monitoring utilities from an external location. You will need the External IP Address for the FTL Server LB. Note: The Enterprise edition of FTL 6.4 and AS 4.4 are required for the monitoring components.

• On the workstation that was used to build the environment, install both FTL6.4 and ActiveSpaces 4.4 following their respective installation guides.

• Once both products are installed, change directory to /opt/tibco/ftl/current-version/monitoring

• Run ./monitor-start.py -f http://<external IP for the FTL LB>:30080.

Figure 15 - FTL monitor-start example

• Change directory to /opt/tibco/as/4.4/monitor/scripts, and run ./import-activespaces-dashboards. This will import the AS4 dashboards into the FTL monitor. This only has to be done once. The output should be similar to the following example:

Figure 16 - Importing the AS4 dashboards

Page 21: How to Configure TIBCO ActiveSpaces4.4 on K8 with EKS · 2020. 5. 1. · Note: After creating the AWS account, ensure the AWS credential and config files are created, and contain

©2020 TIBCO Software Inc. All Rights Reserved. 21

• Using a web browser, go to http://<machine running the monitoring software>:3000 • Login in using admin/admin. The user password can be changed, as well as securing the

monitor. See the FTL 6.4 and ActiveSpaces 4.4 documentation for details. • Click on the Home to get the Dashboards, and then click on the ActiveSpaces Grid Activity

dashboard. You should get something similar to the following example:

Figure 17 - ActiveSpaces Gird Activity Dashboard

• Feel free to use the operations sample application to enter data into the grid, and see the rates change.

• Use monitor-stop.py to stop the monitoring software.