Working with Amazon EC2 Instances

Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity in the cloud.

Procedure

  1. Install Docker Engine: http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
  2. Install Docker Compose: https://docs.docker.com/compose/install
  3. Install Docker Machine: https://docs.docker.com/machine/install-machine
  4. 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.
  5. Navigate to the root folder of the extracted contents and run the following command to build the Mashery Local image set (comprising three images):
    1. ./build-docker.sh
      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.
    2. Verify three images are created: ml_db.tar.gz, ml-mem.tar.gz, ml_core.tar.gz.
  6. Navigate to the examples folder and copy the docker-compose.yml and the three image .gz files previously built to a target directory.
    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 command: docker load -i <each of the three image files, one by one>
    At this point, this AWS instance can be saved as an AM1 that can be re-used for any Mashery Local instance.
  7. Run the following command: docker-compose up -d
    Verify that four Docker containers are up:
    docker ps to make sure the four containers are running.
  8. Go to the instance in a browser:

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

  9. Complete Master registration to TIBCO MOM (Mashery On-Prem Manager) or complete Slave registration to Master.
    Note: If you are using docker-machine to create the docker container, then use the following command:
    docker-machine create --driver amazonec2 --amazonec2-access-key <Your AWS Key> --amazonec2-secret-key <Your AWS Key Secret> --amazonec2-region <Region You want to create the instance>  <Instance Name>
    Note: You will need to open the following ports under the security group for registering Slave machine with Master: 22, 443, 2200, 2376 (TCP), 3306 , 5480, 11212.