-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
200 additions
and
144 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--eufaula配置参数 | ||
|
||
--服务器集群,对应后台的服务器id | ||
QUANTA_CLUSTER = 2 | ||
|
||
--主机IP | ||
QUANTA_HOST_IP = "10.98.8.59" | ||
|
||
--mongo地址 | ||
QUANTA_MONGO_URL = "mongodb://root:MTAE379673#@10.96.8.100:27017" | ||
|
||
--redis地址 | ||
QUANTA_REDIS_URL = "redis://root:[email protected]:6379" | ||
|
||
--扩展说明 | ||
--专用的的配置参考上面的配置,添加到顶层目录 | ||
|
||
ENVIRON_VARIABLES = { | ||
QUANTA_ENVIRON = "develop" | ||
} | ||
|
||
--扩展说明 | ||
--公用的的配置参考上面的配置,添加到ENVIRON_VARIABLES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
|
||
@echo off | ||
setlocal enabledelayedexpansion | ||
|
||
set /p CONF=please input your conf name: | ||
|
||
set RootDir=%~dp0 | ||
|
||
set ConfDir=%RootDir%quanta | ||
rmdir /Q /S %ConfDir% | ||
md %ConfDir% | ||
|
||
set TplDir=%RootDir%template | ||
cd %TplDir% | ||
|
||
set SCRIPT=../../extend/lmake/ltemplate.lua | ||
set ENVIRON=../config/%CONF%.conf | ||
for %%i in (*.conf) do ( | ||
..\lua.exe %SCRIPT% %%i %ConfDir%\%%i %ENVIRON% | ||
) | ||
|
||
pause | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
taskkill /f /im quanta.exe | ||
|
||
::start "accord" quanta.exe quanta\accord.conf --index=1 --port=1 | ||
start "monitor" quanta.exe quanta\monitor.conf --index=1 --port=1 | ||
start "router1" quanta.exe quanta\router.conf --index=1 --port=1 | ||
start "cache1" quanta.exe quanta\cache.conf --index=1 --port=1 | ||
start "mongo" quanta.exe quanta\mongo.conf --index=1 --port=1 | ||
start "redis" quanta.exe quanta\redis.conf --index=1 --port=1 | ||
start "gate1" quanta.exe quanta\gateway.conf --index=1 --port=1 | ||
start "center" quanta.exe quanta\center.conf --index=1 --port=1 | ||
start "login" quanta.exe quanta\login.conf --index=1 --port=1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--[[ | ||
quanta启动环境配置 | ||
启动: | ||
启动第一个参数是本配置文件的路径,后续跟环境变量 | ||
备注: | ||
环境变量可在此文件配置, 也可以配置在启动参数, 从启动参数配置时, 系统会自动补全QUANTA_前缀 | ||
案例: | ||
./quanta.exe quanta.conf --index=3 --service=test | ||
]] | ||
|
||
--基础配置 | ||
dofile("share.conf") | ||
|
||
--服务大区 | ||
set_env("QUANTA_CLUSTER", "{{%= QUANTA_CLUSTER %}}") | ||
|
||
--本机ip | ||
set_env("QUANTA_HOST_IP", "{{%= QUANTA_HOST_IP %}}") | ||
|
||
--需要定义的环境变量 | ||
{{% for ENV_KEY, ENV_VALUE in pairs(ENVIRON_VARIABLES or {}) do %}} | ||
set_env("{{%= ENV_KEY %}}", "{{%= ENV_VALUE %}}") | ||
|
||
{{% end %}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--[[ | ||
quanta启动环境配置 | ||
启动: | ||
启动第一个参数是本配置文件的路径,后续跟环境变量 | ||
备注: | ||
环境变量可在此文件配置,也可以配置在启动参数,从启动参数配置时,系统会自动补全QUANTA_前缀 | ||
案例: | ||
./quanta.exe quanta.conf --index=3 --service=test | ||
]] | ||
|
||
--包含通用环境变量配置 | ||
dofile("quanta/base.conf") | ||
dofile("quanta/database.conf") | ||
|
||
--启动参数 | ||
--------------------------------------------------------- | ||
--定义启动文件路径 | ||
set_env("QUANTA_ENTRY", "cachesvr") | ||
--定义服务名称 | ||
set_env("QUANTA_SERVICE", "cache") | ||
--服务INCLUDE | ||
set_env("QUANTA_INCLUDE", "cache.init") | ||
|
||
--缓存组条目数量 | ||
set_env("QUANTA_DB_CACHE_MAX", "{{%= QUANTA_DB_CACHE_MAX or 4096 %}}") | ||
--每帧落地最大数量 | ||
set_env("QUANTA_DB_CACHE_FLUSH", "{{%= QUANTA_DB_CACHE_FLUSH or 10 %}}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,23 +10,28 @@ quanta启动环境配置 | |
|
||
--数据库配置 | ||
--------------------------------------------------------- | ||
--数据库连接字符串列表, 分割符为";" | ||
--单个连接串格式: driver://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]] | ||
--options格式: key1=value1&key2=value2 | ||
|
||
{{% if QUANTA_MONGO_URL then %}} | ||
--mongo | ||
set_env("QUANTA_MONGO_URL", "mongodb://root:MTAE379673#@127.0.0.1:27017/quanta") | ||
--redis | ||
set_env("QUANTA_REDIS_URL", "redis://root:[email protected]:6379") | ||
set_env("QUANTA_MONGO_URL", "{{%= QUANTA_MONGO_URL %}}/quanta_{{%= QUANTA_CLUSTER %}}") | ||
{{% end %}} | ||
|
||
{{% if QUANTA_MYSQL_URL then %}} | ||
--mysql | ||
set_env("QUANTA_MYSQL_URL", "mysql://root:[email protected]:3306/quanta") | ||
set_env("QUANTA_MYSQL_URL", "{{%= QUANTA_MYSQL_URL %}}/quanta_{{%= QUANTA_CLUSTER %}}") | ||
{{% end %}} | ||
|
||
{{% if QUANTA_REDIS_URL then %}} | ||
--redis | ||
set_env("QUANTA_REDIS_URL", "{{%= QUANTA_REDIS_URL %}}") | ||
{{% end %}} | ||
|
||
--AUTOINCKEY | ||
set_env("QUANTA_DB_AUTOINCTB", "counters") | ||
set_env("QUANTA_DB_BENCHMARK", "1001014135") | ||
set_env("QUANTA_DB_AUTOINCKEY", "COUNTER:QUANTA:ROLE") | ||
|
||
--DB连接池大小 | ||
set_env("QUANTA_DB_POOL_COUNT", "3") | ||
|
||
--消息队列驱动器 [redis, mongo] | ||
set_env("QUANTA_MQ_DRIVER", "redis") | ||
set_env("QUANTA_DB_POOL_COUNT", "{{%= QUANTA_DB_POOL_COUNT or 11 %}}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,29 @@ | ||
--[[ | ||
quanta启动环境配置 | ||
启动: | ||
启动第一个参数是本配置文件的路径, 后续跟环境变量 | ||
启动第一个参数是本配置文件的路径,后续跟环境变量 | ||
备注: | ||
环境变量可在此文件配置, 也可以配置在启动参数, 从启动参数配置时, 系统会自动补全QUANTA_前缀 | ||
环境变量可在此文件配置,也可以配置在启动参数,从启动参数配置时,系统会自动补全QUANTA_前缀 | ||
案例: | ||
./quanta.exe quanta.conf --index=3 --service=test | ||
]] | ||
|
||
--包含通用环境变量配置 | ||
dofile("share.conf") | ||
dofile("quanta/base.conf") | ||
|
||
--启动参数 | ||
--------------------------------------------------------- | ||
--定义启动文件路径 | ||
set_env("QUANTA_ENTRY", "login") | ||
--定义服务名称 | ||
set_env("QUANTA_SERVICE", "login") | ||
--服务INCLUDE | ||
set_env("QUANTA_INCLUDE", "login.init") | ||
|
||
--IP地址相关 | ||
--------------------------------------------------------- | ||
--Login监听地址(客户端直连访问,或者nginx等lbs转发) | ||
set_env("QUANTA_LOGIN_ADDR", "0.0.0.0:20013") | ||
|
||
--登陆验证线程数量 | ||
set_env("QUANTA_LOGIN_WORKER", "{{%= QUANTA_LOGIN_WORKER or 2 %}}") |
Oops, something went wrong.