update header

This commit is contained in:
Jerome Sagnole 2017-09-11 21:53:03 +02:00
parent e18fa4bbef
commit ac7614b8e4
9 changed files with 199 additions and 41 deletions

View file

@ -1,10 +1,20 @@
# Dockerfile - Build new package server # Dockerfile - Build environment to compile khanat server
# Build for server debian-8 (amd64)
# #
# Copyright : GNU/AGPLv3 # Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# Created : 1 AUG 2017
# Created by : AleaJactaEst
# to build : # to build :
# $ docker build . -t builder_debian_8_i686 --file dist/docker/builder/debian-8-i686/Dockerfile # $ docker build . -t builder_debian_8_i686 --file dist/docker/builder/debian-8-i686/Dockerfile

View file

@ -1,9 +1,21 @@
#!/bin/bash #!/bin/bash
# Script to build Khaganat # Script to build Khaganat binary (executed in docker)
# Copyright : GNU/AGPLv3 #
# Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# Created : 1 AUG 2017
# Created by : AleaJactaEst
declare DIRBUILD="/opt/code/build/" declare DIRBUILD="/opt/code/build/"
if [[ -n "$1" ]] if [[ -n "$1" ]]

View file

@ -1,11 +1,22 @@
#!/bin/bash #!/bin/bash
# #
# Script to build under docker # Script to build khaganat server
# #
# Copyright : GNU/AGPLv3 # Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# Created : 1 AUG 2017
# Created by : AleaJactaEst
declare -i REMOVE=0 declare -i REMOVE=0
declare -i IMAGE=0 declare -i IMAGE=0
@ -16,6 +27,7 @@ declare CMAKEOPTS=""
declare DOCKEROPTS="" declare DOCKEROPTS=""
declare DIRBUILD="" declare DIRBUILD=""
declare CLEANDOCKER=0 declare CLEANDOCKER=0
declare -i CLEANIMAGENONE=0
declare -i AUTODETEC=1 declare -i AUTODETEC=1
declare IMAGEDOCKER="builder_khanat_debian_jessie_i686" declare IMAGEDOCKER="builder_khanat_debian_jessie_i686"
@ -43,6 +55,7 @@ options:
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-a OPTS, --add-opts-cmake=OPTS : Adding options on cmake command (before build) -a OPTS, --add-opts-cmake=OPTS : Adding options on cmake command (before build)
-c, --clean-container : remove all container in state Exited -c, --clean-container : remove all container in state Exited
-w, --clean-images-none : Remove images docker (with name 'none')
-m OPTS, --add-opts-docker=OPTS : Adding options on docker command (when build) -m OPTS, --add-opts-docker=OPTS : Adding options on docker command (when build)
Example : Example :
@ -139,6 +152,10 @@ do
DOCKEROPTS="$DOCKEROPTS ${1#*=}" DOCKEROPTS="$DOCKEROPTS ${1#*=}"
shift shift
;; ;;
-w|--clean-images-none)
CLEANIMAGENONE=1
shift
;;
*) *)
msg_error "options '$1' not recoginze" msg_error "options '$1' not recoginze"
usage usage
@ -222,5 +239,17 @@ then
docker rm --force `docker ps -qf 'status=exited' -f "ancestor=${IMAGEDOCKER}"` || exit 2 docker rm --force `docker ps -qf 'status=exited' -f "ancestor=${IMAGEDOCKER}"` || exit 2
fi fi
if [[ $CLEANIMAGENONE -ne 0 ]]
then
msg_info "CLEAN IMAGE DOCKER 'NONE'"
listimages=( $(docker images | awk '{if ($1=="<none>")print $3}') )
msg_debug "IMAGES NONE : ${listimages[@]}"
if [[ -n "${listimages[@]}" ]]
then
docker rmi --force "${listimages[@]}" || exit 2
fi
fi
trap '' EXIT trap '' EXIT
msg_info "END" msg_info "END"

View file

@ -1,10 +1,20 @@
# Dockerfile - Build new package server # Dockerfile - Build environment to compile khanat server
# Build for server debian-8 (amd64)
# #
# Copyright : GNU/AGPLv3 # Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# Created : 1 AUG 2017
# Created by : AleaJactaEst
# to build : # to build :
# $ docker build . -t builder_khanat_jessie_x86_64 --file dist/docker/builder/debian-8-amd64/Dockerfile # $ docker build . -t builder_khanat_jessie_x86_64 --file dist/docker/builder/debian-8-amd64/Dockerfile

View file

