To build and run the sample, you must have the done the following:
- Obtain this repository's contents, either use
git
or just download the samples as a ZIP - Provision an Event Streams Service Instance in IBM Cloud®
- Install Docker
-
Build the container image from the
Dockerfile
:docker build -t python-console-sample .
-
Export the Event Streams for IBM Cloud instance credentials:
From the Event Streams for IBM Cloud instance dashboard, click
Service Credentials
and select or create a new one. Copy its content and export it as below:export VCAP_SERVICES='{ "instance_id": "...", "api_key": "...", "kafka_admin_url": "....", "kafka_rest_url": "...", "kafka_brokers_sasl": [ ... ], "user": "...", "password": "..." }'
-
Run the container image
docker run -e VCAP_SERVICES="$VCAP_SERVICES" python-console-sample
If you want find out more about Docker then check the following document: