mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Fix config, add way to update libpandadna when needed, and add modded Start scripts to not try to include a folder that doesn't exist in production.
This commit is contained in:
parent
070616b987
commit
6c8e93db79
5 changed files with 147 additions and 14 deletions
|
@ -2,7 +2,7 @@ This deployment folder contains files that describe how a release of TTSride sho
|
||||||
|
|
||||||
uberdogs.yml contains the 'uberdogs' section of an astrond.yml. Please keep it updated, or else you'll break prod!
|
uberdogs.yml contains the 'uberdogs' section of an astrond.yml. Please keep it updated, or else you'll break prod!
|
||||||
|
|
||||||
deploy.json describes a the environment for a release of TTSride. It contains the version of astron to use as well as the version of Panda3D to use.
|
deploy.json describes a the environment for a release of TTSride. It contains the version of astron to use as well as the version of Panda3D to use as well as the libpandadna version to use..
|
||||||
deploy.json also contains a version prefix. This is used to generate dev version strings on the development server (which are probably something like ttstride-beta-dev-gabcdef0).
|
deploy.json also contains a version prefix. This is used to generate dev version strings on the development server (which are probably something like ttstride-beta-dev-gabcdef0).
|
||||||
When we deploy a release to prod, we push a git tag named after the version to the repository (i.e. ttstride-alpha-v1.3.7). It is required that the tag's name contain the version prefix specified in deploy.json.
|
When we deploy a release to prod, we push a git tag named after the version to the repository (i.e. ttstride-alpha-v1.3.7). It is required that the tag's name contain the version prefix specified in deploy.json.
|
||||||
The key 'server-resources' maps to a list of file extensions of files in the resources directory that are necessary to be used server-side. We do not package and deploy art assets onto servers.
|
The key 'server-resources' maps to a list of file extensions of files in the resources directory that are necessary to be used server-side. We do not package and deploy art assets onto servers.
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
"__fyi__": "If you use anything other than the first 7 characters of the git hash, you just broke everything",
|
"__fyi__": "If you use anything other than the first 7 characters of the git hash, you just broke everything",
|
||||||
"astron": "6b769e6",
|
"astron": "6b769e6",
|
||||||
"panda3d": "b924139",
|
"panda3d": "b924139",
|
||||||
|
"libpandadna": "a0047ce",
|
||||||
"version-prefix": "ttstride-alpha-",
|
"version-prefix": "ttstride-alpha-",
|
||||||
"server-resources": ["pdna", "dna", "xml", "txt", "dat", "bam", "ttf"]
|
"server-resources": ["pdna", "dna", "xml", "txt", "dat", "bam", "ttf"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,19 +19,19 @@ texture-anisotropic-degree 16
|
||||||
model-path /
|
model-path /
|
||||||
model-cache-models #f
|
model-cache-models #f
|
||||||
model-cache-textures #f
|
model-cache-textures #f
|
||||||
vfs-mount phase_3.mf /
|
vfs-mount resources/default/phase_3.mf /
|
||||||
vfs-mount phase_3.5.mf /
|
vfs-mount resources/default/phase_3.5.mf /
|
||||||
vfs-mount phase_4.mf /
|
vfs-mount resources/default/phase_4.mf /
|
||||||
vfs-mount phase_5.mf /
|
vfs-mount resources/default/phase_5.mf /
|
||||||
vfs-mount phase_5.5.mf /
|
vfs-mount resources/default/phase_5.5.mf /
|
||||||
vfs-mount phase_6.mf /
|
vfs-mount resources/default/phase_6.mf /
|
||||||
vfs-mount phase_7.mf /
|
vfs-mount resources/default/phase_7.mf /
|
||||||
vfs-mount phase_8.mf /
|
vfs-mount resources/default/phase_8.mf /
|
||||||
vfs-mount phase_9.mf /
|
vfs-mount resources/default/phase_9.mf /
|
||||||
vfs-mount phase_10.mf /
|
vfs-mount resources/default/phase_10.mf /
|
||||||
vfs-mount phase_11.mf /
|
vfs-mount resources/default/phase_11.mf /
|
||||||
vfs-mount phase_12.mf /
|
vfs-mount resources/default/phase_12.mf /
|
||||||
vfs-mount phase_13.mf /
|
vfs-mount resources/default/phase_13.mf /
|
||||||
default-model-extension .bam
|
default-model-extension .bam
|
||||||
|
|
||||||
|
|
||||||
|
|
72
deployment/toontown/ai/ServiceStart.py
Normal file
72
deployment/toontown/ai/ServiceStart.py
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
import __builtin__
|
||||||
|
|
||||||
|
|
||||||
|
__builtin__.process = 'ai'
|
||||||
|
|
||||||
|
|
||||||
|
# Temporary hack patch:
|
||||||
|
__builtin__.__dict__.update(__import__('pandac.PandaModules', fromlist=['*']).__dict__)
|
||||||
|
from direct.extensions_native import HTTPChannel_extensions
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import gc
|
||||||
|
|
||||||
|
# Panda3D 1.10.0 is 63.
|
||||||
|
gc.disable()
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('--base-channel', help='The base channel that the server may use.')
|
||||||
|
parser.add_argument('--max-channels', help='The number of channels the server may use.')
|
||||||
|
parser.add_argument('--stateserver', help="The control channel of this AI's designated State Server.")
|
||||||
|
parser.add_argument('--district-name', help="What this AI Server's district will be named.")
|
||||||
|
parser.add_argument('--astron-ip', help="The IP address of the Astron Message Director to connect to.")
|
||||||
|
parser.add_argument('--eventlogger-ip', help="The IP address of the Astron Event Logger to log to.")
|
||||||
|
parser.add_argument('config', nargs='*', default=['dependencies/config/general.prc', 'dependencies/config/release/dev.prc'], help="PRC file(s) to load.")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
for prc in args.config:
|
||||||
|
loadPrcFile(prc)
|
||||||
|
|
||||||
|
if os.path.isfile('dependencies/config/local.prc'):
|
||||||
|
loadPrcFile('dependencies/config/local.prc')
|
||||||
|
|
||||||
|
localconfig = ''
|
||||||
|
if args.base_channel: localconfig += 'air-base-channel %s\n' % args.base_channel
|
||||||
|
if args.max_channels: localconfig += 'air-channel-allocation %s\n' % args.max_channels
|
||||||
|
if args.stateserver: localconfig += 'air-stateserver %s\n' % args.stateserver
|
||||||
|
if args.district_name: localconfig += 'district-name %s\n' % args.district_name
|
||||||
|
if args.astron_ip: localconfig += 'air-connect %s\n' % args.astron_ip
|
||||||
|
if args.eventlogger_ip: localconfig += 'eventlog-host %s\n' % args.eventlogger_ip
|
||||||
|
loadPrcFileData('Command-line', localconfig)
|
||||||
|
|
||||||
|
from otp.ai.AIBaseGlobal import *
|
||||||
|
|
||||||
|
from toontown.ai.ToontownAIRepository import ToontownAIRepository
|
||||||
|
simbase.air = ToontownAIRepository(config.GetInt('air-base-channel', 401000000),
|
||||||
|
config.GetInt('air-stateserver', 4002),
|
||||||
|
config.GetString('district-name', 'Devhaven'))
|
||||||
|
host = config.GetString('air-connect', '127.0.0.1')
|
||||||
|
port = 7100
|
||||||
|
if ':' in host:
|
||||||
|
host, port = host.split(':', 1)
|
||||||
|
port = int(port)
|
||||||
|
simbase.air.connect(host, port)
|
||||||
|
|
||||||
|
isServer = config.GetBool('is-server', False)
|
||||||
|
|
||||||
|
try:
|
||||||
|
run()
|
||||||
|
gc.enable()
|
||||||
|
except SystemExit:
|
||||||
|
raise
|
||||||
|
except Exception:
|
||||||
|
info = describeException()
|
||||||
|
|
||||||
|
simbase.air.writeServerEvent('ai-exception', avId=simbase.air.getAvatarIdFromSender(), accId=simbase.air.getAccountIdFromSender(), exception=info)
|
||||||
|
|
||||||
|
if isServer:
|
||||||
|
import datetime
|
||||||
|
with open(config.GetString('ai-crash-log-name', '/opt/var/log/%s-ai-crash-%s.txt' % (config.GetString('district-name', 'Devhaven'), datetime.datetime.now())), 'w+') as file:
|
||||||
|
file.write(info + "\n")
|
||||||
|
|
||||||
|
raise
|
60
deployment/toontown/uberdog/ServiceStart.py
Normal file
60
deployment/toontown/uberdog/ServiceStart.py
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
import __builtin__
|
||||||
|
|
||||||
|
|
||||||
|
__builtin__.process = 'uberdog'
|
||||||
|
|
||||||
|
# Temporary hack patch:
|
||||||
|
__builtin__.__dict__.update(__import__('pandac.PandaModules', fromlist=['*']).__dict__)
|
||||||
|
from direct.extensions_native import HTTPChannel_extensions
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('--base-channel', help='The base channel that the server may use.')
|
||||||
|
parser.add_argument('--max-channels', help='The number of channels the server may use.')
|
||||||
|
parser.add_argument('--stateserver', help="The control channel of this UD's designated State Server.")
|
||||||
|
parser.add_argument('--astron-ip', help="The IP address of the Astron Message Director to connect to.")
|
||||||
|
parser.add_argument('--eventlogger-ip', help="The IP address of the Astron Event Logger to log to.")
|
||||||
|
parser.add_argument('config', nargs='*', default=['dependencies/config/general.prc', 'dependencies/config/release/dev.prc'], help="PRC file(s) to load.")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
for prc in args.config:
|
||||||
|
loadPrcFile(prc)
|
||||||
|
|
||||||
|
if os.path.isfile('dependencies/config/local.prc'):
|
||||||
|
loadPrcFile('dependencies/config/local.prc')
|
||||||
|
|
||||||
|
localconfig = ''
|
||||||
|
if args.base_channel:
|
||||||
|
localconfig += 'air-base-channel %s\n' % args.base_channel
|
||||||
|
if args.max_channels:
|
||||||
|
localconfig += 'air-channel-allocation %s\n' % args.max_channels
|
||||||
|
if args.stateserver:
|
||||||
|
localconfig += 'air-stateserver %s\n' % args.stateserver
|
||||||
|
if args.astron_ip:
|
||||||
|
localconfig += 'air-connect %s\n' % args.astron_ip
|
||||||
|
if args.eventlogger_ip:
|
||||||
|
localconfig += 'eventlog-host %s\n' % args.eventlogger_ip
|
||||||
|
loadPrcFileData('Command-line', localconfig)
|
||||||
|
|
||||||
|
|
||||||
|
from otp.ai.AIBaseGlobal import *
|
||||||
|
|
||||||
|
from toontown.uberdog.ToontownUberRepository import ToontownUberRepository
|
||||||
|
simbase.air = ToontownUberRepository(config.GetInt('air-base-channel', 400000000),
|
||||||
|
config.GetInt('air-stateserver', 4002))
|
||||||
|
host = config.GetString('air-connect', '127.0.0.1')
|
||||||
|
port = 7100
|
||||||
|
if ':' in host:
|
||||||
|
host, port = host.split(':', 1)
|
||||||
|
port = int(port)
|
||||||
|
simbase.air.connect(host, port)
|
||||||
|
|
||||||
|
try:
|
||||||
|
run()
|
||||||
|
except SystemExit:
|
||||||
|
raise
|
||||||
|
except Exception:
|
||||||
|
info = describeException()
|
||||||
|
simbase.air.writeServerEvent('uberdog-exception', simbase.air.getAvatarIdFromSender(), simbase.air.getAccountIdFromSender(), info)
|
||||||
|
raise
|
Loading…
Reference in a new issue