@ -1,9 +1,21 @@
#!/bin/bash #!/bin/bash
# Script to build Khaganat # Script to build Khaganat binary (executed in docker)
# Copyright : GNU/AGPLv3 #
# Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# Created : 1 AUG 2017
# Created by : AleaJactaEst
declare DIRBUILD="/opt/code/build/" declare DIRBUILD="/opt/code/build/"
if [[ -n "$1" ]] if [[ -n "$1" ]]

View file

@ -1,11 +1,22 @@
#!/bin/bash #!/bin/bash
# #
# Script to build under docker # Script to build khaganat server
# #
# Copyright : GNU/AGPLv3 # Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# Created : 1 AUG 2017
# Created by : AleaJactaEst
declare -i REMOVE=0 declare -i REMOVE=0
declare -i IMAGE=0 declare -i IMAGE=0
@ -16,6 +27,7 @@ declare CMAKEOPTS=""
declare DOCKEROPTS="" declare DOCKEROPTS=""
declare DIRBUILD="" declare DIRBUILD=""
declare CLEANDOCKER=0 declare CLEANDOCKER=0
declare -i CLEANIMAGENONE=0
declare -i AUTODETEC=1 declare -i AUTODETEC=1
declare IMAGEDOCKER="builder_khanat_debian_jessie_x86_64" declare IMAGEDOCKER="builder_khanat_debian_jessie_x86_64"
@ -43,6 +55,7 @@ options:
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg. -j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-a OPTS, --add-opts-cmake=OPTS : Adding options on cmake command (before build) -a OPTS, --add-opts-cmake=OPTS : Adding options on cmake command (before build)
-c, --clean-container : remove all container in state Exited -c, --clean-container : remove all container in state Exited
-w, --clean-images-none : Remove images docker (with name 'none')
-m OPTS, --add-opts-docker=OPTS : Adding options on docker command (when build) -m OPTS, --add-opts-docker=OPTS : Adding options on docker command (when build)
--only-build-server : adding option to build only server --only-build-server : adding option to build only server
@ -145,6 +158,10 @@ do
CMAKEOPTS="$CMAKEOPTS -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_CLIENT=OFF -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_SOUND=OFF" CMAKEOPTS="$CMAKEOPTS -DWITH_NEL_TESTS=OFF -DWITH_RYZOM_CLIENT=OFF -DWITH_DRIVER_OPENGL=OFF -DWITH_DRIVER_OPENAL=OFF -DWITH_NEL_SAMPLES=OFF -DWITH_SOUND=OFF"
shift shift
;; ;;
-w|--clean-images-none)
CLEANIMAGENONE=1
shift
;;
*) *)
msg_error "options '$1' not recoginze" msg_error "options '$1' not recoginze"
usage usage
@ -228,5 +245,17 @@ then
docker rm --force `docker ps -qf 'status=exited' -f "ancestor=${IMAGEDOCKER}"` || exit 2 docker rm --force `docker ps -qf 'status=exited' -f "ancestor=${IMAGEDOCKER}"` || exit 2
fi fi
if [[ $CLEANIMAGENONE -ne 0 ]]
then
msg_info "CLEAN IMAGE DOCKER 'NONE'"
listimages=( $(docker images | awk '{if ($1=="<none>")print $3}') )
msg_debug "IMAGES NONE : ${listimages[@]}"
if [[ -n "${listimages[@]}" ]]
then
docker rmi --force "${listimages[@]}" || exit 2
fi
fi
trap '' EXIT trap '' EXIT
msg_info "END" msg_info "END"

View file

@ -1,10 +1,20 @@
# Dockerfile - Build new package server # Dockerfile - Build image to prepare khanat server
# Build for server debian-8 (amd64)
# #
# Copyright : GNU/AGPLv3 # Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# Created : 1 AUG 2017
# Createryzomwebd by : AleaJactaEst
FROM amd64/debian:8 FROM amd64/debian:8
MAINTAINER AleaJactaEst MAINTAINER AleaJactaEst

View file

