├── CONTRIBUTORS ├── LICENSE ├── README.md ├── VERSION.txt ├── image-ngc ├── Dockerfile-ngc ├── build-ngc.sh ├── config-standalone │ ├── Includes.ini │ ├── README │ ├── Regions │ │ ├── .keep │ │ ├── Regions.ini │ │ └── Regions.ini.example │ ├── config-include │ │ ├── Final.ini │ │ ├── FlotsamCache.ini │ │ ├── Standalone.ini │ │ ├── StandaloneCommon.ini │ │ ├── osslDefaultEnable.ini │ │ ├── osslEnable.ini │ │ └── storage │ │ │ └── SQLiteStandalone.ini │ ├── os-secrets │ ├── scripts │ │ ├── initializeDb.sh │ │ └── setEnvironment.sh │ └── setup.sh ├── docker-compose.yml ├── env ├── envToEnvironment.sh ├── pushOpenSimImage.sh ├── restart-opensim.sh ├── run-opensim.sh └── stop-opensim.sh ├── image-opensim-herbal3d ├── Dockerfile-herbal3d ├── Dockerfile-opensim ├── README.md ├── build-herbal3d.sh ├── config-osgrid │ ├── Includes.ini │ ├── README │ ├── Regions │ │ ├── .keep │ │ ├── Regions.ini │ │ └── Regions.ini.example │ ├── config-include │ │ ├── Final.ini │ │ ├── FlotsamCache.ini │ │ ├── GridCommon.ini │ │ ├── GridHypergrid.ini │ │ ├── osslDefaultEnable.ini │ │ ├── osslEnable.ini │ │ └── storage │ │ │ └── SQLiteStandalone.ini │ ├── os-secrets │ ├── scripts │ │ ├── initializeDb.sh │ │ └── setEnvironment.sh │ └── setup.sh ├── config-standalone │ ├── Includes.ini │ ├── README │ ├── Regions │ │ ├── .keep │ │ ├── Regions.ini │ │ └── Regions.ini.example │ ├── config-include │ │ ├── Final.ini │ │ ├── FlotsamCache.ini │ │ ├── Standalone.ini │ │ ├── StandaloneCommon.ini │ │ ├── osslDefaultEnable.ini │ │ ├── osslEnable.ini │ │ └── storage │ │ │ └── SQLiteStandalone.ini │ ├── os-secrets │ ├── scripts │ │ ├── initializeDb.sh │ │ └── setEnvironment.sh │ └── setup.sh ├── docker-compose.yml ├── env ├── envToEnvironment.sh ├── pushOpenSimImage.sh ├── restart-opensim.sh ├── run-opensim.sh └── stop-opensim.sh ├── image-opensim-webrtc ├── Dockerfile-webrtc ├── README.md ├── build-webrtc.sh ├── config-osgrid │ ├── Includes.ini │ ├── README │ ├── Regions │ │ ├── .keep │ │ └── Regions.ini.example │ ├── config-include │ │ ├── Final.ini │ │ ├── FlotsamCache.ini │ │ ├── GridCommon.ini │ │ ├── GridHypergrid.ini │ │ ├── osslDefaultEnable.ini │ │ ├── osslEnable.ini │ │ └── storage │ │ │ └── SQLiteStandalone.ini │ ├── os-secrets │ ├── os-webrtc-janus.ini │ ├── scripts │ │ ├── initializeDb.sh │ │ └── setEnvironment.sh │ └── setup.sh ├── config-standalone │ ├── Includes.ini │ ├── README │ ├── Regions │ │ ├── .keep │ │ ├── Regions.ini │ │ └── Regions.ini.example │ ├── config-include │ │ ├── Final.ini │ │ ├── FlotsamCache.ini │ │ ├── Standalone.ini │ │ ├── StandaloneCommon.ini │ │ ├── osslDefaultEnable.ini │ │ ├── osslEnable.ini │ │ └── storage │ │ │ └── SQLiteStandalone.ini │ ├── os-secrets │ ├── os-webrtc-janus.ini │ ├── scripts │ │ ├── initializeDb.sh │ │ └── setEnvironment.sh │ └── setup.sh ├── docker-compose.yml ├── env ├── envToEnvironment.sh ├── pushOpenSimImage.sh ├── restart-opensim.sh ├── run-opensim.sh └── stop-opensim.sh ├── image-opensim ├── Dockerfile-opensim ├── README.md ├── build-opensim.sh ├── config-osgrid │ ├── Includes.ini │ ├── README │ ├── Regions │ │ ├── .keep │ │ ├── Regions.ini │ │ └── Regions.ini.example │ ├── config-include │ │ ├── Final.ini │ │ ├── FlotsamCache.ini │ │ ├── GridCommon.ini │ │ ├── GridHypergrid.ini │ │ ├── osslDefaultEnable.ini │ │ ├── osslEnable.ini │ │ └── storage │ │ │ └── SQLiteStandalone.ini │ ├── os-secrets │ ├── scripts │ │ ├── initializeDb.sh │ │ └── setEnvironment.sh │ └── setup.sh ├── config-standalone │ ├── Includes.ini │ ├── README │ ├── Regions │ │ ├── .keep │ │ ├── Regions.ini │ │ └── Regions.ini.example │ ├── config-include │ │ ├── Final.ini │ │ ├── FlotsamCache.ini │ │ ├── Standalone.ini │ │ ├── StandaloneCommon.ini │ │ ├── osslDefaultEnable.ini │ │ ├── osslEnable.ini │ │ └── storage │ │ │ └── SQLiteStandalone.ini │ ├── os-secrets │ ├── scripts │ │ ├── initializeDb.sh │ │ └── setEnvironment.sh │ └── setup.sh ├── docker-compose.yml ├── env ├── envToEnvironment.sh ├── pushOpenSimImage.sh ├── restart-opensim.sh ├── run-opensim.sh └── stop-opensim.sh └── run-scripts ├── NOOPENSIM ├── README.md ├── bootOpenSim.sh ├── captureCrash.sh ├── checkOldLogFiles.sh ├── checkOpenSim.sh ├── crontab ├── firstTimeSetup.sh ├── getVersion.sh ├── nullOutConfigInclude.sh ├── run.opensim.sh ├── stopOpenSim.sh └── vimrc /CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | Robert Adams 2 | Peter Gloor 3 | -------------------------------------------------------------------------------- /VERSION.txt: -------------------------------------------------------------------------------- 1 | 4.0.13 2 | -------------------------------------------------------------------------------- /image-ngc/build-ngc.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Build docker images for running a standalone version of NCG 3 | 4 | BUILD_DATE=$(date "+%Y%m%d.%H%M") 5 | BUILD_DAY=$(date "+%Y%m%d") 6 | 7 | # version infomation about opensim-docker 8 | OS_DOCKER_VERSION=$(cat ../VERSION.txt) 9 | OS_DOCKER_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) 10 | OS_DOCKER_GIT_COMMIT=$(git rev-parse HEAD) 11 | OS_DOCKER_GIT_COMMIT_SHORT=$(git rev-parse --short HEAD) 12 | 13 | # Set up the environment with all the environment build parameters 14 | source ./env 15 | 16 | # Copy the run-scripts into the local directory here since the Docker build 17 | # only knowns the context of this directory 18 | rm -rf temp-run-scripts 19 | cp -r ../run-scripts temp-run-scripts 20 | 21 | # Build the image 22 | docker build \ 23 | --pull \ 24 | --build-arg BUILD_DATE=$BUILD_DATE \ 25 | --build-arg BUILD_DAY=$BUILD_DAY \ 26 | --build-arg OS_DOCKER_VERSION=$OS_DOCKER_VERSION \ 27 | --build-arg OS_DOCKER_GIT_BRANCH=$OS_DOCKER_GIT_BRANCH \ 28 | --build-arg OS_DOCKER_GIT_COMMIT=$OS_DOCKER_GIT_COMMIT \ 29 | --build-arg OS_DOCKER_GIT_COMMIT_SHORT=$OS_DOCKER_GIT_COMMIT_SHORT \ 30 | --build-arg OS_GIT_REPO=$OS_GIT_REPO \ 31 | --build-arg OS_GIT_BRANCH=$OS_GIT_BRANCH \ 32 | --build-arg OS_BUILDTARGET=$OS_BUILDTARGET \ 33 | --build-arg OS_SLN=$OS_SLN \ 34 | -t "$IMAGE_NAME" \ 35 | -f Dockerfile-ngc \ 36 | . 37 | 38 | # Remove the temporarily copied run-scripts to reduce any confusion 39 | rm -rf temp-run-scripts 40 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/README: -------------------------------------------------------------------------------- 1 | CONFIGURATION ON DOCKER IMAGE 2 | 3 | This directory will be mounted in `bin/config` and the running simulator will 4 | read the `Includes.ini` file. This file imports environment variables, sets 5 | global "Const" parameters, and then includes the necessary INI files (like 6 | `StandaloneCommon.ini`, `osslEnable.ini`, ...). 7 | 8 | Most of the files in `config-include` are copies of the standard files from 9 | the repository. In this setup, most parameters are changed by the overrides 10 | that happen in `Final.ini` which is the last INI files read (and thus anything 11 | specified in `Final.ini` overrides anything that came before. 12 | 13 | The convention used herein is to use the unchanged INI files from the repository 14 | and to make any changes and additions in `Final.ini`. 15 | 16 | When the docker image is run, the startup script also checks for 'bin/config/setup.sh' 17 | and, if it exists, it is executed. The included version adds `os-secrets` to the 18 | running environment so those values can be used in the INI files (see the 19 | "[Environment]" section in `Includes.ini`. So, things like database passwords 20 | only need to be entered into `os-secrets` and they will be used in the INI files. 21 | You don't need to change any database configuration in any of the INI files. 22 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/Regions/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Misterblue/opensim-docker/eb3cbb7aef4ba4f1495d1bb299a863492283b1f1/image-ngc/config-standalone/Regions/.keep -------------------------------------------------------------------------------- /image-ngc/config-standalone/Regions/Regions.ini: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 2f75645d-acfd-4296-9cc5-8b1f0537fdaf 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/Regions/Regions.ini.example: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 11111111-2222-3333-4444-555555555555 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/config-include/Final.ini: -------------------------------------------------------------------------------- 1 | ; Misc over-rides and settings 2 | 3 | [Startup] 4 | MaxPoolThreads = 45 5 | PhysicalPrimMax = 256 6 | ; physics = BulletSim 7 | physics = ubODE 8 | meshing = ubODEMeshmerizer 9 | ; physics = OpenDynamicsEngine 10 | ; CombineContiguousRegions = true 11 | 12 | ; Turn off periodic statistics output to console 13 | LogShowStatsSeconds = 0 14 | 15 | [DatabaseService] 16 | ; SQLite 17 | ; Include-Storage = "/home/opensim/opensim/bin/config/config-include/storage/SQLiteStandalone.ini" 18 | 19 | ; MySql 20 | ; Uncomment these lines if you want to use mysql storage 21 | ; Change the connection string to your db details 22 | StorageProvider = "OpenSim.Data.MySQL.dll" 23 | ConnectionString = "Data Source=${Environment|MYSQL_DB_HOST};Database=${Environment|MYSQL_DB_DB};User ID=${Environment|MYSQL_DB_USER};Password=${Environment|MYSQL_DB_USER_PW};SslMode=None;" 24 | 25 | [Estates] 26 | ; NOTE That names and passwords come from environment variables set from os-secrets 27 | DefaultEstateName = ${Environment|DEFAULT_ESTATE_NAME} 28 | DefaultEstateOwnerName = ${Environment|DEFAULT_ESTATE_OWNER} 29 | ; ** Standalone Estate Settings ** 30 | ; The following parameters will only be used on a standalone system to 31 | ; create an estate owner that does not already exist 32 | DefaultEstateOwnerUUID = ${Environment|DEFAULT_ESTATE_OWNER_UUID} 33 | DefaultEstateOwnerEMail = owner@example.com 34 | DefaultEstateOwnerPassword = ${Environment|DEFAULT_ESTATE_OWNER_PW} 35 | 36 | [Terrain] 37 | SendTerrainUpdatesByViewDistance = true 38 | 39 | [ExtendedPhysics] 40 | Enabled = true 41 | 42 | [XEngine] 43 | ; If one uses XEngine, use a larger thread stack 44 | ThreadStackSize = 500000 45 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/config-include/FlotsamCache.ini: -------------------------------------------------------------------------------- 1 | [AssetCache] 2 | ;; 3 | ;; Options for FlotsamAssetCache 4 | ;; 5 | 6 | ; cache directory can be shared by multiple instances 7 | CacheDirectory = ./assetcache 8 | ; Other examples: 9 | ;CacheDirectory = /directory/writable/by/OpenSim/instance 10 | 11 | ; Log level 12 | ; 0 - (Error) Errors only 13 | ; 1 - (Info) Hit Rate Stats + Level 0 14 | ; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1 15 | ; 16 | LogLevel = 0 17 | 18 | ; How often should hit rates be displayed (given in AssetRequests) 19 | ; 0 to disable 20 | HitRateDisplay = 100 21 | 22 | ; Set to false for no memory cache 23 | ; assets can be requested several times in short periods 24 | ; so even a small memory cache is useful 25 | MemoryCacheEnabled = false 26 | 27 | ; If a memory cache hit happens, or the asset is still in memory 28 | ; due to other causes, update the timestamp on the disk file anyway. 29 | ; Don't turn this on unless you share your asset cache between simulators 30 | ; AND use an external process, e.g. cron job, to clean it up. 31 | UpdateFileTimeOnCacheHit = false 32 | 33 | ; Enabling this will cache negative fetches. If an asset is negative-cached 34 | ; it will not be re-requested from the asset server again for a while. 35 | ; Generally, this is a good thing. 36 | ; 37 | ; Regular expiration settings (non-sliding) mean that the asset will be 38 | ; retried after the time has expired. Sliding expiration means that 39 | ; the time the negative cache will keep the asset is refreshed each 40 | ; time a fetch is attempted. Use sliding expiration if you have rogue 41 | ; scripts hammering the asset server with requests for nonexistent 42 | ; assets. 43 | ; 44 | ; There are two cases where negative caching may cause issues: 45 | ; 46 | ; 1 - If an invalid asset is repeatedly requested by a script and that asset is 47 | ; subsequently created, it will not be seen until fcache clear 48 | ; is used. This is a very theoretical scenario since UUID collisions 49 | ; are deemed to be not occuring in practice. 50 | ; This can only become an issue with sliding expiration time. 51 | ; 52 | ; 2 - If the asset service is clustered, an asset may not have propagated 53 | ; to all cluster members when it is first attempted to fetch it. 54 | ; This may theoretically occur with networked vendor systems and 55 | ; would lead to an asset not found message. However, after the 56 | ; expiration time has elapsed, the asset will then be fetchable. 57 | ; 58 | ; The defaults below are suitable for all small to medium installations 59 | ; including grids. 60 | NegativeCacheEnabled = true 61 | NegativeCacheTimeout = 120 62 | NegativeCacheSliding = false 63 | 64 | ; Set to false for no file cache 65 | FileCacheEnabled = true 66 | 67 | ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes 68 | ; even a few minutes may mean many assets loaded to memory, if not all. 69 | ; this is good if memory is not a problem. 70 | ; if memory is a problem then a few seconds may actually save same. 71 | ; see hit rates with console comand: fcache status 72 | MemoryCacheTimeout = .016 ; one minute 73 | 74 | ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes 75 | ; Specify 0 if you do not want your disk cache to expire 76 | FileCacheTimeout = 48 77 | 78 | ; How often {in hours} should the disk be checked for expired files 79 | ; Specify 0 to disable expiration checking 80 | FileCleanupTimer = 0.0 ; disabled 81 | 82 | ; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how 83 | ; long (in miliseconds) to block a request thread while trying to complete 84 | ; an existing write to disk. 85 | ; NOTE: THIS PARAMETER IS NOT CURRENTLY USED BY THE CACHE 86 | ; WaitOnInprogressTimeout = 3000 87 | 88 | ; Number of tiers to use for cache directories (current valid 89 | ; range 1 to 3) 90 | ;CacheDirectoryTiers = 1 91 | 92 | ; Number of letters per path tier, 1 will create 16 directories 93 | ; per tier, 2 - 256, 3 - 4096 and 4 - 65K 94 | ;CacheDirectoryTierLength = 3 95 | 96 | ; Warning level for cache directory size 97 | ;CacheWarnAt = 30000 98 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/config-include/storage/SQLiteStandalone.ini: -------------------------------------------------------------------------------- 1 | ; These are the initialization settings for running OpenSim Standalone with an SQLite database 2 | 3 | [DatabaseService] 4 | StorageProvider = "OpenSim.Data.SQLite.dll" 5 | ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" 6 | 7 | [AssetService] 8 | ConnectionString = "URI=file:Asset.db,version=3" 9 | 10 | ; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration. 11 | ; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead. 12 | ; However, the internal asset service will still use the [AssetService] section. 13 | ; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService] 14 | ; so that they both access the same database. 15 | ; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and 16 | ; do not have separate connection strings for different services. 17 | [HGAssetService] 18 | ConnectionString = "URI=file:Asset.db,version=3" 19 | 20 | [InventoryService] 21 | ;ConnectionString = "URI=file:inventory.db,version=3" 22 | ; if you have a legacy inventory store use the connection string below 23 | ConnectionString = "URI=file:inventory.db,version=3,UseUTF16Encoding=True" 24 | 25 | [AvatarService] 26 | ConnectionString = "URI=file:avatars.db,version=3" 27 | 28 | [AuthenticationService] 29 | ConnectionString = "URI=file:auth.db,version=3" 30 | 31 | [UserAccountService] 32 | ConnectionString = "URI=file:userprofiles.db,version=3" 33 | 34 | [GridUserService] 35 | ConnectionString = "URI=file:griduser.db,version=3" 36 | 37 | [FriendsService] 38 | ConnectionString = "URI=file:friends.db,version=3" 39 | 40 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/os-secrets: -------------------------------------------------------------------------------- 1 | # File of secrets for the build and run images. 2 | # This file is a template of the values to use. 3 | # NEVER, NEVER EVER CHECK-IN the version with the real values!! 4 | 5 | # The configuration files look for the file 'os-secrets.crypt' and, when 6 | # found, runs 'ccrypt' using the password from the environment variable 7 | # "OS_CONFIGKEY". So, edit this file and do: 8 | # cp os-secrets tempFile 9 | # 10 | # ccrypt -e -E "OS_CONFIGKEY" < tempFile > os-secrets.crypt 11 | # rm tempFile 12 | # or (exposing the key in the bash history): 13 | # ccrypt -e -K thekey < os-secrets > os-secrets.crypt 14 | # 15 | # Later, if you need to review the passwords, decrypt the file with: 16 | # ccrypt -d -E "OS_CONFIGKEY" < os-secrets.crypt 17 | 18 | export MYSQL_ROOT_PASSWORD=unknownStuff 19 | export MARIADB_ROOT_PASSWORD=unknownStuff 20 | export MYSQL_DB_HOST=dbservice 21 | export MYSQL_DB_DB=opensim 22 | export MYSQL_DB_USER=opensim 23 | export MYSQL_DB_USER_PW=moreUnknownStuff 24 | 25 | # The following are used to initialize estate if running standalone 26 | export DEFAULT_ESTATE_NAME="MyEstate" 27 | export DEFAULT_ESTATE_OWNER="Donald Duck" 28 | export DEFAULT_ESTATE_OWNER_UUID=ff5ec374-8028-43cb-ae58-8d38d70729e5 29 | export DEFAULT_ESTATE_OWNER_PW=SomeSecret 30 | 31 | # These are values that should be in other configurtion files. 32 | # Someday, there might be a system that inserts these parameters into files. 33 | # For the moment, the per-installation parameters must be editted by hand. 34 | # Host name that is advertized to a client. Set in Includes.ini and Region.ini 35 | export EXTERNAL_HOSTNAME=127.0.0.1 36 | 37 | # Did I mention that one should NEVER, NEVER, EVER check-in a version 38 | # with the real passwords in it? 39 | 40 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/scripts/initializeDb.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script to create database 'opensim' in mysql if it does not exist. 3 | # This is usually run in the container on the first time it is invoked. 4 | # This creates the database for this simulator (MYSQL_DB_HOST) if it 5 | # doesn't exist. 6 | # 7 | # Someone has set the environment variables before running this. 8 | # Needs: 9 | # MYSQL_ROOT_PASSWORD 10 | # MYSQL_DB_HOST 11 | # MYSQL_DB_DB 12 | # MYSQL_DB_USER 13 | # MYSQL_DB_USER_PW 14 | 15 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 16 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 17 | 18 | echo "opensim-docker: initializeDb.sh: " 19 | 20 | cd "$OPENSIMCONFIG" 21 | 22 | if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then 23 | for needed in "MYSQL_DB_DB" "MYSQL_DB_HOST" "MYSQL_DB_USER" "MYSQL_DB_USER_PW" ; do 24 | if [[ -z "$!needed" ]] ; then 25 | echo "opensim-docker: initializeDb.sh: missing required env parameter $needed" 26 | echo "opensim-docker: initializeDb.sh: DATABASE NOT INITIALIZED" 27 | exit 5 28 | fi 29 | done 30 | 31 | SQLCMDS=/tmp/mymy$$ 32 | SQLOPTIONS=/tmp/mymyoptions$$ 33 | rm -f "$SQLCMDS" 34 | rm -f "$SQLOPTIONS" 35 | 36 | # Create command file that creates the SQL database and SQL user for this simulator. 37 | cat > "$SQLCMDS" < "$SQLOPTIONS" < /dev/null ; do 53 | echo "opensim-docker: initializeDb.sh: Waiting on database to be ready" 54 | sleep 2 55 | done 56 | echo "opensim-docker: initializeDb.sh: Database is ready" 57 | 58 | 59 | HASDB=$(mysql --defaults-extra-file=$SQLOPTIONS -e "show databases" | grep "^${MYSQL_DB_DB}$") 60 | 61 | if [[ -z "$HASDB" ]] ; then 62 | echo "opensim-docker: initialzeDb.sh: creating opensim database" 63 | mysql --defaults-extra-file=$SQLOPTIONS < "$SQLCMDS" 64 | else 65 | echo "opensim-docker: initialzeDb.sh: opensim database has already been created" 66 | fi 67 | 68 | rm -f "$SQLCMDS" 69 | rm -f "$SQLOPTIONS" 70 | else 71 | echo "opensim-docker: initializeDb.sh: Not configuring SQL database" 72 | fi 73 | 74 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/scripts/setEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script that sets up the environment variables 3 | # This script is run before the docker-compose file is run to get the 4 | # database password and it is run when the opensim Docker container starts 5 | # to get all the values for the configuration files. 6 | 7 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 8 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 9 | 10 | cd "$OPENSIMCONFIG" 11 | 12 | # See if we have encrypted secrets 13 | unset HAVE_SECRETS 14 | if [[ ! -z "$OS_CONFIGKEY" ]] ; then 15 | for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do 16 | if [[ -e "$secretsFile" ]] ; then 17 | echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" 18 | source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") 19 | HAVE_SECRETS=yes 20 | break; 21 | else 22 | echo "opensim-docker: setEnvironment.sh: no encrypted secrets file" 23 | fi 24 | done 25 | fi 26 | 27 | # If no encrypted secrets, maybe unsecure plain-text secrets are available 28 | if [[ -z "$HAVE_SECRETS" ]] ; then 29 | echo "opensim-docker: setEnvironment.sh: trying plain text secrets" 30 | for secretsFile in $OPENSIMCONFIG/os-secrets ; do 31 | if [[ -e "$secretsFile" ]] ; then 32 | echo "opensim-docker: setEnvironment.sh: plain text secrets from \"${secretsFile}\"" 33 | source "$secretsFile" 34 | break; 35 | else 36 | echo "opensim-docker: setEnvironment.sh: no plain text secrets file" 37 | fi 38 | done 39 | fi 40 | -------------------------------------------------------------------------------- /image-ngc/config-standalone/setup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script run when the container starts and before OpenSimulator is started 3 | # 4 | # The operations done here are: 5 | # -- if first time called, setup DB and initialize variables in configuration files 6 | # -- move sub-config specific Includes.ini into the config directory 7 | # -- update all the configuration files with environment variables 8 | 9 | export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 10 | export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 11 | 12 | echo "opensim-docker: setup.sh: OPENSIMCONFIG=\"${OPENSIMCONFIG}\"" 13 | 14 | FIRSTTIMEFLAG=${HOME}/.configFirstTime 15 | 16 | cd "$OPENSIMCONFIG" 17 | # This sets CONFIG_NAME which is the configuration subdirectory 18 | source ./scripts/setEnvironment.sh 19 | 20 | # If this is the first time run, do database setup and some one-time configuration updates 21 | if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then 22 | echo "opensim-docker: setup.sh: first time" 23 | cd "$OPENSIMCONFIG" 24 | # Do any database account and db creation 25 | ./scripts/initializeDb.sh 26 | touch "$FIRSTTIMEFLAG" 27 | fi 28 | 29 | -------------------------------------------------------------------------------- /image-ngc/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | version: '3' 3 | 4 | networks: 5 | localnet: 6 | driver: bridge 7 | 8 | services: 9 | dbservice: 10 | # Use MariaDB 11 | image: mariadb:latest 12 | environment: 13 | MYSQL_ROOT_PASSWORD: 14 | MARIADB_ROOT_PASSWORD: 15 | # Parameters added to invocation. 16 | # Default is to flush after every operation which slows Docker image down. 17 | # This flushes log once a second. 18 | command: --innodb_flush_log_at_trx_commit=2 --sync_binlog=0 19 | volumes: 20 | # NOTE: you must create this directory before starting the simulator 21 | # This mysql data directory can be placed anywhere 22 | - ~/opensim-sql-data:/var/lib/mysql 23 | networks: 24 | - localnet 25 | # restart: always 26 | 27 | opensim: 28 | depends_on: 29 | - dbservice 30 | image: opensim-ngc 31 | environment: 32 | OS_CONFIG: 33 | volumes: 34 | - ./config-$OS_CONFIG:/home/opensim/opensim/bin/config 35 | networks: 36 | - localnet 37 | ports: 38 | - 9000:9000/tcp 39 | - 9000:9000/udp 40 | - 9010:9010/tcp 41 | - 9010:9010/udp 42 | 43 | # restart: always 44 | -------------------------------------------------------------------------------- /image-ngc/env: -------------------------------------------------------------------------------- 1 | # Overall parameters for building and storing the OpenSimulator image. 2 | # This file is 'source'ed in Bash scripts and used by docker-compose. 3 | 4 | # While nearly everything can be moved into this file, these are the 5 | # top level build and run configurations but most of the configuration 6 | # happens in the config-$OS_CONFIG directory. 7 | 8 | # NOTE: the assignment format is restricted so it works as a Bash 9 | # assignment file and a docker-compose env-file 10 | 11 | # the configuration to run with. This is prepended with "config-" to get the directory 12 | OS_CONFIG=${OS_CONFIG:-standalone} 13 | 14 | # The sources to build 15 | OS_GIT_REPO=https://github.com/OpenSim-NGC/OpenSim-Sasquatch.git 16 | OS_GIT_BRANCH=develop 17 | # OS_GIT_BRANCH=opensim-rel-0.9.3.8940 18 | # OS_GIT_BRANCH=opensim-rel-0.9.3.8984 19 | OS_BUILDTARGET=Release 20 | OS_SLN=OpenSim.sln 21 | 22 | # The container parameters 23 | IMAGE_OWNER=misterblue 24 | IMAGE_NAME=opensim-ngc 25 | IMAGE_VERSION=latest 26 | DOCKER_IMAGE="${IMAGE_OWNER}/${IMAGE_NAME}:${IMAGE_VERSION}" 27 | -------------------------------------------------------------------------------- /image-ngc/envToEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! bin/bash 2 | # The ./env file is formatted for docker-compose 3 | # This script outputs a conversion of that file with 4 | # 'export' added to each line so it can be set into 5 | # a Bash environment. 6 | 7 | TEMPFILE=/tmp/envToEnvironment$$ 8 | sed -e 's/^\([A-Z]\)/export \1/' < ./env > "$TEMPFILE" 9 | source "$TEMPFILE" 10 | rm -f "$TEMPFILE" 11 | -------------------------------------------------------------------------------- /image-ngc/pushOpenSimImage.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Push the local image named "opensim-opensim" to the repository. 3 | # The image tag is set to "latest". 4 | 5 | # The repository image name can be over-ridden with the environment variable REPO_IMAGE. 6 | 7 | export IMAGE_OWNER=${IMAGE_OWNER:-misterblue} 8 | export IMAGE_NAME=${IMAGE_NAME:-opensim-ngc} 9 | export IMAGE_VERSION=${IMAGE_VERSION:-latest} 10 | 11 | VERSIONLABEL=$(docker run --rm --entrypoint /home/opensim/getVersion.sh ${IMAGE_NAME}:${IMAGE_VERSION} OS_GIT_DESCRIBE) 12 | 13 | echo "Pushing docker image for opensim version ${VERSIONLABEL}" 14 | 15 | for tagg in ${VERSIONLABEL} ${IMAGE_VERSION} ; do 16 | IMAGE=${IMAGE_OWNER}/${IMAGE_NAME}:${tagg} 17 | docker tag ${IMAGE_NAME} ${IMAGE} 18 | echo " Pushing ${IMAGE}" 19 | docker push ${IMAGE} 20 | done 21 | -------------------------------------------------------------------------------- /image-ngc/restart-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Stop the running opensimulator 3 | 4 | BASE=$(pwd) 5 | 6 | # Get the container parameters into the environment 7 | # (Needs to be in the environment for the docker-compose.yml file) 8 | source ./envToEnvironment.sh 9 | 10 | export OS_CONFIG=${OS_CONFIG:-standalone} 11 | 12 | echo "Restarting configuration $CONFIG_NAME from docker-compose.yml" 13 | 14 | docker compose \ 15 | --file docker-compose.yml \ 16 | --env-file ./env \ 17 | --project-name opensim-${OS_CONFIG} \ 18 | restart 19 | -------------------------------------------------------------------------------- /image-ngc/run-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Run the OpenSimulator image 3 | 4 | # Since the initial run has to create and initialize the MYSQL database 5 | # the first time, this sets the passwords into the environment before 6 | # running things. 7 | 8 | # Be sure to set environment variables: 9 | # OS_CONFIG=nameOfRunConfiguration (default 'standalone' of not supplied) 10 | 11 | BASE=$(pwd) 12 | 13 | # Get the container parameters into the environment 14 | # source ./envToEnvironment.sh 15 | source ./env 16 | 17 | # The selects the configuration to mount and use in the Docker image 18 | export OS_CONFIG=${OS_CONFIG:-standalone} 19 | echo "Using configuration \"$OS_CONFIG\"" 20 | 21 | # Get the secrets for the environment 22 | # (the following 'export' fakes out 'setEnvironment' to use the local directory 23 | export OPENSIMCONFIG=${BASE}/config-${OS_CONFIG} 24 | source ${OPENSIMCONFIG}/scripts/setEnvironment.sh 25 | 26 | # Local directory for storage of sql persistant data (so region 27 | # contents persists between container restarts). 28 | # This must be the same directory as in $COMPOSEFILE 29 | if [[ ! -d "$HOME/opensim-sql-data" ]] ; then 30 | echo "Directory \"$HOME/opensim-sql-data/\" does not exist. Creating same." 31 | mkdir -p "$HOME/opensim-sql-data" 32 | chmod o+w "$HOME/opensim-sql-data" 33 | fi 34 | 35 | cd "${BASE}" 36 | 37 | # https://docs.docker.com/engine/security/userns-remap/ 38 | # --userns-remap="opensim:opensim" 39 | docker compose \ 40 | --file docker-compose.yml \ 41 | --env-file ./env \ 42 | --project-name opensim-${OS_CONFIG} \ 43 | up \ 44 | --detach 45 | -------------------------------------------------------------------------------- /image-ngc/stop-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Stop the running opensimulator 3 | 4 | BASE=$(pwd) 5 | 6 | # Get the container parameters into the environment 7 | # source ./envToEnvironment.sh 8 | source ./env 9 | 10 | export OS_CONFIG=${OS_CONFIG:-standalone} 11 | 12 | echo "Stopping configuration $OS_CONFIG from docker compose.sh" 13 | 14 | docker compose \ 15 | --file docker compose.yml \ 16 | --env-file ./env \ 17 | --project-name opensim-${OS_CONFIG} \ 18 | down 19 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/README.md: -------------------------------------------------------------------------------- 1 | # image-opensim-herbal3d 2 | 3 | This builds an image of the master branch of OpenSimulator 4 | with the [Herbal3d] addon-modules. 5 | 6 | This is meant for testing and will keep changing so it 7 | is be best that most everyone ignore this image. 8 | 9 | [Herbal3d]: https://herbal3d.github.io/ 10 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/build-herbal3d.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Build docker images for running a standalone version of OpenSimulator 3 | 4 | BUILD_DATE=$(date "+%Y%m%d.%H%M") 5 | BUILD_DAY=$(date "+%Y%m%d") 6 | # version infomation about opensim-docker 7 | OS_DOCKER_VERSION=$(cat ../VERSION.txt) 8 | OS_DOCKER_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) 9 | OS_DOCKER_GIT_COMMIT=$(git rev-parse HEAD) 10 | OS_DOCKER_GIT_COMMIT_SHORT=$(git rev-parse --short HEAD) 11 | 12 | # Set up the environment with all the environment build parameters 13 | source ./env 14 | 15 | # Copy the run-scripts into the local directory here since the Docker build 16 | # only knowns the context of this directory 17 | rm -rf temp-run-scripts 18 | cp -r ../run-scripts temp-run-scripts 19 | 20 | # Build the image 21 | docker build \ 22 | --pull \ 23 | --build-arg BUILD_DATE=$BUILD_DATE \ 24 | --build-arg BUILD_DAY=$BUILD_DAY \ 25 | --build-arg OS_DOCKER_VERSION=$OS_DOCKER_VERSION \ 26 | --build-arg OS_DOCKER_GIT_BRANCH=$OS_DOCKER_GIT_BRANCH \ 27 | --build-arg OS_DOCKER_GIT_COMMIT=$OS_DOCKER_GIT_COMMIT \ 28 | --build-arg OS_DOCKER_GIT_COMMIT_SHORT=$OS_DOCKER_GIT_COMMIT_SHORT \ 29 | --build-arg OS_GIT_REPO=$OS_GIT_REPO \ 30 | --build-arg OS_GIT_BRANCH=$OS_GIT_BRANCH \ 31 | --build-arg OS_BUILDTARGET=$OS_BUILDTARGET \ 32 | --build-arg OS_SLN=$OS_SLN \ 33 | -t "$IMAGE_NAME" \ 34 | -f Dockerfile-opensim \ 35 | . 36 | 37 | # Remove the temporarily copied run-scripts to reduce any confusion 38 | rm -rf temp-run-scripts 39 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/README: -------------------------------------------------------------------------------- 1 | CONFIGURATION ON DOCKER IMAGE 2 | 3 | The OpenSim docker image is setup with most of the normal configuration nulled out. 4 | The file 'bin/OpenSim.ini.example' has been copied to 'bin/OpenSim.ini' but all 5 | the files that are normally included (from 'bin/config-include') have been emptied so none 6 | of the normal network, grid, database, or cache setup is present. 7 | 8 | The configuration relies on the feature that OpenSimulator reads all INI files 9 | in the 'bin/config' directory. 10 | 11 | The default installation is for a single region, standalone, sqlite based version 12 | of OpenSimulator. 'bin/config/setup.sh' copies 'bin/config/standalone/Includes.ini' 13 | into 'bin/config'. This file includes all the INI files 14 | needed to configure same. 'Includes.ini' includes files from the 'standalone' 15 | directory. This includes 'Standalone.ini' and 'StandaloneCommon.ini' to do their 16 | normal configuration. It finally includes 'Misc.ini' which specifies parameters 17 | that overlay everything previous for final setting and over-riding. 18 | 19 | Edit 'Misc.ini' for specific simulator settings. 20 | 21 | When the docker image is run, the startup script also checks for 'bin/config/setup.sh' 22 | and, if it exists, it is executed. This allows initializing databases and any 23 | passwords that need to be set in the configuration files. 24 | 25 | One can completely override the configuration included in this Docker image build 26 | by mounting a bind volume over '/home/opensim/opensim/bin/config'. For this case, 27 | all normal OpenSimulator configuration is replaced by whatever one puts in 28 | that 'config' directory. 29 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/Regions/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Misterblue/opensim-docker/eb3cbb7aef4ba4f1495d1bb299a863492283b1f1/image-opensim-herbal3d/config-osgrid/Regions/.keep -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/Regions/Regions.ini: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 2f75645d-acfd-4296-9cc5-8b1f0537fdaf 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/Regions/Regions.ini.example: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 11111111-2222-3333-4444-555555555555 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/config-include/FlotsamCache.ini: -------------------------------------------------------------------------------- 1 | [AssetCache] 2 | ;; 3 | ;; Options for FlotsamAssetCache 4 | ;; 5 | 6 | ; cache directory can be shared by multiple instances 7 | CacheDirectory = ./assetcache 8 | ; Other examples: 9 | ;CacheDirectory = /directory/writable/by/OpenSim/instance 10 | 11 | ; Log level 12 | ; 0 - (Error) Errors only 13 | ; 1 - (Info) Hit Rate Stats + Level 0 14 | ; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1 15 | ; 16 | LogLevel = 0 17 | 18 | ; How often should hit rates be displayed (given in AssetRequests) 19 | ; 0 to disable 20 | HitRateDisplay = 100 21 | 22 | ; Set to false for no memory cache 23 | ; assets can be requested several times in short periods 24 | ; so even a small memory cache is useful 25 | MemoryCacheEnabled = false 26 | 27 | ; If a memory cache hit happens, or the asset is still in memory 28 | ; due to other causes, update the timestamp on the disk file anyway. 29 | ; Don't turn this on unless you share your asset cache between simulators 30 | ; AND use an external process, e.g. cron job, to clean it up. 31 | UpdateFileTimeOnCacheHit = false 32 | 33 | ; Enabling this will cache negative fetches. If an asset is negative-cached 34 | ; it will not be re-requested from the asset server again for a while. 35 | ; Generally, this is a good thing. 36 | ; 37 | ; Regular expiration settings (non-sliding) mean that the asset will be 38 | ; retried after the time has expired. Sliding expiration means that 39 | ; the time the negative cache will keep the asset is refreshed each 40 | ; time a fetch is attempted. Use sliding expiration if you have rogue 41 | ; scripts hammering the asset server with requests for nonexistent 42 | ; assets. 43 | ; 44 | ; There are two cases where negative caching may cause issues: 45 | ; 46 | ; 1 - If an invalid asset is repeatedly requested by a script and that asset is 47 | ; subsequently created, it will not be seen until fcache clear 48 | ; is used. This is a very theoretical scenario since UUID collisions 49 | ; are deemed to be not occuring in practice. 50 | ; This can only become an issue with sliding expiration time. 51 | ; 52 | ; 2 - If the asset service is clustered, an asset may not have propagated 53 | ; to all cluster members when it is first attempted to fetch it. 54 | ; This may theoretically occur with networked vendor systems and 55 | ; would lead to an asset not found message. However, after the 56 | ; expiration time has elapsed, the asset will then be fetchable. 57 | ; 58 | ; The defaults below are suitable for all small to medium installations 59 | ; including grids. 60 | NegativeCacheEnabled = true 61 | NegativeCacheTimeout = 120 62 | NegativeCacheSliding = false 63 | 64 | ; Set to false for no file cache 65 | FileCacheEnabled = true 66 | 67 | ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes 68 | ; even a few minutes may mean many assets loaded to memory, if not all. 69 | ; this is good if memory is not a problem. 70 | ; if memory is a problem then a few seconds may actually save same. 71 | ; see hit rates with console comand: fcache status 72 | MemoryCacheTimeout = .016 ; one minute 73 | 74 | ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes 75 | ; Specify 0 if you do not want your disk cache to expire 76 | FileCacheTimeout = 48 77 | 78 | ; How often {in hours} should the disk be checked for expired files 79 | ; Specify 0 to disable expiration checking 80 | FileCleanupTimer = 1.0 81 | 82 | ; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how 83 | ; long (in miliseconds) to block a request thread while trying to complete 84 | ; an existing write to disk. 85 | ; NOTE: THIS PARAMETER IS NOT CURRENTLY USED BY THE CACHE 86 | ; WaitOnInprogressTimeout = 3000 87 | 88 | ; Number of tiers to use for cache directories (current valid 89 | ; range 1 to 3) 90 | ;CacheDirectoryTiers = 1 91 | 92 | ; Number of letters per path tier, 1 will create 16 directories 93 | ; per tier, 2 - 256, 3 - 4096 and 4 - 65K 94 | ;CacheDirectoryTierLength = 3 95 | 96 | ; Warning level for cache directory size 97 | ;CacheWarnAt = 30000 98 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/config-include/GridHypergrid.ini: -------------------------------------------------------------------------------- 1 | ;; 2 | ;; Please don't change this file. 3 | ;; All optional settings are in GridCommon.ini.example, 4 | ;; which you can copy and change. 5 | ;; 6 | 7 | [Includes] 8 | Include-Common = "config-include/GridCommon.ini" 9 | 10 | [Startup] 11 | WorldMapModule = "HGWorldMap" 12 | 13 | [Modules] 14 | AssetServices = "RegionAssetConnector" 15 | InventoryServices = "HGInventoryBroker" 16 | GridServices = "RegionGridServicesConnector" 17 | AvatarServices = "RemoteAvatarServicesConnector" 18 | NeighbourServices = "NeighbourServicesOutConnector" 19 | AuthenticationServices = "RemoteAuthenticationServicesConnector" 20 | AuthorizationServices = "LocalAuthorizationServicesConnector" 21 | PresenceServices = "RemotePresenceServicesConnector" 22 | UserAccountServices = "RemoteUserAccountServicesConnector" 23 | AgentPreferencesServices= "RemoteAgentPreferencesServicesConnector" 24 | GridUserServices = "RemoteGridUserServicesConnector" 25 | SimulationServices = "RemoteSimulationConnectorModule" 26 | EntityTransferModule = "HGEntityTransferModule" 27 | InventoryAccessModule = "HGInventoryAccessModule" 28 | LandServices = "RemoteLandServicesConnector" 29 | FriendsModule = "HGFriendsModule" 30 | MapImageService = "MapImageServiceModule" 31 | UserManagementModule = "HGUserManagementModule" 32 | SearchModule = "BasicSearchModule" 33 | MuteListService = "RemoteMuteListServicesConnector" 34 | 35 | LandServiceInConnector = true 36 | NeighbourServiceInConnector = true 37 | SimulationServiceInConnector = true 38 | LibraryModule = true 39 | 40 | Setup_EntityTransferModule = disabled 41 | Setup_WorldMapModule = disabled 42 | 43 | [SimulationDataStore] 44 | LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService" 45 | 46 | [EstateDataStore] 47 | LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" 48 | 49 | [AssetService] 50 | LocalGridAssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" 51 | HypergridAssetService = "OpenSim.Services.Connectors.dll:HGAssetServiceConnector" 52 | 53 | [InventoryService] 54 | LocalGridInventoryService = "OpenSim.Region.CoreModules.dll:RemoteXInventoryServicesConnector" 55 | 56 | [GridService] 57 | LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" 58 | StorageProvider = "OpenSim.Data.Null.dll:NullRegionData" 59 | 60 | NetworkConnector = "OpenSim.Services.Connectors.dll:GridServicesConnector" 61 | 62 | ; Needed to display non-default map tile images for linked regions 63 | AssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" 64 | 65 | HypergridLinker = true 66 | AllowHypergridMapSearch = true 67 | SuppressConsoleCommands = true 68 | 69 | [LibraryService] 70 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService" 71 | LibraryName = "OpenSim Library" 72 | DefaultLibrary = "./inventory/Libraries.xml" 73 | 74 | [Friends] 75 | Connector = "OpenSim.Services.Connectors.dll:FriendsServicesConnector" 76 | 77 | [Messaging] 78 | MessageTransferModule = HGMessageTransferModule 79 | LureModule = HGLureModule 80 | 81 | [HGInstantMessageService] 82 | LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService" 83 | GridService = "OpenSim.Services.Connectors.dll:GridServicesConnector" 84 | PresenceService = "OpenSim.Services.Connectors.dll:PresenceServicesConnector" 85 | UserAgentService = "OpenSim.Services.Connectors.dll:UserAgentServiceConnector" 86 | 87 | [MapImageService] 88 | LocalServiceModule = "OpenSim.Services.Connectors.dll:MapImageServicesConnector" 89 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/config-include/storage/SQLiteStandalone.ini: -------------------------------------------------------------------------------- 1 | ; These are the initialization settings for running OpenSim Standalone with an SQLite database 2 | 3 | [DatabaseService] 4 | StorageProvider = "OpenSim.Data.SQLite.dll" 5 | ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" 6 | 7 | [AssetService] 8 | ConnectionString = "URI=file:Asset.db,version=3" 9 | 10 | ; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration. 11 | ; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead. 12 | ; However, the internal asset service will still use the [AssetService] section. 13 | ; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService] 14 | ; so that they both access the same database. 15 | ; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and 16 | ; do not have separate connection strings for different services. 17 | [HGAssetService] 18 | ConnectionString = "URI=file:Asset.db,version=3" 19 | 20 | [InventoryService] 21 | ;ConnectionString = "URI=file:inventory.db,version=3" 22 | ; if you have a legacy inventory store use the connection string below 23 | ConnectionString = "URI=file:inventory.db,version=3,UseUTF16Encoding=True" 24 | 25 | [AvatarService] 26 | ConnectionString = "URI=file:avatars.db,version=3" 27 | 28 | [AuthenticationService] 29 | ConnectionString = "URI=file:auth.db,version=3" 30 | 31 | [UserAccountService] 32 | ConnectionString = "URI=file:userprofiles.db,version=3" 33 | 34 | [GridUserService] 35 | ConnectionString = "URI=file:griduser.db,version=3" 36 | 37 | [FriendsService] 38 | ConnectionString = "URI=file:friends.db,version=3" 39 | 40 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/os-secrets: -------------------------------------------------------------------------------- 1 | # File of secrets for the build and run images. 2 | # This file is a template of the values to use. 3 | # NEVER, NEVER EVER CHECK-IN the version with the real values!! 4 | 5 | # The configuration files look for the file 'os-secrets.crypt' and, when 6 | # found, runs 'ccrypt' using the password from the environment variable 7 | # "OS_CONFIGKEY". So, edit this file and do: 8 | # cp os-secrets tempFile 9 | # 10 | # ccrypt -e -E "OS_CONFIGKEY" < tempFile > os-secrets.crypt 11 | # rm tempFile 12 | # or (exposing the key in the bash history): 13 | # ccrypt -e -K thekey < os-secrets > os-secrets.crypt 14 | # 15 | # Later, if you need to review the passwords, decrypt the file with: 16 | # ccrypt -d -E "OS_CONFIGKEY" < os-secrets.crypt 17 | 18 | export MYSQL_ROOT_PASSWORD=unknownStuff 19 | export MARIADB_ROOT_PASSWORD=unknownStuff 20 | export MYSQL_DB_HOST=dbservice 21 | export MYSQL_DB_DB=opensim 22 | export MYSQL_DB_USER=opensim 23 | export MYSQL_DB_USER_PW=moreUnknownStuff 24 | 25 | # The following are used to initialize estate if running standalone 26 | export DEFAULT_ESTATE_NAME="MyEstate" 27 | export DEFAULT_ESTATE_OWNER="Donald Duck" 28 | export DEFAULT_ESTATE_OWNER_UUID=ff5ec374-8028-43cb-ae58-8d38d70729e5 29 | export DEFAULT_ESTATE_OWNER_PW=SomeSecret 30 | 31 | # These are values that should be in other configurtion files. 32 | # Someday, there might be a system that inserts these parameters into files. 33 | # For the moment, the per-installation parameters must be editted by hand. 34 | # Host name that is advertized to a client. Set in Includes.ini and Region.ini 35 | export EXTERNAL_HOSTNAME=127.0.0.1 36 | 37 | # Did I mention that one should NEVER, NEVER, EVER check-in a version 38 | # with the real passwords in it? 39 | 40 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/scripts/initializeDb.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script to create database 'opensim' in mysql if it does not exist. 3 | # This is usually run in the container on the first time it is invoked. 4 | # This creates the database for this simulator (MYSQL_DB_HOST) if it 5 | # doesn't exist. 6 | # 7 | # Someone has set the environment variables before running this. 8 | # Needs: 9 | # MYSQL_ROOT_PASSWORD 10 | # MYSQL_DB_HOST 11 | # MYSQL_DB_DB 12 | # MYSQL_DB_USER 13 | # MYSQL_DB_USER_PW 14 | 15 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 16 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 17 | 18 | echo "opensim-docker: initializeDb.sh: " 19 | 20 | cd "$OPENSIMCONFIG" 21 | 22 | if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then 23 | for needed in "MYSQL_DB_DB" "MYSQL_DB_HOST" "MYSQL_DB_USER" "MYSQL_DB_USER_PW" ; do 24 | if [[ -z "$!needed" ]] ; then 25 | echo "opensim-docker: initializeDb.sh: missing required env parameter $needed" 26 | echo "opensim-docker: initializeDb.sh: DATABASE NOT INITIALIZED" 27 | exit 5 28 | fi 29 | done 30 | 31 | SQLCMDS=/tmp/mymy$$ 32 | SQLOPTIONS=/tmp/mymyoptions$$ 33 | rm -f "$SQLCMDS" 34 | rm -f "$SQLOPTIONS" 35 | 36 | # Create command file that creates the SQL database and SQL user for this simulator. 37 | cat > "$SQLCMDS" < "$SQLOPTIONS" < /dev/null ; do 53 | echo "opensim-docker: initializeDb.sh: Waiting on database to be ready" 54 | sleep 2 55 | done 56 | echo "opensim-docker: initializeDb.sh: Database is ready" 57 | 58 | 59 | HASDB=$(mysql --defaults-extra-file=$SQLOPTIONS -e "show databases" | grep "^${MYSQL_DB_DB}$") 60 | 61 | if [[ -z "$HASDB" ]] ; then 62 | echo "opensim-docker: initialzeDb.sh: creating opensim database" 63 | mysql --defaults-extra-file=$SQLOPTIONS < "$SQLCMDS" 64 | else 65 | echo "opensim-docker: initialzeDb.sh: opensim database has already been created" 66 | fi 67 | 68 | rm -f "$SQLCMDS" 69 | rm -f "$SQLOPTIONS" 70 | else 71 | echo "opensim-docker: initializeDb.sh: Not configuring SQL database" 72 | fi 73 | 74 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/scripts/setEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script that sets up the environment variables 3 | # This script is run before the docker-compose file is run to get the 4 | # database password and it is run when the opensim Docker container starts 5 | # to get all the values for the configuration files. 6 | 7 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 8 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 9 | 10 | cd "$OPENSIMCONFIG" 11 | 12 | # See if we have encrypted secrets 13 | unset HAVE_SECRETS 14 | if [[ ! -z "$OS_CONFIGKEY" ]] ; then 15 | for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do 16 | if [[ -e "$secretsFile" ]] ; then 17 | echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" 18 | source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") 19 | HAVE_SECRETS=yes 20 | break; 21 | else 22 | echo "opensim-docker: setEnvironment.sh: no encrypted secrets file" 23 | fi 24 | done 25 | fi 26 | 27 | # If no encrypted secrets, maybe unsecure plain-text secrets are available 28 | if [[ -z "$HAVE_SECRETS" ]] ; then 29 | echo "opensim-docker: setEnvironment.sh: trying plain text secrets" 30 | for secretsFile in $OPENSIMCONFIG/os-secrets ; do 31 | if [[ -e "$secretsFile" ]] ; then 32 | echo "opensim-docker: setEnvironment.sh: plain text secrets from \"${secretsFile}\"" 33 | source "$secretsFile" 34 | break; 35 | else 36 | echo "opensim-docker: setEnvironment.sh: no plain text secrets file" 37 | fi 38 | done 39 | fi 40 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-osgrid/setup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script run when the container starts and before OpenSimulator is started 3 | # 4 | # The operations done here are: 5 | # -- if first time called, setup DB and initialize variables in configuration files 6 | # -- move sub-config specific Includes.ini into the config directory 7 | # -- update all the configuration files with environment variables 8 | 9 | export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 10 | export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 11 | 12 | echo "opensim-docker: setup.sh: OPENSIMCONFIG=\"${OPENSIMCONFIG}\"" 13 | 14 | FIRSTTIMEFLAG=${HOME}/.configFirstTime 15 | 16 | cd "$OPENSIMCONFIG" 17 | # This sets CONFIG_NAME which is the configuration subdirectory 18 | source ./scripts/setEnvironment.sh 19 | 20 | # If this is the first time run, do database setup and some one-time configuration updates 21 | if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then 22 | echo "opensim-docker: setup.sh: first time" 23 | cd "$OPENSIMCONFIG" 24 | # Do any database account and db creation 25 | ./scripts/initializeDb.sh 26 | touch "$FIRSTTIMEFLAG" 27 | fi 28 | 29 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/README: -------------------------------------------------------------------------------- 1 | CONFIGURATION ON DOCKER IMAGE 2 | 3 | The OpenSim docker image is setup with most of the normal configuration nulled out. 4 | The file 'bin/OpenSim.ini.example' has been copied to 'bin/OpenSim.ini' but all 5 | the files that are normally included (from 'bin/config-include') have been emptied so none 6 | of the normal network, grid, database, or cache setup is present. 7 | 8 | The configuration relies on the feature that OpenSimulator reads all INI files 9 | in the 'bin/config' directory. 10 | 11 | The default installation is for a single region, standalone, sqlite based version 12 | of OpenSimulator. 'bin/config/setup.sh' copies 'bin/config/standalone/Includes.ini' 13 | into 'bin/config'. This file includes all the INI files 14 | needed to configure same. 'Includes.ini' includes files from the 'standalone' 15 | directory. This includes 'Standalone.ini' and 'StandaloneCommon.ini' to do their 16 | normal configuration. It finally includes 'Misc.ini' which specifies parameters 17 | that overlay everything previous for final setting and over-riding. 18 | 19 | Edit 'Misc.ini' for specific simulator settings. 20 | 21 | When the docker image is run, the startup script also checks for 'bin/config/setup.sh' 22 | and, if it exists, it is executed. This allows initializing databases and any 23 | passwords that need to be set in the configuration files. 24 | 25 | One can completely override the configuration included in this Docker image build 26 | by mounting a bind volume over '/home/opensim/opensim/bin/config'. For this case, 27 | all normal OpenSimulator configuration is replaced by whatever one puts in 28 | that 'config' directory. 29 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/Regions/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Misterblue/opensim-docker/eb3cbb7aef4ba4f1495d1bb299a863492283b1f1/image-opensim-herbal3d/config-standalone/Regions/.keep -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/Regions/Regions.ini: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 2f75645d-acfd-4296-9cc5-8b1f0537fdaf 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/Regions/Regions.ini.example: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 11111111-2222-3333-4444-555555555555 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/config-include/Final.ini: -------------------------------------------------------------------------------- 1 | ; Misc over-rides and settings 2 | 3 | [Startup] 4 | MaxPoolThreads = 45 5 | PhysicalPrimMax = 256 6 | ; physics = BulletSim 7 | physics = ubODE 8 | meshing = ubODEMeshmerizer 9 | ; physics = OpenDynamicsEngine 10 | ; CombineContiguousRegions = true 11 | 12 | ; Turn off periodic statistics output to console 13 | LogShowStatsSeconds = 0 14 | 15 | [DatabaseService] 16 | ; SQLite 17 | ; Include-Storage = "/home/opensim/opensim/bin/config/config-include/storage/SQLiteStandalone.ini" 18 | 19 | ; MySql 20 | ; Uncomment these lines if you want to use mysql storage 21 | ; Change the connection string to your db details 22 | StorageProvider = "OpenSim.Data.MySQL.dll" 23 | ConnectionString = "Data Source=${Environment|MYSQL_DB_HOST};Database=${Environment|MYSQL_DB_DB};User ID=${Environment|MYSQL_DB_USER};Password=${Environment|MYSQL_DB_USER_PW};SslMode=None;" 24 | 25 | [Estates] 26 | ; NOTE That names and passwords come from environment variables set from os-secrets 27 | DefaultEstateName = ${Environment|DEFAULT_ESTATE_NAME} 28 | DefaultEstateOwnerName = ${Environment|DEFAULT_ESTATE_OWNER} 29 | ; ** Standalone Estate Settings ** 30 | ; The following parameters will only be used on a standalone system to 31 | ; create an estate owner that does not already exist 32 | DefaultEstateOwnerUUID = ${Environment|DEFAULT_ESTATE_OWNER_UUID} 33 | DefaultEstateOwnerEMail = owner@example.com 34 | DefaultEstateOwnerPassword = ${Environment|DEFAULT_ESTATE_OWNER_PW} 35 | 36 | [Terrain] 37 | SendTerrainUpdatesByViewDistance = true 38 | 39 | [ExtendedPhysics] 40 | Enabled = true 41 | 42 | [XEngine] 43 | ; If one uses XEngine, use a larger thread stack 44 | ThreadStackSize = 500000 45 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/config-include/storage/SQLiteStandalone.ini: -------------------------------------------------------------------------------- 1 | ; These are the initialization settings for running OpenSim Standalone with an SQLite database 2 | 3 | [DatabaseService] 4 | StorageProvider = "OpenSim.Data.SQLite.dll" 5 | ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" 6 | 7 | [AssetService] 8 | ConnectionString = "URI=file:Asset.db,version=3" 9 | 10 | ; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration. 11 | ; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead. 12 | ; However, the internal asset service will still use the [AssetService] section. 13 | ; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService] 14 | ; so that they both access the same database. 15 | ; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and 16 | ; do not have separate connection strings for different services. 17 | [HGAssetService] 18 | ConnectionString = "URI=file:Asset.db,version=3" 19 | 20 | [InventoryService] 21 | ;ConnectionString = "URI=file:inventory.db,version=3" 22 | ; if you have a legacy inventory store use the connection string below 23 | ConnectionString = "URI=file:inventory.db,version=3,UseUTF16Encoding=True" 24 | 25 | [AvatarService] 26 | ConnectionString = "URI=file:avatars.db,version=3" 27 | 28 | [AuthenticationService] 29 | ConnectionString = "URI=file:auth.db,version=3" 30 | 31 | [UserAccountService] 32 | ConnectionString = "URI=file:userprofiles.db,version=3" 33 | 34 | [GridUserService] 35 | ConnectionString = "URI=file:griduser.db,version=3" 36 | 37 | [FriendsService] 38 | ConnectionString = "URI=file:friends.db,version=3" 39 | 40 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/os-secrets: -------------------------------------------------------------------------------- 1 | # File of secrets for the build and run images. 2 | # This file is a template of the values to use. 3 | # NEVER, NEVER EVER CHECK-IN the version with the real values!! 4 | 5 | # The configuration files look for the file 'os-secrets.crypt' and, when 6 | # found, runs 'ccrypt' using the password from the environment variable 7 | # "OS_CONFIGKEY". So, edit this file and do: 8 | # cp os-secrets tempFile 9 | # 10 | # ccrypt -e -E "OS_CONFIGKEY" < tempFile > os-secrets.crypt 11 | # rm tempFile 12 | # or (exposing the key in the bash history): 13 | # ccrypt -e -K thekey < os-secrets > os-secrets.crypt 14 | # 15 | # Later, if you need to review the passwords, decrypt the file with: 16 | # ccrypt -d -E "OS_CONFIGKEY" < os-secrets.crypt 17 | 18 | export MYSQL_ROOT_PASSWORD=unknownStuff 19 | export MARIADB_ROOT_PASSWORD=unknownStuff 20 | export MYSQL_DB_HOST=dbservice 21 | export MYSQL_DB_DB=opensim 22 | export MYSQL_DB_USER=opensim 23 | export MYSQL_DB_USER_PW=moreUnknownStuff 24 | 25 | # The following are used to initialize estate if running standalone 26 | export DEFAULT_ESTATE_NAME="MyEstate" 27 | export DEFAULT_ESTATE_OWNER="Donald Duck" 28 | export DEFAULT_ESTATE_OWNER_UUID=ff5ec374-8028-43cb-ae58-8d38d70729e5 29 | export DEFAULT_ESTATE_OWNER_PW=SomeSecret 30 | 31 | # These are values that should be in other configurtion files. 32 | # Someday, there might be a system that inserts these parameters into files. 33 | # For the moment, the per-installation parameters must be editted by hand. 34 | # Host name that is advertized to a client. Set in Includes.ini and Region.ini 35 | export EXTERNAL_HOSTNAME=127.0.0.1 36 | 37 | # Did I mention that one should NEVER, NEVER, EVER check-in a version 38 | # with the real passwords in it? 39 | 40 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/scripts/initializeDb.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script to create database 'opensim' in mysql if it does not exist. 3 | # This is usually run in the container on the first time it is invoked. 4 | # This creates the database for this simulator (MYSQL_DB_HOST) if it 5 | # doesn't exist. 6 | # 7 | # Someone has set the environment variables before running this. 8 | # Needs: 9 | # MYSQL_ROOT_PASSWORD 10 | # MYSQL_DB_HOST 11 | # MYSQL_DB_DB 12 | # MYSQL_DB_USER 13 | # MYSQL_DB_USER_PW 14 | 15 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 16 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 17 | 18 | echo "opensim-docker: initializeDb.sh: " 19 | 20 | cd "$OPENSIMCONFIG" 21 | 22 | if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then 23 | for needed in "MYSQL_DB_DB" "MYSQL_DB_HOST" "MYSQL_DB_USER" "MYSQL_DB_USER_PW" ; do 24 | if [[ -z "$!needed" ]] ; then 25 | echo "opensim-docker: initializeDb.sh: missing required env parameter $needed" 26 | echo "opensim-docker: initializeDb.sh: DATABASE NOT INITIALIZED" 27 | exit 5 28 | fi 29 | done 30 | 31 | SQLCMDS=/tmp/mymy$$ 32 | SQLOPTIONS=/tmp/mymyoptions$$ 33 | rm -f "$SQLCMDS" 34 | rm -f "$SQLOPTIONS" 35 | 36 | # Create command file that creates the SQL database and SQL user for this simulator. 37 | cat > "$SQLCMDS" < "$SQLOPTIONS" < /dev/null ; do 53 | echo "opensim-docker: initializeDb.sh: Waiting on database to be ready" 54 | sleep 2 55 | done 56 | echo "opensim-docker: initializeDb.sh: Database is ready" 57 | 58 | 59 | HASDB=$(mysql --defaults-extra-file=$SQLOPTIONS -e "show databases" | grep "^${MYSQL_DB_DB}$") 60 | 61 | if [[ -z "$HASDB" ]] ; then 62 | echo "opensim-docker: initialzeDb.sh: creating opensim database" 63 | mysql --defaults-extra-file=$SQLOPTIONS < "$SQLCMDS" 64 | else 65 | echo "opensim-docker: initialzeDb.sh: opensim database has already been created" 66 | fi 67 | 68 | rm -f "$SQLCMDS" 69 | rm -f "$SQLOPTIONS" 70 | else 71 | echo "opensim-docker: initializeDb.sh: Not configuring SQL database" 72 | fi 73 | 74 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/scripts/setEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script that sets up the environment variables 3 | # This script is run before the docker-compose file is run to get the 4 | # database password and it is run when the opensim Docker container starts 5 | # to get all the values for the configuration files. 6 | 7 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 8 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 9 | 10 | cd "$OPENSIMCONFIG" 11 | 12 | # See if we have encrypted secrets 13 | unset HAVE_SECRETS 14 | if [[ ! -z "$OS_CONFIGKEY" ]] ; then 15 | for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do 16 | if [[ -e "$secretsFile" ]] ; then 17 | echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" 18 | source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") 19 | HAVE_SECRETS=yes 20 | break; 21 | else 22 | echo "opensim-docker: setEnvironment.sh: no encrypted secrets file" 23 | fi 24 | done 25 | fi 26 | 27 | # If no encrypted secrets, maybe unsecure plain-text secrets are available 28 | if [[ -z "$HAVE_SECRETS" ]] ; then 29 | echo "opensim-docker: setEnvironment.sh: trying plain text secrets" 30 | for secretsFile in $OPENSIMCONFIG/os-secrets ; do 31 | if [[ -e "$secretsFile" ]] ; then 32 | echo "opensim-docker: setEnvironment.sh: plain text secrets from \"${secretsFile}\"" 33 | source "$secretsFile" 34 | break; 35 | else 36 | echo "opensim-docker: setEnvironment.sh: no plain text secrets file" 37 | fi 38 | done 39 | fi 40 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/config-standalone/setup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script run when the container starts and before OpenSimulator is started 3 | # 4 | # The operations done here are: 5 | # -- if first time called, setup DB and initialize variables in configuration files 6 | # -- move sub-config specific Includes.ini into the config directory 7 | # -- update all the configuration files with environment variables 8 | 9 | export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 10 | export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 11 | 12 | echo "opensim-docker: setup.sh: OPENSIMCONFIG=\"${OPENSIMCONFIG}\"" 13 | 14 | FIRSTTIMEFLAG=${HOME}/.configFirstTime 15 | 16 | cd "$OPENSIMCONFIG" 17 | # This sets CONFIG_NAME which is the configuration subdirectory 18 | source ./scripts/setEnvironment.sh 19 | 20 | # If this is the first time run, do database setup and some one-time configuration updates 21 | if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then 22 | echo "opensim-docker: setup.sh: first time" 23 | cd "$OPENSIMCONFIG" 24 | # Do any database account and db creation 25 | ./scripts/initializeDb.sh 26 | touch "$FIRSTTIMEFLAG" 27 | fi 28 | 29 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | version: '3' 3 | 4 | networks: 5 | localnet: 6 | driver: bridge 7 | 8 | services: 9 | dbservice: 10 | # Use MariaDB 11 | image: mariadb:latest 12 | environment: 13 | MYSQL_ROOT_PASSWORD: 14 | MARIADB_ROOT_PASSWORD: 15 | # Parameters added to invocation. 16 | # Default is to flush after every operation which slows Docker image down. 17 | # This flushes log once a second. 18 | command: --innodb_flush_log_at_trx_commit=2 --sync_binlog=0 19 | volumes: 20 | # NOTE: you must create this directory before starting the simulator 21 | # This mysql data directory can be placed anywhere 22 | - ~/opensim-sql-data:/var/lib/mysql 23 | networks: 24 | - localnet 25 | # restart: always 26 | 27 | opensim: 28 | depends_on: 29 | - dbservice 30 | image: opensim-herbal3d 31 | environment: 32 | OS_CONFIG: 33 | volumes: 34 | - ./config-$OS_CONFIG:/home/opensim/opensim/bin/config 35 | # Loden generated asset directory tree is stored externally 36 | - ./LodenAssets:/home/opensim/opensim/bin/LodenAssets 37 | networks: 38 | - localnet 39 | ports: 40 | - 9000:9000/tcp 41 | - 9000:9000/udp 42 | - 9010:9010/tcp 43 | - 9010:9010/udp 44 | 45 | # restart: always 46 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/env: -------------------------------------------------------------------------------- 1 | # Overall parameters for building and storing the OpenSimulator image. 2 | # This file is 'source'ed in Bash scripts and used by docker-compose. 3 | 4 | # While nearly everything can be moved into this file, these are the 5 | # top level build and run configurations but most of the configuration 6 | # happens in the config-$OS_CONFIG directory. 7 | 8 | # NOTE: the assignment format is restricted so it works as a Bash 9 | # assignment file and a docker-compose env-file 10 | 11 | # The sources to build 12 | OS_GIT_REPO=git://opensimulator.org/git/opensim 13 | OS_GIT_BRANCH=master 14 | # OS_GIT_BRANCH=opensim-rel-0.9.3.8940 15 | OS_BUILDTARGET=Release 16 | OS_SLN=OpenSim.sln 17 | 18 | # The container parameters 19 | IMAGE_OWNER=misterblue 20 | IMAGE_NAME=opensim-herbal3d 21 | IMAGE_VERSION=latest 22 | DOCKER_IMAGE="${IMAGE_OWNER}/${IMAGE_NAME}:${IMAGE_VERSION}" 23 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/envToEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! bin/bash 2 | # The ./env file is formatted for docker-compose 3 | # This script outputs a conversion of that file with 4 | # 'export' added to each line so it can be set into 5 | # a Bash environment. 6 | 7 | TEMPFILE=/tmp/envToEnvironment$$ 8 | sed -e 's/^\([A-Z]\)/export \1/' < ./env > "$TEMPFILE" 9 | source "$TEMPFILE" 10 | rm -f "$TEMPFILE" 11 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/pushOpenSimImage.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Push the local image named "opensim-herbal3d" to the repository. 3 | # The image tag is set to "latest". 4 | 5 | # The repository image name can be over-ridden with the environment variable REPO_IMAGE. 6 | 7 | export IMAGE_OWNER=${IMAGE_OWNER:-misterblue} 8 | export IMAGE_NAME=${IMAGE_NAME:-opensim-herbal3d} 9 | export IMAGE_VERSION=${IMAGE_VERSION:-latest} 10 | 11 | VERSIONLABEL=$(docker run --rm --entrypoint /home/opensim/getVersion.sh ${IMAGE_NAME}:${IMAGE_VERSION} OS_GIT_DESCRIBE) 12 | 13 | echo "Pushing docker image for opensim version ${VERSIONLABEL}" 14 | 15 | for tagg in ${VERSIONLABEL} ${IMAGE_VERSION} ; do 16 | IMAGE=${IMAGE_OWNER}/${IMAGE_NAME}:${tagg} 17 | docker tag ${IMAGE_NAME} ${IMAGE} 18 | echo " Pushing ${IMAGE}" 19 | docker push ${IMAGE} 20 | done 21 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/restart-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Stop the running opensimulator 3 | 4 | BASE=$(pwd) 5 | 6 | # Get the container parameters into the environment 7 | # (Needs to be in the environment for the docker-compose.yml file) 8 | source ./envToEnvironment.sh 9 | 10 | export OS_CONFIG=${OS_CONFIG:-standalone} 11 | 12 | echo "Restarting configuration $CONFIG_NAME from docker-compose.yml" 13 | 14 | docker compose \ 15 | --file docker-compose.yml \ 16 | --env-file ./env \ 17 | --project-name opensim-${OS_CONFIG} \ 18 | restart 19 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/run-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Run the OpenSimulator image 3 | 4 | # Since the initial run has to create and initialize the MYSQL database 5 | # the first time, this sets the passwords into the environment before 6 | # running things. 7 | 8 | # Be sure to set environment variables: 9 | # OS_CONFIG=nameOfRunConfiguration (default 'standalone' of not supplied) 10 | 11 | BASE=$(pwd) 12 | 13 | # Get the container parameters into the environment 14 | # source ./envToEnvironment.sh 15 | source ./env 16 | 17 | # The selects the configuration to mount and use in the Docker image 18 | export OS_CONFIG=${OS_CONFIG:-standalone} 19 | echo "Using configuration \"$OS_CONFIG\"" 20 | 21 | # Get the secrets for the environment 22 | # (the following 'export' fakes out 'setEnvironment' to use the local directory 23 | export OPENSIMCONFIG=${BASE}/config-${OS_CONFIG} 24 | source ${OPENSIMCONFIG}/scripts/setEnvironment.sh 25 | 26 | # Local directory for storage of sql persistant data (so region 27 | # contents persists between container restarts). 28 | # This must be the same directory as in $COMPOSEFILE 29 | if [[ ! -d "$HOME/opensim-sql-data" ]] ; then 30 | echo "Directory \"$HOME/opensim-sql-data/\" does not exist. Creating same." 31 | mkdir -p "$HOME/opensim-sql-data" 32 | chmod o+w "$HOME/opensim-sql-data" 33 | fi 34 | 35 | cd "${BASE}" 36 | 37 | # https://docs.docker.com/engine/security/userns-remap/ 38 | # --userns-remap="opensim:opensim" 39 | docker compose \ 40 | --file docker-compose.yml \ 41 | --env-file ./env \ 42 | --project-name opensim-${OS_CONFIG} \ 43 | up \ 44 | --detach 45 | -------------------------------------------------------------------------------- /image-opensim-herbal3d/stop-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Stop the running opensimulator 3 | 4 | BASE=$(pwd) 5 | 6 | # Get the container parameters into the environment 7 | # source ./envToEnvironment.sh 8 | source ./env 9 | 10 | export OS_CONFIG=${OS_CONFIG:-standalone} 11 | 12 | echo "Stopping configuration $OS_CONFIG from docker-compose.sh" 13 | 14 | docker compose \ 15 | --file docker-compose.yml \ 16 | --env-file ./env \ 17 | --project-name opensim-${OS_CONFIG} \ 18 | down 19 | -------------------------------------------------------------------------------- /image-opensim-webrtc/README.md: -------------------------------------------------------------------------------- 1 | # image-opensim-webrtc 2 | 3 | This builds an image of the master branch of the OpenSimulator repository 4 | that includes the addon-module [os-webrtc-janus]. 5 | That is, this is OpenSimulator with WebRTC voice. 6 | 7 | There will be additional configuration for voice so refer to [os-webrtc-janus]. 8 | 9 | There are two configurations supplied for this image: 10 | 11 | `config-standalone` runs OpenSimulator as a standalone instance 12 | that has both the region simulators and grid services in a local 13 | instance. 14 | This is great for testing or just getting confortable with what 15 | OpenSimulator can do. 16 | 17 | `config-osgrid` has the [OSGrid] connection configuration for 18 | hosting a region connected to that grid. 19 | You MUST change `Regions.ini` to a allocated location in 20 | that grid. 21 | Notice that all the .ini files supplied are the defaults 22 | from the OpenSimulator distribution and all the [OSGrid] 23 | configuration is done in `Final.ini`. 24 | 25 | [OSGrid]: https://osgrid.org 26 | [OpenSimulator]: http://opensimulator.org 27 | [os-webrtc-janus]: https://github.com/Misterblue/os-webrtc-janus 28 | -------------------------------------------------------------------------------- /image-opensim-webrtc/build-webrtc.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Build docker images for running OpenSimulator with webrtc 3 | 4 | BUILD_DATE=$(date "+%Y%m%d.%H%M") 5 | BUILD_DAY=$(date "+%Y%m%d") 6 | # version infomation about opensim-docker 7 | OS_DOCKER_VERSION=$(cat ../VERSION.txt) 8 | OS_DOCKER_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) 9 | OS_DOCKER_GIT_COMMIT=$(git rev-parse HEAD) 10 | OS_DOCKER_GIT_COMMIT_SHORT=$(git rev-parse --short HEAD) 11 | 12 | # Set up the environment with all the environment build parameters 13 | source ./env 14 | 15 | # Copy the run-scripts into the local directory here since the Docker build 16 | # only knowns the context of this directory 17 | rm -rf temp-run-scripts 18 | cp -r ../run-scripts temp-run-scripts 19 | 20 | # Build the image 21 | docker build \ 22 | --pull \ 23 | --build-arg BUILD_DATE=$BUILD_DATE \ 24 | --build-arg BUILD_DAY=$BUILD_DAY \ 25 | --build-arg OS_DOCKER_VERSION=$OS_DOCKER_VERSION \ 26 | --build-arg OS_DOCKER_GIT_BRANCH=$OS_DOCKER_GIT_BRANCH \ 27 | --build-arg OS_DOCKER_GIT_COMMIT=$OS_DOCKER_GIT_COMMIT \ 28 | --build-arg OS_DOCKER_GIT_COMMIT_SHORT=$OS_DOCKER_GIT_COMMIT_SHORT \ 29 | --build-arg OS_GIT_REPO=$OS_GIT_REPO \ 30 | --build-arg OS_GIT_BRANCH=$OS_GIT_BRANCH \ 31 | --build-arg OS_BUILDTARGET=$OS_BUILDTARGET \ 32 | --build-arg OS_SLN=$OS_SLN \ 33 | -t "$IMAGE_NAME" \ 34 | -f Dockerfile-webrtc \ 35 | . 36 | 37 | # Remove the temporarily copied run-scripts to reduce any confusion 38 | rm -rf temp-run-scripts 39 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/README: -------------------------------------------------------------------------------- 1 | CONFIGURATION ON DOCKER IMAGE 2 | 3 | The OpenSim docker image is setup with most of the normal configuration nulled out. 4 | The file 'bin/OpenSim.ini.example' has been copied to 'bin/OpenSim.ini' but all 5 | the files that are normally included (from 'bin/config-include') have been emptied so none 6 | of the normal network, grid, database, or cache setup is present. 7 | 8 | The configuration relies on the feature that OpenSimulator reads all INI files 9 | in the 'bin/config' directory. 10 | 11 | The default installation is for a single region, standalone, sqlite based version 12 | of OpenSimulator. 'bin/config/setup.sh' copies 'bin/config/standalone/Includes.ini' 13 | into 'bin/config'. This file includes all the INI files 14 | needed to configure same. 'Includes.ini' includes files from the 'standalone' 15 | directory. This includes 'Standalone.ini' and 'StandaloneCommon.ini' to do their 16 | normal configuration. It finally includes 'Misc.ini' which specifies parameters 17 | that overlay everything previous for final setting and over-riding. 18 | 19 | Edit 'Misc.ini' for specific simulator settings. 20 | 21 | When the docker image is run, the startup script also checks for 'bin/config/setup.sh' 22 | and, if it exists, it is executed. This allows initializing databases and any 23 | passwords that need to be set in the configuration files. 24 | 25 | One can completely override the configuration included in this Docker image build 26 | by mounting a bind volume over '/home/opensim/opensim/bin/config'. For this case, 27 | all normal OpenSimulator configuration is replaced by whatever one puts in 28 | that 'config' directory. 29 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/Regions/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Misterblue/opensim-docker/eb3cbb7aef4ba4f1495d1bb299a863492283b1f1/image-opensim-webrtc/config-osgrid/Regions/.keep -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/Regions/Regions.ini.example: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 11111111-2222-3333-4444-555555555555 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/config-include/FlotsamCache.ini: -------------------------------------------------------------------------------- 1 | [AssetCache] 2 | ;; 3 | ;; Options for FlotsamAssetCache 4 | ;; 5 | 6 | ; cache directory can be shared by multiple instances 7 | CacheDirectory = ./assetcache 8 | ; Other examples: 9 | ;CacheDirectory = /directory/writable/by/OpenSim/instance 10 | 11 | ; Log level 12 | ; 0 - (Error) Errors only 13 | ; 1 - (Info) Hit Rate Stats + Level 0 14 | ; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1 15 | ; 16 | LogLevel = 0 17 | 18 | ; How often should hit rates be displayed (given in AssetRequests) 19 | ; 0 to disable 20 | HitRateDisplay = 100 21 | 22 | ; Set to false for no memory cache 23 | ; assets can be requested several times in short periods 24 | ; so even a small memory cache is useful 25 | MemoryCacheEnabled = false 26 | 27 | ; If a memory cache hit happens, or the asset is still in memory 28 | ; due to other causes, update the timestamp on the disk file anyway. 29 | ; Don't turn this on unless you share your asset cache between simulators 30 | ; AND use an external process, e.g. cron job, to clean it up. 31 | UpdateFileTimeOnCacheHit = false 32 | 33 | ; Enabling this will cache negative fetches. If an asset is negative-cached 34 | ; it will not be re-requested from the asset server again for a while. 35 | ; Generally, this is a good thing. 36 | ; 37 | ; Regular expiration settings (non-sliding) mean that the asset will be 38 | ; retried after the time has expired. Sliding expiration means that 39 | ; the time the negative cache will keep the asset is refreshed each 40 | ; time a fetch is attempted. Use sliding expiration if you have rogue 41 | ; scripts hammering the asset server with requests for nonexistent 42 | ; assets. 43 | ; 44 | ; There are two cases where negative caching may cause issues: 45 | ; 46 | ; 1 - If an invalid asset is repeatedly requested by a script and that asset is 47 | ; subsequently created, it will not be seen until fcache clear 48 | ; is used. This is a very theoretical scenario since UUID collisions 49 | ; are deemed to be not occuring in practice. 50 | ; This can only become an issue with sliding expiration time. 51 | ; 52 | ; 2 - If the asset service is clustered, an asset may not have propagated 53 | ; to all cluster members when it is first attempted to fetch it. 54 | ; This may theoretically occur with networked vendor systems and 55 | ; would lead to an asset not found message. However, after the 56 | ; expiration time has elapsed, the asset will then be fetchable. 57 | ; 58 | ; The defaults below are suitable for all small to medium installations 59 | ; including grids. 60 | NegativeCacheEnabled = true 61 | NegativeCacheTimeout = 120 62 | NegativeCacheSliding = false 63 | 64 | ; Set to false for no file cache 65 | FileCacheEnabled = true 66 | 67 | ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes 68 | ; even a few minutes may mean many assets loaded to memory, if not all. 69 | ; this is good if memory is not a problem. 70 | ; if memory is a problem then a few seconds may actually save same. 71 | ; see hit rates with console comand: fcache status 72 | MemoryCacheTimeout = .016 ; one minute 73 | 74 | ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes 75 | ; Specify 0 if you do not want your disk cache to expire 76 | FileCacheTimeout = 48 77 | 78 | ; How often {in hours} should the disk be checked for expired files 79 | ; Specify 0 to disable expiration checking 80 | FileCleanupTimer = 1.0 81 | 82 | ; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how 83 | ; long (in miliseconds) to block a request thread while trying to complete 84 | ; an existing write to disk. 85 | ; NOTE: THIS PARAMETER IS NOT CURRENTLY USED BY THE CACHE 86 | ; WaitOnInprogressTimeout = 3000 87 | 88 | ; Number of tiers to use for cache directories (current valid 89 | ; range 1 to 3) 90 | ;CacheDirectoryTiers = 1 91 | 92 | ; Number of letters per path tier, 1 will create 16 directories 93 | ; per tier, 2 - 256, 3 - 4096 and 4 - 65K 94 | ;CacheDirectoryTierLength = 3 95 | 96 | ; Warning level for cache directory size 97 | ;CacheWarnAt = 30000 98 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/config-include/GridHypergrid.ini: -------------------------------------------------------------------------------- 1 | ;; 2 | ;; Please don't change this file. 3 | ;; All optional settings are in GridCommon.ini.example, 4 | ;; which you can copy and change. 5 | ;; 6 | 7 | [Includes] 8 | Include-Common = "config-include/GridCommon.ini" 9 | 10 | [Startup] 11 | WorldMapModule = "HGWorldMap" 12 | 13 | [Modules] 14 | AssetServices = "RegionAssetConnector" 15 | InventoryServices = "HGInventoryBroker" 16 | GridServices = "RegionGridServicesConnector" 17 | AvatarServices = "RemoteAvatarServicesConnector" 18 | NeighbourServices = "NeighbourServicesOutConnector" 19 | AuthenticationServices = "RemoteAuthenticationServicesConnector" 20 | AuthorizationServices = "LocalAuthorizationServicesConnector" 21 | PresenceServices = "RemotePresenceServicesConnector" 22 | UserAccountServices = "RemoteUserAccountServicesConnector" 23 | AgentPreferencesServices= "RemoteAgentPreferencesServicesConnector" 24 | GridUserServices = "RemoteGridUserServicesConnector" 25 | SimulationServices = "RemoteSimulationConnectorModule" 26 | EntityTransferModule = "HGEntityTransferModule" 27 | InventoryAccessModule = "HGInventoryAccessModule" 28 | LandServices = "RemoteLandServicesConnector" 29 | FriendsModule = "HGFriendsModule" 30 | MapImageService = "MapImageServiceModule" 31 | UserManagementModule = "HGUserManagementModule" 32 | SearchModule = "BasicSearchModule" 33 | MuteListService = "RemoteMuteListServicesConnector" 34 | 35 | LandServiceInConnector = true 36 | NeighbourServiceInConnector = true 37 | SimulationServiceInConnector = true 38 | LibraryModule = true 39 | 40 | Setup_EntityTransferModule = disabled 41 | Setup_WorldMapModule = disabled 42 | 43 | [SimulationDataStore] 44 | LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService" 45 | 46 | [EstateDataStore] 47 | LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" 48 | 49 | [AssetService] 50 | LocalGridAssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" 51 | HypergridAssetService = "OpenSim.Services.Connectors.dll:HGAssetServiceConnector" 52 | 53 | [InventoryService] 54 | LocalGridInventoryService = "OpenSim.Region.CoreModules.dll:RemoteXInventoryServicesConnector" 55 | 56 | [GridService] 57 | LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" 58 | StorageProvider = "OpenSim.Data.Null.dll:NullRegionData" 59 | 60 | NetworkConnector = "OpenSim.Services.Connectors.dll:GridServicesConnector" 61 | 62 | ; Needed to display non-default map tile images for linked regions 63 | AssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" 64 | 65 | HypergridLinker = true 66 | AllowHypergridMapSearch = true 67 | SuppressConsoleCommands = true 68 | 69 | [LibraryService] 70 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService" 71 | LibraryName = "OpenSim Library" 72 | DefaultLibrary = "./inventory/Libraries.xml" 73 | 74 | [Friends] 75 | Connector = "OpenSim.Services.Connectors.dll:FriendsServicesConnector" 76 | 77 | [Messaging] 78 | MessageTransferModule = HGMessageTransferModule 79 | LureModule = HGLureModule 80 | 81 | [HGInstantMessageService] 82 | LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService" 83 | GridService = "OpenSim.Services.Connectors.dll:GridServicesConnector" 84 | PresenceService = "OpenSim.Services.Connectors.dll:PresenceServicesConnector" 85 | UserAgentService = "OpenSim.Services.Connectors.dll:UserAgentServiceConnector" 86 | 87 | [MapImageService] 88 | LocalServiceModule = "OpenSim.Services.Connectors.dll:MapImageServicesConnector" 89 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/config-include/storage/SQLiteStandalone.ini: -------------------------------------------------------------------------------- 1 | ; These are the initialization settings for running OpenSim Standalone with an SQLite database 2 | 3 | [DatabaseService] 4 | StorageProvider = "OpenSim.Data.SQLite.dll" 5 | ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" 6 | 7 | [AssetService] 8 | ConnectionString = "URI=file:Asset.db,version=3" 9 | 10 | ; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration. 11 | ; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead. 12 | ; However, the internal asset service will still use the [AssetService] section. 13 | ; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService] 14 | ; so that they both access the same database. 15 | ; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and 16 | ; do not have separate connection strings for different services. 17 | [HGAssetService] 18 | ConnectionString = "URI=file:Asset.db,version=3" 19 | 20 | [InventoryService] 21 | ;ConnectionString = "URI=file:inventory.db,version=3" 22 | ; if you have a legacy inventory store use the connection string below 23 | ConnectionString = "URI=file:inventory.db,version=3,UseUTF16Encoding=True" 24 | 25 | [AvatarService] 26 | ConnectionString = "URI=file:avatars.db,version=3" 27 | 28 | [AuthenticationService] 29 | ConnectionString = "URI=file:auth.db,version=3" 30 | 31 | [UserAccountService] 32 | ConnectionString = "URI=file:userprofiles.db,version=3" 33 | 34 | [GridUserService] 35 | ConnectionString = "URI=file:griduser.db,version=3" 36 | 37 | [FriendsService] 38 | ConnectionString = "URI=file:friends.db,version=3" 39 | 40 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/os-secrets: -------------------------------------------------------------------------------- 1 | # File of secrets for the build and run images. 2 | # This file is a template of the values to use. 3 | # NEVER, NEVER EVER CHECK-IN the version with the real values!! 4 | 5 | # The configuration files look for the file 'os-secrets.crypt' and, when 6 | # found, runs 'ccrypt' using the password from the environment variable 7 | # "OS_CONFIGKEY". So, edit this file and do: 8 | # cp os-secrets tempFile 9 | # 10 | # ccrypt -e -E "OS_CONFIGKEY" < tempFile > os-secrets.crypt 11 | # rm tempFile 12 | # or (exposing the key in the bash history): 13 | # ccrypt -e -K thekey < os-secrets > os-secrets.crypt 14 | # 15 | # Later, if you need to review the passwords, decrypt the file with: 16 | # ccrypt -d -E "OS_CONFIGKEY" < os-secrets.crypt 17 | 18 | export MYSQL_ROOT_PASSWORD=unknownStuff 19 | export MARIADB_ROOT_PASSWORD=unknownStuff 20 | export MYSQL_DB_HOST=dbservice 21 | export MYSQL_DB_DB=opensim 22 | export MYSQL_DB_USER=opensim 23 | export MYSQL_DB_USER_PW=moreUnknownStuff 24 | 25 | # The following are used to initialize estate if running standalone 26 | export DEFAULT_ESTATE_NAME="MyEstate" 27 | export DEFAULT_ESTATE_OWNER="Donald Duck" 28 | export DEFAULT_ESTATE_OWNER_UUID=ff5ec374-8028-43cb-ae58-8d38d70729e5 29 | export DEFAULT_ESTATE_OWNER_PW=SomeSecret 30 | 31 | # These are values that should be in other configurtion files. 32 | # Someday, there might be a system that inserts these parameters into files. 33 | # For the moment, the per-installation parameters must be editted by hand. 34 | # Host name that is advertized to a client. Set in Includes.ini and Region.ini 35 | export EXTERNAL_HOSTNAME=127.0.0.1 36 | 37 | # Did I mention that one should NEVER, NEVER, EVER check-in a version 38 | # with the real passwords in it? 39 | 40 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/os-webrtc-janus.ini: -------------------------------------------------------------------------------- 1 | [WebRtcVoice] 2 | Enabled=true 3 | ; Module to use for spatial WebRtcVoice 4 | SpatialVoiceService = WebRtcJanusService.dll:WebRtcJanusService 5 | ; Module to use for non-spatial WebRtcVoice 6 | NonSpatialVoiceService = WebRtcJanusService.dll:WebRtcJanusService 7 | ; URL for the grid service that is providing the WebRtcVoiceService 8 | WebRtcVoiceServerURI = ${Const|PrivURL}:${Const|PrivatePort} 9 | ; Debugging: output to log file messages sent and received from the viewer 10 | MessageDetails = false 11 | 12 | [JanusWebRtcVoice] 13 | ; URI to access the Janus Gateway 14 | JanusGatewayURI = http://janus.example.org/janus 15 | ; APIKey to access the Janus Gateway. Must be set to the same value as the Janus Gateway. 16 | APIToken = APITokenToNeverCheckIn 17 | ; URI to access the admin port on Janus Gateway 18 | JanusGatewayAdminURI = http://janus.example.org/admin 19 | ; APIKey to access the admin port on the Janus Gateway. Must be set to the same value as the Janus Gateway. 20 | AdminAPIToken = AdminAPITokenToNeverCheckIn 21 | ; Debugging: output to log file messages sent and received from Janus 22 | MessageDetails = false 23 | 24 | 25 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/scripts/initializeDb.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script to create database 'opensim' in mysql if it does not exist. 3 | # This is usually run in the container on the first time it is invoked. 4 | # This creates the database for this simulator (MYSQL_DB_HOST) if it 5 | # doesn't exist. 6 | # 7 | # Someone has set the environment variables before running this. 8 | # Needs: 9 | # MYSQL_ROOT_PASSWORD 10 | # MYSQL_DB_HOST 11 | # MYSQL_DB_DB 12 | # MYSQL_DB_USER 13 | # MYSQL_DB_USER_PW 14 | 15 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 16 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 17 | 18 | echo "opensim-docker: initializeDb.sh: " 19 | 20 | cd "$OPENSIMCONFIG" 21 | 22 | if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then 23 | for needed in "MYSQL_DB_DB" "MYSQL_DB_HOST" "MYSQL_DB_USER" "MYSQL_DB_USER_PW" ; do 24 | if [[ -z "$!needed" ]] ; then 25 | echo "opensim-docker: initializeDb.sh: missing required env parameter $needed" 26 | echo "opensim-docker: initializeDb.sh: DATABASE NOT INITIALIZED" 27 | exit 5 28 | fi 29 | done 30 | 31 | SQLCMDS=/tmp/mymy$$ 32 | SQLOPTIONS=/tmp/mymyoptions$$ 33 | rm -f "$SQLCMDS" 34 | rm -f "$SQLOPTIONS" 35 | 36 | # Create command file that creates the SQL database and SQL user for this simulator. 37 | cat > "$SQLCMDS" < "$SQLOPTIONS" < /dev/null ; do 53 | echo "opensim-docker: initializeDb.sh: Waiting on database to be ready" 54 | sleep 2 55 | done 56 | echo "opensim-docker: initializeDb.sh: Database is ready" 57 | 58 | 59 | HASDB=$(mysql --defaults-extra-file=$SQLOPTIONS -e "show databases" | grep "^${MYSQL_DB_DB}$") 60 | 61 | if [[ -z "$HASDB" ]] ; then 62 | echo "opensim-docker: initialzeDb.sh: creating opensim database" 63 | mysql --defaults-extra-file=$SQLOPTIONS < "$SQLCMDS" 64 | else 65 | echo "opensim-docker: initialzeDb.sh: opensim database has already been created" 66 | fi 67 | 68 | rm -f "$SQLCMDS" 69 | rm -f "$SQLOPTIONS" 70 | else 71 | echo "opensim-docker: initializeDb.sh: Not configuring SQL database" 72 | fi 73 | 74 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/scripts/setEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script that sets up the environment variables 3 | # This script is run before the docker-compose file is run to get the 4 | # database password and it is run when the opensim Docker container starts 5 | # to get all the values for the configuration files. 6 | 7 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 8 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 9 | 10 | cd "$OPENSIMCONFIG" 11 | 12 | # See if we have encrypted secrets 13 | unset HAVE_SECRETS 14 | if [[ ! -z "$OS_CONFIGKEY" ]] ; then 15 | for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do 16 | if [[ -e "$secretsFile" ]] ; then 17 | echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" 18 | source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") 19 | HAVE_SECRETS=yes 20 | break; 21 | else 22 | echo "opensim-docker: setEnvironment.sh: no encrypted secrets file" 23 | fi 24 | done 25 | fi 26 | 27 | # If no encrypted secrets, maybe unsecure plain-text secrets are available 28 | if [[ -z "$HAVE_SECRETS" ]] ; then 29 | echo "opensim-docker: setEnvironment.sh: trying plain text secrets" 30 | for secretsFile in $OPENSIMCONFIG/os-secrets ; do 31 | if [[ -e "$secretsFile" ]] ; then 32 | echo "opensim-docker: setEnvironment.sh: plain text secrets from \"${secretsFile}\"" 33 | source "$secretsFile" 34 | break; 35 | else 36 | echo "opensim-docker: setEnvironment.sh: no plain text secrets file" 37 | fi 38 | done 39 | fi 40 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-osgrid/setup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script run when the container starts and before OpenSimulator is started 3 | # 4 | # The operations done here are: 5 | # -- if first time called, setup DB and initialize variables in configuration files 6 | # -- move sub-config specific Includes.ini into the config directory 7 | # -- update all the configuration files with environment variables 8 | 9 | export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 10 | export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 11 | 12 | echo "opensim-docker: setup.sh: OPENSIMCONFIG=\"${OPENSIMCONFIG}\"" 13 | 14 | FIRSTTIMEFLAG=${HOME}/.configFirstTime 15 | 16 | cd "$OPENSIMCONFIG" 17 | # This sets CONFIG_NAME which is the configuration subdirectory 18 | source ./scripts/setEnvironment.sh 19 | 20 | # If this is the first time run, do database setup and some one-time configuration updates 21 | if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then 22 | echo "opensim-docker: setup.sh: first time" 23 | cd "$OPENSIMCONFIG" 24 | # Do any database account and db creation 25 | ./scripts/initializeDb.sh 26 | touch "$FIRSTTIMEFLAG" 27 | fi 28 | 29 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/README: -------------------------------------------------------------------------------- 1 | CONFIGURATION ON DOCKER IMAGE 2 | 3 | This directory will be mounted in `bin/config` and the running simulator will 4 | read the `Includes.ini` file. This file imports environment variables, sets 5 | global "Const" parameters, and then includes the necessary INI files (like 6 | `StandaloneCommon.ini`, `osslEnable.ini`, ...). 7 | 8 | Most of the files in `config-include` are copies of the standard files from 9 | the repository. In this setup, most parameters are changed by the overrides 10 | that happen in `Final.ini` which is the last INI files read (and thus anything 11 | specified in `Final.ini` overrides anything that came before. 12 | 13 | The convention used herein is to use the unchanged INI files from the repository 14 | and to make any changes and additions in `Final.ini`. 15 | 16 | When the docker image is run, the startup script also checks for 'bin/config/setup.sh' 17 | and, if it exists, it is executed. The included version adds `os-secrets` to the 18 | running environment so those values can be used in the INI files (see the 19 | "[Environment]" section in `Includes.ini`. So, things like database passwords 20 | only need to be entered into `os-secrets` and they will be used in the INI files. 21 | You don't need to change any database configuration in any of the INI files. 22 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/Regions/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Misterblue/opensim-docker/eb3cbb7aef4ba4f1495d1bb299a863492283b1f1/image-opensim-webrtc/config-standalone/Regions/.keep -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/Regions/Regions.ini: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 2f75645d-acfd-4296-9cc5-8b1f0537fdaf 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/Regions/Regions.ini.example: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 11111111-2222-3333-4444-555555555555 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/config-include/Final.ini: -------------------------------------------------------------------------------- 1 | ; Misc over-rides and settings 2 | 3 | [Startup] 4 | MaxPoolThreads = 45 5 | PhysicalPrimMax = 256 6 | ; physics = BulletSim 7 | physics = ubODE 8 | meshing = ubODEMeshmerizer 9 | ; physics = OpenDynamicsEngine 10 | ; CombineContiguousRegions = true 11 | 12 | ; Turn off periodic statistics output to console 13 | LogShowStatsSeconds = 0 14 | 15 | [DatabaseService] 16 | ; SQLite 17 | ; Include-Storage = "/home/opensim/opensim/bin/config/config-include/storage/SQLiteStandalone.ini" 18 | 19 | ; MySql 20 | ; Uncomment these lines if you want to use mysql storage 21 | ; Change the connection string to your db details 22 | StorageProvider = "OpenSim.Data.MySQL.dll" 23 | ConnectionString = "Data Source=${Environment|MYSQL_DB_HOST};Database=${Environment|MYSQL_DB_DB};User ID=${Environment|MYSQL_DB_USER};Password=${Environment|MYSQL_DB_USER_PW};SslMode=None;" 24 | 25 | [Estates] 26 | ; NOTE That names and passwords come from environment variables set from os-secrets 27 | DefaultEstateName = ${Environment|DEFAULT_ESTATE_NAME} 28 | DefaultEstateOwnerName = ${Environment|DEFAULT_ESTATE_OWNER} 29 | ; ** Standalone Estate Settings ** 30 | ; The following parameters will only be used on a standalone system to 31 | ; create an estate owner that does not already exist 32 | DefaultEstateOwnerUUID = ${Environment|DEFAULT_ESTATE_OWNER_UUID} 33 | DefaultEstateOwnerEMail = owner@example.com 34 | DefaultEstateOwnerPassword = ${Environment|DEFAULT_ESTATE_OWNER_PW} 35 | 36 | [Terrain] 37 | SendTerrainUpdatesByViewDistance = true 38 | 39 | [ExtendedPhysics] 40 | Enabled = true 41 | 42 | [XEngine] 43 | ; If one uses XEngine, use a larger thread stack 44 | ThreadStackSize = 500000 45 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/config-include/storage/SQLiteStandalone.ini: -------------------------------------------------------------------------------- 1 | ; These are the initialization settings for running OpenSim Standalone with an SQLite database 2 | 3 | [DatabaseService] 4 | StorageProvider = "OpenSim.Data.SQLite.dll" 5 | ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" 6 | 7 | [AssetService] 8 | ConnectionString = "URI=file:Asset.db,version=3" 9 | 10 | ; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration. 11 | ; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead. 12 | ; However, the internal asset service will still use the [AssetService] section. 13 | ; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService] 14 | ; so that they both access the same database. 15 | ; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and 16 | ; do not have separate connection strings for different services. 17 | [HGAssetService] 18 | ConnectionString = "URI=file:Asset.db,version=3" 19 | 20 | [InventoryService] 21 | ;ConnectionString = "URI=file:inventory.db,version=3" 22 | ; if you have a legacy inventory store use the connection string below 23 | ConnectionString = "URI=file:inventory.db,version=3,UseUTF16Encoding=True" 24 | 25 | [AvatarService] 26 | ConnectionString = "URI=file:avatars.db,version=3" 27 | 28 | [AuthenticationService] 29 | ConnectionString = "URI=file:auth.db,version=3" 30 | 31 | [UserAccountService] 32 | ConnectionString = "URI=file:userprofiles.db,version=3" 33 | 34 | [GridUserService] 35 | ConnectionString = "URI=file:griduser.db,version=3" 36 | 37 | [FriendsService] 38 | ConnectionString = "URI=file:friends.db,version=3" 39 | 40 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/os-secrets: -------------------------------------------------------------------------------- 1 | # File of secrets for the build and run images. 2 | # This file is a template of the values to use. 3 | # NEVER, NEVER EVER CHECK-IN the version with the real values!! 4 | 5 | # The configuration files look for the file 'os-secrets.crypt' and, when 6 | # found, runs 'ccrypt' using the password from the environment variable 7 | # "OS_CONFIGKEY". So, edit this file and do: 8 | # cp os-secrets tempFile 9 | # 10 | # ccrypt -e -E "OS_CONFIGKEY" < tempFile > os-secrets.crypt 11 | # rm tempFile 12 | # or (exposing the key in the bash history): 13 | # ccrypt -e -K thekey < os-secrets > os-secrets.crypt 14 | # 15 | # Later, if you need to review the passwords, decrypt the file with: 16 | # ccrypt -d -E "OS_CONFIGKEY" < os-secrets.crypt 17 | 18 | export MYSQL_ROOT_PASSWORD=unknownStuff 19 | export MARIADB_ROOT_PASSWORD=unknownStuff 20 | export MYSQL_DB_HOST=dbservice 21 | export MYSQL_DB_DB=opensim 22 | export MYSQL_DB_USER=opensim 23 | export MYSQL_DB_USER_PW=moreUnknownStuff 24 | 25 | # The following are used to initialize estate if running standalone 26 | export DEFAULT_ESTATE_NAME="MyEstate" 27 | export DEFAULT_ESTATE_OWNER="Donald Duck" 28 | export DEFAULT_ESTATE_OWNER_UUID=ff5ec374-8028-43cb-ae58-8d38d70729e5 29 | export DEFAULT_ESTATE_OWNER_PW=SomeSecret 30 | 31 | # These are values that should be in other configurtion files. 32 | # Someday, there might be a system that inserts these parameters into files. 33 | # For the moment, the per-installation parameters must be editted by hand. 34 | # Host name that is advertized to a client. Set in Includes.ini and Region.ini 35 | export EXTERNAL_HOSTNAME=127.0.0.1 36 | 37 | # Did I mention that one should NEVER, NEVER, EVER check-in a version 38 | # with the real passwords in it? 39 | 40 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/os-webrtc-janus.ini: -------------------------------------------------------------------------------- 1 | [WebRtcVoice] 2 | Enabled=true 3 | ; Module to use for spatial WebRtcVoice 4 | SpatialVoiceService = WebRtcJanusService.dll:WebRtcJanusService 5 | ; Module to use for non-spatial WebRtcVoice 6 | NonSpatialVoiceService = WebRtcJanusService.dll:WebRtcJanusService 7 | ; URL for the grid service that is providing the WebRtcVoiceService 8 | WebRtcVoiceServerURI = ${Const|PrivURL}:${Const|PrivatePort} 9 | ; Debugging: output to log file messages sent and received from the viewer 10 | MessageDetails = false 11 | 12 | [JanusWebRtcVoice] 13 | ; URI to access the Janus Gateway 14 | JanusGatewayURI = http://janus.example.org/janus 15 | ; APIKey to access the Janus Gateway. Must be set to the same value as the Janus Gateway. 16 | APIToken = APITokenToNeverCheckIn 17 | ; URI to access the admin port on Janus Gateway 18 | JanusGatewayAdminURI = http://janus.example.org/admin 19 | ; APIKey to access the admin port on the Janus Gateway. Must be set to the same value as the Janus Gateway. 20 | AdminAPIToken = AdminAPITokenToNeverCheckIn 21 | ; Debugging: output to log file messages sent and received from Janus 22 | MessageDetails = false 23 | 24 | 25 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/scripts/initializeDb.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script to create database 'opensim' in mysql if it does not exist. 3 | # This is usually run in the container on the first time it is invoked. 4 | # This creates the database for this simulator (MYSQL_DB_HOST) if it 5 | # doesn't exist. 6 | # 7 | # Someone has set the environment variables before running this. 8 | # Needs: 9 | # MYSQL_ROOT_PASSWORD 10 | # MYSQL_DB_HOST 11 | # MYSQL_DB_DB 12 | # MYSQL_DB_USER 13 | # MYSQL_DB_USER_PW 14 | 15 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 16 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 17 | 18 | echo "opensim-docker: initializeDb.sh: " 19 | 20 | cd "$OPENSIMCONFIG" 21 | 22 | if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then 23 | for needed in "MYSQL_DB_DB" "MYSQL_DB_HOST" "MYSQL_DB_USER" "MYSQL_DB_USER_PW" ; do 24 | if [[ -z "$!needed" ]] ; then 25 | echo "opensim-docker: initializeDb.sh: missing required env parameter $needed" 26 | echo "opensim-docker: initializeDb.sh: DATABASE NOT INITIALIZED" 27 | exit 5 28 | fi 29 | done 30 | 31 | SQLCMDS=/tmp/mymy$$ 32 | SQLOPTIONS=/tmp/mymyoptions$$ 33 | rm -f "$SQLCMDS" 34 | rm -f "$SQLOPTIONS" 35 | 36 | # Create command file that creates the SQL database and SQL user for this simulator. 37 | cat > "$SQLCMDS" < "$SQLOPTIONS" < /dev/null ; do 53 | echo "opensim-docker: initializeDb.sh: Waiting on database to be ready" 54 | sleep 2 55 | done 56 | echo "opensim-docker: initializeDb.sh: Database is ready" 57 | 58 | 59 | HASDB=$(mysql --defaults-extra-file=$SQLOPTIONS -e "show databases" | grep "^${MYSQL_DB_DB}$") 60 | 61 | if [[ -z "$HASDB" ]] ; then 62 | echo "opensim-docker: initialzeDb.sh: creating opensim database" 63 | mysql --defaults-extra-file=$SQLOPTIONS < "$SQLCMDS" 64 | else 65 | echo "opensim-docker: initialzeDb.sh: opensim database has already been created" 66 | fi 67 | 68 | rm -f "$SQLCMDS" 69 | rm -f "$SQLOPTIONS" 70 | else 71 | echo "opensim-docker: initializeDb.sh: Not configuring SQL database" 72 | fi 73 | 74 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/scripts/setEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script that sets up the environment variables 3 | # This script is run before the docker-compose file is run to get the 4 | # database password and it is run when the opensim Docker container starts 5 | # to get all the values for the configuration files. 6 | 7 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 8 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 9 | 10 | cd "$OPENSIMCONFIG" 11 | 12 | # See if we have encrypted secrets 13 | unset HAVE_SECRETS 14 | if [[ ! -z "$OS_CONFIGKEY" ]] ; then 15 | for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do 16 | if [[ -e "$secretsFile" ]] ; then 17 | echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" 18 | source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") 19 | HAVE_SECRETS=yes 20 | break; 21 | else 22 | echo "opensim-docker: setEnvironment.sh: no encrypted secrets file" 23 | fi 24 | done 25 | fi 26 | 27 | # If no encrypted secrets, maybe unsecure plain-text secrets are available 28 | if [[ -z "$HAVE_SECRETS" ]] ; then 29 | echo "opensim-docker: setEnvironment.sh: trying plain text secrets" 30 | for secretsFile in $OPENSIMCONFIG/os-secrets ; do 31 | if [[ -e "$secretsFile" ]] ; then 32 | echo "opensim-docker: setEnvironment.sh: plain text secrets from \"${secretsFile}\"" 33 | source "$secretsFile" 34 | break; 35 | else 36 | echo "opensim-docker: setEnvironment.sh: no plain text secrets file" 37 | fi 38 | done 39 | fi 40 | -------------------------------------------------------------------------------- /image-opensim-webrtc/config-standalone/setup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script run when the container starts and before OpenSimulator is started 3 | # 4 | # The operations done here are: 5 | # -- if first time called, setup DB and initialize variables in configuration files 6 | # -- move sub-config specific Includes.ini into the config directory 7 | # -- update all the configuration files with environment variables 8 | 9 | export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 10 | export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 11 | 12 | echo "opensim-docker: setup.sh: OPENSIMCONFIG=\"${OPENSIMCONFIG}\"" 13 | 14 | FIRSTTIMEFLAG=${HOME}/.configFirstTime 15 | 16 | cd "$OPENSIMCONFIG" 17 | # This sets CONFIG_NAME which is the configuration subdirectory 18 | source ./scripts/setEnvironment.sh 19 | 20 | # If this is the first time run, do database setup and some one-time configuration updates 21 | if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then 22 | echo "opensim-docker: setup.sh: first time" 23 | cd "$OPENSIMCONFIG" 24 | # Do any database account and db creation 25 | ./scripts/initializeDb.sh 26 | touch "$FIRSTTIMEFLAG" 27 | fi 28 | 29 | -------------------------------------------------------------------------------- /image-opensim-webrtc/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | version: '3' 3 | 4 | networks: 5 | localnet: 6 | driver: bridge 7 | 8 | services: 9 | dbservice: 10 | # Use MariaDB 11 | image: mariadb:latest 12 | environment: 13 | MYSQL_ROOT_PASSWORD: 14 | MARIADB_ROOT_PASSWORD: 15 | # Parameters added to invocation. 16 | # Default is to flush after every operation which slows Docker image down. 17 | # This flushes log once a second. 18 | command: --innodb_flush_log_at_trx_commit=2 --sync_binlog=0 19 | volumes: 20 | # NOTE: you must create this directory before starting the simulator 21 | # This mysql data directory can be placed anywhere 22 | - ~/opensim-sql-data:/var/lib/mysql 23 | networks: 24 | - localnet 25 | restart: unless-stopped 26 | 27 | opensim: 28 | depends_on: 29 | - dbservice 30 | image: opensim-webrtc:latest 31 | environment: 32 | OS_CONFIG: 33 | volumes: 34 | - ./config-$OS_CONFIG:/home/opensim/opensim/bin/config 35 | # Loden generated asset directory tree is stored externally 36 | - ./LodenAssets:/home/opensim/opensim/bin/LodenAssets 37 | networks: 38 | - localnet 39 | ports: 40 | - 9000:9000/tcp 41 | - 9000:9000/udp 42 | - 9010:9010/tcp 43 | - 9010:9010/udp 44 | - 9050:9050/tcp 45 | - 9050:9050/udp 46 | 47 | restart: unless-stopped 48 | -------------------------------------------------------------------------------- /image-opensim-webrtc/env: -------------------------------------------------------------------------------- 1 | # Overall parameters for building and storing the OpenSimulator image. 2 | # This file is 'source'ed in Bash scripts and used by docker-compose. 3 | 4 | # While nearly everything can be moved into this file, these are the 5 | # top level build and run configurations but most of the configuration 6 | # happens in the config-$OS_CONFIG directory. 7 | 8 | # NOTE: the assignment format is restricted so it works as a Bash 9 | # assignment file and a docker-compose env-file 10 | 11 | # The sources to build 12 | OS_GIT_REPO=git://opensimulator.org/git/opensim 13 | OS_GIT_BRANCH=master 14 | # OS_GIT_BRANCH=opensim-rel-0.9.3.8940 15 | OS_BUILDTARGET=Release 16 | OS_SLN=OpenSim.sln 17 | 18 | # The container parameters 19 | IMAGE_OWNER=misterblue 20 | IMAGE_NAME=opensim-webrtc 21 | IMAGE_VERSION=latest 22 | DOCKER_IMAGE="${IMAGE_OWNER}/${IMAGE_NAME}:${IMAGE_VERSION}" 23 | -------------------------------------------------------------------------------- /image-opensim-webrtc/envToEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! bin/bash 2 | # The ./env file is formatted for docker-compose 3 | # This script outputs a conversion of that file with 4 | # 'export' added to each line so it can be set into 5 | # a Bash environment. 6 | 7 | TEMPFILE=/tmp/envToEnvironment$$ 8 | sed -e 's/^\([A-Z]\)/export \1/' < ./env > "$TEMPFILE" 9 | source "$TEMPFILE" 10 | rm -f "$TEMPFILE" 11 | -------------------------------------------------------------------------------- /image-opensim-webrtc/pushOpenSimImage.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Push the local image named "opensim-webrtc" to the repository. 3 | # The image tag is set to "latest". 4 | 5 | # The repository image name can be over-ridden with the environment variable REPO_IMAGE. 6 | 7 | export IMAGE_OWNER=${IMAGE_OWNER:-misterblue} 8 | export IMAGE_NAME=${IMAGE_NAME:-opensim-webrtc} 9 | export IMAGE_VERSION=${IMAGE_VERSION:-latest} 10 | 11 | VERSIONLABEL=$(docker run --rm --entrypoint /home/opensim/getVersion.sh ${IMAGE_NAME}:${IMAGE_VERSION} OS_GIT_DESCRIBE) 12 | 13 | echo "Pushing docker image for opensim version ${VERSIONLABEL}" 14 | 15 | for tagg in ${VERSIONLABEL} ${IMAGE_VERSION} ; do 16 | IMAGE=${IMAGE_OWNER}/${IMAGE_NAME}:${tagg} 17 | docker tag ${IMAGE_NAME} ${IMAGE} 18 | echo " Pushing ${IMAGE}" 19 | docker push ${IMAGE} 20 | done 21 | -------------------------------------------------------------------------------- /image-opensim-webrtc/restart-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Stop the running opensimulator 3 | 4 | BASE=$(pwd) 5 | 6 | # Get the container parameters into the environment 7 | # (Needs to be in the environment for the docker-compose.yml file) 8 | source ./envToEnvironment.sh 9 | 10 | export OS_CONFIG=${OS_CONFIG:-standalone} 11 | 12 | echo "Restarting configuration $CONFIG_NAME from docker-compose.yml" 13 | 14 | docker compose \ 15 | --file docker-compose.yml \ 16 | --env-file ./env \ 17 | --project-name opensim-${OS_CONFIG} \ 18 | restart 19 | -------------------------------------------------------------------------------- /image-opensim-webrtc/run-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Run the OpenSimulator image 3 | 4 | # Since the initial run has to create and initialize the MYSQL database 5 | # the first time, this sets the passwords into the environment before 6 | # running things. 7 | 8 | # Be sure to set environment variables: 9 | # OS_CONFIG=nameOfRunConfiguration (default 'standalone' of not supplied) 10 | 11 | BASE=$(pwd) 12 | 13 | # Get the container parameters into the environment 14 | # source ./envToEnvironment.sh 15 | source ./env 16 | 17 | # The selects the configuration to mount and use in the Docker image 18 | export OS_CONFIG=${OS_CONFIG:-standalone} 19 | echo "Using configuration \"$OS_CONFIG\"" 20 | 21 | # Get the secrets for the environment 22 | # (the following 'export' fakes out 'setEnvironment' to use the local directory 23 | export OPENSIMCONFIG=${BASE}/config-${OS_CONFIG} 24 | source ${OPENSIMCONFIG}/scripts/setEnvironment.sh 25 | 26 | # Local directory for storage of sql persistant data (so region 27 | # contents persists between container restarts). 28 | # This must be the same directory as in $COMPOSEFILE 29 | if [[ ! -d "$HOME/opensim-sql-data" ]] ; then 30 | echo "Directory \"$HOME/opensim-sql-data/\" does not exist. Creating same." 31 | mkdir -p "$HOME/opensim-sql-data" 32 | chmod o+w "$HOME/opensim-sql-data" 33 | fi 34 | 35 | cd "${BASE}" 36 | 37 | # https://docs.docker.com/engine/security/userns-remap/ 38 | # --userns-remap="opensim:opensim" 39 | docker compose \ 40 | --file docker-compose.yml \ 41 | --env-file ./env \ 42 | --project-name opensim-${OS_CONFIG} \ 43 | up \ 44 | --detach 45 | -------------------------------------------------------------------------------- /image-opensim-webrtc/stop-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Stop the running opensimulator 3 | 4 | BASE=$(pwd) 5 | 6 | # Get the container parameters into the environment 7 | # source ./envToEnvironment.sh 8 | source ./env 9 | 10 | export OS_CONFIG=${OS_CONFIG:-standalone} 11 | 12 | echo "Stopping configuration $OS_CONFIG from docker-compose.sh" 13 | 14 | docker compose \ 15 | --file docker-compose.yml \ 16 | --env-file ./env \ 17 | --project-name opensim-${OS_CONFIG} \ 18 | down 19 | -------------------------------------------------------------------------------- /image-opensim/README.md: -------------------------------------------------------------------------------- 1 | # image-opensim 2 | 3 | This builds an image of the master branch of the OpenSimulator repository. 4 | 5 | There are two configurations supplied for this image: 6 | 7 | `config-standalone` runs OpenSimulator as a standalone instance 8 | that has both the region simulators and grid services in a local 9 | instance. 10 | This is great for testing or just getting confortable with what 11 | OpenSimulator can do. 12 | 13 | `config-osgrid` has the [OSGrid] connection configuration for 14 | hosting a region connected to that grid. 15 | You MUST change `Regions.ini` to a allocated location in 16 | that grid. 17 | Notice that all the .ini files supplied are the defaults 18 | from the OpenSimulator distribution and all the [OSGrid] 19 | configuration is done in `Final.ini`. 20 | 21 | [OSGrid]: https://osgrid.org 22 | [OpenSimulator]: http://opensimulator.org 23 | -------------------------------------------------------------------------------- /image-opensim/build-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Build docker images for running a standalone version of OpenSimulator 3 | 4 | BUILD_DATE=$(date "+%Y%m%d.%H%M") 5 | BUILD_DAY=$(date "+%Y%m%d") 6 | # version infomation about opensim-docker 7 | OS_DOCKER_VERSION=$(cat ../VERSION.txt) 8 | OS_DOCKER_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) 9 | OS_DOCKER_GIT_COMMIT=$(git rev-parse HEAD) 10 | OS_DOCKER_GIT_COMMIT_SHORT=$(git rev-parse --short HEAD) 11 | 12 | # Set up the environment with all the environment build parameters 13 | source ./env 14 | 15 | # Copy the run-scripts into the local directory here since the Docker build 16 | # only knowns the context of this directory 17 | rm -rf temp-run-scripts 18 | cp -r ../run-scripts temp-run-scripts 19 | 20 | # Build the image 21 | docker build \ 22 | --pull \ 23 | --build-arg BUILD_DATE=$BUILD_DATE \ 24 | --build-arg BUILD_DAY=$BUILD_DAY \ 25 | --build-arg OS_DOCKER_VERSION=$OS_DOCKER_VERSION \ 26 | --build-arg OS_DOCKER_GIT_BRANCH=$OS_DOCKER_GIT_BRANCH \ 27 | --build-arg OS_DOCKER_GIT_COMMIT=$OS_DOCKER_GIT_COMMIT \ 28 | --build-arg OS_DOCKER_GIT_COMMIT_SHORT=$OS_DOCKER_GIT_COMMIT_SHORT \ 29 | --build-arg OS_GIT_REPO=$OS_GIT_REPO \ 30 | --build-arg OS_GIT_BRANCH=$OS_GIT_BRANCH \ 31 | --build-arg OS_BUILDTARGET=$OS_BUILDTARGET \ 32 | --build-arg OS_SLN=$OS_SLN \ 33 | -t "$IMAGE_NAME" \ 34 | -f Dockerfile-opensim \ 35 | . 36 | 37 | # Remove the temporarily copied run-scripts to reduce any confusion 38 | rm -rf temp-run-scripts 39 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/README: -------------------------------------------------------------------------------- 1 | CONFIGURATION ON DOCKER IMAGE 2 | 3 | This directory will be mounted in `bin/config` and the running simulator will 4 | read the `Includes.ini` file. This file imports environment variables, sets 5 | global "Const" parameters, and then includes the necessary INI files (like 6 | `StandaloneCommon.ini`, `osslEnable.ini`, ...). 7 | 8 | Most of the files in `config-include` are copies of the standard files from 9 | the repository. In this setup, most parameters are changed by the overrides 10 | that happen in `Final.ini` which is the last INI files read (and thus anything 11 | specified in `Final.ini` overrides anything that came before. 12 | 13 | The convention used herein is to use the unchanged INI files from the repository 14 | and to make any changes and additions in `Final.ini`. 15 | 16 | When the docker image is run, the startup script also checks for 'bin/config/setup.sh' 17 | and, if it exists, it is executed. The included version adds `os-secrets` to the 18 | running environment so those values can be used in the INI files (see the 19 | "[Environment]" section in `Includes.ini`. So, things like database passwords 20 | only need to be entered into `os-secrets` and they will be used in the INI files. 21 | You don't need to change any database configuration in any of the INI files. 22 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/Regions/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Misterblue/opensim-docker/eb3cbb7aef4ba4f1495d1bb299a863492283b1f1/image-opensim/config-osgrid/Regions/.keep -------------------------------------------------------------------------------- /image-opensim/config-osgrid/Regions/Regions.ini: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 2f75645d-acfd-4296-9cc5-8b1f0537fdaf 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/Regions/Regions.ini.example: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 11111111-2222-3333-4444-555555555555 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/config-include/FlotsamCache.ini: -------------------------------------------------------------------------------- 1 | [AssetCache] 2 | ;; 3 | ;; Options for FlotsamAssetCache 4 | ;; 5 | 6 | ; cache directory can be shared by multiple instances 7 | CacheDirectory = ./assetcache 8 | ; Other examples: 9 | ;CacheDirectory = /directory/writable/by/OpenSim/instance 10 | 11 | ; Log level 12 | ; 0 - (Error) Errors only 13 | ; 1 - (Info) Hit Rate Stats + Level 0 14 | ; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1 15 | ; 16 | LogLevel = 0 17 | 18 | ; How often should hit rates be displayed (given in AssetRequests) 19 | ; 0 to disable 20 | HitRateDisplay = 100 21 | 22 | ; Set to false for no memory cache 23 | ; assets can be requested several times in short periods 24 | ; so even a small memory cache is useful 25 | MemoryCacheEnabled = false 26 | 27 | ; If a memory cache hit happens, or the asset is still in memory 28 | ; due to other causes, update the timestamp on the disk file anyway. 29 | ; Don't turn this on unless you share your asset cache between simulators 30 | ; AND use an external process, e.g. cron job, to clean it up. 31 | UpdateFileTimeOnCacheHit = false 32 | 33 | ; Enabling this will cache negative fetches. If an asset is negative-cached 34 | ; it will not be re-requested from the asset server again for a while. 35 | ; Generally, this is a good thing. 36 | ; 37 | ; Regular expiration settings (non-sliding) mean that the asset will be 38 | ; retried after the time has expired. Sliding expiration means that 39 | ; the time the negative cache will keep the asset is refreshed each 40 | ; time a fetch is attempted. Use sliding expiration if you have rogue 41 | ; scripts hammering the asset server with requests for nonexistent 42 | ; assets. 43 | ; 44 | ; There are two cases where negative caching may cause issues: 45 | ; 46 | ; 1 - If an invalid asset is repeatedly requested by a script and that asset is 47 | ; subsequently created, it will not be seen until fcache clear 48 | ; is used. This is a very theoretical scenario since UUID collisions 49 | ; are deemed to be not occuring in practice. 50 | ; This can only become an issue with sliding expiration time. 51 | ; 52 | ; 2 - If the asset service is clustered, an asset may not have propagated 53 | ; to all cluster members when it is first attempted to fetch it. 54 | ; This may theoretically occur with networked vendor systems and 55 | ; would lead to an asset not found message. However, after the 56 | ; expiration time has elapsed, the asset will then be fetchable. 57 | ; 58 | ; The defaults below are suitable for all small to medium installations 59 | ; including grids. 60 | NegativeCacheEnabled = true 61 | NegativeCacheTimeout = 120 62 | NegativeCacheSliding = false 63 | 64 | ; Set to false for no file cache 65 | FileCacheEnabled = true 66 | 67 | ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes 68 | ; even a few minutes may mean many assets loaded to memory, if not all. 69 | ; this is good if memory is not a problem. 70 | ; if memory is a problem then a few seconds may actually save same. 71 | ; see hit rates with console comand: fcache status 72 | MemoryCacheTimeout = .016 ; one minute 73 | 74 | ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes 75 | ; Specify 0 if you do not want your disk cache to expire 76 | FileCacheTimeout = 48 77 | 78 | ; How often {in hours} should the disk be checked for expired files 79 | ; Specify 0 to disable expiration checking 80 | FileCleanupTimer = 1.0 81 | 82 | ; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how 83 | ; long (in miliseconds) to block a request thread while trying to complete 84 | ; an existing write to disk. 85 | ; NOTE: THIS PARAMETER IS NOT CURRENTLY USED BY THE CACHE 86 | ; WaitOnInprogressTimeout = 3000 87 | 88 | ; Number of tiers to use for cache directories (current valid 89 | ; range 1 to 3) 90 | ;CacheDirectoryTiers = 1 91 | 92 | ; Number of letters per path tier, 1 will create 16 directories 93 | ; per tier, 2 - 256, 3 - 4096 and 4 - 65K 94 | ;CacheDirectoryTierLength = 3 95 | 96 | ; Warning level for cache directory size 97 | ;CacheWarnAt = 30000 98 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/config-include/GridHypergrid.ini: -------------------------------------------------------------------------------- 1 | ;; 2 | ;; Please don't change this file. 3 | ;; All optional settings are in GridCommon.ini.example, 4 | ;; which you can copy and change. 5 | ;; 6 | 7 | [Includes] 8 | Include-Common = "config-include/GridCommon.ini" 9 | 10 | [Startup] 11 | WorldMapModule = "HGWorldMap" 12 | 13 | [Modules] 14 | AssetServices = "RegionAssetConnector" 15 | InventoryServices = "HGInventoryBroker" 16 | GridServices = "RegionGridServicesConnector" 17 | AvatarServices = "RemoteAvatarServicesConnector" 18 | NeighbourServices = "NeighbourServicesOutConnector" 19 | AuthenticationServices = "RemoteAuthenticationServicesConnector" 20 | AuthorizationServices = "LocalAuthorizationServicesConnector" 21 | PresenceServices = "RemotePresenceServicesConnector" 22 | UserAccountServices = "RemoteUserAccountServicesConnector" 23 | AgentPreferencesServices= "RemoteAgentPreferencesServicesConnector" 24 | GridUserServices = "RemoteGridUserServicesConnector" 25 | SimulationServices = "RemoteSimulationConnectorModule" 26 | EntityTransferModule = "HGEntityTransferModule" 27 | InventoryAccessModule = "HGInventoryAccessModule" 28 | LandServices = "RemoteLandServicesConnector" 29 | FriendsModule = "HGFriendsModule" 30 | MapImageService = "MapImageServiceModule" 31 | UserManagementModule = "HGUserManagementModule" 32 | SearchModule = "BasicSearchModule" 33 | MuteListService = "RemoteMuteListServicesConnector" 34 | 35 | LandServiceInConnector = true 36 | NeighbourServiceInConnector = true 37 | SimulationServiceInConnector = true 38 | LibraryModule = true 39 | 40 | Setup_EntityTransferModule = disabled 41 | Setup_WorldMapModule = disabled 42 | 43 | [SimulationDataStore] 44 | LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService" 45 | 46 | [EstateDataStore] 47 | LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" 48 | 49 | [AssetService] 50 | LocalGridAssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" 51 | HypergridAssetService = "OpenSim.Services.Connectors.dll:HGAssetServiceConnector" 52 | 53 | [InventoryService] 54 | LocalGridInventoryService = "OpenSim.Region.CoreModules.dll:RemoteXInventoryServicesConnector" 55 | 56 | [GridService] 57 | LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" 58 | StorageProvider = "OpenSim.Data.Null.dll:NullRegionData" 59 | 60 | NetworkConnector = "OpenSim.Services.Connectors.dll:GridServicesConnector" 61 | 62 | ; Needed to display non-default map tile images for linked regions 63 | AssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" 64 | 65 | HypergridLinker = true 66 | AllowHypergridMapSearch = true 67 | SuppressConsoleCommands = true 68 | 69 | [LibraryService] 70 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService" 71 | LibraryName = "OpenSim Library" 72 | DefaultLibrary = "./inventory/Libraries.xml" 73 | 74 | [Friends] 75 | Connector = "OpenSim.Services.Connectors.dll:FriendsServicesConnector" 76 | 77 | [Messaging] 78 | MessageTransferModule = HGMessageTransferModule 79 | LureModule = HGLureModule 80 | 81 | [HGInstantMessageService] 82 | LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService" 83 | GridService = "OpenSim.Services.Connectors.dll:GridServicesConnector" 84 | PresenceService = "OpenSim.Services.Connectors.dll:PresenceServicesConnector" 85 | UserAgentService = "OpenSim.Services.Connectors.dll:UserAgentServiceConnector" 86 | 87 | [MapImageService] 88 | LocalServiceModule = "OpenSim.Services.Connectors.dll:MapImageServicesConnector" 89 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/config-include/storage/SQLiteStandalone.ini: -------------------------------------------------------------------------------- 1 | ; These are the initialization settings for running OpenSim Standalone with an SQLite database 2 | 3 | [DatabaseService] 4 | StorageProvider = "OpenSim.Data.SQLite.dll" 5 | ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" 6 | 7 | [AssetService] 8 | ConnectionString = "URI=file:Asset.db,version=3" 9 | 10 | ; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration. 11 | ; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead. 12 | ; However, the internal asset service will still use the [AssetService] section. 13 | ; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService] 14 | ; so that they both access the same database. 15 | ; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and 16 | ; do not have separate connection strings for different services. 17 | [HGAssetService] 18 | ConnectionString = "URI=file:Asset.db,version=3" 19 | 20 | [InventoryService] 21 | ;ConnectionString = "URI=file:inventory.db,version=3" 22 | ; if you have a legacy inventory store use the connection string below 23 | ConnectionString = "URI=file:inventory.db,version=3,UseUTF16Encoding=True" 24 | 25 | [AvatarService] 26 | ConnectionString = "URI=file:avatars.db,version=3" 27 | 28 | [AuthenticationService] 29 | ConnectionString = "URI=file:auth.db,version=3" 30 | 31 | [UserAccountService] 32 | ConnectionString = "URI=file:userprofiles.db,version=3" 33 | 34 | [GridUserService] 35 | ConnectionString = "URI=file:griduser.db,version=3" 36 | 37 | [FriendsService] 38 | ConnectionString = "URI=file:friends.db,version=3" 39 | 40 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/os-secrets: -------------------------------------------------------------------------------- 1 | # File of secrets for the build and run images. 2 | # This file is a template of the values to use. 3 | # NEVER, NEVER EVER CHECK-IN the version with the real values!! 4 | 5 | # The configuration files look for the file 'os-secrets.crypt' and, when 6 | # found, runs 'ccrypt' using the password from the environment variable 7 | # "OS_CONFIGKEY". So, edit this file and do: 8 | # cp os-secrets tempFile 9 | # 10 | # ccrypt -e -E "OS_CONFIGKEY" < tempFile > os-secrets.crypt 11 | # rm tempFile 12 | # or (exposing the key in the bash history): 13 | # ccrypt -e -K thekey < os-secrets > os-secrets.crypt 14 | # 15 | # Later, if you need to review the passwords, decrypt the file with: 16 | # ccrypt -d -E "OS_CONFIGKEY" < os-secrets.crypt 17 | 18 | export MYSQL_ROOT_PASSWORD=unknownStuff 19 | export MARIADB_ROOT_PASSWORD=unknownStuff 20 | export MYSQL_DB_HOST=dbservice 21 | export MYSQL_DB_DB=opensim 22 | export MYSQL_DB_USER=opensim 23 | export MYSQL_DB_USER_PW=moreUnknownStuff 24 | 25 | # The following are used to initialize estate if running standalone 26 | export DEFAULT_ESTATE_NAME="MyEstate" 27 | export DEFAULT_ESTATE_OWNER="Donald Duck" 28 | export DEFAULT_ESTATE_OWNER_UUID=ff5ec374-8028-43cb-ae58-8d38d70729e5 29 | export DEFAULT_ESTATE_OWNER_PW=SomeSecret 30 | 31 | # These are values that should be in other configurtion files. 32 | # Someday, there might be a system that inserts these parameters into files. 33 | # For the moment, the per-installation parameters must be editted by hand. 34 | # Host name that is advertized to a client. Set in Includes.ini and Region.ini 35 | export EXTERNAL_HOSTNAME=127.0.0.1 36 | 37 | # Did I mention that one should NEVER, NEVER, EVER check-in a version 38 | # with the real passwords in it? 39 | 40 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/scripts/initializeDb.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script to create database 'opensim' in mysql if it does not exist. 3 | # This is usually run in the container on the first time it is invoked. 4 | # This creates the database for this simulator (MYSQL_DB_HOST) if it 5 | # doesn't exist. 6 | # 7 | # Someone has set the environment variables before running this. 8 | # Needs: 9 | # MYSQL_ROOT_PASSWORD 10 | # MYSQL_DB_HOST 11 | # MYSQL_DB_DB 12 | # MYSQL_DB_USER 13 | # MYSQL_DB_USER_PW 14 | 15 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 16 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 17 | 18 | echo "opensim-docker: initializeDb.sh: " 19 | 20 | cd "$OPENSIMCONFIG" 21 | 22 | if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then 23 | for needed in "MYSQL_DB_DB" "MYSQL_DB_HOST" "MYSQL_DB_USER" "MYSQL_DB_USER_PW" ; do 24 | if [[ -z "$!needed" ]] ; then 25 | echo "opensim-docker: initializeDb.sh: missing required env parameter $needed" 26 | echo "opensim-docker: initializeDb.sh: DATABASE NOT INITIALIZED" 27 | exit 5 28 | fi 29 | done 30 | 31 | SQLCMDS=/tmp/mymy$$ 32 | SQLOPTIONS=/tmp/mymyoptions$$ 33 | rm -f "$SQLCMDS" 34 | rm -f "$SQLOPTIONS" 35 | 36 | # Create command file that creates the SQL database and SQL user for this simulator. 37 | cat > "$SQLCMDS" < "$SQLOPTIONS" < /dev/null ; do 53 | echo "opensim-docker: initializeDb.sh: Waiting on database to be ready" 54 | sleep 2 55 | done 56 | echo "opensim-docker: initializeDb.sh: Database is ready" 57 | 58 | 59 | HASDB=$(mysql --defaults-extra-file=$SQLOPTIONS -e "show databases" | grep "^${MYSQL_DB_DB}$") 60 | 61 | if [[ -z "$HASDB" ]] ; then 62 | echo "opensim-docker: initialzeDb.sh: creating opensim database" 63 | mysql --defaults-extra-file=$SQLOPTIONS < "$SQLCMDS" 64 | else 65 | echo "opensim-docker: initialzeDb.sh: opensim database has already been created" 66 | fi 67 | 68 | rm -f "$SQLCMDS" 69 | rm -f "$SQLOPTIONS" 70 | else 71 | echo "opensim-docker: initializeDb.sh: Not configuring SQL database" 72 | fi 73 | 74 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/scripts/setEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script that sets up the environment variables 3 | # This script is run before the docker-compose file is run to get the 4 | # database password and it is run when the opensim Docker container starts 5 | # to get all the values for the configuration files. 6 | 7 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 8 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 9 | 10 | cd "$OPENSIMCONFIG" 11 | 12 | # See if we have encrypted secrets 13 | unset HAVE_SECRETS 14 | if [[ ! -z "$OS_CONFIGKEY" ]] ; then 15 | for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do 16 | if [[ -e "$secretsFile" ]] ; then 17 | echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" 18 | source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") 19 | HAVE_SECRETS=yes 20 | break; 21 | else 22 | echo "opensim-docker: setEnvironment.sh: no encrypted secrets file" 23 | fi 24 | done 25 | fi 26 | 27 | # If no encrypted secrets, maybe unsecure plain-text secrets are available 28 | if [[ -z "$HAVE_SECRETS" ]] ; then 29 | echo "opensim-docker: setEnvironment.sh: trying plain text secrets" 30 | for secretsFile in $OPENSIMCONFIG/os-secrets ; do 31 | if [[ -e "$secretsFile" ]] ; then 32 | echo "opensim-docker: setEnvironment.sh: plain text secrets from \"${secretsFile}\"" 33 | source "$secretsFile" 34 | break; 35 | else 36 | echo "opensim-docker: setEnvironment.sh: no plain text secrets file" 37 | fi 38 | done 39 | fi 40 | -------------------------------------------------------------------------------- /image-opensim/config-osgrid/setup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script run when the container starts and before OpenSimulator is started 3 | # 4 | # The operations done here are: 5 | # -- if first time called, setup DB and initialize variables in configuration files 6 | # -- move sub-config specific Includes.ini into the config directory 7 | # -- update all the configuration files with environment variables 8 | 9 | export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 10 | export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 11 | 12 | echo "opensim-docker: setup.sh: OPENSIMCONFIG=\"${OPENSIMCONFIG}\"" 13 | 14 | FIRSTTIMEFLAG=${HOME}/.configFirstTime 15 | 16 | cd "$OPENSIMCONFIG" 17 | # This sets CONFIG_NAME which is the configuration subdirectory 18 | source ./scripts/setEnvironment.sh 19 | 20 | # If this is the first time run, do database setup and some one-time configuration updates 21 | if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then 22 | echo "opensim-docker: setup.sh: first time" 23 | cd "$OPENSIMCONFIG" 24 | # Do any database account and db creation 25 | ./scripts/initializeDb.sh 26 | touch "$FIRSTTIMEFLAG" 27 | fi 28 | 29 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/README: -------------------------------------------------------------------------------- 1 | CONFIGURATION ON DOCKER IMAGE 2 | 3 | This directory will be mounted in `bin/config` and the running simulator will 4 | read the `Includes.ini` file. This file imports environment variables, sets 5 | global "Const" parameters, and then includes the necessary INI files (like 6 | `StandaloneCommon.ini`, `osslEnable.ini`, ...). 7 | 8 | Most of the files in `config-include` are copies of the standard files from 9 | the repository. In this setup, most parameters are changed by the overrides 10 | that happen in `Final.ini` which is the last INI files read (and thus anything 11 | specified in `Final.ini` overrides anything that came before. 12 | 13 | The convention used herein is to use the unchanged INI files from the repository 14 | and to make any changes and additions in `Final.ini`. 15 | 16 | When the docker image is run, the startup script also checks for 'bin/config/setup.sh' 17 | and, if it exists, it is executed. The included version adds `os-secrets` to the 18 | running environment so those values can be used in the INI files (see the 19 | "[Environment]" section in `Includes.ini`. So, things like database passwords 20 | only need to be entered into `os-secrets` and they will be used in the INI files. 21 | You don't need to change any database configuration in any of the INI files. 22 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/Regions/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Misterblue/opensim-docker/eb3cbb7aef4ba4f1495d1bb299a863492283b1f1/image-opensim/config-standalone/Regions/.keep -------------------------------------------------------------------------------- /image-opensim/config-standalone/Regions/Regions.ini: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 2f75645d-acfd-4296-9cc5-8b1f0537fdaf 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/Regions/Regions.ini.example: -------------------------------------------------------------------------------- 1 | ; * This is an example region config file. 2 | ; * 3 | ; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you. 4 | ; * So there is no need to change this file directly, it is only for reference. 5 | ; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below. 6 | ; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator. 7 | ; * 8 | ; * You can multiple regions into one file or make one file per region 9 | ; * The section name is the region name 10 | ; * 11 | 12 | [Default Region] 13 | 14 | ; * 15 | ; * You MUST change this! It will NOT be done for you! 16 | ; * 17 | 18 | RegionUUID = 11111111-2222-3333-4444-555555555555 19 | 20 | Location = 1000,1000 21 | InternalAddress = 0.0.0.0 22 | InternalPort = 9000 23 | AllowAlternatePorts = False 24 | ExternalHostName = SYSTEMIP 25 | 26 | ;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100 27 | ;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database 28 | ;TargetEstate = 0 29 | 30 | ; * 31 | ; * Variable-sized regions allows the creation of large, borderless spaces. 32 | ; * The default is 256 meters. For larger spaces, set these to multiples of 256. 33 | ; * For the time being, X and Y need to be the same. 34 | ; * 35 | ; SizeX = 512 36 | ; SizeY = 512 37 | 38 | ; * Default region landing point used when no teleport coords are specified 39 | ; DefaultLanding = <128,128,30> 40 | 41 | ; * 42 | ; * Prim data 43 | ; * This allows limiting the sizes of prims and the region prim count 44 | ; * 45 | 46 | ; NonPhysicalPrimMax = 256 47 | ; PhysicalPrimMax = 64 48 | ; ClampPrimSize = False 49 | ; MaxPrims = 15000 50 | ; MaxAgents = 100 51 | 52 | ; * Max prims per user (per parcel). 53 | ; * Negative values will disable the check. 54 | ; MaxPrimsPerUser = -1 55 | 56 | ; * 57 | ; * Multi-Tenancy. Only set if needed 58 | ; * 59 | 60 | ; ScopeID = "00000000-0000-0000-0000-000000000000" 61 | 62 | ; * 63 | ; * Product name (used in search from viewer 1.23 64 | ; * 65 | 66 | ; RegionType = "Mainland" 67 | 68 | ; * Region Specific Static Maptiles: 69 | ; * Important: To use any kind of texture *assets* as a static maptile, the following 70 | ; * things must be set in the [Map] section of OpenSim.ini : 71 | ; * 72 | ; * MapImageModule = "MapImageModule" 73 | ; * GenerateMaptiles = false 74 | ; * 75 | ; * Now, there is a setting in [Map] in OpenSim.ini called 76 | ; * 77 | ; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 78 | ; * 79 | ; * where, given the criteria above, lets you specify the UUID of a texture asset to use 80 | ; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for 81 | ; * Simulators that run multiple regions: 82 | 83 | ; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000 84 | 85 | 86 | ; * Region Specific Static Maptiles from file: 87 | ; * It is also possible to create maptiles using external image files of the right size 88 | ; * and supported formats (bmp,png,jpg in RGB 24bpp format) 89 | ; * 90 | ; * Important: To use any kind of texture *files* as a static maptile, the following 91 | ; * things must be set in the [Map] section of OpenSim.ini : 92 | ; * 93 | ; * MapImageModule = "MapImageModule" 94 | ; * GenerateMaptiles = true 95 | ; * 96 | ; * The image must be the same size in pixels as the region or varregion is in meters. 97 | ; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion 98 | ; * of size 1280x1280m. The image can be loaded from anywhere by setting the path 99 | ; * ie: MaptileStaticFile = "maptiles/SomeFile.png" 100 | ; * 101 | ; * If this setting is used, then the base map is generated from this file instead of being 102 | ; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are 103 | ; * still drawn on top of the static map by the World Map module. 104 | 105 | ; MaptileStaticFile = "SomeFile.png" 106 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/config-include/Final.ini: -------------------------------------------------------------------------------- 1 | ; Misc over-rides and settings 2 | 3 | [Startup] 4 | MaxPoolThreads = 45 5 | PhysicalPrimMax = 256 6 | ; physics = BulletSim 7 | physics = ubODE 8 | meshing = ubODEMeshmerizer 9 | ; physics = OpenDynamicsEngine 10 | ; CombineContiguousRegions = true 11 | 12 | ; Turn off periodic statistics output to console 13 | LogShowStatsSeconds = 0 14 | 15 | [DatabaseService] 16 | ; SQLite 17 | ; Include-Storage = "/home/opensim/opensim/bin/config/config-include/storage/SQLiteStandalone.ini" 18 | 19 | ; MySql 20 | ; Uncomment these lines if you want to use mysql storage 21 | ; Change the connection string to your db details 22 | StorageProvider = "OpenSim.Data.MySQL.dll" 23 | ConnectionString = "Data Source=${Environment|MYSQL_DB_HOST};Database=${Environment|MYSQL_DB_DB};User ID=${Environment|MYSQL_DB_USER};Password=${Environment|MYSQL_DB_USER_PW};SslMode=None;" 24 | 25 | [Estates] 26 | ; NOTE That names and passwords come from environment variables set from os-secrets 27 | DefaultEstateName = ${Environment|DEFAULT_ESTATE_NAME} 28 | DefaultEstateOwnerName = ${Environment|DEFAULT_ESTATE_OWNER} 29 | ; ** Standalone Estate Settings ** 30 | ; The following parameters will only be used on a standalone system to 31 | ; create an estate owner that does not already exist 32 | DefaultEstateOwnerUUID = ${Environment|DEFAULT_ESTATE_OWNER_UUID} 33 | DefaultEstateOwnerEMail = owner@example.com 34 | DefaultEstateOwnerPassword = ${Environment|DEFAULT_ESTATE_OWNER_PW} 35 | 36 | [Terrain] 37 | SendTerrainUpdatesByViewDistance = true 38 | 39 | [ExtendedPhysics] 40 | Enabled = true 41 | 42 | [XEngine] 43 | ; If one uses XEngine, use a larger thread stack 44 | ThreadStackSize = 500000 45 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/config-include/FlotsamCache.ini: -------------------------------------------------------------------------------- 1 | [AssetCache] 2 | ;; 3 | ;; Options for FlotsamAssetCache 4 | ;; 5 | 6 | ; cache directory can be shared by multiple instances 7 | CacheDirectory = ./assetcache 8 | ; Other examples: 9 | ;CacheDirectory = /directory/writable/by/OpenSim/instance 10 | 11 | ; Log level 12 | ; 0 - (Error) Errors only 13 | ; 1 - (Info) Hit Rate Stats + Level 0 14 | ; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1 15 | ; 16 | LogLevel = 0 17 | 18 | ; How often should hit rates be displayed (given in AssetRequests) 19 | ; 0 to disable 20 | HitRateDisplay = 100 21 | 22 | ; Set to false for no memory cache 23 | ; assets can be requested several times in short periods 24 | ; so even a small memory cache is useful 25 | MemoryCacheEnabled = false 26 | 27 | ; If a memory cache hit happens, or the asset is still in memory 28 | ; due to other causes, update the timestamp on the disk file anyway. 29 | ; Don't turn this on unless you share your asset cache between simulators 30 | ; AND use an external process, e.g. cron job, to clean it up. 31 | UpdateFileTimeOnCacheHit = false 32 | 33 | ; Enabling this will cache negative fetches. If an asset is negative-cached 34 | ; it will not be re-requested from the asset server again for a while. 35 | ; Generally, this is a good thing. 36 | ; 37 | ; Regular expiration settings (non-sliding) mean that the asset will be 38 | ; retried after the time has expired. Sliding expiration means that 39 | ; the time the negative cache will keep the asset is refreshed each 40 | ; time a fetch is attempted. Use sliding expiration if you have rogue 41 | ; scripts hammering the asset server with requests for nonexistent 42 | ; assets. 43 | ; 44 | ; There are two cases where negative caching may cause issues: 45 | ; 46 | ; 1 - If an invalid asset is repeatedly requested by a script and that asset is 47 | ; subsequently created, it will not be seen until fcache clear 48 | ; is used. This is a very theoretical scenario since UUID collisions 49 | ; are deemed to be not occuring in practice. 50 | ; This can only become an issue with sliding expiration time. 51 | ; 52 | ; 2 - If the asset service is clustered, an asset may not have propagated 53 | ; to all cluster members when it is first attempted to fetch it. 54 | ; This may theoretically occur with networked vendor systems and 55 | ; would lead to an asset not found message. However, after the 56 | ; expiration time has elapsed, the asset will then be fetchable. 57 | ; 58 | ; The defaults below are suitable for all small to medium installations 59 | ; including grids. 60 | NegativeCacheEnabled = true 61 | NegativeCacheTimeout = 120 62 | NegativeCacheSliding = false 63 | 64 | ; Set to false for no file cache 65 | FileCacheEnabled = true 66 | 67 | ; How long {in hours} to keep assets cached in memory, .5 == 30 minutes 68 | ; even a few minutes may mean many assets loaded to memory, if not all. 69 | ; this is good if memory is not a problem. 70 | ; if memory is a problem then a few seconds may actually save same. 71 | ; see hit rates with console comand: fcache status 72 | MemoryCacheTimeout = .016 ; one minute 73 | 74 | ; How long {in hours} to keep assets cached on disk, .5 == 30 minutes 75 | ; Specify 0 if you do not want your disk cache to expire 76 | FileCacheTimeout = 48 77 | 78 | ; How often {in hours} should the disk be checked for expired files 79 | ; Specify 0 to disable expiration checking 80 | FileCleanupTimer = 0.0 ; disabled 81 | 82 | ; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how 83 | ; long (in miliseconds) to block a request thread while trying to complete 84 | ; an existing write to disk. 85 | ; NOTE: THIS PARAMETER IS NOT CURRENTLY USED BY THE CACHE 86 | ; WaitOnInprogressTimeout = 3000 87 | 88 | ; Number of tiers to use for cache directories (current valid 89 | ; range 1 to 3) 90 | ;CacheDirectoryTiers = 1 91 | 92 | ; Number of letters per path tier, 1 will create 16 directories 93 | ; per tier, 2 - 256, 3 - 4096 and 4 - 65K 94 | ;CacheDirectoryTierLength = 3 95 | 96 | ; Warning level for cache directory size 97 | ;CacheWarnAt = 30000 98 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/config-include/storage/SQLiteStandalone.ini: -------------------------------------------------------------------------------- 1 | ; These are the initialization settings for running OpenSim Standalone with an SQLite database 2 | 3 | [DatabaseService] 4 | StorageProvider = "OpenSim.Data.SQLite.dll" 5 | ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True" 6 | 7 | [AssetService] 8 | ConnectionString = "URI=file:Asset.db,version=3" 9 | 10 | ; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration. 11 | ; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead. 12 | ; However, the internal asset service will still use the [AssetService] section. 13 | ; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService] 14 | ; so that they both access the same database. 15 | ; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and 16 | ; do not have separate connection strings for different services. 17 | [HGAssetService] 18 | ConnectionString = "URI=file:Asset.db,version=3" 19 | 20 | [InventoryService] 21 | ;ConnectionString = "URI=file:inventory.db,version=3" 22 | ; if you have a legacy inventory store use the connection string below 23 | ConnectionString = "URI=file:inventory.db,version=3,UseUTF16Encoding=True" 24 | 25 | [AvatarService] 26 | ConnectionString = "URI=file:avatars.db,version=3" 27 | 28 | [AuthenticationService] 29 | ConnectionString = "URI=file:auth.db,version=3" 30 | 31 | [UserAccountService] 32 | ConnectionString = "URI=file:userprofiles.db,version=3" 33 | 34 | [GridUserService] 35 | ConnectionString = "URI=file:griduser.db,version=3" 36 | 37 | [FriendsService] 38 | ConnectionString = "URI=file:friends.db,version=3" 39 | 40 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/os-secrets: -------------------------------------------------------------------------------- 1 | # File of secrets for the build and run images. 2 | # This file is a template of the values to use. 3 | # NEVER, NEVER EVER CHECK-IN the version with the real values!! 4 | 5 | # The configuration files look for the file 'os-secrets.crypt' and, when 6 | # found, runs 'ccrypt' using the password from the environment variable 7 | # "OS_CONFIGKEY". So, edit this file and do: 8 | # cp os-secrets tempFile 9 | # 10 | # ccrypt -e -E "OS_CONFIGKEY" < tempFile > os-secrets.crypt 11 | # rm tempFile 12 | # or (exposing the key in the bash history): 13 | # ccrypt -e -K thekey < os-secrets > os-secrets.crypt 14 | # 15 | # Later, if you need to review the passwords, decrypt the file with: 16 | # ccrypt -d -E "OS_CONFIGKEY" < os-secrets.crypt 17 | 18 | export MYSQL_ROOT_PASSWORD=unknownStuff 19 | export MARIADB_ROOT_PASSWORD=unknownStuff 20 | export MYSQL_DB_HOST=dbservice 21 | export MYSQL_DB_DB=opensim 22 | export MYSQL_DB_USER=opensim 23 | export MYSQL_DB_USER_PW=moreUnknownStuff 24 | 25 | # The following are used to initialize estate if running standalone 26 | export DEFAULT_ESTATE_NAME="MyEstate" 27 | export DEFAULT_ESTATE_OWNER="Donald Duck" 28 | export DEFAULT_ESTATE_OWNER_UUID=ff5ec374-8028-43cb-ae58-8d38d70729e5 29 | export DEFAULT_ESTATE_OWNER_PW=SomeSecret 30 | 31 | # These are values that should be in other configurtion files. 32 | # Someday, there might be a system that inserts these parameters into files. 33 | # For the moment, the per-installation parameters must be editted by hand. 34 | # Host name that is advertized to a client. Set in Includes.ini and Region.ini 35 | export EXTERNAL_HOSTNAME=127.0.0.1 36 | 37 | # Did I mention that one should NEVER, NEVER, EVER check-in a version 38 | # with the real passwords in it? 39 | 40 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/scripts/initializeDb.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script to create database 'opensim' in mysql if it does not exist. 3 | # This is usually run in the container on the first time it is invoked. 4 | # This creates the database for this simulator (MYSQL_DB_HOST) if it 5 | # doesn't exist. 6 | # 7 | # Someone has set the environment variables before running this. 8 | # Needs: 9 | # MYSQL_ROOT_PASSWORD 10 | # MYSQL_DB_HOST 11 | # MYSQL_DB_DB 12 | # MYSQL_DB_USER 13 | # MYSQL_DB_USER_PW 14 | 15 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 16 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 17 | 18 | echo "opensim-docker: initializeDb.sh: " 19 | 20 | cd "$OPENSIMCONFIG" 21 | 22 | if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then 23 | for needed in "MYSQL_DB_DB" "MYSQL_DB_HOST" "MYSQL_DB_USER" "MYSQL_DB_USER_PW" ; do 24 | if [[ -z "$!needed" ]] ; then 25 | echo "opensim-docker: initializeDb.sh: missing required env parameter $needed" 26 | echo "opensim-docker: initializeDb.sh: DATABASE NOT INITIALIZED" 27 | exit 5 28 | fi 29 | done 30 | 31 | SQLCMDS=/tmp/mymy$$ 32 | SQLOPTIONS=/tmp/mymyoptions$$ 33 | rm -f "$SQLCMDS" 34 | rm -f "$SQLOPTIONS" 35 | 36 | # Create command file that creates the SQL database and SQL user for this simulator. 37 | cat > "$SQLCMDS" < "$SQLOPTIONS" < /dev/null ; do 53 | echo "opensim-docker: initializeDb.sh: Waiting on database to be ready" 54 | sleep 2 55 | done 56 | echo "opensim-docker: initializeDb.sh: Database is ready" 57 | 58 | 59 | HASDB=$(mysql --defaults-extra-file=$SQLOPTIONS -e "show databases" | grep "^${MYSQL_DB_DB}$") 60 | 61 | if [[ -z "$HASDB" ]] ; then 62 | echo "opensim-docker: initialzeDb.sh: creating opensim database" 63 | mysql --defaults-extra-file=$SQLOPTIONS < "$SQLCMDS" 64 | else 65 | echo "opensim-docker: initialzeDb.sh: opensim database has already been created" 66 | fi 67 | 68 | rm -f "$SQLCMDS" 69 | rm -f "$SQLOPTIONS" 70 | else 71 | echo "opensim-docker: initializeDb.sh: Not configuring SQL database" 72 | fi 73 | 74 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/scripts/setEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script that sets up the environment variables 3 | # This script is run before the docker-compose file is run to get the 4 | # database password and it is run when the opensim Docker container starts 5 | # to get all the values for the configuration files. 6 | 7 | OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 8 | OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 9 | 10 | cd "$OPENSIMCONFIG" 11 | 12 | # See if we have encrypted secrets 13 | unset HAVE_SECRETS 14 | if [[ ! -z "$OS_CONFIGKEY" ]] ; then 15 | for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do 16 | if [[ -e "$secretsFile" ]] ; then 17 | echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\"" 18 | source <(ccrypt -c -E OS_CONFIGKEY "$secretsFile") 19 | HAVE_SECRETS=yes 20 | break; 21 | else 22 | echo "opensim-docker: setEnvironment.sh: no encrypted secrets file" 23 | fi 24 | done 25 | fi 26 | 27 | # If no encrypted secrets, maybe unsecure plain-text secrets are available 28 | if [[ -z "$HAVE_SECRETS" ]] ; then 29 | echo "opensim-docker: setEnvironment.sh: trying plain text secrets" 30 | for secretsFile in $OPENSIMCONFIG/os-secrets ; do 31 | if [[ -e "$secretsFile" ]] ; then 32 | echo "opensim-docker: setEnvironment.sh: plain text secrets from \"${secretsFile}\"" 33 | source "$secretsFile" 34 | break; 35 | else 36 | echo "opensim-docker: setEnvironment.sh: no plain text secrets file" 37 | fi 38 | done 39 | fi 40 | -------------------------------------------------------------------------------- /image-opensim/config-standalone/setup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Script run when the container starts and before OpenSimulator is started 3 | # 4 | # The operations done here are: 5 | # -- if first time called, setup DB and initialize variables in configuration files 6 | # -- move sub-config specific Includes.ini into the config directory 7 | # -- update all the configuration files with environment variables 8 | 9 | export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 10 | export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 11 | 12 | echo "opensim-docker: setup.sh: OPENSIMCONFIG=\"${OPENSIMCONFIG}\"" 13 | 14 | FIRSTTIMEFLAG=${HOME}/.configFirstTime 15 | 16 | cd "$OPENSIMCONFIG" 17 | # This sets CONFIG_NAME which is the configuration subdirectory 18 | source ./scripts/setEnvironment.sh 19 | 20 | # If this is the first time run, do database setup and some one-time configuration updates 21 | if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then 22 | echo "opensim-docker: setup.sh: first time" 23 | cd "$OPENSIMCONFIG" 24 | # Do any database account and db creation 25 | ./scripts/initializeDb.sh 26 | touch "$FIRSTTIMEFLAG" 27 | fi 28 | 29 | -------------------------------------------------------------------------------- /image-opensim/docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | version: '3' 3 | 4 | networks: 5 | localnet: 6 | driver: bridge 7 | 8 | services: 9 | dbservice: 10 | # Use MariaDB 11 | image: mariadb:latest 12 | environment: 13 | MYSQL_ROOT_PASSWORD: 14 | MARIADB_ROOT_PASSWORD: 15 | # Parameters added to invocation. 16 | # Default is to flush after every operation which slows Docker image down. 17 | # This flushes log once a second. 18 | command: --innodb_flush_log_at_trx_commit=2 --sync_binlog=0 19 | volumes: 20 | # NOTE: you must create this directory before starting the simulator 21 | # This mysql data directory can be placed anywhere 22 | - ~/opensim-sql-data:/var/lib/mysql 23 | networks: 24 | - localnet 25 | restart: unless-stopped 26 | 27 | opensim: 28 | depends_on: 29 | - dbservice 30 | image: opensim-opensim:latest 31 | environment: 32 | OS_CONFIG: 33 | volumes: 34 | - ./config-$OS_CONFIG:/home/opensim/opensim/bin/config 35 | networks: 36 | - localnet 37 | ports: 38 | - 9000:9000/tcp 39 | - 9000:9000/udp 40 | - 9010:9010/tcp 41 | - 9010:9010/udp 42 | 43 | restart: unless-stopped 44 | -------------------------------------------------------------------------------- /image-opensim/env: -------------------------------------------------------------------------------- 1 | # Overall parameters for building and storing the OpenSimulator image. 2 | # This file is 'source'ed in Bash scripts and used by docker-compose. 3 | 4 | # While nearly everything can be moved into this file, these are the 5 | # top level build and run configurations but most of the configuration 6 | # happens in the config-$OS_CONFIG directory. 7 | 8 | # NOTE: the assignment format is restricted so it works as a Bash 9 | # assignment file and a docker-compose env-file 10 | 11 | # the configuration to run with. This is prepended with "config-" to get the directory 12 | OS_CONFIG=${OS_CONFIG:-standalone} 13 | 14 | # The sources to build 15 | OS_GIT_REPO=git://opensimulator.org/git/opensim 16 | OS_GIT_BRANCH=master 17 | # OS_GIT_BRANCH=opensim-rel-0.9.3.8940 18 | OS_BUILDTARGET=Release 19 | OS_SLN=OpenSim.sln 20 | 21 | # The container parameters 22 | IMAGE_OWNER=misterblue 23 | IMAGE_NAME=opensim-opensim 24 | IMAGE_VERSION=latest 25 | DOCKER_IMAGE="${IMAGE_OWNER}/${IMAGE_NAME}:${IMAGE_VERSION}" 26 | -------------------------------------------------------------------------------- /image-opensim/envToEnvironment.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # The ./env file is formatted for docker-compose 3 | # This script outputs a conversion of that file with 4 | # 'export' added to each line so it can be set into 5 | # a Bash environment. 6 | 7 | TEMPFILE=/tmp/envToEnvironment$$ 8 | sed -e 's/^\([A-Z]\)/export \1/' < ./env > "$TEMPFILE" 9 | source "$TEMPFILE" 10 | rm -f "$TEMPFILE" 11 | -------------------------------------------------------------------------------- /image-opensim/pushOpenSimImage.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Push the local image named "opensim-opensim" to the repository. 3 | # The image tag is set to "latest". 4 | 5 | # The repository image name can be over-ridden with the environment variable REPO_IMAGE. 6 | 7 | export IMAGE_OWNER=${IMAGE_OWNER:-misterblue} 8 | export IMAGE_NAME=${IMAGE_NAME:-opensim-opensim} 9 | export IMAGE_VERSION=${IMAGE_VERSION:-latest} 10 | 11 | VERSIONLABEL=$(docker run --rm --entrypoint /home/opensim/getVersion.sh ${IMAGE_NAME}:${IMAGE_VERSION} OS_GIT_DESCRIBE) 12 | 13 | echo "Pushing docker image for opensim version ${VERSIONLABEL}" 14 | 15 | for tagg in ${VERSIONLABEL} ${IMAGE_VERSION} ; do 16 | IMAGE=${IMAGE_OWNER}/${IMAGE_NAME}:${tagg} 17 | docker tag ${IMAGE_NAME} ${IMAGE} 18 | echo " Pushing ${IMAGE}" 19 | docker push ${IMAGE} 20 | done 21 | -------------------------------------------------------------------------------- /image-opensim/restart-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Stop the running opensimulator 3 | 4 | BASE=$(pwd) 5 | 6 | # Get the container parameters into the environment 7 | # (Needs to be in the environment for the docker-compose.yml file) 8 | source ./envToEnvironment.sh 9 | 10 | export OS_CONFIG=${OS_CONFIG:-standalone} 11 | 12 | echo "Restarting configuration $CONFIG_NAME from docker-compose.yml" 13 | 14 | docker compose \ 15 | --file docker-compose.yml \ 16 | --env-file ./env \ 17 | --project-name opensim-${OS_CONFIG} \ 18 | restart 19 | -------------------------------------------------------------------------------- /image-opensim/run-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Run the OpenSimulator image 3 | 4 | # Since the initial run has to create and initialize the MYSQL database 5 | # the first time, this sets the passwords into the environment before 6 | # running things. 7 | 8 | # Be sure to set environment variables: 9 | # OS_CONFIG=nameOfRunConfiguration (default 'standalone' of not supplied) 10 | 11 | BASE=$(pwd) 12 | 13 | # Get the container parameters into the environment 14 | # source ./envToEnvironment.sh 15 | source ./env 16 | 17 | # This selects the configuration to mount and use in the Docker image 18 | export OS_CONFIG=${OS_CONFIG:-standalone} 19 | echo "Using configuration \"$OS_CONFIG\"" 20 | 21 | # Get the secrets for the environment 22 | # (the following 'export' fakes out 'setEnvironment' to use the local directory 23 | export OPENSIMCONFIG=${BASE}/config-${OS_CONFIG} 24 | source ${OPENSIMCONFIG}/scripts/setEnvironment.sh 25 | 26 | # Local directory for storage of sql persistant data (so region 27 | # contents persists between container restarts). 28 | # This must be the same directory as in $COMPOSEFILE 29 | if [[ ! -d "$HOME/opensim-sql-data" ]] ; then 30 | echo "Directory \"$HOME/opensim-sql-data/\" does not exist. Creating same." 31 | mkdir -p "$HOME/opensim-sql-data" 32 | chmod o+w "$HOME/opensim-sql-data" 33 | fi 34 | 35 | cd "${BASE}" 36 | 37 | # https://docs.docker.com/engine/security/userns-remap/ 38 | # --userns-remap="opensim:opensim" 39 | docker compose \ 40 | --file docker-compose.yml \ 41 | --env-file ./env \ 42 | --project-name opensim-${OS_CONFIG} \ 43 | up \ 44 | --detach 45 | -------------------------------------------------------------------------------- /image-opensim/stop-opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Stop the running opensimulator 3 | 4 | BASE=$(pwd) 5 | 6 | # Get the container parameters into the environment 7 | # source ./envToEnvironment.sh 8 | source ./env 9 | 10 | export OS_CONFIG=${OS_CONFIG:-standalone} 11 | 12 | echo "Stopping configuration $OS_CONFIG from docker-compose.sh" 13 | 14 | docker compose \ 15 | --file docker-compose.yml \ 16 | --env-file ./env \ 17 | --project-name opensim-${OS_CONFIG} \ 18 | down 19 | -------------------------------------------------------------------------------- /run-scripts/NOOPENSIM: -------------------------------------------------------------------------------- 1 | If this file exists in /home/opensim, OpenSimulator will not be started. 2 | Create this file to disable the periodic restart test operation. 3 | -------------------------------------------------------------------------------- /run-scripts/README.md: -------------------------------------------------------------------------------- 1 | This directory of files are copied into /home/opensim to act as the 2 | startup and operation scripts for the instance of OpenSim that is running 3 | in the docker container. 4 | 5 | These scripts all run inside the container to control the running of 6 | the OpenSimulator simulator. The scripts for controlling the container 7 | (like starting and stopping the container from the command line) refer 8 | to the image-* directory. 9 | 10 | `bootOpenSim.sh` is run when the docker container starts and is responsible 11 | for seeing that the configuration files and other setup (like DB) are initialized. 12 | This script calls `firstTimeSetup.sh` for the first ever boot to do any 13 | initial setup. 14 | This script will fail if the environment variables `OS_CONFIGKEY` or `EXTERNAL_HOSTNAME` 15 | are not set. 16 | 17 | `run.opensim.sh` starts the OpenSimulator instance. 18 | 19 | `checkOpenSim.sh` is run periodically to make sure that the OpenSimulator instance 20 | is running and, if not, save crash information (`captureCrash.sh`) and then 21 | restart OpenSimulator. 22 | 23 | `crontab` is set initially to run `checkOldLogFiles.sh` which rotates `OpenSim.log`. 24 | -------------------------------------------------------------------------------- /run-scripts/bootOpenSim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Run when booting the Docker file. 3 | # Checks to see if this is the very first time in which case it 4 | # runs the first time setup. Otherwise it just sets things running. 5 | 6 | # The environment variable CONFIG_NAME can be set here otherwise 7 | # the value in config/os-config is used 8 | # If os-secrets.crypt exists in the configuration, the environment 9 | # variable OS_CONFIGKEY must exist and be the password for the encrypted file 10 | 11 | export OPENSIMHOME=/home/opensim 12 | export VERSIONDIR=$OPENSIMHOME/VERSION 13 | export OPENSIMBIN=$OPENSIMHOME/opensim/bin 14 | export OPENSIMCONFIG=$OPENSIMBIN/config 15 | 16 | # Start Opensim 17 | echo "Starting OpenSimulator version $(cat $VERSIONDIR/OS_VERSION)" 18 | echo " built from branch $(cat $VERSIONDIR/OS_GIT_BRANCH)" 19 | echo " with opensim-docker version $(cat $VERSIONDIR/OS_DOCKER_IMAGE_VERSION)" 20 | echo " using configuration set \"$OS_CONFIG\"" 21 | 22 | cd "$OPENSIMHOME" 23 | ./run.opensim.sh 24 | 25 | # Wait around here because when this script exits the Docker container exits 26 | while true ; do 27 | sleep 300 28 | ./checkOpenSim.sh 29 | done 30 | -------------------------------------------------------------------------------- /run-scripts/captureCrash.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Copy physics logs from usual physics log directory into 3 | # a subdirectory of the log dir so they won't get deleted. 4 | # Also saves the OpenSimulator log and screen files in subdir. 5 | 6 | DATETAG=$1 7 | 8 | OPENSIMHOME=${OPENSIMHOME:-/home/opensim} 9 | 10 | if [[ -z "$DATETAG" ]] ; then 11 | DATETAG=$(date +%Y%m%d.%H%M) 12 | fi 13 | 14 | OPENSIMBIN=${OPENSIMBIN:-$OPENSIMHOME/opensim/bin} 15 | 16 | LOGDIR=$OPENSIMHOME/logs 17 | SAVEDIR=$LOGDIR/$DATETAG 18 | 19 | echo "Capturing crash from $OPENSIMBIN into $SAVEDIR" 20 | 21 | mkdir -p $SAVEDIR 22 | 23 | cd $LOGDIR 24 | for logfile in phys*.log ; do 25 | if [[ -e "$logfile" ]] ; then 26 | mv "$logfile" "$SAVEDIR" 27 | fi 28 | done 29 | if [[ -e "$OPENSIMBIN/screenlog.0" ]] ; then 30 | mv $OPENSIMBIN/screenlog.0 $SAVEDIR 31 | fi 32 | if [[ -e "$OPENSIMBIN/OpenSim.log" ]] ; then 33 | mv $OPENSIMBIN/OpenSim.log $SAVEDIR 34 | fi 35 | 36 | 37 | -------------------------------------------------------------------------------- /run-scripts/checkOldLogFiles.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Clean out old log files in the log directory. 3 | # Does not delete saved log directories. 4 | 5 | OPENSIMHOME=${OPENSIMHOME:-/home/opensim} 6 | 7 | TIMEAGO=${OPENSIMHOME}/.lastLogCleanup 8 | 9 | LOGDIR="${OPENSIMHOME}/logs" 10 | if [[ -d "$LOGDIR" ]] ; then 11 | rm -f "$TIMEAGO" 12 | touch --date="-1 hours" "$TIMEAGO" 13 | 14 | cd "$LOGDIR" 15 | for file in phys*.log scene-*.log ; do 16 | if [[ -e "$file" ]] ; then 17 | if [[ $TIMEAGO -nt "$file" ]] ; then 18 | rm -f "$file" 19 | fi 20 | fi 21 | done 22 | fi 23 | -------------------------------------------------------------------------------- /run-scripts/checkOpenSim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Check to see if OpenSim is running and restart if it is not 3 | 4 | export OPENSIMHOME=${OPENSIMHOME:-/home/opensim} 5 | export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 6 | 7 | CRASHLOG=${OPENSIMHOME}/crashlog.log 8 | HDR="$(date +%Y%m%d%H%M):" 9 | 10 | LASTCRASH=${OPENSIMHOME}/.lastCrash 11 | TIMEAGO=${OPENSIMHOME}/.lastTimeAgo 12 | 13 | if [[ -e "${OPENSIMHOME}/NOOPENSIM" ]] ; then 14 | exit 5 15 | fi 16 | 17 | flag=$(ps -efa | grep SCREEN | grep OpenSimScreen) 18 | 19 | if [[ -z "$flag" ]] ; then 20 | echo "$HDR Found crashed OpenSim regions" 21 | rm -f $TIMEAGO 22 | # If crashed last time, don't keep restarting over and over. 23 | touch --date="-1 hours" $TIMEAGO 24 | if [[ ! -e $LASTCRASH || $TIMEAGO -nt $LASTCRASH ]] ; then 25 | echo "$HDR Capturing OpenSim crash" 26 | ${OPENSIMHOME}/captureCrash.sh 27 | rm -f $LASTCRASH 28 | touch $LASTCRASH 29 | fi 30 | echo "$HDR Restarting OpenSim regions" 31 | ${OPENSIMHOME}/run.opensim.sh 32 | fi >> $CRASHLOG 33 | -------------------------------------------------------------------------------- /run-scripts/crontab: -------------------------------------------------------------------------------- 1 | */30 * * * * /home/opensim/checkOldLogFiles.sh 2 | 3 | -------------------------------------------------------------------------------- /run-scripts/firstTimeSetup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Run the first time to setup the environment for OpenSimulator control 3 | OPENSIMHOME=${OPENSIMHOME:-/home/opensim} 4 | OPENSIMBIN=${OPENSIMBIN:-$OPENSIMHOME/opensim/bin} 5 | 6 | # Setup the crontab entry for this account so OpenSim stays running 7 | crontab "${OPENSIMHOME}/crontab" 8 | -------------------------------------------------------------------------------- /run-scripts/getVersion.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Return a version string for this image. 3 | # The version string is formatted: 4 | # OpenSimVersion-OpenSimBranch-OpenSimGitCommit-BuildDate/OpenSimDockerImageVersion 5 | # An example is: 6 | # 0.9.2.1-develop-17b5123-20240712.1234/2.1.3-20220202-4b994b5 7 | # Verbose but it has all the version information. 8 | 9 | export OPENSIMHOME=/home/opensim 10 | export VERSIONDIR=$OPENSIMHOME/VERSION 11 | 12 | part=$1 13 | 14 | cd "$VERSIONDIR" 15 | for valueName in * ; do 16 | export ${valueName}=$(cat "$valueName") 17 | done 18 | 19 | if [[ -z "$part" ]] ; then 20 | echo "${OS_VERSION}-${OS_GIT_BRANCH}-${OS_GIT_COMMIT_SHORT}-${BUILD_DATE}/${OS_DOCKER_IMAGE_VERSION}" 21 | else 22 | if [[ "$part" == "ALL" ]] ; then 23 | cd "$VERSIONDIR" 24 | for vn in * ; do 25 | echo "$vn = $(cat $vn)" 26 | done 27 | else 28 | cat ${VERSIONDIR}/$part 29 | fi 30 | fi 31 | 32 | # echo "$(cat $VERSIONDIR/OS_VERSION)-$(cat $VERSIONDIR/OS_GIT_COMMIT_SHORT)-$(cat $VERSIONDIR/OS_DOCKER_IMAGE_VERSION)-$(cat $VERSIONDIR/BUILD_DATE)-$($VERSIONDIR/OS_DOCKER_GIT_COMMIT_SHORT)" 33 | -------------------------------------------------------------------------------- /run-scripts/nullOutConfigInclude.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # This file is run for initial configuration and is not run thereafter. 3 | 4 | # Script that walks ./config-include and over-writes all INI files with empty contents. 5 | # This also creates empty INI files for all the *.example files. 6 | 7 | OPENSIMDIR=${OPENSIMDIR:-/home/opensim/opensim} 8 | OPENSIMBIN=${OPENSIMBIN:-$OPENSIMDIR/bin} 9 | 10 | cd "$OPENSIMBIN" 11 | 12 | if [[ ! -d "./config-include" ]] ; then 13 | echo "./config-include directory DOES NOT EXIST in the current directory" 14 | echo "NOT DOING ANYTHING" 15 | exit 5 16 | fi 17 | 18 | TEMPFILE=/tmp/configInclude$$ 19 | rm -f "$TEMPFILE" 20 | cat > "$TEMPFILE" << EOFFFF 21 | ; This file exists because this file is the default architecture include 22 | ; in OpenSim.ini. 23 | ; Look for the real configuration in the mounted config directory. 24 | EOFFFF 25 | 26 | for iniFile in $(find ./config-include -name \*.ini ) ; do 27 | cp "$TEMPFILE" "$iniFile" 28 | done 29 | 30 | # this finds all .example files and creates an empty .ini file from that name 31 | for exampleFile in $(find ./config-include -name \*.example) ; do 32 | cp "$TEMPFILE" "${exampleFile%%.example}" 33 | done 34 | 35 | rm -f "$TEMPFILE" 36 | -------------------------------------------------------------------------------- /run-scripts/run.opensim.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | # Runs the simulators with screen 3 | 4 | export OPENSIMHOME=${OPENSIMHOME:-/home/opensim} 5 | export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin} 6 | export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config} 7 | 8 | # Check for disable flag 9 | if [[ -e "${OPENSIMHOME}/NOOPENSIM" ]] ; then 10 | exit 5 11 | fi 12 | 13 | cd "$OPENSIMBIN" 14 | 15 | # If this configuration has stuff to do... 16 | # This sets environment variables needed for running OpenSim (See Includes.ini) 17 | if [[ -e "$OPENSIMCONFIG/setup.sh" ]] ; then 18 | source $OPENSIMCONFIG/setup.sh 19 | fi 20 | 21 | cd "$OPENSIMBIN" 22 | 23 | rm -f screenlog.0 24 | rm -f *.log 25 | 26 | # Start the simulator 27 | # The configuration will read all .ini files from bin/config/. 28 | # ALL other .ini files have been blanked so this is the ONLY configuration 29 | # Simulator is run under 'screen'. Connect to console with "screen -r OpenSimScreen". 30 | screen -L -S OpenSimScreen -p - -d -m dotnet OpenSim.dll -console=basic 31 | 32 | # if logConfig is specified, expects to read Nini XML configuration 33 | # -logConfig=/home/opensim/config/logConfig.ini 34 | # iniFile is the main configuration file which defaults to "OpenSim.ini" 35 | # -iniFile=/home/opensim/config/iniFile.ini \ 36 | # All .ini and .xml files are read from this directory 37 | # -iniDirectory=/home/opensim/config 38 | -------------------------------------------------------------------------------- /run-scripts/stopOpenSim.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Misterblue/opensim-docker/eb3cbb7aef4ba4f1495d1bb299a863492283b1f1/run-scripts/stopOpenSim.sh -------------------------------------------------------------------------------- /run-scripts/vimrc: -------------------------------------------------------------------------------- 1 | " file copied to /home/opensim/.vimrc 2 | set tabstop=4 3 | set shiftwidth=4 4 | set expandtab 5 | set autoindent 6 | set ff=unix 7 | 8 | set background=dark 9 | syntax enable 10 | --------------------------------------------------------------------------------