diff options
Diffstat (limited to '')
-rwxr-xr-x | InstallItAll.sh | 111 | ||||
-rw-r--r-- | config/ROBUST/opensim-monit.conf | 36 | ||||
-rw-r--r-- | config/Robust.Tests.ini | 468 | ||||
-rw-r--r-- | config/config.ini | 2 | ||||
-rw-r--r-- | config/sim01/My_sim.xml | 11 | ||||
-rw-r--r-- | config/sim01/ThisSim.ini | 6 | ||||
-rw-r--r-- | config/sim01/opensim-monit.conf | 29 |
7 files changed, 194 insertions, 469 deletions
diff --git a/InstallItAll.sh b/InstallItAll.sh new file mode 100755 index 0000000..e421d09 --- /dev/null +++ b/InstallItAll.sh | |||
@@ -0,0 +1,111 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | OSPATH="/opt/opensim" | ||
4 | MYSQL_HOST="localhost" | ||
5 | MYSQL_DB="InfiniteGrid" | ||
6 | MYSQL_USER="opensim" | ||
7 | OS_USER="opensim" | ||
8 | |||
9 | OSVER="8.2.1" | ||
10 | |||
11 | |||
12 | # Figure out where we are, most of this mess is to troll through soft links. | ||
13 | PRG="$0" | ||
14 | while [ -h "${PRG}" ] ; do | ||
15 | ls=$(ls -ld "${PRG}") | ||
16 | link=`expr "${ls}" : '.*-> \(.*\)$'` | ||
17 | if expr "${link}" : '.*/.*' > /dev/null; then | ||
18 | PRG="${link}" | ||
19 | else | ||
20 | PRG=$(dirname "${PRG}")/"${link}" | ||
21 | fi | ||
22 | done | ||
23 | PRGDIR=$(dirname "${PRG}") | ||
24 | pushd ${PRGDIR} >/dev/null | ||
25 | PRGDIR=$(pwd) | ||
26 | popd >/dev/null | ||
27 | |||
28 | # This should all be safe for pre existing installs that are being updated. | ||
29 | |||
30 | MYSQL_PASSWORD=$1 | ||
31 | # Try to get old database credentials if they exist. | ||
32 | if [ -f ${OSPATH}/config/config.ini ]; then | ||
33 | # Get the database credentials. | ||
34 | declare -A creds | ||
35 | while read -d ';' p; do | ||
36 | k=$(echo ${p} | cut -d '=' -f 1) | ||
37 | v=$(echo ${p} | cut -d '=' -f 2) | ||
38 | creds[${k}]="${v}" | ||
39 | done < <(sudo grep ConnectionString ${OSPATH}/config/config.ini | cut -d '"' -f 2) | ||
40 | # The above seems the best way to get bash to let the creds assignments survive outside the loop. | ||
41 | |||
42 | MYSQL_HOST="${creds[Data Source]}" | ||
43 | MYSQL_DB="${creds[Database]}" | ||
44 | MYSQL_USER="${creds[User ID]}" | ||
45 | MYSQL_PASSWORD="${creds[Password]}" | ||
46 | fi | ||
47 | if [ -z $MYSQL_PASSWORD ]; then | ||
48 | MYSQL_PASSWORD="OpenSimSucks${RANDOM}" | ||
49 | fi | ||
50 | |||
51 | USER=$(whoami) | ||
52 | |||
53 | echo "Installing software." | ||
54 | sudo apt-get install mysql-server tmux mono-complete uuid-runtime monit mc | ||
55 | sudo /etc/init.d/mysql restart | ||
56 | |||
57 | echo "Setting up mySQL." | ||
58 | mysql -u root -p -h localhost << zzzzEOFzzz | ||
59 | create database if not exists '$MYSQL_DB'; | ||
60 | create user '$OS_USER' identified by '$MYSQL_PASSWORD'; | ||
61 | create user '$OS_USER'@'localhost' identified by '$MYSQL_PASSWORD'; | ||
62 | grant all on $MYSQL_DB.* to '$OS_USER'; | ||
63 | grant all on $MYSQL_DB.* to '$OS_USER'@'localhost'; | ||
64 | FLUSH PRIVILEGES; | ||
65 | zzzzEOFzzz | ||
66 | |||
67 | echo "Setting up OpenSim." | ||
68 | sudo adduser --system --shell /bin/false --group $OS_USER | ||
69 | sudo addgroup $USER $OS_USER | ||
70 | |||
71 | sudo rm -fr $OSPATH/opensim-IG_* | ||
72 | sudo mkdir -p $OSPATH/opensim-IG_$OSVER | ||
73 | sudo cp -fr $PRGDIR/* $OSPATH/opensim-IG_$OSVER | ||
74 | |||
75 | cd $OSPATH | ||
76 | sudo ln -fs opensim-IG_$OSVER current | ||
77 | |||
78 | cd current | ||
79 | |||
80 | sudo chown -R $OS_USER:$OS_USER $OSPATH | ||
81 | sudo chmod -R 775 $OSPATH | ||
82 | sudo chmod -R a-x $OSPATH | ||
83 | sudo chmod -R a+X $OSPATH | ||
84 | sudo chmod -R g+w $OSPATH | ||
85 | sudo chmod -R a+x $OSPATH/current/scripts/*.sh | ||
86 | sudo chmod a+x $OSPATH/current/scripts/show-console | ||
87 | sudo chmod a+x $OSPATH/current/scripts/start-sim | ||
88 | sudo chmod ug+rwx config | ||
89 | sudo chmod g+s config | ||
90 | sudo chmod 600 config/config.ini | ||
91 | |||
92 | for dir in AssetFiles backups caches config db logs | ||
93 | do | ||
94 | sudo cp -fr $dir .. | ||
95 | sudo rm -fr $dir | ||
96 | sudo ln -fs ../$dir $dir | ||
97 | done | ||
98 | |||
99 | sudo sed -i "s@MYSQL_HOST@${MYSQL_HOST}@g" config/config.ini | ||
100 | sudo sed -i "s@MYSQL_DB@${MYSQL_DB}@g" config/config.ini | ||
101 | sudo sed -i "s@MYSQL_USER@${MYSQL_USER}@g" config/config.ini | ||
102 | sudo chmod 600 config/config.ini | ||
103 | sudo sed -i "s@MYSQL_PASSWORD@${MYSQL_PASSWORD}@g" config/config.ini | ||
104 | sudo chmod 600 config/config.ini | ||
105 | |||
106 | sudo cp scripts/opensim.tmux.conf /home/$OS_USER/.tmux.conf | ||
107 | sudo chown $USER /home/$OS_USER/.tmux.conf | ||
108 | sudo chmod 644 /home/$OS_USER/.tmux.conf | ||
109 | |||
110 | sudo scripts/fix_var_run.sh | ||
111 | sudo cat scripts/opensim-crontab.txt | sudo crontab -u $OS_USER - | ||
diff --git a/config/ROBUST/opensim-monit.conf b/config/ROBUST/opensim-monit.conf new file mode 100644 index 0000000..70190b9 --- /dev/null +++ b/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 /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/config/Robust.Tests.ini b/config/Robust.Tests.ini deleted file mode 100644 index c25e39b..0000000 --- a/config/Robust.Tests.ini +++ /dev/null | |||
@@ -1,468 +0,0 @@ | |||
1 | ; * FOR TESTS ONLY -- DO NOT USE THIS FILE | ||
2 | [Const] | ||
3 | |||
4 | ; The URL of the Robust server | ||
5 | BaseURL = "http://127.0.0.1" | ||
6 | |||
7 | ; The public port of the Robust server | ||
8 | PublicPort = "8888" | ||
9 | |||
10 | ; The private port of the Robust server, same for testing | ||
11 | PrivatePort = "8888" | ||
12 | |||
13 | |||
14 | ; * The startup section lists all the connectors to start up in this server | ||
15 | ; * instance. This may be only one, or it may be the entire server suite. | ||
16 | ; * Multiple connectors should be separated by commas. | ||
17 | ; * | ||
18 | ; * These are the IN connectors the server uses, the in connectors | ||
19 | ; * read this config file and load the needed service and database connectors | ||
20 | ; * | ||
21 | ; * The full syntax of a connector string is: | ||
22 | ; * [[<ConfigName>@]<port>/]<dll name>[:<class name>] | ||
23 | ; * | ||
24 | [Startup] | ||
25 | ; Place to create a PID file | ||
26 | ; If no path if specified then a PID file is not created. | ||
27 | ; PIDFile = "/tmp/Robust.exe.pid" | ||
28 | |||
29 | ; Plugin Registry Location | ||
30 | ; Set path to directory for plugin registry. Information | ||
31 | ; about the registered repositories and installed plugins | ||
32 | ; will be stored here | ||
33 | ; The Robust.exe process must have R/W access to the location | ||
34 | RegistryLocation = "." | ||
35 | |||
36 | ; Modular configurations | ||
37 | ; Set path to directory for modular ini files... | ||
38 | ; The Robust.exe process must have R/W access to the location | ||
39 | ConfigDirectory = "." | ||
40 | |||
41 | console = "rest" | ||
42 | |||
43 | ; Console commands can be saved to a file, so the command history persists after a restart. (default is true) | ||
44 | ConsoleHistoryFileEnabled = false | ||
45 | |||
46 | ; The history file can be just a filename (relative to OpenSim's bin/ directory | ||
47 | ; or it can be a full path to somewhere else. (default is OpenSimConsoleHistory.txt in bin/) | ||
48 | ConsoleHistoryFile = "RobustConsoleHistory.txt" | ||
49 | |||
50 | ; How many lines of command history should we keep? (default is 100) | ||
51 | ConsoleHistoryFileLines = 100 | ||
52 | |||
53 | [ServiceList] | ||
54 | GridServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridServiceConnector" | ||
55 | PresenceServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:PresenceServiceConnector" | ||
56 | InstantMessageServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:InstantMessageServerConnector" | ||
57 | UserAccountServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:UserAccountServiceConnector" | ||
58 | InventoryInConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XInventoryInConnector" | ||
59 | |||
60 | ;; Uncomment as more tests are added | ||
61 | ;AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector" | ||
62 | ;GridInfoServerInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:GridInfoServerInConnector" | ||
63 | ;AuthenticationServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector" | ||
64 | ;OpenIdServerConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:OpenIdServerConnector" | ||
65 | ;AvatarServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AvatarServiceConnector" | ||
66 | ;LLLoginServiceInConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:LLLoginServiceInConnector" | ||
67 | ;GridUserServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:GridUserServiceConnector" | ||
68 | ;FriendsServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:FriendsServiceConnector" | ||
69 | ;MapAddServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:MapAddServiceConnector" | ||
70 | ;MapGetServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:MapGetServiceConnector" | ||
71 | ;OfflineIMServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.OfflineIM.dll:OfflineIMServiceRobustConnector" | ||
72 | ;GroupsServiceConnector = "${Const|PrivatePort}/OpenSim.Addons.Groups.dll:GroupsServiceRobustConnector" | ||
73 | ;BakedTextureService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:XBakesConnector" | ||
74 | ;UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector" | ||
75 | ;EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector" | ||
76 | |||
77 | ; * This is common for all services, it's the network setup for the entire | ||
78 | ; * server instance, if none is specified above | ||
79 | ; * | ||
80 | [Network] | ||
81 | port = ${Const|PrivatePort} | ||
82 | |||
83 | ;; The follow 3 variables are for HTTP Basic Authentication for the Robust services. | ||
84 | ;; Use this if your central services in port ${Const|PrivatePort} need to be accessible on the Internet | ||
85 | ;; but you want to protect them from unauthorized access. | ||
86 | ; AuthType = "BasicHttpAuthentication" | ||
87 | ; HttpAuthUsername = "some_username" | ||
88 | ; HttpAuthPassword = "some_password" | ||
89 | ;; | ||
90 | ;; AuthType above can be overriden in any of the service sections below by | ||
91 | ; AuthType = "None" | ||
92 | ;; This is useful in cases where you want to protect most of the services, | ||
93 | ;; but unprotect individual services. Username and Password can also be | ||
94 | ;; overriden if you want to use different credentials for the different services. | ||
95 | |||
96 | ;; By default, scripts are not allowed to call private services via llHttpRequest() | ||
97 | ;; Such calls are detected by the X-SecondLife-Shared HTTP header | ||
98 | ;; If you allow such calls you must be sure that they are restricted to very trusted scripters | ||
99 | ;; (remember scripts can also be in visiting avatar attachments). | ||
100 | ;; This can be overriden in individual private service sections if necessary | ||
101 | AllowllHTTPRequestIn = false | ||
102 | |||
103 | ; * The following are for the remote console | ||
104 | ; * They have no effect for the local or basic console types | ||
105 | ; * Leave commented to diable logins to the console | ||
106 | ;ConsoleUser = Test | ||
107 | ;ConsolePass = secret | ||
108 | ;ConsolePort = 0 | ||
109 | |||
110 | |||
111 | [DatabaseService] | ||
112 | ; PGSQL | ||
113 | ; Uncomment these lines if you want to use PGSQL storage | ||
114 | ; Change the connection string to your db details | ||
115 | ;StorageProvider = "OpenSim.Data.PGSQL.dll" | ||
116 | ;ConnectionString = "Server=localhost;Database=opensim;User Id=opensim; password=***;" | ||
117 | |||
118 | ; Null | ||
119 | ; Uncomment these lines if you want to use MySQL storage | ||
120 | ; Change the connection string to your db details | ||
121 | StorageProvider = "OpenSim.Data.Null.dll" | ||
122 | ConnectionString = "" | ||
123 | |||
124 | |||
125 | ; * As an example, the below configuration precisely mimicks the legacy | ||
126 | ; * asset server. It is read by the asset IN connector (defined above) | ||
127 | ; * and it then loads the OUT connector (a local database module). That, | ||
128 | ; * in turn, reads the asset loader and database connection information | ||
129 | ; * | ||
130 | [AssetService] | ||
131 | LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" | ||
132 | DefaultAssetLoader = "" | ||
133 | |||
134 | ; Allow maptile assets to remotely deleted by remote calls to the asset service. | ||
135 | ; There is no harm in having this as false - it just means that historical maptile assets are not deleted. | ||
136 | ; This only applies to maptiles served via the version 1 viewer mechanisms | ||
137 | ; Default is false | ||
138 | AllowRemoteDelete = false | ||
139 | |||
140 | ; Allow all assets to be remotely deleted. | ||
141 | ; Only set this to true if you are operating a grid where you control all calls to the asset service | ||
142 | ; (where a necessary condition is that you control all simulators) and you need this for admin purposes. | ||
143 | ; If set to true, AllowRemoteDelete = true is required as well. | ||
144 | ; Default is false. | ||
145 | AllowRemoteDeleteAllTypes = false | ||
146 | |||
147 | |||
148 | ; * This configuration loads the inventory server modules. It duplicates | ||
149 | ; * the function of the legacy inventory server | ||
150 | ; * | ||
151 | [InventoryService] | ||
152 | LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService" | ||
153 | |||
154 | StorageProvider = "OpenSim.Tests.Common.dll:TestXInventoryDataPlugin" | ||
155 | ConnectionString = "" | ||
156 | |||
157 | ; Will calls to purge folders (empty trash) and immediately delete/update items or folders (not move to trash first) succeed? | ||
158 | ; If this is set to false then some other arrangement must be made to perform these operations if necessary. | ||
159 | AllowDelete = true | ||
160 | |||
161 | |||
162 | ; * This is the new style grid service. | ||
163 | ; * "Realm" is the table that is used for user lookup. | ||
164 | ; * It defaults to "regions", which uses the legacy tables | ||
165 | ; * | ||
166 | [GridService] | ||
167 | LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" | ||
168 | ; Realm = "regions" | ||
169 | ; AllowDuplicateNames = "True" | ||
170 | |||
171 | ;; Next, we can specify properties of regions, including default and fallback regions | ||
172 | ;; The syntax is: Region_<RegionName> = "<flags>" | ||
173 | ;; or: Region_<RegionID> = "<flags>" | ||
174 | ;; where <flags> can be DefaultRegion, DefaultHGRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut, Reservation, NoMove, Authenticate | ||
175 | ;; | ||
176 | ;; DefaultRegion If a local login cannot be placed in the required region (e.g. home region does not exist, avatar is not allowed entry, etc.) | ||
177 | ;; then this region becomes the destination. Only the first online default region will be used. If no DefaultHGRegion | ||
178 | ;; is specified then this will also be used as the region for hypergrid connections that require it (commonly because they have not specified | ||
179 | ;; an explicit region. | ||
180 | ;; | ||
181 | ;; DefaultHGRegion If an avatar connecting via the hypergrid does not specify a region, then they are placed here. Only the first online | ||
182 | ;; region will be used. | ||
183 | ;; | ||
184 | ;; FallbackRegion If the DefaultRegion is not available for a local login, then any FallbackRegions are tried instead. These are tried in the | ||
185 | ;; order specified. This only applies to local logins at this time, not Hypergrid connections. | ||
186 | ;; | ||
187 | ;; NoDirectLogin A hypergrid user cannot directly connect to this region. This does not apply to local logins. | ||
188 | ;; | ||
189 | ;; Persistent When the simulator is shutdown, the region is signalled as offline but left registered on the grid. | ||
190 | ;; | ||
191 | ;; Example specification: | ||
192 | ; Region_Welcome_Area = "DefaultRegion, FallbackRegion" | ||
193 | ; (replace spaces with underscore) | ||
194 | |||
195 | ;; Allow supporting viewers to export content | ||
196 | ;; Set to false to prevent export | ||
197 | ExportSupported = true | ||
198 | |||
199 | |||
200 | |||
201 | |||
202 | ; * This is the new style authentication service. Currently, only MySQL | ||
203 | ; * is implemented. | ||
204 | ; * | ||
205 | [AuthenticationService] | ||
206 | ; for the server connector | ||
207 | LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" | ||
208 | |||
209 | ;; Allow the service to process HTTP getauthinfo calls. | ||
210 | ;; Default is false. | ||
211 | ; AllowGetAuthInfo = false | ||
212 | |||
213 | ;; Allow the service to process HTTP setauthinfo calls. | ||
214 | ;; Default is false. | ||
215 | ; AllowSetAuthInfo = false | ||
216 | |||
217 | ;; Allow the service to process HTTP setpassword calls. | ||
218 | ;; Default is false. | ||
219 | ; AllowSetPassword = false | ||
220 | |||
221 | |||
222 | ; * This is the new style authentication service. Currently, only MySQL | ||
223 | ; * is implemented. "Realm" is the table that is used for user lookup. | ||
224 | ; * It defaults to "useraccounts", which uses the new style. | ||
225 | ; * Realm = "users" will use the legacy tables as an authentication source | ||
226 | ; * | ||
227 | [UserAccountService] | ||
228 | StorageProvider = "OpenSim.Data.Null.dll" | ||
229 | ConnectionString = "" | ||
230 | |||
231 | ; for the server connector | ||
232 | LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService" | ||
233 | ; Realm = "useraccounts" | ||
234 | |||
235 | ; These are for creating new accounts by the service | ||
236 | ;AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" | ||
237 | PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" | ||
238 | GridService = "OpenSim.Services.GridService.dll:GridService" | ||
239 | InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService" | ||
240 | ;AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" | ||
241 | ;GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" | ||
242 | |||
243 | ;; This switch creates the minimum set of body parts and avatar entries for a viewer 2 | ||
244 | ;; to show a default "Ruth" avatar rather than a cloud for a newly created user. | ||
245 | ;; Default is false | ||
246 | CreateDefaultAvatarEntries = true | ||
247 | |||
248 | ;; Allow the service to process HTTP createuser calls. | ||
249 | ;; Default is false. | ||
250 | AllowCreateUser = true | ||
251 | |||
252 | ;; Allow the service to process HTTP setaccount calls. | ||
253 | ;; Default is false. | ||
254 | AllowSetAccount = true | ||
255 | |||
256 | |||
257 | [GridUserService] | ||
258 | ; for the server connector | ||
259 | LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService" | ||
260 | |||
261 | |||
262 | [PresenceService] | ||
263 | ; for the server connector | ||
264 | LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService" | ||
265 | ; Set this to true to allow the use of advanced web services and multiple | ||
266 | ; bots using one account | ||
267 | AllowDuplicatePresences = false; | ||
268 | |||
269 | |||
270 | [AvatarService] | ||
271 | ; for the server connector | ||
272 | LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService" | ||
273 | |||
274 | |||
275 | [FriendsService] | ||
276 | ; for the server connector | ||
277 | LocalServiceModule = "OpenSim.Services.FriendsService.dll:FriendsService" | ||
278 | |||
279 | [EstateService] | ||
280 | LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" | ||
281 | |||
282 | [LibraryService] | ||
283 | LibraryName = "OpenSim Library" | ||
284 | DefaultLibrary = "./inventory/Libraries.xml" | ||
285 | |||
286 | |||
287 | [LoginService] | ||
288 | ; for the server connector | ||
289 | LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService" | ||
290 | ; for the service | ||
291 | UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService" | ||
292 | GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService" | ||
293 | AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" | ||
294 | InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService" | ||
295 | AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService" | ||
296 | PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" | ||
297 | GridService = "OpenSim.Services.GridService.dll:GridService" | ||
298 | SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector" | ||
299 | LibraryService = "OpenSim.Services.InventoryService.dll:LibraryService" | ||
300 | FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" | ||
301 | |||
302 | ; The minimum user level required for a user to be able to login. 0 by default | ||
303 | ; If you disable a particular user's account then you can set their login level below this number. | ||
304 | ; You can also change this level from the console though these changes will not be persisted. | ||
305 | ; MinLoginLevel = 0 | ||
306 | |||
307 | ; Ask co-operative viewers to use a different currency name | ||
308 | ;Currency = "" | ||
309 | |||
310 | ;; Set minimum fee to publish classified | ||
311 | ; ClassifiedFee = 0 | ||
312 | |||
313 | WelcomeMessage = "Welcome, Avatar!" | ||
314 | AllowRemoteSetLoginLevel = "false" | ||
315 | |||
316 | ; For V2 map | ||
317 | MapTileURL = "${Const|BaseURL}:${Const|PublicPort}/"; | ||
318 | |||
319 | ; Url to search service | ||
320 | ; SearchURL = "${Const|BaseURL}:${Const|PublicPort}/"; | ||
321 | |||
322 | ; For V3 destination guide | ||
323 | ; DestinationGuide = "${Const|BaseURL}/guide" | ||
324 | |||
325 | ; For V3 avatar picker (( work in progress )) | ||
326 | ; AvatarPicker = "${Const|BaseURL}/avatars" | ||
327 | |||
328 | ; If you run this login server behind a proxy, set this to true | ||
329 | ; HasProxy = false | ||
330 | |||
331 | ;; Regular expressions for controlling which client versions are accepted/denied. | ||
332 | ;; An empty string means nothing is checked. | ||
333 | ;; | ||
334 | ;; Example 1: allow only these 3 types of clients (any version of them) | ||
335 | ;; AllowedClients = "Imprudence|Hippo|Second Life" | ||
336 | ;; | ||
337 | ;; Example 2: allow all clients except these | ||
338 | ;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald" | ||
339 | ;; | ||
340 | ;; Note that these are regular expressions, so every character counts. | ||
341 | ;; Also note that this is very weak security and should not be trusted as a reliable means | ||
342 | ;; for keeping bad clients out; modified clients can fake their identifiers. | ||
343 | ;; | ||
344 | ;; | ||
345 | ;AllowedClients = "" | ||
346 | ;DeniedClients = "" | ||
347 | |||
348 | ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time" | ||
349 | ;; Viewers do not listen to timezone sent by the server. They use Pacific Standard Time instead, | ||
350 | ;; but rely on the server to calculate Daylight Saving Time. Sending another DST than US Pacific | ||
351 | ;; would result in time inconsistencies between grids (during summer and around DST transition period) | ||
352 | ;; default let OpenSim calculate US Pacific DST | ||
353 | ;; "none" disable DST (equivallent to "local" with system set to GMT) | ||
354 | ;; "local" force legacy behaviour (using local system time to calculate DST) | ||
355 | ; DSTZone = "America/Los_Angeles;Pacific Standard Time" | ||
356 | |||
357 | ;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time" | ||
358 | ;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time | ||
359 | ;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not. | ||
360 | ;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids. | ||
361 | ;; By default, this setting uses various timezone names to calculate DST with regards to the viewer's standard PST. | ||
362 | ;; Options are | ||
363 | ;; "none" no DST | ||
364 | ;; "local" use the server's only timezone to calculate DST. This is previous OpenSimulator behaviour. | ||
365 | ;; "America/Los_Angeles;Pacific Standard Time" use these timezone names to look up Daylight savings. | ||
366 | ;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows | ||
367 | DSTZone = "America/Los_Angeles;Pacific Standard Time" | ||
368 | |||
369 | ;Basic Login Service Dos Protection Tweaks | ||
370 | ;; | ||
371 | ;; Some Grids/Users use a transparent proxy that makes use of the X-Forwarded-For HTTP Header, If you do, set this to true | ||
372 | ;; If you set this to true and you don't have a transparent proxy, it may allow attackers to put random things in the X-Forwarded-For header to | ||
373 | ;; get around this basic DOS protection. | ||
374 | ;DOSAllowXForwardedForHeader = false | ||
375 | ;; | ||
376 | ;; The protector adds up requests during this rolling period of time, default 10 seconds | ||
377 | ;DOSRequestTimeFrameMS = 10000 | ||
378 | ;; | ||
379 | ;; The amount of requests in the above timeframe from the same endpoint that triggers protection | ||
380 | ;DOSMaxRequestsInTimeFrame = 5 | ||
381 | ;; | ||
382 | ;; The amount of time that a specific endpoint is blocked. Default 2 minutes. | ||
383 | ;DOSForgiveClientAfterMS = 120000 | ||
384 | ;; | ||
385 | ;; To turn off basic dos protection, set the DOSMaxRequestsInTimeFrame to 0. | ||
386 | |||
387 | |||
388 | [MapImageService] | ||
389 | LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService" | ||
390 | |||
391 | ; Set this if you want to change the default | ||
392 | ; TilesStoragePath = "maptiles" | ||
393 | ; | ||
394 | ; If for some reason you have the AddMapTile service outside the firewall (e.g. ${Const|PublicPort}), | ||
395 | ; you may want to set this. Otherwise, don't set it, because it's already protected. | ||
396 | ; GridService = "OpenSim.Services.GridService.dll:GridService" | ||
397 | ; | ||
398 | ; Additionally, if you run this server behind a proxy, set this to true | ||
399 | ; HasProxy = false | ||
400 | |||
401 | |||
402 | [Messaging] | ||
403 | ; OfflineIM | ||
404 | OfflineIMService = "" | ||
405 | |||
406 | |||
407 | [GridInfoService] | ||
408 | ; These settings are used to return information on a get_grid_info call. | ||
409 | ; Client launcher scripts and third-party clients make use of this to | ||
410 | ; autoconfigure the client and to provide a nice user experience. If you | ||
411 | ; want to facilitate that, you should configure the settings here according | ||
412 | ; to your grid or standalone setup. | ||
413 | ; | ||
414 | ; See http://opensimulator.org/wiki/GridInfo | ||
415 | |||
416 | ; login uri: for grid this is the login server URI | ||
417 | login = ${Const|BaseURL}:${Const|PublicPort}/ | ||
418 | |||
419 | ; long grid name: the long name of your grid | ||
420 | gridname = "the lost continent of hippo" | ||
421 | |||
422 | ; short grid name: the short name of your grid | ||
423 | gridnick = "hippogrid" | ||
424 | |||
425 | ; login page: optional: if it exists it will be used to tell the client to use | ||
426 | ; this as splash page | ||
427 | ;welcome = ${Const|BaseURL}/welcome | ||
428 | |||
429 | ; helper uri: optional: if it exists if will be used to tell the client to use | ||
430 | ; this for all economy related things | ||
431 | ;economy = ${Const|BaseURL}:${Const|PublicPort}/ | ||
432 | |||
433 | ; web page of grid: optional: page providing further information about your grid | ||
434 | ;about = ${Const|BaseURL}/about/ | ||
435 | |||
436 | ; account creation: optional: page providing further information about obtaining | ||
437 | ; a user account on your grid | ||
438 | ;register = ${Const|BaseURL}/register | ||
439 | |||
440 | ; help: optional: page providing further assistance for users of your grid | ||
441 | ;help = ${Const|BaseURL}/help | ||
442 | |||
443 | ; password help: optional: page providing password assistance for users of your grid | ||
444 | ;password = ${Const|BaseURL}/password | ||
445 | |||
446 | |||
447 | [UserProfilesService] | ||
448 | LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService" | ||
449 | Enabled = false | ||
450 | ;; Configure this for separate profiles database | ||
451 | ;; ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=*****;Old Guids=true;" | ||
452 | ;; Realm = UserProfiles | ||
453 | UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService | ||
454 | AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService" | ||
455 | |||
456 | |||
457 | [BakedTextureService] | ||
458 | LocalServiceModule = "OpenSim.Server.Handlers.dll:XBakes" | ||
459 | ;; This directory must be writable by the user ROBUST runs as. It will be created automatically. | ||
460 | BaseDirectory = "./bakes" | ||
461 | |||
462 | [HGInstantMessageService] | ||
463 | LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService" | ||
464 | GridService = "OpenSim.Services.GridService.dll:GridService" | ||
465 | PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService" | ||
466 | UserAgentService = "" | ||
467 | ; This should always be true in the Robust config | ||
468 | InGatekeeper = True | ||
diff --git a/config/config.ini b/config/config.ini index f60c7af..31ce07f 100644 --- a/config/config.ini +++ b/config/config.ini | |||
@@ -37,5 +37,5 @@ | |||
37 | 37 | ||
38 | 38 | ||
39 | DataProvider = "OpenSim.Data.MySQL.dll" | 39 | DataProvider = "OpenSim.Data.MySQL.dll" |
40 | ConnectionString = "Data Source=localhost;Database=$MYSQL_DB;User ID=$MYSQL_USER;Password=$MYSQL_PASSWORD;Old Guids=true;" | 40 | ConnectionString = "Data Source=MYSQL_HOST;Database=MYSQL_DB;User ID=MYSQL_USER;Password=MYSQL_PASSWORD;Old Guids=true;" |
41 | 41 | ||
diff --git a/config/sim01/My_sim.xml b/config/sim01/My_sim.xml new file mode 100644 index 0000000..144cb0a --- /dev/null +++ b/config/sim01/My_sim.xml | |||
@@ -0,0 +1,11 @@ | |||
1 | <Nini> | ||
2 | <Section Name="My sim"> | ||
3 | <Key Name="RegionUUID" Value="ffffffff-ffff-ffff-ffff-ffffffffffff" /> | ||
4 | <Key Name="Location" Value="10000,10000" /> | ||
5 | <Key Name="InternalAddress" Value="0.0.0.0" /> | ||
6 | <Key Name="InternalPort" Value="9106" /> | ||
7 | <Key Name="AllowAlternatePorts" Value="False" /> | ||
8 | <Key Name="ExternalHostName" Value="SYSTEMIP" /> | ||
9 | <Key Name="RegionType" Value="public sim" /> | ||
10 | </Section> | ||
11 | </Nini> | ||
diff --git a/config/sim01/ThisSim.ini b/config/sim01/ThisSim.ini new file mode 100644 index 0000000..e7953ab --- /dev/null +++ b/config/sim01/ThisSim.ini | |||
@@ -0,0 +1,6 @@ | |||
1 | [Startup] | ||
2 | PIDFile = "/var/run/opensim/sim01.pid" | ||
3 | regionload_regionsdir="/opt/opensim/config/sim01" | ||
4 | |||
5 | [Network] | ||
6 | http_listener_port = 9105 | ||
diff --git a/config/sim01/opensim-monit.conf b/config/sim01/opensim-monit.conf new file mode 100644 index 0000000..9d66ce6 --- /dev/null +++ b/config/sim01/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 sim01 with pidfile /var/run/opensim/sim01.pid | ||
17 | start program = "/usr/bin/sudo -Hu opensim /bin/bash -lc 'cd /opt/opensim/config/sim01 && /opt/opensim/config/sim01/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/sim01 && /opt/opensim/config/sim01/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 | ||