Creating a Mashery Local Cluster

  1. Login into OpenShift server. Get the login url by running the following command.
    az group deployment show --name Microsoft.Template --resource-group <ResourceGroupName> | grep "cloudapp.azure.com/console"
    Example Command:
    az group deployment show --name
    Microsoft.Template --resource-group suneelOSFPClusterRG | grep "cloudapp.azure.com/console"
    Output-
    "value": "https://masterdnspbodumwnz6vx6.eastus.cloudapp.azure.com/console"
    Now use the above URL to login.
    oc login <openshiftConsoleUrl> -u <username> --insecure-skip-tls-verify
    Example Command:
    oc login https://masterdnspbodumwnz6vx6.eastus.cloudapp.azure.com -u ocpadmin --insecure-skip-tls-verify
  2. Create a new project:
    oc new-project <project name>
    Sample:
    oc new-project ml5-openshift
  3. Make sure you are on a newly created project by running the following command.
    oc project <project name>
    Example Command:
    - oc project ml5-openshift
  4. Assign anyuid security context constraint to the project.
    oc adm policy add-scc-to-user anyuid
    system:serviceaccount:<project
    name>:<service_account>
    Example Command:
    oc adm policy add-scc-to-user anyuid
    system:serviceaccount:ml5-openshift:default
  5. Obtain the registry url created by the OpenShift deployment.
    1. Change the project to default.
      oc project default
    2. Get the routes.
      oc get routes
      Example output.

      Make note of host corresponding to docker-registry. In the above, docker registry host will be docker-registry-default.x.x.206.102.nip.io.

    3. Return to your project by executing step 3.
  6. Now login into the registry to push the images. This step must be completed successfully before proceeding further.
    docker login -u clusteradmin -p $(oc whoami -t) <REGISTRY_HOST>
    Example Command:
    docker login -u ocpadmin -p $(oc whoami -t) docker-registry-default.x.x.94.123.nip.io
    Upload the images into the registry:
    ./upload-images.sh
  7. Run the following command to set registry secret in the OpenShift cluster:
    ./set-registry-secret.sh
  8. Run the following command to create the TIBCO Mashery Gateway cluster:
    ./create-tml-cluster.sh