From a5d8db63d39d2412f3bebf3c7fb7f4847441bf61 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Tue, 1 Feb 2022 21:33:38 +0000 Subject: [PATCH] Complete conversion to Image/config organization. Have working standalone and standalone-sql configurations for standard opensim image. --- README.md | 36 ++- image-opensim/Dockerfile-opensim | 15 +- image-opensim/build-opensim.sh | 12 +- image-opensim/config/os-secrets | 32 -- image-opensim/config/scripts/initializeDb.sh | 29 +- .../config/scripts/setEnvironment.sh | 14 +- .../config/scripts/updateConfigFiles.sh | 10 +- image-opensim/config/setup.sh | 10 +- .../config/standalone-sql/Includes.ini | 19 +- .../config-include/Standalone.ini | 6 +- .../config-include/StandaloneCommon.ini | 104 +++---- .../config-include/StandaloneHypergrid.ini | 7 +- .../config-include/osslEnable.ini | 275 +++--------------- .../config/standalone-sql/docker-compose.yml | 9 +- image-opensim/config/standalone-sql/misc.ini | 24 +- .../config/standalone-sql/os-secrets | 27 +- .../config/standalone/docker-compose.yml | 2 +- image-opensim/config/standalone/misc.ini | 3 +- image-opensim/config/standalone/os-secrets | 6 +- image-opensim/run-opensim.sh | 4 +- image-opensim/vimrc | 8 - run-scripts/bootOpenSim.sh | 4 +- 22 files changed, 232 insertions(+), 424 deletions(-) delete mode 100644 image-opensim/config/os-secrets delete mode 100755 image-opensim/vimrc diff --git a/README.md b/README.md index 461819e..bd21880 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,22 @@ There was a presentation on this project at the that is available at [OSCC19 Dockerizing OpenSimulator](https://www.youtube.com/watch?v=-EnTepHqLA4) . -There are two possible images: `opensim-standalone` which is straight [OpenSimulator] -'master' branch, and `opensim-herbal3d` which is [OpenSimulator] built with -the [Herbal3d] addon modules. These base images can have different runtime -configurations which includes running with a seperate [Docker] container for -the database (uses [MariaDB]) and/or different [OpenSimulator] configuration -files. +This is organized into building *images* and *config*s for those images. +The model is for one to build a Docker image with one of the [OpenSimulator] +images in it and, at runtime, choose one of the embedded configurations to +run it with. The [OpenSimulator] "image" is a built version of the source +code and the "config" is the collection of INI files that are used to run it. + +Two images are currently present: `image-opensim` which is a built of the +straight [OpenSimulator] 'master' branch, +and `image-opensim-herbal3d` which is [OpenSimulator] built with +the [Herbal3d] addon modules. +(Since I'm the Herbal3d main developer, this is how I test it.) + +The Docker images are run using `docker-compose` to set up ports +and environment. Additionally, if a database server is needed, +that is also started and linked to the [OpenSimulator] instance. +[MariaDB] is used for the external SQL server. As an example, to create a standalone version that creates two containers (simulator and database): @@ -26,7 +36,7 @@ cd git clone https://github.com/Misterblue/opensim-docker.git # Use the standalone setup for this example -cd opensim-docker/opensim-standalone +cd opensim-docker/image-opensim # Select the runtime configuration to use export CONFIG_NAME=standalone-mysql @@ -45,14 +55,14 @@ rm tmpfile # Build OpenSimulator image cd -cd opensim-docker/opensim-standalone -./build-standalone.sh +cd opensim-docker/image-opensim +./build-opensim.sh # Run the composed container set CONFIG_NAME=standalone-mysql CONFIGKEY=secretPassword EXTERNAL_HOSTNAME=whateverTheHostnameIs ./run-standalone.sh ``` -As of October 2019, these [Docker] images have not been built and uploaded +As of January 2022, these [Docker] images have not been built and uploaded anywhere as you will probably want to be using the latest [OpenSimulator] sources and thus require a fresh build. @@ -71,15 +81,15 @@ The simulator runs as the created user account `opensim` for a little security. The `README` files in the sub-directories contain instructions on setup of these configuration files and building the images. There are scripts -for building the images (e.g., `build-standalone.sh`) and then running -the images with `docker-compose` (e.g., `run-standalone.sh`). +for building the images (e.g., `build-opensim.sh`) and then running +the images with `docker-compose` (e.g., `run-opensim.sh`). ## OpenSimulator Configuration The biggest problem with Docker'izing [OpenSimulator] is the configuration file setup -- [OpenSimulator] has manual setup and configuration files scattered around. Add to that the radically different runtime setups possible -(stand-alone with or without databases and grid hosting or grid connected) +(standalone with or without databases and grid hosting or grid connected) and a generalized, containerable configuration becomes difficult. The solution used here is to mostly null out the configuration that comes diff --git a/image-opensim/Dockerfile-opensim b/image-opensim/Dockerfile-opensim index 1e47b67..0323ede 100644 --- a/image-opensim/Dockerfile-opensim +++ b/image-opensim/Dockerfile-opensim @@ -38,8 +38,9 @@ RUN adduser --disabled-password --gecos 'OpenSimulator user' opensim USER opensim:opensim # Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc -COPY --chown=opensim:opensim run-scripts/* /home/opensim/ -COPY --chown=opensim:opensim vimrc /home/opensim/.vimrc +COPY --chown=opensim:opensim temp-run-scripts/*.sh /home/opensim/ +COPY --chown=opensim:opensim temp-run-scripts/crontab /home/opensim/ +COPY --chown=opensim:opensim temp-run-scripts/.vimrc /home/opensim/ # Version information that goes in the image RUN mkdir -p $VERSIONDIR \ @@ -52,18 +53,20 @@ RUN mkdir -p $VERSIONDIR \ && echo $OS_DOCKER_GIT_COMMIT_SHORT > "OS_DOCKER_GIT_COMMIT_SHORT" \ && echo ${OS_DOCKER_VERSION}-${BUILD_DAY}-${OS_DOCKER_GIT_COMMIT_SHORT} > "OS_DOCKER_IMAGE_VERSION" -# Fetch and build the latest version of the OpenSimulator sources. +# Fetch the latest version of the OpenSimulator sources. RUN cd /home/opensim \ && git clone --depth=1 $OS_REPO opensim \ && cd $OPENSIMDIR \ && git checkout $OS_BRANCH +# Extract version information from the fetched sources RUN cd $OPENSIMDIR \ && git rev-parse HEAD > $VERSIONDIR/OS_GIT_COMMIT \ && git rev-parse --short HEAD > $VERSIONDIR/OS_GIT_COMMIT_SHORT \ && grep "const string VersionNumber" ./OpenSim/Framework/VersionInfo.cs | \ sed -e "s/^.*VersionNumber = \"\(.*\)\".*$/\1/" > $VERSIONDIR/OS_VERSION +# Build OpenSimulator RUN cd $OPENSIMDIR \ && chmod +x runprebuild48.sh \ && ./runprebuild48.sh \ @@ -71,8 +74,10 @@ RUN cd $OPENSIMDIR \ # OpenSim.ini and other INI files include from "config-include/*" # so copy an empty versions to nullfy the default configuration. -COPY --chown=opensim:opensim config-include/ $OPENSIMDIR/bin/config-include/ -# Copy over any extra configuration files we're including +RUN cd $OPENSIMDIR/bin \ + && /home/opensim/nullOutConfigInclude.sh + +# Copy the configuration file sets for this image RUN mkdir -p $OPENSIMDIR/bin/config COPY --chown=opensim:opensim config/ $OPENSIMDIR/bin/config/ # Use the default, included configuration parameters diff --git a/image-opensim/build-opensim.sh b/image-opensim/build-opensim.sh index c800395..10df068 100755 --- a/image-opensim/build-opensim.sh +++ b/image-opensim/build-opensim.sh @@ -8,6 +8,11 @@ GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) GIT_COMMIT=$(git rev-parse HEAD) GIT_COMMIT_SHORT=$(git rev-parse --short HEAD) +# Copy the run-scripts into the local directory here since the Docker build +# only knowns the context of this directory +rm -rf temp-run-scripts +cp -r ../run-scripts temp-run-scripts + # Note that the '--no-cache' is here to force refetching of the OpenSimulator git sources # --no-cache docker build \ @@ -17,6 +22,9 @@ docker build \ --build-arg OS_DOCKER_GIT_BRANCH=$GIT_BRANCH \ --build-arg OS_DOCKER_GIT_COMMIT=$GIT_COMMIT \ --build-arg OS_DOCKER_GIT_COMMIT_SHORT=$GIT_COMMIT_SHORT \ - -t opensim-standalone \ - -f Dockerfile-standalone \ + -t opensim-opensim \ + -f Dockerfile-opensim \ . + +# Remove the temporarily copied run-scripts to reduce any confusion +rm -rf temp-run-scripts diff --git a/image-opensim/config/os-secrets b/image-opensim/config/os-secrets deleted file mode 100644 index 62ce777..0000000 --- a/image-opensim/config/os-secrets +++ /dev/null @@ -1,32 +0,0 @@ -# File of secrets for the build and run images. -# This file is a template of the values to use. -# NEVER, NEVER EVER CHECK-IN the version with the real values!! - -# The configuration files look for the file 'os-secrets.crypt' and, when -# found, runs 'ccrypt' using the password from the environment variable -# "CONFIGKEY". So, edit this file and do: -# ccrypt -e -E "$CONFIGKEY" < os-secrets > os-secrets.crypt -# or (exposing the key in the bash history): -# ccrypt -e -K thekey < os-secrets > os-secrets.crypt - -# If this next variable is defined, MYSQL is configured -#export MYSQL_ROOT_PASSWORD=ksdjfalkcxviowerw -export MYSQL_DB_SOURCE=localhost -export MYSQL_DB_DB=opensim -export MYSQL_DB_USER=opensim -export MYSQL_DB_PASSWORD=dbpassword - -export OPENSIM_USER=opensim -export OPENSIM_USER_PASSWORD=klajslkjsladfiouw - -# The following are used to initialize estate if running standalone -export DEFAULT_ESTATE_NAME="Donalds Estate" -export DEFAULT_ESTATE_OWNER="Donald Duck" -export PW_FOR_DEFAULT_ESTATE_OWNER=asoiouzkxcjkvhuqwu - -# Flag used to know if secrest are set -export HAVE_SECRETS=true - -# Did I mention that one should NEVER, NEVER, EVER check-in a version -# with the real passwords in it? - diff --git a/image-opensim/config/scripts/initializeDb.sh b/image-opensim/config/scripts/initializeDb.sh index dec1408..fdb3e99 100755 --- a/image-opensim/config/scripts/initializeDb.sh +++ b/image-opensim/config/scripts/initializeDb.sh @@ -2,25 +2,36 @@ # Script to create database 'opensim' in mysql if it does not exist. # Someone has set the environment variables before running this. # Needs: +# MYSQL_DB_SOURCE # MYSQL_ROOT_PASSWORD # OPENSIM_DB_PASSWORD OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} +echo "opensim-docker: initializeDb.sh: " + cd "$OPENSIMCONFIG" if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then + for needed in "MYSQL_DB_DB" "MYSQL_DB_SOURCE" "MYSQL_DB_USER" "MYSQL_DB_USER_PASSWORD" ; do + if [[ -z "$!needed" ]] ; then + echo "opensim-docker: initializeDb.sh: missing required env parameter $needed" + echo "opensim-docker: initializeDb.sh: DATABASE NOT INITIALIZE" + exit 5 + fi + done + SQLCMDS=${OPENSIMCONFIG}/mymy$$ SQLOPTIONS=${OPENSIMCONFIG}/mymyoptions$$ rm -f "$SQLCMDS" rm -f "$SQLOPTIONS" cat > "$SQLCMDS" < "$SQLOPTIONS" <= 200 @@ -63,229 +67,16 @@ ; NPC macros ; These can be mis-used so limit use to those you can trust. osslNPC = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - - ; The OSSL function name is prepended with "Allow_" and it checks against - ; the owners of the containing prim. There can also be entries beginning with - ; 'Creators_". The 'Creators_" parameters can only be a list of UUIDs and it is - ; checked against the creator of the script itself. + + ; example + ; Allow_osNpcCreate = ${OSSL|osslNPC} + + ; The threat level also can be replaced by lines of the form + ; Creators__FunctionName = comma separated list of UUIDs + ; this will enable the function for users that are the script creators and owners of the prim ; ************************************************* - - ; ThreatLevel None - Allow_osGetAgents = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetAvatarList = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGender = true - Allow_osGetHealth = true - Allow_osGetHealRate = true - Allow_osGetNPCList = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetRezzingObject = true - Allow_osNpcGetOwner = ${OSSL|osslNPC} - Allow_osSetSunParam = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osTeleportOwner = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osWindActiveModelPluginName = true - - ; ThreatLevel Nuisance - Allow_osSetEstateSunSettings = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetRegionSunSettings = ESTATE_MANAGER,ESTATE_OWNER - - ; ThreatLevel VeryLow - Allow_osEjectFromGroup = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceBreakAllLinks = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceBreakLink = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetWindParam = true - Allow_osInviteToGroup = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osReplaceString = true - Allow_osSetDynamicTextureData = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureDataFace = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureDataBlend = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureDataBlendFace = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureURL = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureURLBlend = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureURLBlendFace = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetParcelMediaURL = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetParcelSIPAddress = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetPrimFloatOnWater = true - Allow_osSetWindParam = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osTerrainFlush = ESTATE_MANAGER,ESTATE_OWNER - Allow_osUnixTimeToTimestamp = true - - ; ThreatLevel Low - Allow_osAvatarName2Key = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osFormatString = true - Allow_osKey2Name = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osListenRegex = true - Allow_osLoadedCreationDate = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osLoadedCreationID = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osLoadedCreationTime = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osMessageObject = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osRegexIsMatch = true - Allow_osGetAvatarHomeURI = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osNpcSetProfileAbout = ${OSSL|osslNPC} - Allow_osNpcSetProfileImage = ${OSSL|osslNPC} - Allow_osDie = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - - ; ThreatLevel Moderate - Allow_osDetectedCountry = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osDropAttachment = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osDropAttachmentAt = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetAgentCountry = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridCustom = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridGatekeeperURI = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridHomeURI = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridLoginURI = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridName = true - Allow_osGetGridNick = true - Allow_osGetNumberOfAttachments = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetRegionStats = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetSimulatorMemory = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetSimulatorMemoryKB = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osMessageAttachments = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetSpeed = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetOwnerSpeed = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - - ; ThreatLevel High - Allow_osCauseDamage = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osCauseHealing = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetHealth = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetHealRate = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceAttachToAvatar = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceAttachToAvatarFromInventory = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceCreateLink = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceDropAttachment = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceDropAttachmentAt = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetLinkPrimitiveParams = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetPhysicsEngineType = true - Allow_osGetRegionMapTexture = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetScriptEngineName = true - Allow_osGetSimulatorVersion = true - Allow_osMakeNotecard = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osMatchString = true - Allow_osNpcCreate = ${OSSL|osslNPC} - Allow_osNpcGetPos = ${OSSL|osslNPC} - Allow_osNpcGetRot = ${OSSL|osslNPC} - Allow_osNpcLoadAppearance = ${OSSL|osslNPC} - Allow_osNpcMoveTo = ${OSSL|osslNPC} - Allow_osNpcMoveToTarget = ${OSSL|osslNPC} - Allow_osNpcPlayAnimation = ${OSSL|osslNPC} - Allow_osNpcRemove = ${OSSL|osslNPC} - Allow_osNpcSaveAppearance = ${OSSL|osslNPC} - Allow_osNpcSay = ${OSSL|osslNPC} - Allow_osNpcSayTo = ${OSSL|osslNPC} - Allow_osNpcSetRot = ${OSSL|osslNPC} - Allow_osNpcShout = ${OSSL|osslNPC} - Allow_osNpcSit = ${OSSL|osslNPC} - Allow_osNpcStand = ${OSSL|osslNPC} - Allow_osNpcStopAnimation = ${OSSL|osslNPC} - Allow_osNpcStopMoveToTarget = ${OSSL|osslNPC} - Allow_osNpcTouch = ${OSSL|osslNPC} - Allow_osNpcWhisper = ${OSSL|osslNPC} - Allow_osOwnerSaveAppearance = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osParcelJoin = ESTATE_MANAGER,ESTATE_OWNER - Allow_osParcelSubdivide = ESTATE_MANAGER,ESTATE_OWNER - Allow_osRegionRestart = ESTATE_MANAGER,ESTATE_OWNER - Allow_osRegionNotice = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetProjectionParams = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetRegionWaterHeight = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetStateEvents = false ; deprecated - Allow_osSetTerrainHeight = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetTerrainTexture = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetTerrainTextureHeight = ESTATE_MANAGER,ESTATE_OWNER - - ; ThreatLevel VeryHigh - Allow_osAgentSaveAppearance = ESTATE_MANAGER,ESTATE_OWNER - ; Warning: The next function allows scripts to force animations on avatars without the user giving permission. - ; Enabling this can allow forced animations which can trigger traumatic episodes in vulnerable populations. - ; Similar things can be said for several of the 'force' functions. Enable with care and control. - ; Some of these were added as early functionality for NPCs. This has been replaced with the NPC functions. - Allow_osAvatarPlayAnimation = false - Allow_osAvatarStopAnimation = false - Allow_osForceAttachToOtherAvatarFromInventory = false - Allow_osForceDetachFromAvatar = false - Allow_osForceOtherSit = false - ; The notecard functions can cause a lot of load on the region if over used - Allow_osGetNotecard = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetNotecardLine = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetNumberOfNotecardLines = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetRot = false - Allow_osSetParcelDetails = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - - ; ThreatLevel Severe - Allow_osConsoleCommand = false - Allow_osGrantScriptPermissions = false - Allow_osKickAvatar = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osRevokeScriptPermissions = false - Allow_osTeleportAgent = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osTeleportObject = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - - ; ThreatLevel Severe with additional internal restrictions - Allow_osGetAgentIP = true ; always restricted to Administrators (true or false to disable) - Allow_osSetContentType = false +; add lines with our region local changes, below this to replace the default on osslDefaultEnable.ini or code. -; available functions out of Threat level control (for reference only) -; Allow_osAdjustSoundVolume = true -; Allow_osAngleBetween = true -; Allow_osApproxEquals = true -; Allow_osCheckODE = true -; Allow_osClearInertia = true -; Allow_osCollisionSound = true -; Allow_osDrawEllipse = true -; Allow_osDrawFilledEllipse = true -; Allow_osDrawFilledPolygon = true -; Allow_osDrawFilledRectangle = true -; Allow_osDrawImage = true -; Allow_osDrawLine = true -; Allow_osDrawPolygon = true -; Allow_osDrawRectangle = true -; Allow_osDrawResetTransform = true -; Allow_osDrawRotationTransform = true -; Allow_osDrawScaleTransform = true -; Allow_osDrawText = true -; Allow_osDrawTranslationTransform = true -; Allow_osGetCurrentSunHour = true -; Allow_osGetInertiaData = true -; Allow_osGetInventoryDesc = true -; Allow_osGetLinkNumber = true -; Allow_osGetMapTexture = true -; Allow_osGetPhysicsEngineName = true -; Allow_osGetPrimitiveParams = true -; Allow_osGetRegionSize = true -; Allow_osGetSunParam = true -; Allow_osGetTerrainHeight = true -; Allow_osGetDrawStringSize = true -; Allow_osIsNpc = true -; Allow_osIsUUID = true -; Allow_osLoopSound = true -; Allow_osLoopSoundMaster = true -; Allow_osLoopSoundSlave = true -; Allow_osMax = true -; Allow_osMin = true -; Allow_osMovePen = true -; Allow_osPlaySound = true -; Allow_osPlaySoundSlave = true -; Allow_osPreloadSound = true -; Allow_osRound = true -; Allow_osSetFontName = true -; Allow_osSetFontSize = true -; Allow_osSetInertia = true -; Allow_osSetInertiaAsBox = true -; Allow_osSetInertiaAsSphere = true -; Allow_osSetInertiaAsCylinder = true -; Allow_osSetPenCap = true -; Allow_osSetPenColor = true -; Allow_osSetPenSize = true -; Allow_osSetPrimitiveParams = true -; Allow_osSetSoundRadius = true -; Allow_osStopSound = true -; Allow_osStringSubString = true -; Allow_osStringStartsWith = true -; Allow_osStringEndsWith = true -; Allow_osStringIndexOf = true -; Allow_osStringLastIndexOf = true -; Allow_osStringRemove = true -; Allow_osStringReplace = true -; Allow_osTriggerSound = true -; Allow_osTriggerSoundLimited = true -; Allow_osVecDistSquare = true -; Allow_osVecMagSquare = true -; Allow_osVolumeDetect = true + diff --git a/image-opensim/config/standalone-sql/docker-compose.yml b/image-opensim/config/standalone-sql/docker-compose.yml index 53862db..ace1cac 100644 --- a/image-opensim/config/standalone-sql/docker-compose.yml +++ b/image-opensim/config/standalone-sql/docker-compose.yml @@ -3,11 +3,10 @@ version: '3' services: - mysql: + dbservice: # MySql version 8 requires a bunch of new security stuff. Stay with v5. # image: mysql:5 image: mariadb:latest - # container_name: opensim-mysql environment: MYSQL_ROOT_PASSWORD: # Parameters added to invocation. @@ -22,8 +21,8 @@ services: opensim: depends_on: - - mysql - image: opensim-standalone + - dbservice + image: opensim-opensim environment: CONFIG_NAME: CONFIGKEY: @@ -36,5 +35,5 @@ services: - 9010:9010/tcp - 9010:9010/udp links: - - mysql:mysql + - dbservice:dbservice # restart: always diff --git a/image-opensim/config/standalone-sql/misc.ini b/image-opensim/config/standalone-sql/misc.ini index b973cee..e681956 100755 --- a/image-opensim/config/standalone-sql/misc.ini +++ b/image-opensim/config/standalone-sql/misc.ini @@ -3,8 +3,9 @@ [Startup] MaxPoolThreads = 45 PhysicalPrimMax = 256 - physics = BulletSim - ; physics = ubODE + ; physics = BulletSim + physics = ubODE + meshing = ubODEMeshmerizer ; physics = OpenDynamicsEngine ; CombineContiguousRegions = true @@ -18,10 +19,12 @@ ; MySql ; Uncomment these lines if you want to use mysql storage ; Change the connection string to your db details + ; NOTE That password comes from environment variables set from os-secrets StorageProvider = "OpenSim.Data.MySQL.dll" - ConnectionString = "Data Source=MYSQL_DB_SOURCE;Database=MYSQL_DB_DB;User ID=MYSQL_DB_USER;Password=MYSQL_DB_PASSWORD;Old Guids=true;" + ConnectionString = "Data Source=MYSQL_DB_SOURCE;Database=opensim;User ID=MYSQL_DB_USER;Password=MYSQL_DB_PASSWORD;Old Guids=true;" [Estates] + ; NOTE That names and passwords come from environment variables set from os-secrets DefaultEstateName = DEFAULT_ESTATE_NAME DefaultEstateOwnerName = DEFAULT_ESTATE_OWNER ; ** Standalone Estate Settings ** @@ -34,22 +37,9 @@ [Terrain] SendTerrainUpdatesByViewDistance = true -[BulletSim] - ; BulletEngine = BulletXNA - ; VehicleLoggingEnabled = True - ; VehicleDebuggingEnable = true - ; VehiclePhysicalLoggingEnabled = True - - ; UseSeparatePhysicsThread = true ; orig = false - - ; PhysicsLoggingEnabled = True - ; PhysicsLoggingDoFlush = True - ; PhysicsLoggingDir = "../logs" - ; PhysicsPhysicalDumpEnabled = True - ; PhysicsUnmanLoggingFrames = 100 - [ExtendedPhysics] Enabled = true [XEngine] + ; If one uses XEngine, use a larger thread stack ThreadStackSize = 500000 diff --git a/image-opensim/config/standalone-sql/os-secrets b/image-opensim/config/standalone-sql/os-secrets index d66dcd9..5635ed1 100644 --- a/image-opensim/config/standalone-sql/os-secrets +++ b/image-opensim/config/standalone-sql/os-secrets @@ -1,7 +1,3 @@ -# Copied from .. to supply defaults when just running a -# standalone copy. MAKE A NEW ONE if you are releasing an -# actual public service. - # File of secrets for the build and run images. # This file is a template of the values to use. # NEVER, NEVER EVER CHECK-IN the version with the real values!! @@ -9,28 +5,31 @@ # The configuration files look for the file 'os-secrets.crypt' and, when # found, runs 'ccrypt' using the password from the environment variable # "CONFIGKEY". So, edit this file and do: -# ccrypt -e -E CONFIGKEY < os-secrets > os-secrets.crypt +# cp os-secrets tempFile +# +# ccrypt -e -E "CONFIGKEY" < tempFile > os-secrets.crypt +# rm tempFile # or (exposing the key in the bash history): # ccrypt -e -K thekey < os-secrets > os-secrets.crypt +# +# Later, if you need to review the passwords, decrypt the file with: +# ccrypt -d -E "CONFIGKEY" < os-secrets.crypt # If this next variable is defined, MYSQL is configured -export MYSQL_ROOT_PASSWORD=kjiosdfasjdfanwenasd -export MYSQL_DB_SOURCE=mysql +export MYSQL_ROOT_PASSWORD=unknownStuff +export MYSQL_DB_SOURCE=dbservice export MYSQL_DB_DB=opensim export MYSQL_DB_USER=opensim -export MYSQL_DB_PASSWORD=aisdsdnxcmjl +export MYSQL_DB_USER_PASSWORD=moreUnknownStuff export OPENSIM_USER=opensim -export OPENSIM_USER_PASSWORD=klajslkjsladfiouw +export OPENSIM_USER_PASSWORD=unknownPassword # The following are used to initialize estate if running standalone export DEFAULT_ESTATE_NAME="Donalds Estate" export DEFAULT_ESTATE_OWNER="Donald Duck" -export PW_FOR_DEFAULT_ESTATE_OWNER=aoisdufaeras +export PW_FOR_DEFAULT_ESTATE_OWNER=anotherUnknownPassword -# Flag used to know if secrest are set -export HAVE_SECRETS=true - -# Did I mention that one should NEVER, NEVER, EVER checkin a version +# Did I mention that one should NEVER, NEVER, EVER check-in a version # with the real passwords in it? diff --git a/image-opensim/config/standalone/docker-compose.yml b/image-opensim/config/standalone/docker-compose.yml index a1ca490..f7f2ac1 100644 --- a/image-opensim/config/standalone/docker-compose.yml +++ b/image-opensim/config/standalone/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: opensim: - image: opensim-standalone + image: opensim-opensim environment: CONFIGKEY: diff --git a/image-opensim/config/standalone/misc.ini b/image-opensim/config/standalone/misc.ini index 63888d0..876c96b 100755 --- a/image-opensim/config/standalone/misc.ini +++ b/image-opensim/config/standalone/misc.ini @@ -4,7 +4,8 @@ MaxPoolThreads = 45 PhysicalPrimMax = 256 ; physics = BulletSim - ; physics = ubODE + physics = ubODE + meshing = ubODEMeshmerizer ; physics = OpenDynamicsEngine ; CombineContiguousRegions = true diff --git a/image-opensim/config/standalone/os-secrets b/image-opensim/config/standalone/os-secrets index 4944aae..08bcdc4 100644 --- a/image-opensim/config/standalone/os-secrets +++ b/image-opensim/config/standalone/os-secrets @@ -7,16 +7,16 @@ # "CONFIGKEY". So, edit this file and do: # cp os-secrets tempFile # -# ccrypt -e -E "$CONFIGKEY" < tempFile > os-secrets.crypt +# ccrypt -e -E "CONFIGKEY" < tempFile > os-secrets.crypt # rm tempFile # or (exposing the key in the bash history): # ccrypt -e -K thekey < os-secrets > os-secrets.crypt # # Later, if you need to review the passwords, decrypt the file with: -# ccrypt -d -E "$CONFIGKEY" < os-secrets.crypt +# ccrypt -d -E "CONFIGKEY" < os-secrets.crypt # If this next variable is defined, MYSQL is configured -#export MYSQL_ROOT_PASSWORD=ksdjfalkcxviowerw +#export MYSQL_ROOT_PASSWORD=unknownStuff export MYSQL_DB_SOURCE=localhost export MYSQL_DB_DB=opensim export MYSQL_DB_USER=opensim diff --git a/image-opensim/run-opensim.sh b/image-opensim/run-opensim.sh index 6b9af50..dc94764 100755 --- a/image-opensim/run-opensim.sh +++ b/image-opensim/run-opensim.sh @@ -33,6 +33,7 @@ export OPENSIMBIN=$BASE source config/scripts/setEnvironment.sh unset OPENSIMBIN +# Use the generic docker-compose file or the one specific to the configuration if it exists cd "$BASE" COMPOSEFILE=./docker-compose.yml if [[ -e "config/$CONFIG_NAME/docker-compose.yml" ]] ; then @@ -51,5 +52,4 @@ docker-compose \ --project-name opensim-standalone \ --project-directory "$BASE" \ up \ - -d \ - opensim + --detach diff --git a/image-opensim/vimrc b/image-opensim/vimrc deleted file mode 100755 index e00ec5b..0000000 --- a/image-opensim/vimrc +++ /dev/null @@ -1,8 +0,0 @@ -set tabstop=4 -set shiftwidth=4 -set expandtab -set autoindent -set ff=unix - -set background=dark -syntax enable diff --git a/run-scripts/bootOpenSim.sh b/run-scripts/bootOpenSim.sh index 37d3376..6375515 100755 --- a/run-scripts/bootOpenSim.sh +++ b/run-scripts/bootOpenSim.sh @@ -32,7 +32,9 @@ if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then fi # Start Opensim -echo "Starting OpenSimulator version $(cat $VERSIONDIR/OS_VERSION) with opensim-docker version $(cat $VERSIONDIR/OS_DOCKER_IMAGE_VERSION)" +echo "Starting OpenSimulator version $(cat $VERSIONDIR/OS_VERSION)" +echo " with opensim-docker version $(cat $VERSIONDIR/OS_DOCKER_IMAGE_VERSION)" +echo " using configuration set \"$CONFIG_NAME\"" cd "$OPENSIMHOME" ./run.opensim.sh