Commit 12e761ce authored by Clément OUDOT's avatar Clément OUDOT
Browse files

Simple scripts to start and stop all containers

parent df6b399b
#!/bin/bash
script_realpath=`realpath $0`
script_path=`dirname $script_realpath`
version="v0.1"
repository="gitlab.ow2.org:4567/fusioniam/fusioniam"
echo "Start all FusionIAM containers"
# FIDS
mkdir -p $script_path/volumes/ldap-data $script_path/volumes/ldap-config
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/ldap-data:/usr/local/openldap/var/openldap-data \
-v $script_path/volumes/ldap-config:/usr/local/openldap/etc/openldap/slapd.d \
--rm=true \
-p 127.0.0.1:33389:33389 \
--name=fusioniam-directory-server \
--detach=true \
--no-hosts \
$repository/fusioniam-centos8-openldap-ltb:$version
# FIAM
mkdir -p $script_path/volumes/sso-data
mkdir -p $script_path/volumes/llng-run
mkdir -p $script_path/volumes/llng-cache
mkdir -p $script_path/volumes/llng-keys
podman unshare chown 48:48 -R $script_path/volumes/llng-*
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/sso-data:/var/lib/postgresql/data \
--rm=true \
-p 127.0.0.1:33432:5432 \
--name=fusioniam-database \
--detach=true \
--no-hosts \
docker.io/library/postgres
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/llng-run:/run/llng-fastcgi-server \
-v $script_path/volumes/llng-cache:/var/cache/lemonldap-ng \
-v $script_path/volumes/llng-keys:/etc/lemonldap-ng-keys \
--rm=true \
--name=fusioniam-access-manager-fastcgi-server \
--detach=true \
--no-hosts \
--network=slirp4netns:allow_host_loopback=true \
--entrypoint='["/bin/bash","/run-ct.sh","llng-fastcgi-server"]' \
$repository/fusioniam-centos8-lemonldap-ng:$version
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/llng-run:/run/llng-fastcgi-server \
-v $script_path/volumes/llng-cache:/var/cache/lemonldap-ng \
-v $script_path/volumes/llng-keys:/etc/lemonldap-ng-keys \
--rm=true \
-p 127.0.0.1:8080:8080 \
--name=fusioniam-access-manager-nginx \
--detach=true \
--no-hosts \
--network=slirp4netns:allow_host_loopback=true \
--entrypoint='["/bin/bash","/run-ct.sh","nginx"]' \
$repository/fusioniam-centos8-lemonldap-ng:$version
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/llng-run:/run/llng-fastcgi-server \
-v $script_path/volumes/llng-cache:/var/cache/lemonldap-ng \
-v $script_path/volumes/llng-keys:/etc/lemonldap-ng-keys \
--rm=true \
--name=fusioniam-access-manager-cron \
--detach=true \
--no-hosts \
--network=slirp4netns:allow_host_loopback=true \
--entrypoint='["/bin/bash","/run-ct.sh","purge-sessions"]' \
$repository/fusioniam-centos8-lemonldap-ng:$version
# FIWP
mkdir -p $script_path/volumes/wp-run
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/wp-run:/run/php-fpm/ \
--rm=true \
--name=fusioniam-white-pages-php-fpm \
--detach=true \
--no-hosts \
--network=slirp4netns:allow_host_loopback=true \
--entrypoint='["/bin/bash","/run-ct.sh","php-fpm"]' \
$repository/fusioniam-centos8-white-pages:$version
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/wp-run:/var/run/php-fpm/ \
--rm=true \
-p 127.0.0.1:8083:8080 \
--name=fusioniam-white-pages-nginx \
--detach=true \
--no-hosts \
--entrypoint='["/bin/bash","/run-ct.sh","nginx"]' \
$repository/fusioniam-centos8-white-pages:$version
# FISD
mkdir -p $script_path/volumes/sd-run
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/sd-run:/run/php-fpm/ \
--rm=true \
--name=fusioniam-service-desk-php-fpm \
--detach=true \
--no-hosts \
--network=slirp4netns:allow_host_loopback=true \
--entrypoint='["/bin/bash","/run-ct.sh","php-fpm"]' \
$repository/fusioniam-centos8-service-desk:$version
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/sd-run:/var/run/php-fpm/ \
--rm=true \
-p 127.0.0.1:8082:8080 \
--name=fusioniam-service-desk-nginx \
--detach=true \
--no-hosts \
--entrypoint='["/bin/bash","/run-ct.sh","nginx"]' \
$repository/fusioniam-centos8-service-desk:$version
# FIDM
mkdir -p $script_path/volumes/fd-run
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/fd-run:/run/php-fpm/ \
--rm=true \
--name=fusioniam-fusiondirectory-php-fpm \
--detach=true \
--no-hosts \
--network=slirp4netns:allow_host_loopback=true \
--entrypoint='["/bin/bash","/run-ct.sh","php-fpm"]' \
$repository/fusioniam-centos8-fusiondirectory:$version
podman run \
--env-file=$script_path/ENVVAR.example \
-v $script_path/volumes/fd-run:/var/run/php-fpm/ \
--rm=true \
-p 127.0.0.1:8081:8080 \
--name=fusioniam-fusiondirectory-nginx \
--detach=true \
--no-hosts \
--entrypoint='["/bin/bash","/run-ct.sh","nginx"]' \
$repository/fusioniam-centos8-fusiondirectory:$version
# Display logs
podman logs -f \
fusioniam-directory-server \
fusioniam-database \
fusioniam-access-manager-fastcgi-server \
fusioniam-access-manager-nginx \
fusioniam-access-manager-cron \
fusioniam-white-pages-php-fpm \
fusioniam-white-pages-nginx \
fusioniam-service-desk-php-fpm \
fusioniam-service-desk-nginx \
fusioniam-fusiondirectory-php-fpm \
fusioniam-fusiondirectory-nginx
#!/bin/bash
echo "Stop all FusionIAM containers"
podman stop fusioniam-directory-server
podman stop fusioniam-database
podman stop fusioniam-access-manager-fastcgi-server
podman stop fusioniam-access-manager-nginx
podman stop fusioniam-access-manager-cron
podman stop fusioniam-white-pages-php-fpm
podman stop fusioniam-white-pages-nginx
podman stop fusioniam-service-desk-php-fpm
podman stop fusioniam-service-desk-nginx
podman stop fusioniam-fusiondirectory-php-fpm
podman stop fusioniam-fusiondirectory-nginx
exit 0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment