Commit 9c080e78 authored by Your Name's avatar Your Name
Browse files

-

parents
###
\ No newline at end of file
version: '2'
networks:
# for use with a reverse proxy
backend:
driver: bridge
services:
kix:
#https://hub.docker.com/r/capeit/kix/
#docker-compose exec kix bash
image: capeit/kix:17.1
restart: always
hostname: kix-referenz-installation-i-1
expose:
#- 22
- 80
#- 443
environment:
- KIXDB_DATABASE=kix17
- KIXDB_HOST=kix_maria_db
- KIXDB_DBMS=mysql
- KIXDB_USER=root
- KIXDB_PASSWORD=root
depends_on:
- kix_maria_db
#command: ["./wait-for-it.sh", "kix_maria_db:3306", "--"; "sleep 15" ]
command: ["sleep 20" ]
ports:
## syntax to specify IP "141.13.240.24:80:80"
## Bsp für localhost wenn die Ports 80 und 443 frei sind
## - "220:22"
## - "80:80"
## - "443"
##Bsp für Server / fest IP
- "141.13.241.3:8080:8080"
#networks:
#- backend
#volumes:
#- ./volumes/var/www:/var/www
#- ./volumes/var/lib/mysql:/var/lib/mysql
#- ./volumes/opt:/opt
#- ./volumes/root/uniba.de/share:/root/uniba.de/share
#- ./volumes/.git:/.git
kix_maria_db:
#https://hub.docker.com/_/mariadb/
#docker-compose exec kix_maria_db bash
#kirst init CREATE DATABASE kix17;
container_name: kix_maria_db
image: mariadb
environment:
#- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_ROOT_PASSWORD=root
volumes:
# - "./mariadb:/var/lib/mysql:rw"
- ./volumes/var/lib/mysql:/var/lib/mysql:rw
ports:
- "3306:3306"
#kix sollte schauen, ob daten eienr älteren Version vorhanden sind und automatisch dann migrieren, so verhält sich z.B. bei gitlab
\ No newline at end of file
FROM ubuntu:16.04
RUN rm /etc/apt/sources.list
ADD sources.list /etc/apt/sources.list
RUN apt-get update
RUN apt-get upgrade -y
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
ubuntu-server \
bash-completion \
vim \
git \
sudo \
rsync \
cron \
byobu \
openssh-server \
curl \
mysql-workbench
RUN echo 'deb http://packages.kixdesk.com/repository/debian kix2017 stable' | sudo tee /etc/apt/sources.list.d/kix2017-stable.list > /dev/null
RUN curl http://packages.kixdesk.com/repository/debian/PublicKey > kixkey
RUN cat kixkey | apt-key add -
RUN apt-get update
RUN locale-gen de_DE.utf8 && locale -a
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
--allow-unauthenticated \
kix-mysql\
kix
#Mailversand Bug
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential
RUN DEBIAN_FRONTEND=noninteractive \
cpan -i Net::SMTP::SSL Net::Cmd IO:Socket::SSL
#< Mailversand Bug
####shib
ADD SWITCHaai-swdistrib.asc /SWITCHaai-swdistrib.asc
RUN gpg --with-fingerprint SWITCHaai-swdistrib.asc
RUN apt-key add SWITCHaai-swdistrib.asc
RUN echo 'deb http://pkg.switch.ch/switchaai/ubuntu xenial main' | sudo tee /etc/apt/sources.list.d/SWITCHaai-swdistrib.list > /dev/null
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
curl
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
--install-recommends shibboleth
######<shib
######> php (für shib-tools)
RUN DEBIAN_FRONTEND=noninteractive \
LC_ALL=de_DE.UTF-8 add-apt-repository -y ppa:ondrej/php
RUN apt-get update
RUN locale-gen de_DE.UTF-8
RUN export LANG=de_DE.UTF-8
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
php5.6 \
php5.6-cli \
php5.6-common \
php5.6-curl \
php5.6-gd \
php5.6-mcrypt \
php5.6-memcache \
php5.6-mysql \
php5.6-xmlrpc
######< php (für shib-tools)
RUN a2ensite default-ssl && a2enmod ssl && a2enmod rewrite && a2enmod headers
RUN make-ssl-cert generate-default-snakeoil --force-overwrite
# das brauchen wir später im normalen Dateisystem, wird aber beim mounten von Volumes verdeckt
RUN mkdir -p /root/uniba.de/initial/var/lib/mysql/
RUN rsync -a /var/lib/mysql/ /root/uniba.de/initial/var/lib/mysql/
RUN mkdir -p /root/uniba.de/initial/opt/
RUN rsync -a /opt/ /root/uniba.de/initial/opt/
#
ADD start.sh /start
RUN chmod +x /start
#
RUN mkdir -p /root/uniba.de/initial/remove-after-run
ADD setup.sh /root/uniba.de/initial/remove-after-run/setup.sh
#
RUN mkdir -p /root/.ssh/
ADD authorized_keys2 /root/.ssh/authorized_keys2
ADD .bash_history /root/.bash_history
CMD ["/start", "-D"]
#!/bin/bash
mkdir -p /root/uniba.de/share/overlay/
rsync -a -v /root/uniba.de/share/overlay-kix-basis/ /
rsync -a -v /root/uniba.de/share/overlay-certs/ /
#rsync -a -v /root/uniba.de/share/overlay/ /
#rsync -a -v /root/uniba.de/share/overlay-agent-auth-ldap/ /
#rsync -a -v /root/uniba.de/share/overlay-shib-minimal/ /
rsync -a -v /root/uniba.de/share/overlay-shib-head/ /
bash enable.sh
rm enable.sh
#rsync -a -v /root/uniba.de/share/overlay/ / && service apache2 restart
git config --global user.email "rz@uni-bamberg.de"; \
git config --global user.name "Docker INTERN"; \
git config --global push.default simple
######
service mysql restart
# gültig auf ungültig temporär
mysql -e "UPDATE kix17.mail_account SET valid_id=3 WHERE valid_id = '1' LIMIT 100;"
# test-1.ticketsystem.rz@uni-bamberg.de
mysql -e "UPDATE kix17.mail_account SET valid_id=1 WHERE comments LIKE 'test-1.ticketsystem.rz@uni-bamberg.de';"
#######
chown -R www-data /opt/kix17/
mkdir /var/log/kix/
chown -R www-data /var/log/kix/
#evtl für migration von otrs
mkdir /var/log/otrs/
chown -R www-data /var/log/otrs/
cd /opt/kix17/
sudo -u www-data bin/kix.Console.pl Maint::Cache::Delete
sudo -u www-data bin/kix.Console.pl Maint::Config::Rebuild
#a2enconf uniba.de
exit
###>shib
a2enmod shib2
###<shib
exit
#############
#mit dem folgenden kann man die Volumes initialisieren,
# löscht aber alle Inhalte, deshab das exit oben
service mysql stop
service apache2 stop
rsync -a --delete /root/uniba.de/initial/var/lib/mysql/ /var/lib/mysql/
ls -l /var/lib/mysql
service mysql restart
rsync -a --delete /root/uniba.de/initial/opt/ /opt/
rsync -a --delete /root/uniba.de/initial/opt/kix/ /opt/kix/
rsync -a --delete /root/uniba.de/initial/opt/kix17/ /opt/kix17/
service apache2 restart
#login auf /kix/index.pl mit
#root@localhost
#root
\ No newline at end of file
#
# deb cdrom:[Ubuntu-Server 14.04 LTS _Trusty Tahr_ - Release amd64 (20140416.2)]/ xenial main restricted
#deb cdrom:[Ubuntu-Server 14.04 LTS _Trusty Tahr_ - Release amd64 (20140416.2)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial main restricted
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates main restricted
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial universe
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial universe
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates universe
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial multiverse
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial multiverse
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates multiverse
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ubuntu.mirror.lrz.de/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://ubuntu.mirror.lrz.de/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner
## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.
## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
# deb http://extras.ubuntu.com/ubuntu xenial main
# deb-src http://extras.ubuntu.com/ubuntu xenial main
deb http://packages.kixdesk.com/repository/debian kix2017 stable
#!/bin/bash
sh /root/uniba.de/initial/remove-after-run/setup.sh
rm /root/uniba.de/initial/remove-after-run/setup.sh
mkdir /root/.ssh/
touch /root/.ssh/authorized_keys2
chmod 700 /root/.ssh/authorized_keys2
/sbin/init
service ssh restart
service shibd restart
service rsyslog restart
service mysql restart
service apache2 restart
cron
tail -f /start
Markdown is supported
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