Skip to content

Instantly share code, notes, and snippets.

@imesh
imesh / download_wso2_ppaas_rc.sh
Last active December 28, 2015 14:45
Download WSO2 Private PaaS RC
#!/bin/bash
set -e
version="4.1.1"
rc="rc2"
url="https://svn.wso2.org/repos/wso2/scratch/PPAAS/wso2ppaas-${version}-${rc}/"
function download() {
file=$1
wget -N $url/$file
#!/bin/bash
prgdir=`dirname "$0"`
script_path=`cd "$prgdir"; pwd`
deploy() {
pushd ${script_path}/$1
sh deploy.sh
popd
}
@imesh
imesh / install_elasticsearch.sh
Created September 26, 2015 10:59
A script to install elasticsearch on Ubuntu
#!/bin/bash
echo "Downloading distributions..."
pushd /home/ubuntu
wget https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.7.2.tar.gz
wget https://download.elastic.co/kibana/kibana/kibana-4.1.2-linux-x64.tar.gz
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.tar.gz
popd
echo "Mouting volume..."
@imesh
imesh / fix-source-release.sh
Created July 11, 2015 04:24
Fix stratos source release package
#!/bin/bash
set -e
stratos_version="4.1.0"
unzip stratos-parent-${stratos_version}-source-release.zip
rm stratos-parent-${stratos_version}/DEPENDENCIES
mv stratos-parent-${stratos_version} apache-stratos-${stratos_version}-source-release
zip -r apache-stratos-${stratos_version}-source-release.zip apache-stratos-${stratos_version}-source-release/*
rm stratos-parent-${stratos_version}-source-release.zip
@imesh
imesh / increase-boot2docker-disk.sh
Last active December 18, 2015 13:50
Increase Boot2Docker Disk
# Reference
# https://docs.docker.com/articles/b2d_volume_resize/
echo "Cloning existing disk..."
vboxmanage clonehd "/path/to/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vmdk" "/path/to/VirtualBox VMs/boot2docker-vm/boot2docker-vm-v1.vdi" --format VDI --variant Standard
echo "Increasing disk size..."
vboxmanage modifyhd "/path/to/VirtualBox VMs/boot2docker-vm/boot2docker-vm-v1.vdi" --resize 40960
@imesh
imesh / build-load-balancer.sh
Created March 6, 2015 10:11
A script to build Stratos Load Balancer
#!/bin/bash
# -----------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
@imesh
imesh / merge-pull-request.sh
Last active August 29, 2015 14:15
Merge Stratos Pull Requests
#!/bin/bash
# Clone stratos git repository and add github mirror as a remote
# git clone https://git-wip-us.apache.org/repos/asf/stratos.git
# git remote add github https://github.com/apache/stratos.git
set -e
pr_no=$1
pr_branch=pr_${pr_no}
dest_branch="master"
@imesh
imesh / update-docker-images.sh
Last active August 29, 2015 14:12
A script for updating stratos docker images on an Ubuntu VM and pushing them to docker hub.
#!/bin/bash
set -e
sudo su
apt-get install git
apt-get install docker.io
git clone https://github.com/imesh/stratos-docker-images.git
pushd cartridge-docker-images/base-image/

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.
@imesh
imesh / stratos-init.d.sh
Last active August 2, 2016 15:43
An init.d script for Apache Stratos
#!/bin/sh
# ------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#