Simple How-To section to cover different kinds of use cases.
Info: We use the override feature of Docker Compose to provide different configurations for certain use cases. More information.
Basic override file with common configuration settings for our environment:
_docker-compose.override.yml
. Simply, make a copy and modify it to your needs:cp _docker-compose.override.yml docker-compose.override.ymlSettings from
docker-compose.override.yml
are applied automatically when usingdocker-compose up
.
- Open the "Administration" tab in the OpenTOSCA UI
- In the "Repository Configuration" section click on the "OpenTOSCA" entry (it should have the URL
http://localhost:8080/winery/servicetemplates/
if the configuration was not changed before) - Change the domain (and port) in the dialog to point to the Winery server you want to use (e.g.
http://winery.example.com:8181/winery/servicetemplates/
) - Wait until the new URL is checked by the OpenTOSCA UI
- Click "Save"
The configuration is stored locally in the Local Storage (under the key opentosca
) of your browser and should survive reloads of the page.
To clear the configuration data, first try to change the settings in the "Administration" tab. If that does not work, use tho development tools of the browser and clear the local storage manually (in chrome it can be found in the "Application" tab of the development tools).
You can map an existing Winery repository (on your host) as a volume into the winery
container.
-
Create a
docker-compose.override.yml
file (or copy it from_docker-compose.override.yml
) -
Use the following configuration in order to map a repository:
winery: volumes: - <path on host system>:/var/opentosca/repository environment: WINERY_REPOSITORY_PATH: /var/opentosca/repository
-
Replace
<path on host system>
with the path to a valid Winery repository (can be empty) -
Start the environment as usual:
docker-compose up -d
You can instruct Winery to use a public git repository which it clones on startup.
- In the
docker-compose.override.yml
file add the following map:
winery:
environment:
WINERY_REPOSITORY_URL: <git url>
# exmaple: WINERY_REPOSITORY_URL: https://github.com/OpenTOSCA/tosca-definitions-public
:Warning: Make sure git lfs
is setup correctly. See troubleshooting entry about git lfs
for more information.
Start the environment with the docker-compose.bps.yml
override:
docker-compose -f docker-compose.yml -f docker-compose.bps.yml up -d
- Create a
docker-compose.override.yml
file (or copy it from_docker-compose.override.yml
) - Make sure you enable and set the certain Java debug options (e.g.,
-Xdebug
) - Start the environment as usual:
docker-compose up -d
-
Start the environment as usual:
docker-compose up -d
-
Log in to the Winery container and clone the respective Git repository manually (we use our internal
tosca-definitions-internal
repo as an example here):docker-compose exec winery bash rm -rf ${WINERY_REPOSITORY_PATH} git clone https://github.com/OpenTOSCA/tosca-definitions-internal ${WINERY_REPOSITORY_PATH} exit
-
Open Winery at http://localhost:8080
Note: Changes to the repository has to be pushed manually with
git push
.
:Warning: Make sure git lfs
is setup correctly. See troubleshooting entry about git lfs
for more information.
You can adjust Winery's JVM heap size by setting a respective environment variable for the winery
container.
-
Create a
docker-compose.override.yml
file (or copy it from_docker-compose.override.yml
) -
Use the following configuration in order to map a repository:
winery: environment: WINERY_HEAP_MAX: 8192m
-
Note: Make sure the hosting VM has enough capacity
-
Start the environment as usual:
docker-compose up -d
It is possible to start a loki and grafana server to access docker logs in the browser. Therefore, you must install the loki docker driver as follows and extend the default docker-compose file with the logging configurations.
# Install loki docker driver
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
# Start services in background along with loki and grafana server
docker-compose -f docker-compose.yml -f docker-compose.logging.yml up -d
The logs can be accessed at http://${PUBLIC_HOSTNAME}:3000/explore
.
The following exemplary query searches for ready to use
in the OpenTOSCA Container logs.
{compose_service="container"} |= "ready to use"
Some useful links:
Note, logs of the docker containers inside dind are currently not accessible.