Creating a Mashery Local Cluster
-
Navigate to the manifest-single-zone or manifest-multi-zones folder and the run the following command to create a Kubernetes cluster:
./create-k8s-cluster.sh
Note: The creation of Kubernetes cluster in AWS takes a couple of minutes; in the beginning, information such as the following, shows AWS EC2 instances are being initialized:unexpected error during validation: error listing nodes: Get https://api-82639c304b69c40a9b598-61u3ae-1931300466.us-east-1.elb.amazonaws.com/api/v1/nodes: EOFUsing cluster from kubectl context: 82639c304b69c40a9b598c6ae694f731.k8s.local
Example output of a successful Kubernetes cluster creation on AWS:Validating cluster 887e51ce137a59febf02d1dc777abb22.k8s.local INSTANCE GROUPS NAME ROLE MACHINETYPE MIN MAX SUBNETS master-us-east-1e Master m3.medium 1 1 us-east-1e nodes Node m3.large 3 3 us-east-1e NODE STATUS NAME ROLE READY ip-x-x-49-153.ec2.internal node True ip-x-x-50-219.ec2.internal master True ip-x-x-62-150.ec2.internal node True ip-x-x-63-177.ec2.internal node True Your cluster 887e51ce137a59febf02d1dc777abb22.k8s.local is ready WARNING! Using --password via the CLI is insecure. Use --password-stdin. WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store Login Succeeded
- Load and upload Docker images.
Run the following command to load Docker images locally:
./load-images.sh path_to_docker_image_files
Note: When deploying TIBCO Mashery Local cluster in the installer, Docker images are already loaded after a successful build. The above step can be skipped.Run the following command to upload Docker images to the AWS repository:./upload-images.sh
Note: If you modified the k8s_deploy_namespace to deploy Mashery Local 5.1 in a specific namespace in the Kubernetes cluster, you need to configure kubectl again for the given namespace. After running the above command, your kube config file (~/.kube/config) will have an entry for the AKS Kubernetes cluster and user as shown below.apiVersion: v1 clusters: - cluster: certificate-authority-data: abc server: https://<K8S Server> name: ml51ns contexts: - context: cluster: ml51ns user: <clusterUser> name: ml51ns current-context: ml51ns kind: Config preferences: {} users: - name: <clusterUser> user: client-certificate-data: xyz
Note down the value of cluster and user.
Execute the following commands to create a new context for the namespace you want to deploy and configure kubectl to use the new context:-
kubectl config set-context <conext-name> --namespace=<namespace_value provided in the manifest-single-zone.json or manifest-multi-zones.json> --cluster=<k8s cluster name > --user=<k8s user>
Example Command:kubectl config set-context mashery-dev --namespace=mashery --cluster=ml51ns --user= <clusterUser>
-
kubectl config use-context <context-name>
Example Command:kubectl config use-context mashery-dev
If the namespace you provided in manifest-single-zone.json or manifest-multi-zones.json is not present in Kubernetes cluster, run the following command to create the namespace../create-tml-namespace.sh
Run the following command to set the registry secret in AWS:./set-registry-secret.sh
- Create the Mashery Local cluster.
Run the following command to create the Mashery Local cluster:
./create-tml-cluster.sh
-
Copyright © Cloud Software Group, Inc. All rights reserved.