Remove the old and incorrect 'opensim-mysql' and 'opensim-region-old'

Docker build directories.
This commit is contained in:
Robert Adams
2019-10-04 08:20:45 -07:00
parent a5ff7c9c43
commit 12124f1271
12 changed files with 0 additions and 243 deletions
-8
View File
@@ -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"
-38
View File
@@ -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
-72
View File
@@ -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?
View File
-27
View File
@@ -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
-18
View File
@@ -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
-32
View File
@@ -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
-3
View File
@@ -1,3 +0,0 @@
*/2 * * * * /home/opensim/checkOpenSim.sh
*/30 * * * * /home/opensim/checkOldLogFiles.sh
-10
View File
@@ -1,10 +0,0 @@
#! /bin/bash
mysql -u root --password=${MYSQL_ROOT_PASSWORD} <<<EOFFFF
CREATE DATABASE opensim;
USE opensim;
CREATE USER 'opensim'@'%' IDENTIFIED BY 'opensimit';
GRANT ALL ON opensim.* to 'opensim'@'%';
quit
EOFFFF
-10
View File
@@ -1,10 +0,0 @@
#! /bin/bash
# Run the first time to setup the environment for OpenSimulator
BASE=/home/opensim
# Run OpenSimulator interactively for setting up estate information
# Setup the crontab entry for this account so OpenSim stays running
# Delete the no run flag
# rm -f ${BASE}/NOOPENSIM
-25
View File
@@ -1,25 +0,0 @@
#! /bin/bash
# Runs the simulators with screen
cd /home/opensim
cd opensim/bin
rm -f screenlog.0
rm -f *.log
export MONO_THREADS_PER_CPU=100
# parameters suggested by Ubit (20170526)
ulimit -s 262144
export MONO_GC_PARAMS="soft-heap-limit=1280m,minor=split,promotion-age=14"
export MONO_ENV_OPTIONS="--desktop"
screen -L -S OpenSimScreen -p - -d -m mono OpenSim.exe -console=basic
# screen -L -S OpenSimScreen -p - -d -m mono --profile=log:sample=cycles/100 OpenSim.exe -console=basic
# screen -L -S OpenSimScreen -p - -d -m mono --profile=log:sample=instr/100 OpenSim.exe -console=basic
# screen -L -S OpenSimScreen -p - -d -m mono --profile=log:noalloc,calls,maxframes=4 OpenSim.exe -console=basic
# To analyze:
# mprof-report --traces output.mlpd > /tmp/frog2
# mprof-report --reports=sample output.mlpd
# mprof-report --reports=sample --verbose output.mlpd
# mprof-report --reports=call --verbose output.mlpd
View File