Skip to content

Commit

Permalink
Add simple podman shell scripts for manual test run
Browse files Browse the repository at this point in the history
  • Loading branch information
groldan committed Jan 7, 2022
1 parent 26e8a86 commit 467d24d
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/deploy/podman/traditional/manual/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
datadir
1 change: 1 addition & 0 deletions docs/deploy/podman/traditional/manual/config
2 changes: 2 additions & 0 deletions docs/deploy/podman/traditional/manual/env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
GSCLOUD_VERSION=1.0-RC7

4 changes: 2 additions & 2 deletions docs/deploy/podman/traditional/manual/podman.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ In order to speed up the "starting" part of the documentation we are going to do

```bash
podman pull docker.io/library/rabbitmq:3.9-management
export GSCLOUD_VERSION=1.0-RC6
export GSCLOUD_VERSION=1.0-RC7

for service in discovery config gateway admin-server rest webui wms wfs wcs
do
Expand Down Expand Up @@ -71,7 +71,7 @@ podman run -d --name=config --hostname=config \
--network gs-cloud-network \
-e SPRING_PROFILES_ACTIVE=git \
-e CONFIG_GIT_URI=https://github.com/geoserver/geoserver-cloud-config.git \
-e SPRING_CLOUD_CONFIG_SERVER_GIT_DEFAULT_LABEL=v1.0-RC6 \
-e SPRING_CLOUD_CONFIG_SERVER_GIT_DEFAULT_LABEL=v1.0-RC7 \
-e CONFIG_GIT_BASEDIR=/opt/app/git_config \
geoservercloud/geoserver-cloud-config:$GSCLOUD_VERSION
```
Expand Down
11 changes: 11 additions & 0 deletions docs/deploy/podman/traditional/manual/pull.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# read GSCLOUD_VERSION from ./env
export $(cat ./env)

podman pull docker.io/library/rabbitmq:3.9-management

for i in discovery config gateway rest webui wms wfs wcs admin-server
do
podman pull docker-daemon:geoservercloud/geoserver-cloud-$i:$GSCLOUD_VERSION
done
7 changes: 7 additions & 0 deletions docs/deploy/podman/traditional/manual/shutdown.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

for service in gateway rest webui wms wfs wcs admin-server discovery config rabbitmq
do
podman container stop -i $service
podman container rm -i $service
done
56 changes: 56 additions & 0 deletions docs/deploy/podman/traditional/manual/startup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

podman network create gscloud 2>/dev/null

podman volume create rabbitmq_data 2>/dev/null

# read GSCLOUD_VERSION from ./env
export $(cat ./env)

STD_OPTS="-d --network gscloud"

# Note rabbitmq and discovery are the only containers addressed
# by hostname inside the cluster, so we're adding the --hostname
# parameter to `podman run` on them. All other container urls are
# resolved by discovery.

echo Starting rabbitmq...
podman run $STD_OPTS --name=rabbitmq --hostname=rabbitmq \
-v rabbitmq_data:/var/lib/rabbitmq \
--restart always \
rabbitmq:3.9-management

echo Starting discovery:$GSCLOUD_VERSION...
podman run $STD_OPTS --name=discovery --hostname=discovery \
-p 8761:8761 \
--restart always \
geoservercloud/geoserver-cloud-discovery:$GSCLOUD_VERSION

echo Starting config:$GSCLOUD_VERSION...
podman run $STD_OPTS --name=config \
--restart always \
-e SPRING_PROFILES_ACTIVE=native \
-v ./config:/opt/app/config:z \
-e CONFIG_NATIVE_PATH=/opt/app/config \
geoservercloud/geoserver-cloud-config:$GSCLOUD_VERSION

echo Starting gateway:$GSCLOUD_VERSION...
podman run $STD_OPTS --name=gateway \
-p 9090:8080 \
geoservercloud/geoserver-cloud-gateway:$GSCLOUD_VERSION

echo Starting admin-server:$GSCLOUD_VERSION...
podman run $STD_OPTS --name=admin-server \
-p 9091:8080 \
geoservercloud/geoserver-cloud-admin-server:$GSCLOUD_VERSION

mkdir -p datadir
#for i in webui wms wfs wcs rest
for i in webui wms wfs
do
echo Starting $i:$GSCLOUD_VERSION...
podman run $STD_OPTS --name=$i \
-e SPRING_PROFILES_ACTIVE=datadir \
-v ./datadir:/opt/app/data_directory:z \
geoservercloud/geoserver-cloud-$i:$GSCLOUD_VERSION
done

0 comments on commit 467d24d

Please sign in to comment.