Skip to content

jusabatier/docker

 
 

Repository files navigation

docker

This repository contains the docker and compose configuration files required to build a basic geOrchestra SDI instance.

There are two branches:

  • master is for a regular geOrchestra setup with GeoServer security,
  • geofence installs the GeoFence webapp and a modified version of GeoServer which includes the GeoFence probe.

The goal is to setup a dev or demo server, but this is NOT for production use.
If you need a provisioning tool, have a look at this contributed geOrchestra ansible playbook.

The webapps are pulled from our continuous integration, which builds the complete stack every night from the master branch. You've been warned: it might not work at all !

pre-requisites

Install a recent Docker version:

sudo apt-get remove docker.io
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker

Install Compose:

sudo -i
curl -L https://github.com/docker/compose/releases/download/1.2.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
exit

Create the directories on the host for the tmp and data volumes:

mkdir -p ~/docker/tmp ~/docker/data && chmod -R a+rw ~/docker/*

The ~/docker/data folder is mounted on /data in the GeoServer container. Copy some of your geodata inside !

Clone the repository:

git clone --recursive https://github.com/georchestra/docker.git ~/docker_georchestra

build & run

Run the stack with:

cd ~/docker_georchestra && docker-compose up

Register the IP of the front server in your host machine with this one-liner:

sudo sed -i '/georchestra.mydomain.org/d' /etc/hosts && \
sudo sh -c "echo `docker inspect --format {{.NetworkSettings.IPAddress}} docker_apache_1` georchestra.mydomain.org >> /etc/hosts"

Open http://georchestra.mydomain.org/header/ in your browser and voila !
Login with testadmin / testadmin.

Once you're done with it, you can stop the containers with CTRL + C

customizing the images

In case you make changes to the Dockerfiles, and before running again docker-compose up, remember you have to:

  • stop the containers with CTRL + C
  • remove the containers with docker-compose rm
  • remove the previous images with eg docker rmi -f docker_proxycas (in case you modified proxycas/Dockerfile)

debugging

Inspect the logs:

tail -f ~/docker/tmp/security-proxy.log

In order to see what's going on in the containers, open a console with, eg:

docker exec -it docker_proxycas_1 bash

... where docker_proxycas_1 is the name of the running container (retrieve it with docker ps).

For the network:

sudo tcpdump -X -i docker0 tcp port XXXX

... where XXXX might be 8180, 8280, 8281, 8282, 8380, etc... depending on which webapp you have to debug.

About

Easy setup of a geOrchestra stack for dev or demo purposes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%