Skip to content

Instantly share code, notes, and snippets.

@imesh
Last active August 29, 2015 14:12
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save imesh/b8f81fac8de39183a504 to your computer and use it in GitHub Desktop.
Save imesh/b8f81fac8de39183a504 to your computer and use it in GitHub Desktop.

Getting Started with Apache Stratos 4.1.0-rc2 on Kubernetes

Please follow below steps to run a sample workflow with Apache Stratos 4.1.0-rc2 on Kubernetes:

  1. Download Stratos 4.1.0-rc2 distribution, load balancer (optional) and samples from the following location:
[https://dist.apache.org/repos/dist/dev/stratos/4.1.0-rc2/](https://dist.apache.org/repos/dist/dev/stratos/4.1.0-rc2/)
  1. Download Apache ActiveMQ 5.10 and start an instance.
```
cd [activemq-home-folder]
sh bin/activemq start
```
  1. Setup a Kuberntes cluster using Vagrant, the following git repository provides step by step instructions for this:
[https://github.com/imesh/kubernetes-vagrant-setup](https://github.com/imesh/kubernetes-vagrant-setup)
  1. Login to each Kubernetes minion node and pull the below docker image:
```
cd [kubernetes-vagrant-setup-folder]
vagrant ssh node-01
docker pull stratos/php:4.1.0

vagrant ssh node-02
docker pull stratos/php:4.1.0
```
  1. Start Stratos instance and tail the log:
```
cd [stratos-home-folder]
sh bin/stratos.sh start
tail -f repository/logs/wso2carbon.log
```
  1. Once Stratos server is started run the following Kubernetes sample: cd [stratos-source-folder] cd samples/applications/single-cartridge/scripts/kubernetes/ ./deploy.sh

  2. Log into Stratos dashboard and wait for the application to be activated:

```
https://localhost:9443/console
Go to Applications -> single-cartridge-app -> View
```
  1. Once the application is active try to access the service with the below URL:
```
http://172.17.8.102:4500
```
In the above URL the IP address is the host IP address of the Kubernetes minion in which the Kubernetes pod was created. The port is auto-generated by Stratos while creating a Kubernetes service to load balance the pods. This information can be found on the Stratos dashboard, application topology view by moving the cursor to one of the members in the tree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment