aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/example/config
diff options
context:
space:
mode:
authoronefang2019-05-19 23:10:15 +1000
committeronefang2019-05-19 23:10:15 +1000
commit64dfe62fab804be64cc29cc0c821e7abac1d946d (patch)
tree3874e927329d88a62e27dde2cc210c968b86c2e2 /example/config
parentNew TODO. (diff)
downloadopensim-SC_OLD-64dfe62fab804be64cc29cc0c821e7abac1d946d.zip
opensim-SC_OLD-64dfe62fab804be64cc29cc0c821e7abac1d946d.tar.gz
opensim-SC_OLD-64dfe62fab804be64cc29cc0c821e7abac1d946d.tar.bz2
opensim-SC_OLD-64dfe62fab804be64cc29cc0c821e7abac1d946d.tar.xz
Make examples directory, and shuffle all the out of tree stuff into it.
Diffstat (limited to 'example/config')
-rw-r--r--example/config/ROBUST/opensim-monit.conf36
-rw-r--r--example/config/config.ini42
-rw-r--r--example/config/sim_skeleton/My_sim.xml13
-rw-r--r--example/config/sim_skeleton/ThisSim.ini10
-rw-r--r--example/config/sim_skeleton/opensim-monit.conf29
5 files changed, 130 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..70190b9
--- /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#
24check process ROBUST with pidfile /var/run/opensim/ROBUST.pid
25 start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/ROBUST && /opt/opensim/config/ROBUST/start-sim -q'"
26 as uid root and gid root
27 stop program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/ROBUST && /opt/opensim/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..99d3c96
--- /dev/null
+++ b/example/config/config.ini
@@ -0,0 +1,42 @@
1; **
2; * The Const section allows us to define some basic information that we
3; * will use throughout our configuration. We will provide examples for
4; * setting the base url of the Robust server and the public and private ports
5; * it uses. Changing the values of the constants will set the operating
6; * parameters thoughout the configuration. Other constants that may prove
7; * to be useful may be added to the followin section. They may be
8; * referenced anywhere in the configuration by using ${Const|Name}. One
9; * such use is providing a base path for setting locations that Robust
10; * uses to write data.
11
12
13[Const]
14 MOTD = "Welcome to this virtual world."
15
16 AssetsPath = "../../AssetFiles"
17 CachePath = "../../caches"
18 ConfigPath = "../../config"
19
20 GridName = "My virtual world"
21
22 ; For a grid these will usually be the externally accessible IP/DNS
23 ; name and use default public port 8002 and default private port 8003
24 ; For a standalone this will usually be the externally accessible IP/DNS
25 ; name and use default public port 9000. The private port is not used
26 ; in the configuration for a standalone.
27
28 ;# {BaseURL} {} {BaseURL} {"http://example.com" "http://127.0.0.1"} "http://127.0.0.1"
29 HostName = "localhost"
30 BaseURL = http://127.0.0.1
31 GridURL = http://grid.infinitegrid.org
32
33 ;# {PublicPort} {} {PublicPort} {8002 9000} "8002"
34 PublicPort = "8002"
35
36 ;# {PrivatePort} {} {PrivatePort} {8003} "8003"
37 PrivatePort = "8003"
38
39
40 DataProvider = "OpenSim.Data.MySQL.dll"
41 ConnectionString = "Data Source=MYSQL_HOST;Database=MYSQL_DB;User ID=MYSQL_USER;Password=MYSQL_PASSWORD;Old Guids=true;"
42
diff --git a/example/config/sim_skeleton/My_sim.xml b/example/config/sim_skeleton/My_sim.xml
new file mode 100644
index 0000000..c5723f3
--- /dev/null
+++ b/example/config/sim_skeleton/My_sim.xml
@@ -0,0 +1,13 @@
1<Nini>
2 <Section Name="SIM_NAME">
3 <Key Name="RegionUUID" Value="SIM_UUID" />
4 <Key Name="Location" Value="SIM_POS" />
5 <Key Name="InternalAddress" Value="SIM_IP" />
6 <Key Name="InternalPort" Value="SIM_INT_PORT" />
7 <Key Name="AllowAlternatePorts" Value="False" />
8 <Key Name="ExternalHostName" Value="SIM_URL" />
9 <Key Name="RegionType" Value="private sim" />
10 <Key Name="SizeX" Value="SIM_SIZE" />
11 <Key Name="SizeY" Value="SIM_SIZE" />
12 </Section>
13</Nini>
diff --git a/example/config/sim_skeleton/ThisSim.ini b/example/config/sim_skeleton/ThisSim.ini
new file mode 100644
index 0000000..2f691f0
--- /dev/null
+++ b/example/config/sim_skeleton/ThisSim.ini
@@ -0,0 +1,10 @@
1[Const]
2 mysim="SIM_NUMBER"
3
4[Startup]
5 PIDFile = "/var/run/opensim/sim${Const|mysim}.pid"
6 regionload_regionsdir="/opt/opensim/config/sim${Const|mysim}"
7 LogFile = "../logs/OpenSim_sim${Const|mysim}.log"
8
9[Network]
10 http_listener_port = SIM_PORT
diff --git a/example/config/sim_skeleton/opensim-monit.conf b/example/config/sim_skeleton/opensim-monit.conf
new file mode 100644
index 0000000..ac50fc2
--- /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#
16check process simSIM_NUMBER with pidfile /var/run/opensim/simSIM_NUMBER.pid
17 start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/simSIM_NUMBER && /opt/opensim/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 /opt/opensim/config/simSIM_NUMBER && /opt/opensim/config/simSIM_NUMBER/stop-sim'" with timeout 600 seconds
20 if cpu usage > 50% for 4 cycles then restart
21 if MEMORY usage > 25% 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