Follow the steps given below run a WSO2 product as a service on Private PaaS, on Docker:
Step 1: Downloading the Product pack
Panel |
---|
Copy the respective product pack in the .zip format to the packs folder, which is in the /etc/puppet/modules/wso2installer/files/<SERVER_NAME> directory. Example: When configuring ESB navigate to the /etc/puppet/modules/wso2installer/files/wso2esb481/packs directory. Info |
---|
You can download the product pack from the respective products download page. Example: Download ESB from here. |
|
Steps 2: Exporting the Docker image to the nodes
Panel |
---|
Run build.sh file to build the docker image. Info |
---|
This will copy the plugins and template module to the docker image. |
List docker images. Example response format: If you successfully build the Docker image, you will get the following as a response: Code Block |
---|
wso2/das 3.0.0 ac57800e96c2 2 minutes ago 777.6 MB |
|
...
Login to each Kubernetes minion node and pull your docker image.
Example: Execute the following command to pull the docker image with the docker image ID wso2/esb:4.8.1
...
Save the new image to a .tar file. Code Block |
---|
docker save <NEW_IMAGE_NAME> > <LOCATION_OF_OF_TAR_FILE> |
For example: Code Block |
---|
docker save myppaasimage > /tmp/myppaasimage.tar |
Copy the Docker image to the Kubernetes minion nodes. Code Block |
---|
scp <IMAGE_NAME>.tar core@<NODE_IP>: |
Example: Code Block |
---|
scp myppaasimage.tar core@172.17.8.102: |
Info |
---|
Execute the kubectl get nodes command to get the IP address of the respective Kubernetes node. |
SSH into the Kubernetes node using one of the following commands: Code Block |
---|
ssh core@<NODE_IP> or vagrant ssh node-01 |
Load the .tart file to the Kubernetes node. Code Block |
---|
docker load < <LOCATION_OF_OF_TAR_FILE> |
Example:
|
...
...
Info |
---|
If there is more than one Kubernetes node, repeat the steps 6 and 7 for the remaining nodes. |
|
Step 3: Running the product as service on Private PaaS
Panel |
---|
Navigate to the preferred WSO2 products application sample directory. Code Block |
---|
cd <PRIVATE_PAAS_CARTRIDGES_HOME>/<SERVER_NAME>/<VERSION>/samples/applications/<SERVER_NAME>-<VERSION>-application/scripts/<IAAS> |
Example: Code Block |
---|
cd <PRIVATE_PAAS_CARTRIDGES_HOME>/wso2das/3.0.0/samples/applications/wso2das-300-application/scripts/mock |
- Deploy the application.
|