Layer 7 API Management

Expand all | Collapse all

Live API Creator -- docker behaviour volumes

Jump to Best Answer
  • 1.  Live API Creator -- docker behaviour volumes

    Posted 08-01-2019 08:11 AM
    Dear Team,
    I observed that the behaviour of LAC implemented as a docker container is different using volumes versus not using volumes.

    Using:

    docker run -p 8080:8080 -d --link=my-mysql:db --name liveapicreator caliveapicreator/5.2.00
    
    Gives me a system which contains the DEMO APIs.


    docker run -p 8080:8080 -d --link=my-mysql:db --name liveapicreator \
    -v /Users/grean11/Docker_Runtime/LiveAPICreator/CALiveAPICreator.repository:/home/tomcat/CALiveAPICreator.repository \
    -v /Users/grean11/Docker_Runtime/LiveAPICreator/databases:/usr/local/CALiveAPICreator/databases \
    caliveapicreator/5.2.00
    
    Results in a system WITHOUT the DEMO APIs.

    I assume that the instantiation/startup uses some files on the overmounted directories to implement the demo APIs.

    Any ideas here?
    It would be great to get the same results in both cases.

    Kind regards,
    Andreas


    ------------------------------
    Senior Solution Architect
    CA Technologies a Broadcom Company
    ------------------------------


  • 2.  RE: Live API Creator -- docker behaviour volumes
    Best Answer

    Posted 08-07-2019 08:53 AM
    Hi Andreas,

    Do you see any errors in the container logs?  I've typically seen permissions issues when running in  persistent mode.
    You can try specifying the user the image should run as with the -u 0 option.

    Regards,
    Joe


  • 3.  RE: Live API Creator -- docker behaviour volumes

    Posted 08-07-2019 09:23 AM
    Hi Joe,
    i assume that the image is prepared with all the demo APIs but starting the container with the mounted volumes the relevant directories are then empty at first startup.

    LAC seems to recreate / reinitiate some of the needed filesystem-entriesin CALiveAPICreator.repository but does not install the demo APIs and relevant data:
    Starting LAC without mounts and saving a tarbal of the directories and then starting LAC with mounts and untar the saved tarbal brings up a system including demo APIs.

    Probably the first startup needs to be changed to get the demo APIs installed in the docker image also when persistent storage is mounted.

    => Do not install the Demos into the image but install the Demos at "first startup" of the container. Probably controlled  thru an environmental condition (var) to decide if the demos are installed or not.

    Kind regards,
    Andreas

    ------------------------------
    Senior Solution Architect
    CA Technologies a Broadcom Company
    ------------------------------