Gavin hace 5 años
padre
commit
42bda4a61a

+ 13 - 0
logonsvr/登陆服务器-提审/Dockerfile

@@ -0,0 +1,13 @@
+FROM golang:1.11
+RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
+RUN echo 'Asia/Shanghai' > /etc/timezone
+
+COPY iplist.yaml /go/bin/
+COPY logonsvr.yaml /go/bin/
+COPY thirdpart.yaml /go/bin/
+COPY logonsvr /go/bin/
+RUN chmod +x /go/bin/logonsvr
+
+CMD ["/go/bin/logonsvr"]
+EXPOSE 6532
+EXPOSE 8181

+ 86 - 0
logonsvr/登陆服务器-提审/deployment.yaml

@@ -0,0 +1,86 @@
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+  labels:
+    app: logintestonly
+  name: logintestonly
+  namespace: login
+spec:
+  progressDeadlineSeconds: 600
+  replicas: 1
+  revisionHistoryLimit: 10
+  selector:
+    matchLabels:
+      app: logintestonly
+  strategy:
+    type: Recreate
+  template:
+    metadata:
+      labels:
+        app: logintestonly
+        group: login-testonly
+    spec:
+      containers:
+        - env:
+            - name: aliyun_logs_login-console
+              value: stdout
+          image: 'registry-vpc.cn-beijing.aliyuncs.com/jixiang/logintestonly:1'
+          imagePullPolicy: Always
+          lifecycle:
+            preStop:
+              exec:
+                command:
+                  - sleep
+                  - '5'
+          livenessProbe:
+            failureThreshold: 3
+            initialDelaySeconds: 15
+            periodSeconds: 10
+            successThreshold: 1
+            tcpSocket:
+              port: 6532
+            timeoutSeconds: 5
+          name: logintestonly
+          ports:
+            - containerPort: 6532
+              protocol: TCP
+            - containerPort: 8181
+              protocol: TCP
+          readinessProbe:
+            failureThreshold: 3
+            initialDelaySeconds: 20
+            periodSeconds: 10
+            successThreshold: 1
+            tcpSocket:
+              port: 6532
+            timeoutSeconds: 5
+          resources:
+            limits:
+              cpu: '1'
+              memory: 512Mi
+            requests:
+              cpu: 500m
+              memory: 512Mi
+          stdin: true
+          terminationMessagePath: /dev/termination-log
+          terminationMessagePolicy: File
+          tty: true
+      dnsPolicy: ClusterFirst
+      hostAliases:
+        - hostnames:
+            - mpa-api.jixiang.cn
+          ip: 10.16.196.131
+        - hostnames:
+            - console.api.jixiang.cn
+            - console-api.jixiang.cn
+          ip: 10.16.196.146
+        - hostnames:
+            - ds-console.jixiang.cn
+            - ds.console.jixiang.cn
+          ip: 10.16.196.28
+      imagePullSecrets:
+        - name: reg-key-fyj
+      restartPolicy: Always
+      schedulerName: default-scheduler
+      securityContext: {}
+      terminationGracePeriodSeconds: 30

+ 55 - 0
logonsvr/登陆服务器-提审/iplist.yaml

@@ -0,0 +1,55 @@
+safeMode : true
+ipGroupUrl : http://ds.console.xinyueyouxi.com/api/ipGroup?id=%d&format=json
+testDistribHall :   #  分配测试,只有心悦才有
+  ip : 47.93.217.198                 
+  port : 9999                       
+vGameHallSvrList :
+  4701 :
+    10.18.8.53 : 9701
+  4702 :
+    10.18.8.53 : 9702
+  4703 :
+    10.18.8.53 : 9703
+  4704 :
+    10.18.8.53 : 9704
+vGameHallSvrPubList :
+  4701 :
+    101.200.37.55 : 9701
+  4702 :
+    101.200.37.55 : 9702
+  4703 :
+    101.200.37.55 : 9703
+  4704 :
+    101.200.37.55 : 9704
+reconnectIps:
+  ip1 : 180.97.158.207
+hallSvrList :
+  ip1 :    
+    4201 : 9201
+    4202 : 9202
+    4203 : 9203
+    4204 : 9204
+    4205 : 9205
+    4206 : 9206
+    4207 : 9207
+    4208 : 9208
+    4209 : 9209
+    4210 : 9210
+    4211 : 9211
+    4212 : 9212
+    4213 : 9213
+    4214 : 9214
+    4215 : 9215
+    4216 : 9216
+    4217 : 9217
+    4218 : 9218
+    4219 : 9219
+    4220 : 9220
+    4221 : 9221
+    4222 : 9222
+    4223 : 9223
+    4224 : 9224
+    4701 : 9701
+    4702 : 9702
+    4703 : 9703
+    4704 : 9704

