Layer7 API Management

  • 1.  Gateway in Docker

    Posted Jun 01, 2018 04:45 AM

    HI,

     

    I am train to run a container whit the image that I have downloaded from the Docker Hub, but when I do so i get an error like this:

    sudo docker run caapim/gateway
    ERROR - License not accepted (environment variable ACCEPT_LICENSE=)

     

    even after I have run the command export SSG_LICENSE="$(cat /c/my-license/LICENSE.xml | gzip | base64)"  with my license , it is still not working.

    my docker-compose.yml file looks like this:

     

    ssg:
    image: caapim/gateway:latest
    mem_limit: 2048m
    expose:
    - "8777"
    ports:
    - "8080:8080"
    - "8443:8443"
    - "9443:9443"
    environment:
    ACCEPT_LICENSE: "true"
    SSG_CLUSTER_COMMAND: "create"
    SSG_CLUSTER_HOST: "localhost"
    SSG_CLUSTER_PASSWORD: "7layer"
    SSG_DATABASE_TYPE: "mysql"
    SSG_DATABASE_HOST: "mysql"
    SSG_DATABASE_PORT: "3306"
    SSG_DATABASE_NAME: "ssg"
    SSG_DATABASE_USER: "gateway"
    SSG_DATABASE_PASSWORD: "7layer"
    SSG_DATABASE_ADMIN_USER: "root"
    SSG_DATABASE_ADMIN_PASS: "7layer"
    SSG_ADMIN_USER: "pmadmin"
    SSG_ADMIN_PASS: "7layer"
    SSG_LICENSE:
    SSG_INTERNAL_SERVICES: "restman wsman"
    links:
    - mysql
    mysql:
    image: mysql:5.7
    mem_limit: 512m
    # volumes:
    # - ./mysqlconf:/etc/mysql/conf.d
    # - /root/mysqldatadir:/var/lib/mysql
    environment:
    - MYSQL_ROOT_PASSWORD=7layer

     

    Am I missing something?



  • 2.  Re: Gateway in Docker

    Broadcom Employee
    Posted Jun 01, 2018 06:50 AM

    Hi Marija,

    passing the license as environment variable is disabled per default.

    You should use

    EXTRA_JAVA_ARGS: "-Dcom.l7tech.bootstrap.env.license.enable=true"

    in the docker-compose.yml to enable to pass the SSG_LICENSE env  the gzip+base64 license string. However, the suggested way is to mount the license as a secret. For more information on how to do this, see secrets in the Docker Compose file.

     

    Does that help?



  • 3.  Re:  Gateway in Docker

    Posted Jun 01, 2018 08:51 AM

    Hi Conny,

     

    I am still getting the same error.

     

    I do not understand what do I need to do with the secrets, do I just add them like this?

    Do I have to create a new file?

    I am only using docker-compose.yml.

     

    ssg:
    image: caapim/gateway:latest
    mem_limit: 2048m
    expose:
    - "8777"
    ports:
    - "8080:8080"
    - "8443:8443"
    - "9443:9443"
    environment:
    ACCEPT_LICENSE: "true"
    SSG_CLUSTER_COMMAND: "create"
    SSG_CLUSTER_HOST: "localhost"
    SSG_CLUSTER_PASSWORD: "7layer"
    SSG_DATABASE_TYPE: "mysql"
    SSG_DATABASE_HOST: "mysql"
    SSG_DATABASE_PORT: "3306"
    SSG_DATABASE_NAME: "ssg"
    SSG_DATABASE_USER: "gateway"
    SSG_DATABASE_PASSWORD: "7layer"
    SSG_DATABASE_ADMIN_USER: "root"
    SSG_DATABASE_ADMIN_PASS: "7layer"
    SSG_ADMIN_USER: "pmadmin"
    SSG_ADMIN_PASS: "7layer"
    SSG_LICENSE:
    SSG_INTERNAL_SERVICES: "restman wsman"

    EXTRA_JAVA_ARGS: "-Dcom.l7tech.bootstrap.env.license.enable=true"


    links:
    - mysql
    mysql:
    image: mysql:5.7
    mem_limit: 512m
    # volumes:
    # - ./mysqlconf:/etc/mysql/conf.d
    # - /root/mysqldatadir:/var/lib/mysql
    environment:
    - MYSQL_ROOT_PASSWORD=7layer

    secrets:   my_secret:     file: ./my_secret.txt   my_other_secret:     external: true

    Thank you.



  • 4.  Re:  Gateway in Docker
    Best Answer

    Broadcom Employee
    Posted Jun 03, 2018 07:22 PM

    Try this EXTRA_JAVA_ARGS,

    EXTRA_JAVA_ARGS: "-XX:ParallelGCThreads=4 -Dcom.l7tech.bootstrap.env.license.enable=true -Dcom.l7tech.bootstrap.autoTrustSslKey=trustAnchor,TrustedFor.SSL,TrustedFor.SAML_ISSUER"



  • 5.  Re:  Gateway in Docker

    Posted Jun 06, 2018 04:56 AM

    Hi Zhijun,

     

    I have tried entering this arguments, but when running the

    docker-compose -f "./docker-compose.yml" -p docops up -d

    I am still getting the error:image:

    * here I am using mysql:latest image

     

    I am folowing the Using the Gateway Docker Appliance - CA API Gateway - 9.2 - CA Technologies Documentation 

    It is like there is something missing...