Creating a Local Edition Cluster
Note: TIBCO Cloud™ API Management - Local Edition on a Swarm cluster relies on host pinning to achieve statefulness, for example, you need to specify the host name where you want to run
API Management - Local Edition stateful components (NoSQL, Log, SQL and Cache) in the corresponding deployment file, and then run deployment step by step.
Follow the steps below for each zone:
- Create a
tar file in the
resources/<tml-type> folder by executing the following script:
./create_resources.sh
List files using ls.
The following files can be seen.
- Deploy NoSQL components first. The first NoSQL container is deployed as a seed. Open the file
tmgc-nosql.yml and replace
${HOST_NAME} with the name of the host. The name of the host is the value shown under the
HOSTNAME column in the output of the
docker node ls command. You can replace this with "master", as we create a VM with name "master" and execute the following command:
docker stack deploy -c tmgc-nosql.yml nosqlstack --with-registry-auth
Run docker service ls. The output should be as below. Make sure it gets deployed successfully before proceeding.k6rpc2tmey91 nosqlstack_nosql_seed replicated 1/1 tmlbuilder.company.com/tml/tml-nosql:v5.2.0.160
Run docker service ls. Successful output should show nosqlstack_nosql_seed is replicated.If you have more than one NoSQL component and you want each of them to be deployed on a separate node, open the file tmgc-nosql-ring.yml and replace ${HOST_NAME} with the desired host, and then make replicas equal to 1 (replicas: 1 ) on line 6 and run the following command after each change.docker stack deploy -c tmgc-nosql-ring.yml nosqlnonseedstack --with-registry-auth
Successful output should show nosqlnonseedstack_nosql_nonseed is replicated. - Deploy Configuration Manager (CM). As this is a stateless component, it can be run on any node. Run the following command:
docker stack deploy -c tmgc-cm.yml cmstack --with-registry-auth
Run docker service ls. The output should be as below. Make sure it gets deployed successfully (showing "1/1" in 4th column of the output) before proceeding.ID NAME MODE REPLICAS IMAGE j4x64bis9qmb cmstack_tmlcm replicated 1/1 tmlbuilder.company.com/tml/tml-cm:v5.2.0.160
- Deploy Log Service. Open the file
tmgc-log.yml and replace
${HOST_NAME} with the desired host for each instance of log deployment and make replicas equal to 1 (replicas: 1 ) on line 6 and run the following command after each change.
docker stack deploy -c tmgc-log.yml logstack --with-registry-auth
- Deploy SQL Service. Open the file
tmgc-sql.yml and replace
${HOST_NAME} with the desired host where you want deploy SQL service and run the following command. As per design, you can only have one SQL per zone.
docker stack deploy -c tmgc-sql.yml sqlstack --with-registry-auth
- Deploy Cache Service. Open the file
tmgc-cache.yml and replace
${HOST_NAME} with the desired host for each instance of cache deployment and make replicas equal to 1 (replicas: 1 ) on line 6 and run the following command after each change.
docker stack deploy -c tmgc-cache.yml cachestack --with-registry-auth
- Deploy Traffic Manager (TM) Service. Run the following command. TM will be distributed by Swarm Manager among available nodes.
docker stack deploy -c tmgc-tm.yml tmstack --with-registry-auth
Once the deployment is complete, you can get the placement of containers node-wise by running the following command on the Swarm master:docker node ps $(docker node ls -q) --filter desired-state=Running | uniq
When the cluster is created, it creates a load balancer.
To check the staus of the deployment run the following command.
docker service ls
Sample output for refernce is as follows.
wrugewdl5c16 tmstack_tm replicated 1/1 tml-tm:v5.4.1.GA.1 *:80->20080/tcp, *:443->20443/tcp, *:8083->8083/tcp
Copyright © 2022. Cloud Software Group, Inc. All Rights Reserved.