@ -1,10 +1,20 @@
# Dockerfile - Build new package server # Dockerfile - Build for server debian
# Build for server debian-8 (amd64)
# #
# Copyright : GNU/AGPLv3 # Copyright (C) 2017 AleaJactaEst
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# #
# Created : 1 AUG 2017
# Createryzomwebd by : AleaJactaEst
FROM server_generic_debian_jessie_x86_64 FROM server_generic_debian_jessie_x86_64
MAINTAINER AleaJactaEst MAINTAINER AleaJactaEst
@ -15,6 +25,15 @@ COPY todelete.sh /opt/khanat_config.sh
COPY dist/docker/server/debian/common/init-khanat.sh /opt/ COPY dist/docker/server/debian/common/init-khanat.sh /opt/
COPY dist/docker/server/debian/common/autostart.sh /opt/ COPY dist/docker/server/debian/common/autostart.sh /opt/
COPY dist/docker/server/debian/common/launch_services.sh /opt/ COPY dist/docker/server/debian/common/launch_services.sh /opt/
COPY dist/docker/server/debian/common/configure_environment.sh /opt/
COPY dist/docker/server/debian/common/install_package.sh /opt/
COPY dist/docker/server/debian/common/configure_apache.sh /opt/
COPY dist/docker/server/debian/common/configure_database.sh /opt/
COPY dist/docker/server/debian/common/initialize_khanat_server.sh /opt/
COPY dist/docker/server/debian/common/initialize_patch_server.sh /opt/
COPY dist/docker/server/debian/common/prepare_start_server.sh /opt/
COPY ryzomcore.tar.gz /opt/ COPY ryzomcore.tar.gz /opt/
COPY ryzom-ressources.tar.gz /opt/ COPY ryzom-ressources.tar.gz /opt/
COPY khanat-ressources.tar.gz /opt/ COPY khanat-ressources.tar.gz /opt/
@ -22,5 +41,3 @@ COPY khanat-data-client.tar.gz /opt/
RUN /opt/init-khanat.sh RUN /opt/init-khanat.sh

View file

@ -2,10 +2,21 @@
# #
# Script to start khanat server # Script to start khanat server
# #
# Copyright : GNU/AGPLv3 # Copyright (C) 2017 AleaJactaEst
# #
# Created : 1 AUG 2017 # This program is free software: you can redistribute it and/or modify
# Created by : AleaJactaEst # it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
declare -i IMAGE=1 declare -i IMAGE=1
declare -i BASICSERVER=0 declare -i BASICSERVER=0
@ -22,6 +33,7 @@ declare -i CONNECTSSHKHANAT=0
declare -i KHANAT_CLIENT_VERSION=1 declare -i KHANAT_CLIENT_VERSION=1
declare -i SHOWIPKHANATSERVER=0 declare -i SHOWIPKHANATSERVER=0
declare -i METHODSTARTSERVER=1 declare -i METHODSTARTSERVER=1
declare -i CLEANIMAGENONE=0
declare IMAGEGENERICSERVER="server_generic_debian_jessie_x86_64" declare IMAGEGENERICSERVER="server_generic_debian_jessie_x86_64"
declare IMAGEKHANATSERVER="server_khanat_debian_jessie_x86_64" declare IMAGEKHANATSERVER="server_khanat_debian_jessie_x86_64"
@ -51,6 +63,7 @@ options:
-n, --no-launch-khanat : Doesn't launch khanat server -n, --no-launch-khanat : Doesn't launch khanat server
-s, --stop-server : Stop server khanat -s, --stop-server : Stop server khanat
-c, --clean-container-khanat : Remove old server khanat (stopped) -c, --clean-container-khanat : Remove old server khanat (stopped)
-w, --clean-images-none : Remove images docker (with name 'none')
-i, --show-ip-khanat-server : show ip address for khanat server (launch under docker) -i, --show-ip-khanat-server : show ip address for khanat server (launch under docker)
--start-khanat-with-screen : [default] start khanat with screen --start-khanat-with-screen : [default] start khanat with screen
--start-khanat-with-full-log : start server khanat and show full log --start-khanat-with-full-log : start server khanat and show full log
@ -163,6 +176,10 @@ do
KHANAT_CLIENT_VERSION="${1#*=}" KHANAT_CLIENT_VERSION="${1#*=}"
shift shift
;; ;;
-w|--clean-images-none)
CLEANIMAGENONE=1
shift
;;
*) *)
msg_error "options '$1' not recoginze" msg_error "options '$1' not recoginze"
usage usage
@ -345,6 +362,18 @@ then
fi fi
fi fi
if [[ $CLEANIMAGENONE -ne 0 ]]
then
msg_info "CLEAN IMAGE DOCKER 'NONE'"
listimages=( $(docker images | awk '{if ($1=="<none>")print $3}') )
msg_debug "IMAGES NONE : ${listimages[@]}"
if [[ -n "${listimages[@]}" ]]
then
docker rmi --force "${listimages[@]}" || exit 2
fi
fi
if [[ $BASICSERVER -ne 0 ]] if [[ $BASICSERVER -ne 0 ]]
then then
msg_info "GENERATE DOCKER IMAGE BASIC SERVER" msg_info "GENERATE DOCKER IMAGE BASIC SERVER"