This section defines Dockerfiles and step-by-step instructions to build Docker images for product profiles provided by
WSO2 Stream Processor 4.0.0, namely :
- Dashboard
- Editor
- Manager
- Worker
- Kafka
git clone https://github.com/wso2/docker-sp.git
The local copy of the
dockerfiles
directory will be referred to asDOCKERFILE_HOME
from this point onwards.
- Download JDK 1.8
and extract it to
<DOCKERFILE_HOME>/base/files
. - Download WSO2 Stream Processor 4.0.0 distribution
and extract it to
<DOCKERFILE_HOME>/base/files
.
3. Download MySQL Connector/J v5.1.45 and copy the jar to <DOCKERFILE_HOME>/base/files
cp path/to/mysql/connector/jar <DOCKERFILE_HOME>/base/files
4. Convert and copy the Kafka client jars from the kafka_2.11-0.10.0.0/libs/
to <DOCKERFILE_HOME>/base/files
directory
The list of required client jars are;
- kafka_2.11-0.10.2.1.jar
- kafka-clients-0.10.2.1.jar
- metrics-core-2.2.0.jar
- scala-library-2.11.8.jar
- scala-parser-combinators_2.11-1.0.4.jar
- zkclient-0.10.jar
- zookeeper-3.4.9.jar
Use the
jartobundle.sh
script found itwso2sp-4.0.0/bin
as shown below; note that you will have to run this command for each jar mentioned above
./wso2sp-4.0.0/bin/jartobundle.sh path/to/kafka/client/jar <DOCKERFILE_HOME>/base/files
- For base, navigate to
<DOCKERFILE_HOME>/base
directory.
Executedocker build
command as shown below.docker build -t wso2sp-base:4.0.0 .
- For Dashboard, navigate to
<DOCKERFILE_HOME>/dashboard
directory.
Executedocker build
command as shown below.docker build -t wso2sp-dashboard:4.0.0 .
- For Editor, navigate to
<DOCKERFILE_HOME>/editor
directory.
Executedocker build
command as shown below.docker build -t wso2sp-editor:4.0.0 .
- For Manager, navigate to
<DOCKERFILE_HOME>/manager
directory.
Executedocker build
command as shown below.docker build -t wso2sp-manager:4.0.0 .
- For Worker, navigate to
<DOCKERFILE_HOME>/worker
directory.
Executedocker build
command as shown below.docker build -t wso2sp-worker:4.0.0 .
- For Dashboard,
docker run -it -p 9643:9643 wso2sp-dashboard:4.0.0
- For Editor,
docker run -it -p 9390:9390 -p 9743:9743 wso2sp-editor:4.0.0
- For Manager,
docker run -it wso2sp-manager:4.0.0
- For Worker,
docker run -it wso2sp-worker:4.0.0
- For Dashboard,
- Business Rules:
https://<DOCKER_HOST>:9643/business-rules
- Portal:
https://<DOCKER_HOST>:9643/portal
- Monitoring:
https://<DOCKER_HOST>:9643/monitoring
- Business Rules:
- For Editor,
http://<DOCKER_HOST>:9390/editor
In here, <DOCKER_HOST> refers to hostname or IP of the host machine on top of which containers are spawned.
In order to run a distributed Stream Processor setup, Kafka is required. This section provide the steps to build the Kafka docker image.
- Download JDK 1.8
and extract it to
<DOCKERFILE_HOME>/kafka/files
. - Download Kafka 2.11-0.10.0.0 and extract it to
<DOCKERFILE_HOME>/kafka/files
.
- Navigate to
<DOCKERFILE_HOME>/kafka
directory. Executedocker build
command as shown below.docker build -t kafka:2.11-0.10.0.0 .