Installing Mashery Local for Docker

To install Mashery Local for Docker:

Procedure

  1. Install Docker Engine, Docker Machine (optional), and docker-compose (optional, and not needed if on Kubernetes) on your operating system.
    Note: Refer to the Docker documentation for the operating system of your choice:
    Note: For Mac OS installations, it's recommended to install Docker Toolbox so that multiple docker hosts can be run on the same box.
  2. TIBCO Mashery Local for Docker is available as a TIB_mash-local**.tar.gz file. Download this file from TIBCO eDelivery and extract the file contents.
  3. Create the TIBCO Mashery Local Docker Image set:
    1. Drop in custom configurations: - Modify examples/set-user-variables.sh and drop it in the resource/addons directory - (Optional) To use a custom https server PEM file for ML Cluster Manager, drop the PEM file to the resource/addons/certs directory and name it server.pem.
      Note: If planning to run on Kubernetes, additional customization may be required. Please see the section Installing and Running Mashery Local for Docker with Kubernetes.
    2. Navigate to the root folder of the extracted contents and run the following command to build the Mashery Local image set (comprising three images): ./build-docker.sh 2>&1 |tee /tmp/build-docker.log
      Note: This will increment the image tag revision number. You can use the command "docker images" to check it out. You will need to modify the docker-compose.yml file to use the new tag if you build more than once in the same directory. However, if you would like to keep the same revision number, you will need to remove the file BUILD_NUMBER.txt in the current directory before starting the next build.
    3. Verify three images are created: ml-db.tar.gz, ml-mem.tar.gz, ml-core.tar.gz. (The image sizes are about 400MB, 120MB, and 850MB, respectively.)
      Note: If the size of any image is significantly less than the numbers above, then the image build might have some problems. Check the build-docker.log generated from the previous step. If you see several errors, such as:

      Could not retrieve mirrorlist http://mirrorlist.centos.org/?..... error was14: PYCURL ERROR 22 - "The requested URL returned error: 503 Service Unavailable"

      then you probably have some firewall issues on your network. Switch to a network without firewall restriction to do the build.

  4. (If planning to run on Kubernetes, the remaining steps do not apply. Please go to the section Installing and Running Mashery Local for Docker with Kubernetes to continue installation.) Navigate to the examples folder and copy the docker-compose.yml and the three image .gz files to the target Docker host machine.
    Note: The docker-compose.yml may need additional edits, depending on what ports need to be exposed or for other customization. For example, to add "extra hosts" if there are any extra host names and IP mapping that need to be added for a container.

    Note: The indents and dash in the docker-compose yml file are important.

    Run the following commands:
    • docker load -i <each of the three image files, one by one>
    • docker-compose up -d
  5. Verify that four Docker containers are up:
    docker ps to make sure the four containers are running.
  6. Repeat Steps 4-5 for each Docker host that will run a Mashery Local instance.
  7. Go to the instance in a browser:

    https://<docker host-IP>:5480.

  8. Complete Master registration to TIBCO MOM (Mashery On-Prem Manager) or complete Slave registration to Master.