BIN
logonsvr/登陆服务器-提审/logonsvr


+ 281 - 0
logonsvr/登陆服务器-提审/logonsvr.yaml

@@ -0,0 +1,281 @@
+listen : 6532					# tcp监听端口
+wsListen : 8181					# websocket监听端口
+runmode : debug						# 服务运行模式 debug/release
+deployType : 1						# 部署类型(0-app,1-小游戏:此环境不会下载iplist)
+testHall : 
+  ip : 47.94.229.194                # 测试大厅ip:外网:47.94.170.189 
+  port : 9999                       # 测试大厅port:外网:6004		
+maxConn : 10000
+svrTimeout : 10					# 服务超时时间(秒)
+svrVersion : 100					# 服务版本
+slowLogRate : 5           # 慢日志万分命中率
+slowLogThan : 100         # 慢日志记录阈值 ms
+giveMoney : 2000
+regGiveExtRoomCard : 2          # 注册额外赠送房卡
+regGiveExtRoomCardReview : 10   # 注册额外赠送房卡(审核状态)
+regGiveExtMoney : 3000          # 注册额外赠送豆豆
+regGiveExtDiamond : 10          # 注册额外赠送豆豆
+wxOAuth2Url : https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code
+wxUserInfoUrl : https://api.weixin.qq.com/sns/userinfo?access_token=%s&openid=%s
+wxJscode2SessionUrl : https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code
+vGameAgentAddr : 
+ 0 : wss://vhall2.xinyueyouxi.com  # wss://vhall1.weile.com/
+consoleApi :
+  url : http://console-api.%s/%s
+  key : f8c842460c091b2433c89a08fd7bfc46
+  salt : e256ee7e3632912a9c92d7b6a0e5da1c
+mpaApi :
+  url : http://mpa-api.%s/%s
+  key : I8Hybc66
+brand :
+  id : 3  							# 吉祥-1,微乐-2,心悦-3
+  tag : xinyue
+  domain : xinyueyouxi.com
+  name : 心悦
+  client : 16384
+  tel : 
+  pfx : XY_   						# JX_/XY_
+logs :					
+  dir : ../log 						# 文件保存路径
+  file : logonserver				# 文件名称,0{filename}+{datetime}
+  level : 3							# 日志等级:0-error,1-warning,2-info,3-debug
+  savefile : false 					# 是否保存为文件,置为false会输出到标准输出
+centerSvr :							# 中央服务器配置
+  ip : 10.68.0.110
+  port : 6501
+  svrname : 登陆服务器ceshi
+  timeout : 1						# 超时时间(秒)
+  password : 
+  tcpReadBufSize : 8388608			# center 单连接,所以将读写缓冲区设大一些,提升吞吐速度
+  tcpWriteBufSize : 8388608
+redis8 :								# redis 配置
+  addr : r-2zed56d6b1cddcb4.redis.rds.aliyuncs.com:6379
+  password : weiLeJXreDis2017
+  db : 8
+  poolSize : 10
+  poolTimeout : 30
+redis15 :								# redis 配置
+  addr : r-2zed56d6b1cddcb4.redis.rds.aliyuncs.com:6379
+  password : weiLeJXreDis2017
+  db : 15
+  poolSize : 10
+  poolTimeout : 30
+mysqlExt:                      		# mysql 配置
+  addr : rm-2zefd772420bxy12d.mysql.rds.aliyuncs.com:3306
+  user : loginuser
+  password : Pit1Sq@S3UJxbPJfuQEa
+  db : ext
+  maxOpen : 100
+  maxIdle : 10
+mysqlLog:                      		# mysql 配置
+  addr : rm-2zefd772420bxy12d.mysql.rds.aliyuncs.com:3306
+  user : loginuser
+  password : Pit1Sq@S3UJxbPJfuQEa
+  db : log
+  maxOpen : 100
+  maxIdle : 10
+mysqlMem:							# 用户服务数据库
+  addr : rm-2zep2efr54x0dppfh.mysql.rds.aliyuncs.com:3306
+  user : loginuser
+  password : Pit1Sq@S3UJxbPJfuQEa
+  db : user_db
+  maxOpen : 100
+  maxIdle : 10
+mongoUser :
+  addrs : 
+    - dds-2ze3917a32d44b441.mongodb.rds.aliyuncs.com:3717
+    - dds-2ze3917a32d44b442.mongodb.rds.aliyuncs.com:3717
+  user : loginuser
+  password : jiWpXS3v2vXQ
+  db : userext
+  poolLimit : 10
+  timeout : 10
+gsdk :
+#  ip :   172.17.18.107
+  ip : 10.30.253.138
+  port : 10015
+  appid : login
+  authkey : e98727d030dcb4e1b80f990a900d96bd
+alioss :
+  bucket : xy-avatar-file
+  accessKeyId : LTAI4Fkkdg43AbEEhjaESiBy
+  accessKeySecret : GK8AtezIg0dDzDfzp3lWO0Iu5NmFhw
+  domain : avatarfile.xinyueyouxi.com
+xyTestUsers :
+  100470 : 1
+  100471 : 1
+  100472 : 1
+  100473 : 1
+  100474 : 1
+  100475 : 1
+  100476 : 1
+  100477 : 1
+  100478 : 1
+  100479 : 1 
+  100480 : 1 
+  100481 : 1 
+  100482 : 1 
+  100483 : 1 
+  100484 : 1 
+  100485 : 1 
+  100486 : 1 
+  100487 : 1 
+  100488 : 1 
+  100489 : 1 
+  100490 : 1  
+  109489 : 1  
+  109496 : 1  
+  109497 : 1  
+  109500 : 1
+  109501 : 1
+  109503 : 1
+  109504 : 1
+  109505 : 1
+  2797252 : 1
+  2797253 : 1
+  2797254 : 1
+  2797255 : 1
+  2797256 : 1
+  2797257 : 1
+  2797258 : 1
+  2797259 : 1
+  2797260 : 1
+  2797261 : 1
+  2797262 : 1
+  2797263 : 1
+  2797264 : 1
+  2797265 : 1
+  2797266 : 1
+  2797267 : 1
+  2797268 : 1
+  2797269 : 1
+  2797270 : 1
+  2797271 : 1
+  2797272 : 1
+  2797273 : 1
+  2797274 : 1
+  2797275 : 1
+  2797276 : 1
+  2797277 : 1
+  2797284 : 1
+  3049459 : 1
+  3049460 : 1
+  3049461 : 1
+  3049462 : 1
+  3049463 : 1
+  3049464 : 1
+  3049465 : 1
+  3049466 : 1
+  3049467 : 1
+  3049468 : 1
+  3049469 : 1
+  3049470 : 1
+  3049471 : 1
+  3049472 : 1
+  3049473 : 1
+  3049474 : 1
+  3049475 : 1
+  3049476 : 1
+  3049477 : 1
+  3049478 : 1
+  3514838 : 1
+  3514839 : 1
+  3514840 : 1
+  3514841 : 1
+  3514842 : 1
+  3514843 : 1
+  3514844 : 1
+  3514845 : 1
+  3514846 : 1
+  3514847 : 1
+  3514848 : 1
+  3514849 : 1
+  3514850 : 1
+  3514851 : 1
+  3514852 : 1
+  3514853 : 1
+  3514854 : 1
+  3514855 : 1
+  3514856 : 1
+  3514857 : 1
+  3514858 : 1
+  3514859 : 1
+  3514860 : 1
+  3514861 : 1
+  3514862 : 1
+  3514863 : 1
+  3514864 : 1
+  3514865 : 1
+  3514866 : 1
+  3514867 : 1
+  3514868 : 1
+  3514869 : 1
+  3514870 : 1
+  3514871 : 1
+  3514872 : 1
+  3514873 : 1
+  3514874 : 1
+  3514875 : 1
+  3514876 : 1
+  3514877 : 1
+  3514878 : 1
+  3514879 : 1
+  3514880 : 1
+  3514881 : 1
+  3514882 : 1
+  3514883 : 1
+  3514884 : 1
+  3514885 : 1
+  3514886 : 1
+  3514887 : 1
+  3514888 : 1
+  3514889 : 1
+  3514890 : 1
+  3514891 : 1
+  3514892 : 1
+  3514893 : 1
+  3514894 : 1
+  3514895 : 1
+  3514896 : 1
+  3514897 : 1
+  3514898 : 1
+  3514899 : 1
+  3514900 : 1
+  3514901 : 1
+  3514902 : 1
+  3514903 : 1
+  3514904 : 1
+  3514905 : 1
+  3514906 : 1
+  3514907 : 1
+  3514908 : 1
+  3514909 : 1
+  3514910 : 1
+  3514911 : 1
+  3514912 : 1
+  3514913 : 1
+  3514914 : 1
+  3514915 : 1
+  3514916 : 1
+  3514917 : 1
+  3514918 : 1
+  3514919 : 1
+  3514920 : 1
+  3514921 : 1
+  3514922 : 1
+  3514923 : 1
+  3514924 : 1
+  3514925 : 1
+  3514926 : 1
+  3514927 : 1
+  3514928 : 1
+  3514929 : 1
+  3514930 : 1
+  3514931 : 1
+  3514932 : 1
+  3514933 : 1
+  3514934 : 1
+  3514935 : 1
+  3514936 : 1
+  3514937 : 1
+  3514938 : 1

