diff options
author | onefang | 2019-09-11 16:36:50 +1000 |
---|---|---|
committer | onefang | 2019-09-11 16:36:50 +1000 |
commit | 50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch) | |
tree | 52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /example/config | |
parent | Renamed branch to SledjChisl. (diff) | |
parent | Bump to release flavour, build 0. (diff) | |
download | opensim-SC-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip opensim-SC-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz opensim-SC-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2 opensim-SC-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz |
Merge branch 'SledjChisl'
Diffstat (limited to 'example/config')
-rw-r--r-- | example/config/ROBUST/opensim-monit.conf | 36 | ||||
-rw-r--r-- | example/config/config.ini | 47 | ||||
-rw-r--r-- | example/config/sim_skeleton/ThisSim.ini | 44 | ||||
-rw-r--r-- | example/config/sim_skeleton/opensim-monit.conf | 29 |
4 files changed, 156 insertions, 0 deletions
diff --git a/example/config/ROBUST/opensim-monit.conf b/example/config/ROBUST/opensim-monit.conf new file mode 100644 index 0000000..adce46d --- /dev/null +++ b/example/config/ROBUST/opensim-monit.conf | |||
@@ -0,0 +1,36 @@ | |||
1 | # manage the OpenSim process for Your Sim | ||
2 | # | ||
3 | # usage: | ||
4 | # monit start your_sim | ||
5 | # monit stop your_sim | ||
6 | # monit restart your_sim | ||
7 | # | ||
8 | # see 'daemon' setting in /etc/monit/monitrc for the cycle length. | ||
9 | # on ubuntu/debian, this is overridden by the CHECK_INTERVALS var in | ||
10 | # /etc/default/monit . the below assumes you've set it to 30 seconds. | ||
11 | # | ||
12 | # if process dies, will restart sim within 30 seconds. if process | ||
13 | # dies 5 times in as many tries, will stop trying and send email | ||
14 | # alert. | ||
15 | # | ||
16 | # if SimFPS drops to 0 for 2 minutes, restart. | ||
17 | # | ||
18 | # if process CPU usage stays above 300% for 2 minutes, restart. | ||
19 | # | ||
20 | # see ../README for configuration instructions. | ||
21 | # | ||
22 | # Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l. | ||
23 | # | ||
24 | check process ROBUST with pidfile OS_PATH/caches/ROBUST.pid | ||
25 | start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd OS_PATH/config/ROBUST && OS_PATH/config/ROBUST/start-sim -q'" | ||
26 | as uid root and gid root | ||
27 | stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd OS_PATH/config/ROBUST && OS_PATH/config/ROBUST/stop-sim'" with timeout 600 seconds | ||
28 | if cpu usage > 50% for 4 cycles then restart | ||
29 | # if 5 restarts within 5 cycles then timeout | ||
30 | # if failed url http://127.0.0.1:9005/jsonSimStats/ | ||
31 | # and content != '"SimFPS":0.0,' for 4 cycles | ||
32 | # then restart | ||
33 | # if failed url http://127.0.0.1:9008/jsonSimStats/ | ||
34 | # and content == '"SimFPS":' for 4 cycles | ||
35 | # then restart | ||
36 | |||
diff --git a/example/config/config.ini b/example/config/config.ini new file mode 100644 index 0000000..e95b04c --- /dev/null +++ b/example/config/config.ini | |||
@@ -0,0 +1,47 @@ | |||
1 | ; The Const section allows us to define some basic information that we | ||
2 | ; will use throughout our configuration. We will provide examples for | ||
3 | ; setting the base url of the ROBUST server and the public and private ports | ||
4 | ; it uses. Changing the values of the constants will set the operating | ||
5 | ; parameters thoughout the configuration. Other constants that may prove | ||
6 | ; to be useful may be added to the followin section. They may be | ||
7 | ; referenced anywhere in the configuration by using ${Const|Name}. One | ||
8 | ; such use is providing a base path for setting locations that ROBUST | ||
9 | ; uses to write data. | ||
10 | |||
11 | ; Also put grid specific stuff here. | ||
12 | |||
13 | |||
14 | [Paths] | ||
15 | AssetsPath = "../../AssetFiles" | ||
16 | BackupPath = "../../backups" | ||
17 | CachePath = "../../caches" | ||
18 | ConfigPath = "../../config" | ||
19 | DbPath = "../../db" | ||
20 | LogPath = "../../logs" | ||
21 | WebPath = "../../web" | ||
22 | |||
23 | [Const] | ||
24 | MOTD = "Welcome to your local grid." | ||
25 | |||
26 | GridName = "localhost Grid" | ||
27 | ShortGridName = "lg" | ||
28 | |||
29 | ; For a grid these will usually be the externally accessible IP/DNS | ||
30 | ; name and use default public port 8002 and default private port 8003 | ||
31 | ; For a standalone this will usually be the externally accessible IP/DNS | ||
32 | ; name and use default public port 9000. The private port is not used | ||
33 | ; in the configuration for a standalone. | ||
34 | BaseHostname = "127.0.0.1" | ||
35 | HostName = "localhost" | ||
36 | BaseURL = http://${Const|BaseHostname} | ||
37 | GridURL = http://${Const|BaseHostname} | ||
38 | |||
39 | PublicPort = "8002" | ||
40 | PrivatePort = "8003" | ||
41 | |||
42 | ; The public port of the ROBUST asset server, which might be different. | ||
43 | AssetServerPort = "8003" | ||
44 | |||
45 | ; Database credentials. | ||
46 | DataProvider = "OpenSim.Data.MySQL.dll" | ||
47 | ConnectionString = "Data Source=MYSQL_HOST;Database=MYSQL_DB;User ID=MYSQL_USER;Password=MYSQL_PASSWORD;Old Guids=true;" | ||
diff --git a/example/config/sim_skeleton/ThisSim.ini b/example/config/sim_skeleton/ThisSim.ini new file mode 100644 index 0000000..44749bb --- /dev/null +++ b/example/config/sim_skeleton/ThisSim.ini | |||
@@ -0,0 +1,44 @@ | |||
1 | [Const] | ||
2 | mysim="SIM_NUMBER" | ||
3 | |||
4 | [Startup] | ||
5 | PIDFile = "${Paths|CachePath}/sim${Const|mysim}.pid" | ||
6 | LogFile = "${Paths|LogPath}/OpenSim_sim${Const|mysim}.log" | ||
7 | StatsLogFile = "${Paths|LogPath}/OpenSimStats_sim${Const|mysim}.log" | ||
8 | ConsoleHistoryFile = "${Paths|LogPath}/OpenSimConsoleHistory_sim${Const|mysim}.txt" | ||
9 | |||
10 | [Region] | ||
11 | RegionName = "SIM_NAME" | ||
12 | RegionUUID = "SIM_UUID" | ||
13 | Location = "SIM_POS" | ||
14 | InternalPort = "SIM_INT_PORT" | ||
15 | RegionType = "private sim" | ||
16 | SizeX = SIM_SIZE | ||
17 | SizeY = SIM_SIZE | ||
18 | SizeZ = 16384 | ||
19 | MaxAgents = 100 | ||
20 | MaxPrims = 45000 | ||
21 | PhysicalPrimMax = 640 | ||
22 | NonPhysicalPrimMax = 2560 | ||
23 | ClampPrimSize = False | ||
24 | MaptileStaticUUID = "00000000-0000-0000-0000-000000000000" | ||
25 | ; NonPhysicalPrimMin = 0 | ||
26 | ; PhysicalPrimMin = 0 | ||
27 | ; MaxPrimsPerUser = -1 | ||
28 | ; LinksetPrims = 0 | ||
29 | ; DefaultLanding = "<128, 128, 30>" | ||
30 | ; MaptileStaticFile = "" | ||
31 | ; ScopeID = "00000000-0000-0000-0000-000000000000" | ||
32 | ; Datastore = "" | ||
33 | ; ResolveAddress = "" | ||
34 | |||
35 | [Network] | ||
36 | http_listener_port = SIM_PORT | ||
37 | |||
38 | [Performance] | ||
39 | ;; Select the performance characteristics of OpenSim. | ||
40 | ; Include-Performance = "config-include/SimFast.ini" | ||
41 | Include-Performance = "config-include/SimBalanced.ini" | ||
42 | ; Include-Performance = "config-include/SimDefault.ini" | ||
43 | ; Include-Performance = "config-include/SimLean.ini" | ||
44 | |||
diff --git a/example/config/sim_skeleton/opensim-monit.conf b/example/config/sim_skeleton/opensim-monit.conf new file mode 100644 index 0000000..fd9220f --- /dev/null +++ b/example/config/sim_skeleton/opensim-monit.conf | |||
@@ -0,0 +1,29 @@ | |||
1 | # manage the OpenSim process for Your Sim | ||
2 | # | ||
3 | # usage: | ||
4 | # monit start your_sim | ||
5 | # monit stop your_sim | ||
6 | # monit restart your_sim | ||
7 | # | ||
8 | # see 'daemon' setting in /etc/monit/monitrc for the cycle length. | ||
9 | # on ubuntu/debian, this is overridden by the CHECK_INTERVALS var in | ||
10 | # /etc/default/monit . the below assumes you've set it to 30 seconds. | ||
11 | # | ||
12 | # see ../README for configuration instructions. | ||
13 | # | ||
14 | # Hmmmm, seems that monit changing to a user and running bash -l is different from sudo changing to a user and running bash -l. | ||
15 | # | ||
16 | check process simSIM_NUMBER with pidfile OS_PATH/caches/simSIM_NUMBER.pid | ||
17 | start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd OS_PATH/config/simSIM_NUMBER && OS_PATH/config/simSIM_NUMBER/start-sim -q'" | ||
18 | as uid root and gid root | ||
19 | stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd OS_PATH/config/simSIM_NUMBER && OS_PATH/config/simSIM_NUMBER/stop-sim'" with timeout 600 seconds | ||
20 | if cpu usage > 50% for 4 cycles then restart | ||
21 | if MEMORY usage > 10% for 4 cycles then restart | ||
22 | # if 5 restarts within 5 cycles then timeout | ||
23 | # if failed url http://127.0.0.1:9005/jsonSimStats/ | ||
24 | # and content != '"SimFPS":0.0,' for 4 cycles | ||
25 | # then restart | ||
26 | # if failed url http://127.0.0.1:9008/jsonSimStats/ | ||
27 | # and content == '"SimFPS":' for 4 cycles | ||
28 | # then restart | ||
29 | depends on ROBUST | ||