Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contrib/demo-multi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Host setup
5. Pull and start local docker registry. This will be used to serve the docker images needed for
the demo to the two VMs as well and to host images built during the demo.

$ sudo systemctl start docker.service
$ docker pull pmorie/geard-demo-registry
$ docker run -p 5000:5000 pmorie/geard-demo-registry

Expand Down
3 changes: 2 additions & 1 deletion contrib/demo-multi/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ fi

if [ ! -d "geard" ]; then
echo "Fetching geard code"
git clone git://github.com/openshift/geard
git clone git://github.com/pmorie/geard
cd geard
git checkout demo-multi 2>&1
fi

if [ ! "$(ifconfig | grep eth1)" ]; then
Expand Down
3 changes: 3 additions & 0 deletions contrib/demo-multi/db-import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh -x

sudo switchns --container=parks-db-1 -- /bin/bash -c "curl https://raw.githubusercontent.com/thesteve0/fluentwebmap/master/parkcoord.json | mongoimport -d fluent -c parkpoints --type json && mongo fluent --eval 'db.parkpoints.ensureIndex( { pos : \"2d\" } );'"
26 changes: 22 additions & 4 deletions contrib/demo-multi/setup-multi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,27 @@ fi

$base/teardown-multi.sh

gear deploy $base/deploy_parks_map.json localhost localhost 192.168.205.11 192.168.205.11 localhost
gear stop 192.168.205.11/parks-backend-{2,3}
#gear deploy $base/deploy_parks_map.json localhost localhost 192.168.205.11 192.168.205.11 localhost
#gear stop 192.168.205.11/parks-backend-{2,3}

$base/wait_for_url.sh "http://localhost:14000/"
gear install openshift/centos-mongodb parks-db-1 -p "27017:4003" openshift/centos-mongodb --start
$base/wait_for_url.sh "http://localhost:4003/"
read

sudo switchns --container=parks-db-1 -- /bin/bash -c "curl https://raw.githubusercontent.com/thesteve0/fluentwebmap/master/parkcoord.json | mongoimport -d fluent -c parkpoints --type json && mongo fluent --eval 'db.parkpoints.ensureIndex( { pos : \"2d\" } );'"
gear install parks-map-app parks-backend-1 -p "3000:4002" -n "127.0.0.1:27017:localhost:4003" --start
$base/wait_for_url.sh "http://localhost:4002/"
read

gear install parks-map-app atomic-2:43273/parks-backend-2 -p "3000:4002" -n "127.0.0.1:27017:192.168.205.10:4003" --start
$base/wait_for_url.sh "http://atomic-2:4002"
read

gear install parks-map-app atomic-2:43273/parks-backend-3 -p "3000:4003" -n "127.0.0.1:27017:192.168.205.10:4003" --start
$base/wait_for_url.sh "http://atomic-2:4003"
read

gear install openshift/centos-haproxy-simple-balancer parks-lb-1 -p "8080:14000" -n "192.168.1.1:8080:localhost:4002,192.168.1.2:8080:192.168.205.11:4002,192.168.1.3:8080:192.168.205.11:4003" --start
$base/wait_for_url.sh "http://localhost:14000"
read

$base/db-import.sh