Customizing the Mashery Local Deployment Manifest

Follow this procedure to customize the Mashery Local deployment manifest when deploying on AWS using Docker Swarm.

Procedure

  1. Note the Docker Registry location you are pushing your images from the Jenkins console logs:

    Note: If you are using Docker Registries other than AWS ECR, you can configure that registry as well.

  2. Execute the build_deployment_package Jenkins job to download the /var/jenkins_home/docker-deploy/ folder inside the tml-installer container to your local machine.

    When the folder is successfully downloaded, you can see the following:

    $ ls docker-deploy/
    
    aws azure gcp onprem pks properties upgrade
  3. Log in to the Mashery Local installer container:
    docker exec -it tml-installer /bin/bash
    sudo -su
    Make sure the following aws credentials file is present
    / # vi ~/.aws/credentials
      
    Generate the docker login
    / # aws ecr get-login --registry-ids <12-Digit Docker registry id> --profile kops
    docker login -u AWS -p <Password> -e none https://<12-Digit Docker registry id>.dkr.ecr.us-east-1.amazonaws.com
    Make sure to take note of the generated docker login statement. It will be utilized during deployment.
    Important: Make sure to take note of the generated Docker login statement. It will be utilized during deployment.
  4. Update the location in /docker-deploy/aws/swarm/manifest-aws-swarm.json:

    "tml_image_registry_host" : "<Docker registry location>",

    "tml_image_repo": "tml/v5.2.0.1", → This should point to your Mashery Local build number

  5. Update the docker-deploy files with the changed registry and repo location:
     ./compose.sh manifest-aws-swarm.json
  6. Modify the following .yml files in docker-deploy/aws/swarm/manifest-aws-swarm.
    Note: This step is required only if you are using AWS ECR as the Docker Registry.

    tmgc-cache.yml

    tmgc-cm.yml

    tmgc-log.yml

    tmgc-nosql.yml

    tmgc-sql.yml

    tmgc-tm.yml

    tmgc-nosql-ring.yml

    Note that the format of the image name in the image field should be changed as follows:

    • Existing format: <DockerRegistry/tml/v5.2.0.1/tml-nosql:v5.2.0.1>
    • Correct format: <DockerRegistry>/tml/ v5.2.0.1:<container-name>- v5.2.0.1
  7. Navigate to the /docker-deploy/aws/swarm/ folder on the host and update the reference manifest deployment file, manifest-aws-swarm.json, for customizing your deployment.

    The following settings can be customized (tml_image_tag must be updated to match your Docker image build):

    manifest-aws-swarm.json
    
    "tml_image_tag": "v5.2.0.1",
    
    "tml_cm_count": 1,
    "tml_tm_count": 1,
    "tml_cache_count": 1,
    "tml_sql_count": 1,
    "tml_log_count": 1,
    "tml_nosql_count": 1,
    
    
    "tml_tm_http_enabled": "true",
    "tml_tm_http_port": 80,
    "tml_tm_https_enabled": "true",
    "tml_tm_https_port": 443,
    "tml_tm_oauth_enabled": "true",
    "tml_tm_oauth_port": 8083
    ,
    "cassandra_max_heap": "512M",
    "cassandra_replication_factor": 1
    Variable Prefix Description
    tml_cache Mashery Local Cache Component
    tml_cm Mashery Local Cluster Manager Component
    tml_log Mashery Local Log Component
    tml_nosql Number of Cassandra Component
    tml_sql Mashery Local SQL Component
    tml_tm Mashery Local Traffic Manager Component