From 12124f12716ad446074facfcb8815823bc856fb7 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Fri, 4 Oct 2019 08:20:45 -0700 Subject: [PATCH] Remove the old and incorrect 'opensim-mysql' and 'opensim-region-old' Docker build directories. --- opensim-mysql/Dockerfile | 8 --- opensim-mysql/docker-compose.yml | 38 -------------- opensim-region-old/Dockerfile | 72 -------------------------- opensim-region-old/NOOPENSIM | 0 opensim-region-old/captureCrash.sh | 27 ---------- opensim-region-old/checkOldLogFiles.sh | 18 ------- opensim-region-old/checkOpenSim.sh | 32 ------------ opensim-region-old/crontab | 3 -- opensim-region-old/dbinit.sh | 10 ---- opensim-region-old/firstTimeSetup.sh | 10 ---- opensim-region-old/run.opensim.sh | 25 --------- opensim-region-old/stopOpenSim.sh | 0 12 files changed, 243 deletions(-) delete mode 100644 opensim-mysql/Dockerfile delete mode 100644 opensim-mysql/docker-compose.yml delete mode 100644 opensim-region-old/Dockerfile delete mode 100644 opensim-region-old/NOOPENSIM delete mode 100755 opensim-region-old/captureCrash.sh delete mode 100755 opensim-region-old/checkOldLogFiles.sh delete mode 100755 opensim-region-old/checkOpenSim.sh delete mode 100755 opensim-region-old/crontab delete mode 100644 opensim-region-old/dbinit.sh delete mode 100644 opensim-region-old/firstTimeSetup.sh delete mode 100755 opensim-region-old/run.opensim.sh delete mode 100644 opensim-region-old/stopOpenSim.sh diff --git a/opensim-mysql/Dockerfile b/opensim-mysql/Dockerfile deleted file mode 100644 index db1cc52..0000000 --- a/opensim-mysql/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -# A version of MYSQL setup for OpenSimulator. -# In particular, the initial database 'opensim' is created. - -FROM mysql:latest - -LABEL Version="0.1" -LABEL Description="MYSQL setup for OpenSimulator" - diff --git a/opensim-mysql/docker-compose.yml b/opensim-mysql/docker-compose.yml deleted file mode 100644 index 249ea3a..0000000 --- a/opensim-mysql/docker-compose.yml +++ /dev/null @@ -1,38 +0,0 @@ -# NOTE: NOT WORKING YET. DON'T USE!! -# TODO: update to version 3. Add build instructions. Add secrets. - -version: '2' - -services: - mysql: - image: mysql:latest - container_name: opensim-herbal3d-mysql - environment: - MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}" - volumes: - - /var/lib/mysql - restart: always - networks: - - opensim-herbal3d-mysql-net - - opensim: - depends_on: - - mysql - image: opensim-herbal3d - container_name: opensim-herbal3d - environment: - MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}" - OPENSIM_DB_PASSWORD: "${OPENSIM_DB_PASSWORD}" - ports: - - 9000/tcp - - 9000/udp - links: - - mysql:mysql - restart: always - networks: - - opensim-herbal3d-mysql-net - - networks: - mysql-net: - name: opensim-herbal3d-mysql-net - driver: bridge diff --git a/opensim-region-old/Dockerfile b/opensim-region-old/Dockerfile deleted file mode 100644 index 8d04482..0000000 --- a/opensim-region-old/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -# Dockerfile for building a region server for OpenSimulator. -# -# This - -FROM ubuntu - -LABEL Version="0.9" -LABEL Description="Docker container for OpenSimulator region" - -# install tools and Mono environment -# Kludge for TZ taken from https://github.com/QuantumObject/docker-opensimulator/blob/master/Dockerfile -ENV TZ America/Los_Angeles - -RUN echo $TZ > /etc/timezone \ - && apt-get update \ - && apt-get install -y \ - tzdata \ - git \ - mono-complete \ - mono-reference-assemblies-4.0 \ - && rm /etc/localtime \ - && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ - && dpkg-reconfigure -f noninteractive tzdata \ - && apt-get clean \ - && rm -rf /tmp/* var/tmp/* \ - && rm -rf /var/lib/apt/lists/* - -# The simulator is run under the user name 'opensim' -# (from https://stackoverflow.com/questions/36490627/how-to-create-and-run-docker-container-with-new-user-other-than-root) -# RUN export ACCT=opensim UID=1000 GID=1000 \ -# && mkdir -p /home/$ACCT \ -# && echo "$ACCT:x:${UID}:${GID}:Abc,,,:/home/$ACCT:/bin/bash" >> /etc/passwd \ -# && echo "$ACCT:x:${GID}:" >> /etc/group \ -# && echo "$ACCT ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$ACCT \ -# && chmod 0440 /etc/sudoers.d/$ACCT \ -# && chown ${UID}:${GID} -R /home/$ACCT - -# (From https://stackoverflow.com/questions/27701930/add-user-to-docker-container) -RUN adduser --disabled-password --gecos 'OpenSimulator user' opensim \ - && echo "opensim:${OPENSIM_PASSWORD}" | chpasswd - -WORKDIR /home/opensim -USER opensim:opensim - -COPY NOOPENSIM /home/opensim -COPY checkOpenSim.sh /home/opensim -COPY captureCrash.sh /home/opensim -COPY checkOldLogFiles.sh /home/opensim -COPY run.opensim.sh /home/opensim -COPY firstTimeSetup.sh /home/opensim -COPY crontab /home/opensim - -# Fetch and build the latest version of the sources -RUN git clone git://opensimulator.org/git/opensim /home/opensim/opensim \ - && ./runprebuild.sh \ - && xbuild - -CMD /home/opensim/checkOpenSim.sh - -# The simulator defaults to port 9000 -# All ports are usually over-ridden by the 'docker run' command parameters. -EXPOSE 9000/tcp -EXPOSE 9000/udp - -# The configuration of the region can be supplied via the 'config' subdirectory -VOLUME /home/opensim/opensim/bin/config - -# HOW TO FIX? -# The OpenSim.ini file doesn't exist (it's OpenSim.ini.example). Is that a problem? -# When starting new regions, it will as for the estate info from the console. -# What about the configuration of MySQL? -# What about the configuration of asset cache? diff --git a/opensim-region-old/NOOPENSIM b/opensim-region-old/NOOPENSIM deleted file mode 100644 index e69de29..0000000 diff --git a/opensim-region-old/captureCrash.sh b/opensim-region-old/captureCrash.sh deleted file mode 100755 index 7730420..0000000 --- a/opensim-region-old/captureCrash.sh +++ /dev/null @@ -1,27 +0,0 @@ -#! /bin/bash -# Copy physics logs from usual physics log directory into -# a subdirectory of the log dir so they won't get deleted. -# Also saves the OpenSimulator log and screen files in subdir. - -DATETAG=$1 - -BASE=/home/opensim - -if [[ -z "$DATETAG" ]] ; then - DATETAG=$(date +%Y%m%d.%H%M) -fi - -RUNDIR=$BASE/opensim/bin -LOGDIR=$BASE/logs -SAVEDIR=$LOGDIR/$DATETAG - -echo "Capturing crash from $RUNDIR into $SAVEDIR" - -mkdir -p $SAVEDIR - -cd $LOGDIR -mv phys*.log $SAVEDIR -mv $RUNDIR/screenlog.0 $SAVEDIR -mv $RUNDIR/OpenSim.log $SAVEDIR - - diff --git a/opensim-region-old/checkOldLogFiles.sh b/opensim-region-old/checkOldLogFiles.sh deleted file mode 100755 index 22986e9..0000000 --- a/opensim-region-old/checkOldLogFiles.sh +++ /dev/null @@ -1,18 +0,0 @@ -#! /bin/bash -# Clean out old log files in the log directory. -# Does not delete saved log directories. - -BASE=/home/opensim - -TIMEAGO=${BASE}/.lastLogCleanup - -cd "${BASE}/logs" - -rm -f "$TIMEAGO" -touch --date="-1 hours" "$TIMEAGO" - -for file in $(ls phys*.log scene-*.log ) ; do - if [[ $TIMEAGO -nt "$file" ]] ; then - rm -f "$file" - fi -done diff --git a/opensim-region-old/checkOpenSim.sh b/opensim-region-old/checkOpenSim.sh deleted file mode 100755 index 4f4eb44..0000000 --- a/opensim-region-old/checkOpenSim.sh +++ /dev/null @@ -1,32 +0,0 @@ -#! /bin/bash -# Check to see if OpenSim is running and restart if it is not - -BASE=/home/opensim - -CRASHLOG=${BASE}/crashlog.log -HDR="$(date +%Y%m%d%H%M):" - -LASTCRASH=${BASE}/.lastCrash -TIMEAGO=${BASE}/.lastTimeAgo - -cd - -if [[ -e "${BASE}/NOOPENSIM" ]] ; then - exit 5 -fi - -flag=$(ps -efa | grep SCREEN | grep OpenSimScreen) - -if [[ -z "$flag" ]] ; then - echo "$HDR Found crashed OpenSim regions" - rm -f $TIMEAGO - touch --date="-1 hours" $TIMEAGO - if [[ ! -e $LASTCRASH || $TIMEAGO -nt $LASTCRASH ]] ; then - echo "$HDR Capturing OpenSim crash" - ${BASE}/captureCrash.sh - rm -f $LASTCRASH - touch $LASTCRASH - fi - echo "$HDR Restarting OpenSim regions" - ${BASE}/run.opensim.sh -fi >> $CRASHLOG diff --git a/opensim-region-old/crontab b/opensim-region-old/crontab deleted file mode 100755 index d5de4fc..0000000 --- a/opensim-region-old/crontab +++ /dev/null @@ -1,3 +0,0 @@ -*/2 * * * * /home/opensim/checkOpenSim.sh -*/30 * * * * /home/opensim/checkOldLogFiles.sh - diff --git a/opensim-region-old/dbinit.sh b/opensim-region-old/dbinit.sh deleted file mode 100644 index 784579c..0000000 --- a/opensim-region-old/dbinit.sh +++ /dev/null @@ -1,10 +0,0 @@ -#! /bin/bash - -mysql -u root --password=${MYSQL_ROOT_PASSWORD} << /tmp/frog2 -# mprof-report --reports=sample output.mlpd -# mprof-report --reports=sample --verbose output.mlpd -# mprof-report --reports=call --verbose output.mlpd - diff --git a/opensim-region-old/stopOpenSim.sh b/opensim-region-old/stopOpenSim.sh deleted file mode 100644 index e69de29..0000000