Deploying a Cluster

Generating Deployment Scripts and Configuration

For single-zone deployment, run the following command and find generated deployment scripts and configuration in the folder "manifest-single-zone":
./compose.sh manifest-single-zone.json

Creating the K8S cluster

  1. Navigate to the folder tmgc-deploy/onprem/k8s/manifest-single-zone. Put all the TIBCO Mashery Local images in this folder (that you downloaded earlier) and execute the following command:
    Note:
    If you built the TML images using tml-installer, you need to copy those images from that build machine to the this location on deployment host. If your build and deployment host are same, you can copy those images from tml-installer container into this location using docker cp command such as below (assuming build no 1):
    • docker cp tml-installer:/var/jenkins_home/jobs/tml-build-docker/builds/1/archive/tml-docker/tml-nosql.tar.gz
    • docker cp tml-installer:/var/jenkins_home/jobs/tml-build-docker/builds/1/archive/tml-docker/tml-sql.tar.gz
    • docker cp tml-installer:/var/jenkins_home/jobs/tml-build-docker/builds/1/archive/tml-docker/tml-log.tar.gz
    • docker cp tml-installer:/var/jenkins_home/jobs/tml-build-docker/builds/1/archive/tml-docker/tml-cm.tar.gz
    • docker cp tml-installer:/var/jenkins_home/jobs/tml-build-docker/builds/1/archive/tml-docker/tml-cache.tar.gz
    • docker cp tml-installer:/var/jenkins_home/jobs/tml-build-docker/builds/1/archive/tml-docker/tml-tm.tar.gz
    ./create-local-k8s-cluster.sh
    This will create a local k8s cluster consisting of 1 k8s master node and the number of worker nodes you specified in the manifest-single-zone.json. Default cluster consists 1 k8s master and 1 worker node and it takes around 15 minutes. The script also deletes any previous kube configuration file at the location ~/.kube/config and creates a new configuration file for the newly-created cluster at this location so that you can execute any kubectl command from your terminal. Also, make sure you can ping the VMs with the IP (192.168.99.110, in case of default) from your local machine. If not, please resolve this first. The issue could be related with virtual box networking.
  2. Verify that the cluster is created successfully by running the following command. Status should be Ready for all the nodes. Do not proceed until all the nodes are in Ready status.
    kubectl get nodes
Sample output for 1 master and 2 nodes:
NAME      STATUS    ROLES     AGE       VERSION

master    Ready     master    7m        v1.10.5

node-1    Ready     <none>    4m        v1.10.5

node-2    Ready     <none>    29s       v1.10.5

Creating the TIBCO Mashery Local Cluster

  1. Execute the following command. This deploys the desired number of Mashery Local containers on the local cluster. It will show the progress on the terminal itself.
    ./create-tml-cluster.sh
    You can verify your deployment by running the command kubectl get pods. It should list all the pods. Sample output:
    NAME                            READY     STATUS    RESTARTS   AGE
    
    cache-deploy-54c7f7df6b-6w5h4   1/1       Running   0          15m
    
    cache-deploy-54c7f7df6b-w66vs   1/1       Running   0          15m
    
    cass-set-0                      1/1       Running   0          17m
    
    cass-set-1                      1/1       Running   0          16m
    
    db-set-0                        1/1       Running   0          15m
    
    db-set-1                        1/1       Running   0          15m
    
    log-set-0                       1/1       Running   0          16m
    
    tm-deploy-54bb9dddb8-cg2l4      1/1       Running   0          15m
    
    tm-deploy-54bb9dddb8-fdz6c      1/1       Running   0          15m