A collection of scripts and dockerfile that help to run 2 XAP sites in docker containers on your machine.
- docker 1.3.1 (check with
docker -v
) - docker group
- ip forwarding enabled
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
- git clone https://github.com/barakb/xap-on-docker.git
- Download XAP zip and put it in the xap-on-docker dir.
cd xap-on-docker
- Edit Dockerfile replace 'gigaspaces-xap-premium-10.1.0-m6-b12586-99.zip' with your XAP zip.
./rebuild.sh
- In one shell
./gs1.sh
- In second shell
./gs2.sh
- In third shell
./connect.sh
and type your password when requested. This script edit /etc/hosts of your host and the 2 docker containers. - Now in shell one (gs1) type
./xap.sh
5 In shell 2 (gs2) type./xap.sh
- Run RI on your host with locators gs1,gs2
- Deploy your app.
- Open shell and type
./shell.sh gs1
- In gs1 type
./disconnect.sh
- Open shell and type
./shell.sh gs1
- In gs1 type iptables --flush
- Close both XAP and from your machine type
./rebuild.sh
- If you wish to use network interface other then eth0 edit connect.sh