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

Merge branch 'master' of gitlab.ow2.org:fusioniam/fusioniam

parents 83125562 b96dba74
FVERSION=build/VERSION
CTN=`which podman >/dev/null 2>&1 && echo podman || echo docker`
IMAGENAME="fusioniam-centos8"
VVERSION=`cat $(FVERSION)`
IDLDAP=`podman ps | grep 'fusioniam-directory-server' | sed -e 's/[ ].*//'`
IDWPB=`podman ps | grep 'fusioniam-white-pages-php-fpm' | sed -e 's/[ ].*//'`
IDWPF=`podman ps | grep 'fusioniam-white-pages-nginx' | sed -e 's/[ ].*//'`
IDSDB=`podman ps | grep 'fusioniam-service-desk-php-fpm' | sed -e 's/[ ].*//'`
IDSDF=`podman ps | grep 'fusioniam-service-desk-nginx' | sed -e 's/[ ].*//'`
IDLEMONB=`podman ps | grep 'fusioniam-access-manager-fastcgi-server' | sed -e 's/[ ].*//'`
IDLEMONF=`podman ps | grep 'fusioniam-access-manager-nginx' | sed -e 's/[ ].*//'`
IDLEMONC=`podman ps | grep 'fusioniam-access-manager-cron' | sed -e 's/[ ].*//'`
IDBASE=`podman ps | grep 'fusioniam-database' | sed -e 's/[ ].*//'`
IDFDB=`podman ps | grep 'fusioniam-fusiondirectory-php-fpm' | sed -e 's/[ ].*//'`
IDFDF=`podman ps | grep 'fusioniam-fusiondirectory-nginx' | sed -e 's/[ ].*//'`
################################################################################
# Run commands
################################################################################
runldap:
mkdir -p run/volumes/ldap-data run/volumes/ldap-config
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/volumes/ldap-data:/usr/local/openldap/var/openldap-data \
-v ./run/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 \
localhost/fusioniam-centos8-openldap-ltb:v0.1
runwp:
mkdir -p run/volumes/wp-run
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/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"]' \
localhost/fusioniam-centos8-white-pages:v0.1
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/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"]' \
localhost/fusioniam-centos8-white-pages:v0.1
runsd:
mkdir -p run/volumes/sd-run
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/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"]' \
localhost/fusioniam-centos8-service-desk:v0.1
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/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"]' \
localhost/fusioniam-centos8-service-desk:v0.1
runlemon:
mkdir -p run/volumes/sso-data
mkdir -p run/volumes/llng-run
mkdir -p run/volumes/llng-cache
mkdir -p run/volumes/llng-keys
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/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
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/volumes/llng-run:/run/llng-fastcgi-server \
-v ./run/volumes/llng-cache:/var/cache/lemonldap-ng \
-v ./run/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"]' \
localhost/fusioniam-centos8-lemonldap-ng:v0.1
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/volumes/llng-run:/run/llng-fastcgi-server \
-v ./run/volumes/llng-cache:/var/cache/lemonldap-ng \
-v ./run/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"]' \
localhost/fusioniam-centos8-lemonldap-ng:v0.1
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/volumes/llng-run:/run/llng-fastcgi-server \
-v ./run/volumes/llng-cache:/var/cache/lemonldap-ng \
-v ./run/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"]' \
localhost/fusioniam-centos8-lemonldap-ng:v0.1
runfd:
mkdir -p run/volumes/fd-run
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/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"]' \
localhost/fusioniam-centos8-fusiondirectory:v0.1
$(CTN) run \
--env-file=./run/ENVVAR.example \
-v ./run/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"]' \
localhost/fusioniam-centos8-fusiondirectory:v0.1
runall: runldap runwp runsd runlemon runfd
################################################################################
# Stop commands
################################################################################
stopldap:
$(CTN) stop $(IDLDAP)
stopwp:
$(CTN) stop $(IDWPF) $(IDWPB)
stopsd:
$(CTN) stop $(IDSDF) $(IDSDB)
stoplemon:
$(CTN) stop $(IDLEMONF) $(IDLEMONB) $(IDLEMONC) $(IDBASE)
stopfd:
$(CTN) stop $(IDFDB) $(IDFDF)
stopall: stopldap stopwp stopsd stoplemon stopfd
################################################################################
# Enter commands
################################################################################
enterldap:
$(CTN) exec -it $(IDLDAP) /bin/bash
enterwp:
$(CTN) exec -it $(IDWPB) /bin/bash
entersd:
$(CTN) exec -it $(IDSDB) /bin/bash
enterlemon:
$(CTN) exec -it $(IDLEMONB) /bin/bash
enterfd:
$(CTN) exec -it $(IDFDB) /bin/bash
......@@ -67,31 +67,17 @@ $RES"
write_i18n()
{
# TODO: write function
:
# # hash that will contain the result of the "get_i18n" function
# my %get_i18n_result = get_i18n ($locale_dir);
#
# while ( my ($lang, $files) = each %get_i18n_result ) {
#
# # directory wich will contain the .mo file for each language
# my $lang_cache_dir = dir ("$locale_cache_dir/$lang/LC_MESSAGES");
#
# # if $lang_cache_dir doesn't already exists, creating it
# if ( !-d $lang_cache_dir ) {
# $lang_cache_dir->mkpath or die ("! Can't create $locale_cache_dir/$lang/LC_MESSAGES");
# }
#
# # glue .po files's names
# my $po_files = join(" ", @{$files});
# chomp $po_files;
#
# # merging .po files
# system ( "msgcat --use-first ".$po_files.">".$lang_cache_dir."/fusiondirectory.po" ) and die ("! Unable to merge .po files for $lang with msgcat, is it already installed?\n");
#
# # compiling .po files in .mo files
# system ( "msgfmt -o $lang_cache_dir/fusiondirectory.mo $lang_cache_dir/fusiondirectory.po && rm $lang_cache_dir/fusiondirectory.po" ) and die ("! Unable to compile .mo files with msgfmt, is it already installed?\n");
# }
ALL_PO_FILES=$( find ${FD_HOME_PATH} -name 'fusiondirectory.po' -type f )
LANG_LIST=$( printf "${ALL_PO_FILES}" | sed -e 's/^.*\/\([^\/]\+\)\/fusiondirectory\.po$/\1/' | sort -u )
for L in ${LANG_LIST} ; do
PO_FILES=$( printf "${ALL_PO_FILES}" | grep -F "${L}/fusiondirectory.po" | tr '\r\n' ' ')
mkdir -p "${FD_VAR_PATH}/locale/${L}/LC_MESSAGES"
msgcat --use-first ${PO_FILES} > ${FD_VAR_PATH}/locale/${L}/LC_MESSAGES/fusiondirectory.po
msgfmt -o ${FD_VAR_PATH}/locale/${L}/LC_MESSAGES/fusiondirectory.mo ${FD_VAR_PATH}/locale/${L}/LC_MESSAGES/fusiondirectory.po
rm -f ${FD_VAR_PATH}/locale/${L}/LC_MESSAGES/fusiondirectory.po
done
}
......@@ -116,6 +102,6 @@ copy_dir "${PLUGINS_PATH}/${PLUGIN}/contrib/doc" "${FD_HOME_PATH}/contrib/doc"
copy_dir "${PLUGINS_PATH}/${PLUGIN}/locale" "${FD_HOME_PATH}/locale/plugins/${PLUGIN}/locale"
write_classcache
#write_classcache
#write_i18n
......@@ -236,7 +236,14 @@
- name: Install personal plugin
shell: /install-plugin.sh "{{ item }}"
loop:
- audit
- dsa
- mail
- ssh
- personal
- posix
- ppolicy
- webservice
- name: Update cache and locales
command: /usr/local/bin/fusiondirectory-setup --set-fd_home=/usr/local/share/fusiondirectory --yes --update-cache --update-locales --write-vars
......
......@@ -25,6 +25,7 @@ cn: schema
include: file:///usr/local/openldap/etc/openldap/schema/core.ldif
include: file:///usr/local/openldap/etc/openldap/schema/cosine.ldif
include: file:///usr/local/openldap/etc/openldap/schema/inetorgperson.ldif
include: file:///usr/local/openldap/etc/openldap/schema/nis.ldif
include: file:///usr/local/openldap/etc/openldap/schema/ppolicy.ldif
include: file:///usr/local/openldap/etc/openldap/schema/dyngroup.ldif
......
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