Skip to content
Snippets Groups Projects
Commit 8aca57b0 authored by David Schmitz's avatar David Schmitz
Browse files

providing updated Dockerfiles.fod.* in maindir; old CENTOS Dockerfile is...

providing updated Dockerfiles.fod.* in maindir; old CENTOS Dockerfile is available as Dockerfiles.fod.centos.old
parent 24d40046
No related branches found
No related tags found
No related merge requests found
FROM centos:7
ENV LC_ALL en_US.utf8
RUN yum -y install procps
RUN mkdir -p /var/log/fod /srv
COPY . /srv/flowspy
#COPY supervisord-centos.conf /srv/flowspy/supervisord.conf
RUN rm -rf /srv/flowspy/venv/
RUN (cd /srv/flowspy; ./install-centos.sh;)
# echo "To set environment to English, run: export LC_ALL=en_US"
# echo "To activate virualenv: source /srv/venv/bin/activate"
# echo "To create a user run: cd /srv/flowspy; ./manage.py createsuperuser"
# echo "To start flowspy server: cd /srv/flowspy; ./manage.py runserver 0.0.0.0:8000"
# echo "To start celeryd: cd /srv/flowspy; ./manage.py celeryd"
EXPOSE 8000
CMD [ "/srv/flowspy/runfod.sh" ]
Dockerfile.fod.debian
\ No newline at end of file
# doc: to build+run: docker build -f Dockerfile.fod.centos -t fod.centos && docker run -ti fod.centos
#############################################################################
#############################################################################
FROM centos:7
#############################################################################
ENV LC_ALL en_US.utf8
RUN yum -y install procps # somehow needed for centos repo installation in ./install-centos.sh
#############################################################################
# uncomment, for running under systemd
#RUN apt-get update -y -y && centos_FRONTEND="noninteractive" apt-get install -y -y systemd-sysv systemd
#############################################################################
# typically useful tools for investigation
#RUN apt-get update -y -y && centos_FRONTEND="noninteractive" apt-get install -y -y git less man make gcc strace ltrace lsof file vim tshark tcpdump curl wget net-tools sudo psutils procps iptables iputils-ping iputils-tracepath hping3 iproute2
#############################################################################
#############################################################################
# fod installation
WORKDIR /srv/flowspy
###############################
# fod installation step1
COPY . /srv/flowspy
RUN rm -rf /srv/flowspy/venv
COPY install-*.sh requirement*.txt /srv/flowspy/
# only install system+python deps (for quicker rebuilding by exploiting the docker cache for this step1):
#RUN ./install-centos.sh --basesw --here --systemd --systemd_only_install
RUN bash ./install-centos.sh --basesw --here --supervisord
###############################
# fod installation step2
COPY . /srv/flowspy
#RUN rm -rf /srv/flowspy/venv
#RUN bash ./install-centos.sh --fodproper --here --supervisord --setup_admin_user --setup_admin_user5 admin adminpwd admin@localhost.local testpeer 0.0.0.0/0 --exabgp 10.3.10.3 10.3.10.3 1001 10.3.10.10 10.3.10.10 2001
#RUN bash ./install-centos.sh --both --here --supervisord --setup_admin_user --setup_admin_user5 admin adminpwd admin@localhost.local testpeer 0.0.0.0/0 --exabgp 172.17.0.2 172.17.0.2 1001 172.17.0.3 172.17.0.3 3001
#RUN bash ./install-centos.sh --both --here --systemd --systemd_only_install --setup_admin_user --setup_admin_user5 admin adminpwd admin@localhost.local testpeer 0.0.0.0/0 # --exabgp 172.17.0.2 172.17.0.2 1001 172.17.0.3 172.17.0.3 3001
RUN ./install-centos.sh --fodproper --here --supervisord --setup_admin_user --setup_admin_user5 admin adminpwd admin@localhost.local testpeer 0.0.0.0/0 # --exabgp 172.17.0.2 172.17.0.2 1001 172.17.0.3 172.17.0.3 3001
###############################
# potential standalone re-setup of exabgp later (e.g., to exploit docker build cache for the actual installation step(s) above)
#RUN cd /opt/FOD/ && ./exabgp/run-exabgp-generic --init-conf 10.3.10.3 10.3.10.3 1001 10.3.10.10 10.3.10.12 3001 -- --systemd
#############################################################################
#############################################################################
# running fod
EXPOSE 8000
# if running under systemd
#CMD [ "/sbin/init" ]
CMD [ "/srv/flowspy/runfod.sh" ]
#############################################################################
#############################################################################
FROM centos:7
ENV LC_ALL en_US.utf8
RUN yum -y install procps
RUN mkdir -p /var/log/fod /srv
COPY . /srv/flowspy
#COPY supervisord-centos.conf /srv/flowspy/supervisord.conf
RUN rm -rf /srv/flowspy/venv/
RUN (cd /srv/flowspy; ./install-centos.sh;)
# echo "To set environment to English, run: export LC_ALL=en_US"
# echo "To activate virualenv: source /srv/venv/bin/activate"
# echo "To create a user run: cd /srv/flowspy; ./manage.py createsuperuser"
# echo "To start flowspy server: cd /srv/flowspy; ./manage.py runserver 0.0.0.0:8000"
# echo "To start celeryd: cd /srv/flowspy; ./manage.py celeryd"
EXPOSE 8000
CMD [ "/srv/flowspy/runfod.sh" ]
# doc: to build+run: docker build -f Dockerfile.fod.debian -t fod.debian && docker run -ti fod.debian
#############################################################################
#############################################################################
FROM debian:latest
RUN apt-get -qqy update
#############################################################################
RUN echo -e 'LANG="en_US.UTF-8"\nLANGUAGE="en_US"\n' > /etc/default/locale && echo "en_US.utf8 UTF-8" >> /etc/locale.gen && apt-get -qqy install locales
ENV LC_ALL en_US.utf8
#############################################################################
# uncomment, for running under systemd
#RUN apt-get update -y -y && DEBIAN_FRONTEND="noninteractive" apt-get install -y -y systemd-sysv systemd
#############################################################################
# typically useful tools for investigation
#RUN apt-get update -y -y && DEBIAN_FRONTEND="noninteractive" apt-get install -y -y git less man make gcc strace ltrace lsof file vim tshark tcpdump curl wget net-tools sudo psutils procps iptables iputils-ping iputils-tracepath hping3 iproute2
#############################################################################
#############################################################################
# fod installation
WORKDIR /srv/flowspy
###############################
# fod installation step1
COPY install-*.sh requirement*.txt /srv/flowspy/
# only install system+python deps (for quicker rebuilding by exploiting the docker cache for this step1):
#RUN ./install-debian.sh --basesw --here --systemd --systemd_only_install
RUN ./install-debian.sh --basesw --here --supervisord
###############################
# fod installation step2
COPY . /srv/flowspy
RUN rm -rf /srv/flowspy/venv
# to be sure, try again to install newest deps, i.e., use --both instead of just --fodproper:
#RUN ./install-debian.sh --fodproper --here --supervisord --setup_admin_user --setup_admin_user5 admin adminpwd admin@localhost.local testpeer 0.0.0.0/0 --exabgp 10.3.10.3 10.3.10.3 1001 10.3.10.10 10.3.10.10 2001
#RUN ./install-debian.sh --both --here --supervisord --setup_admin_user --setup_admin_user5 admin adminpwd admin@localhost.local testpeer 0.0.0.0/0 --exabgp 172.17.0.2 172.17.0.2 1001 172.17.0.3 172.17.0.3 3001
#RUN ./install-debian.sh --both --here --systemd --systemd_only_install --setup_admin_user --setup_admin_user5 admin adminpwd admin@localhost.local testpeer 0.0.0.0/0 # --exabgp 172.17.0.2 172.17.0.2 1001 172.17.0.3 172.17.0.3 3001
RUN ./install-debian.sh --both --here --supervisord --setup_admin_user --setup_admin_user5 admin adminpwd admin@localhost.local testpeer 0.0.0.0/0 # --exabgp 172.17.0.2 172.17.0.2 1001 172.17.0.3 172.17.0.3 3001
###############################
# potential standalone re-setup of exabgp later (e.g., to exploit docker build cache for the actual installation step(s) above)
#RUN cd /opt/FOD/ && ./exabgp/run-exabgp-generic --init-conf 10.3.10.3 10.3.10.3 1001 10.3.10.10 10.3.10.12 3001 -- --systemd
#############################################################################
#############################################################################
# running fod
EXPOSE 8000
# if running under systemd
#CMD [ "/sbin/init" ]
CMD [ "/srv/flowspy/runfod.sh" ]
#############################################################################
#############################################################################
......@@ -17,7 +17,7 @@ if cat /etc/centos-release | grep -q "release 7."; then
yum install -y make
#cd ~ && curl https://www.sqlite.org/2020/sqlite-autoconf-3320100.tar.gz > sqlite-autoconf-3320100.tar.gz && tar xvfz sqlite-autoconf-3320100.tar.gz && cd sqlite-autoconf-3320100 && ./configure && make && make install
cd ~ && curl https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz > sqlite-autoconf.tar.gz && tar xvfz sqlite-autoconftar.gz && cd sqlite-autoconf-3410200 && ./configure && make && make install
cd ~ && curl https://www.sqlite.org/2023/sqlite-autoconf-3410200.tar.gz > sqlite-autoconf.tar.gz && tar xvfz sqlite-autoconf.tar.gz && cd sqlite-autoconf-3410200 && ./configure && make && make install
##
......
......@@ -138,7 +138,6 @@ while [ $# -gt 0 ]; do
elif [ $# -ge 1 -a "$1" = "--no_systemd" ]; then
shift 1
install_systemd_services=0
else
elif [ $# -ge 1 -a "$1" = "--setup_admin_user" ]; then
shift 1
setup_adminuser=1
......@@ -305,6 +304,8 @@ if [ "$install_fodproper" = 0 ]; then
set -e
echo "Setup partial python environment for FoD"
(ls -la "$venv_dir" 1>&2 || true)
if [ -x pyvenv ]; then
#pyvenv /srv/venv
pyvenv "$venv_dir"
......
......@@ -6,7 +6,22 @@ fi
#
if [ "$FOD_RUNMODE" = "via_supervisord" ]; then
if [ "$FOD_RUNMODE" = "via_systemd" ]; then
echo "$0: using runmode via_systemd, nothing todo" 1>&2
SYSTEMD_COLORS=1 systemctl status "fod-gunicorn" | cat
echo
SYSTEMD_COLORS=1 systemctl status "fod-celeryd" | cat
echo
SYSTEMD_COLORS=1 systemctl status "redis" | cat
echo
SYSTEMD_COLORS=1 systemctl status "exabgpForFod" | cat
echo
elif [ "$FOD_RUNMODE" = "via_supervisord" ]; then
echo "$0: using runmode via_supervisord" 1>&2
exec ./runfod-supervisord.sh "$@"
else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment