Follow the steps given below to run a WSO2 product as a service on Private PaaS, which runs on Kubernetes:
Step 1: Deploying Private PaaS on a preferred IaaS
...
Panel |
---|
Download the required product pack from the respective product download page. Info |
---|
Example: Download ESB from here. |
- Copy the downloaded
.zip file to the packs folder, which is in the /etc/puppet/modules/wso2installer/files/<SERVER_NAME> directory. Example: When configuring ESB, copy the file to the /etc/puppet/modules/wso2installer/files/wso2esb481/packs directory.
|
Step 3:
...
Building and importing Docker images
Panel |
---|
Download the Private PaaS cartridges from the product page. Navigate to the <PRIVATE-PAAS-CARTRIDGES>/wso2esb/4.8.1/docker directory. Code Block |
---|
cd <PRIVATE-PAAS-CARTRIDGES>/wso2esb/4.8.1/docker |
Run the build.sh file to build the Docker image. Info |
---|
This will copy the plugins and the Template Module to the Docker image. |
List the Docker images. Example response format: If you have successfully build the Docker image, you will get the following as the response: Code Block |
---|
wso2/das 3.0.0 ac57800e96c2 2 minutes ago 777.6 MB |
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 node. 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 Kubernetes nodes. |
SSH into the Kubernetes node using one of the following commands: Code Block |
---|
ssh core@<NODE_IP> or vagrant ssh node-01 |
Load the .tar file to the Kubernetes node. Code Block |
---|
docker load < <LOCATION_OF_OF_TAR_FILE> |
Example: Code Block |
---|
docker load < /tmp/myppaasimage.tar |
Info |
---|
If more than one Kubernetes node exists, repeat step 4, 5 and 6 for the remaining nodes. |
|
...
Panel |
---|
- Cartridge JSON
Configure the following parameters in the cartridge JSON file:- Ensure that the
imageId under the iaasProvider is the same as the Docker image you created, if you are running Private PaaS on Kubernetes.
- Network Partition JSON
Configuring the network partition is optional. Define the load balancer port IPs under property .
Application JSON If the application is a single tenant application, ensure to add the artifact repository related details in subscribableInfo , under the artifactRepository section, of the application JSON definition. Example: Code Block |
---|
"artifactRepository":{
"privateRepo":false,
"repoUrl":"https://github.com/lakwarus/single-cartridge.git",
"repoUsername":"",
"repoPassword":""
} |
|
Step 6:
...
Deploying WSO2 products on Private PaaS
Panel |
---|
Navigate to the application directory of the preferred WSO2 product. 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.
|
...