+ 9 - 0
logonsvr/登陆服务器-提审/push.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+set -e
+
+release=$1
+[ ! -n "$release" ] && exit 1
+
+docker login -u fanyijian@xinyueyouxi -p 88bebaef2e0e2407 registry-vpc.cn-beijing.aliyuncs.com
+docker build -t registry-vpc.cn-beijing.aliyuncs.com/xinyue/login-tishen:${release} .
+docker push registry-vpc.cn-beijing.aliyuncs.com/xinyue/login-tishen:${release}

+ 40 - 0
logonsvr/登陆服务器-提审/thirdpart.yaml

@@ -0,0 +1,40 @@
+userFrom :							# 用户来源标识
+  mobile_he : [11,12,11]
+  mumayi : [13,14,13]
+  qifan : [15,16,15]
+  unionjilin : [17,18,17]
+  baidu : [19,20,19]
+  login360 : [21,22,21]
+  oppo : [23,24,23]
+  huawei : [25,26,25]
+  huaweih5 : [25,26,25]
+  qq : [28,28,28]
+  ysdk : [30,30,30]
+  kuaiya : [31,32,31]
+  xiaomi : [33,34,33]
+  mih5 : [33,34,33]
+  miweb : [33,34,33]
+  wechat : [35,36,35]
+  wechath5 : [35,36,35]
+  vivo : [37,38,37]
+  vivoh5 : [37,38,37]
+  toutiao : [39,40,39]
+  samsung : [41,42,41]
+  meizu : [43,44,43]
+  lenove : [45,46,45]
+  facebook : [51,52,51]
+  laiyouxi : [53,54,53]
+  kayou : [55,56,55]
+  weile : [57,58,57]
+  ximi : [63,64,63]
+  moston : [65,66,65]
+  letu : [67,68,67]
+  dd : [69,70,69]
+  yy : [71,72,71]
+inviteChannels : [818,819,820,821]   # 支持邀请的渠道
+moston :
+  urlAccessToken : https://api.open.mostonetech.com/oauth2/access_token?appKey=%s&appSecret=%s&code=%s
+  urlUserInfo : https://api.open.mostonetech.com/mw/userinfo?accessToken=%s&openId=%s
+  appKey : Y0fPsd3cJL
+  appSecret : 73ef5e05d6563434ab5d47eb39acbba3
+  tokenCacheKey : moston_token