Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢林臻
sun
Commits
4c420914
Commit
4c420914
authored
Sep 19, 2019
by
yuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test auto tagging
parent
baeb9c45
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1155 additions
and
0 deletions
+1155
-0
.drone.yml
.drone.yml
+3
-0
deploy.yaml.temp
deploy.yaml.temp
+1152
-0
No files found.
.drone.yml
View file @
4c420914
...
...
@@ -9,6 +9,8 @@ steps:
username
:
100009168942
password
:
3m4V#TMrUTSIebv1
repo
:
ccr.ccs.tencentyun.com/gm-ai/sun-test
tags
:
-
${DRONE_COMMIT}
-
name
:
deploy
image
:
ccr.ccs.tencentyun.com/gm-ai/drone-kube
...
...
@@ -21,6 +23,7 @@ steps:
settings
:
namespace
:
${DRONE_BRANCH}
template
:
deploy.yaml
tag
:
${DRONE_COMMIT}
trigger
:
branch
:
...
...
deploy.yaml.temp
0 → 100644
View file @
4c420914
apiVersion: v1
kind: Service
metadata:
name: sun
spec:
ports:
- name: tcp-80-80
port: 80
protocol: TCP
targetPort: 80
selector:
release: sun
type: ClusterIP
# service
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: deploy
release: sun
name: sun-deploy
spec:
replicas: 1
selector:
matchLabels:
app: deploy
release: sun
template:
metadata:
labels:
app: deploy
release: sun
spec:
containers:
- image: ccr.ccs.tencentyun.com/gm-ai/sun-test:<IMAGE_TAG>
imagePullPolicy: Always
name: deploy
ports:
- containerPort: 80
name: http
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data/log/sum/app
name: log
- mountPath: /etc/gm-config/storage/static.dir/gm_logging.dir/
name: logging-global
- mountPath: /etc/gm-config/storage/static.dir/helios.dir/
name: helios-global
- mountPath: /etc/gm-config/storage/static.dir/gm_mq.dir/
name: mq-global
- mountPath: /etc/gm-config/storage/static.dir/dev_env.dir/
name: dev-env-global
- mountPath: /etc/gm-config/storage/static.dir/gm_shield.dir/
name: shield-global
- mountPath: /srv/apps/sun/sun/settings_local.py
name: sun-settings-local
readOnly: true
subPath: settings_local.py
dnsPolicy: ClusterFirst
imagePullSecrets:
- name: gm-secret
volumes:
- hostPath:
path: /data/log/sun/app
type: ""
name: log
- configMap:
defaultMode: 420
items:
- key: global_important_sentry.json
path: global_important_sentry.json
- key: kafka.json
path: kafka.json
name: logging-global
name: logging-global
- configMap:
defaultMode: 420
items:
- key: static_route_table.json
path: static_route_table.json
name: helios-global
name: helios-global
- configMap:
defaultMode: 420
items:
- key: celery.json
path: celery.json
name: mq-global
name: mq-global
- configMap:
defaultMode: 420
items:
- key: resource.json
path: resource.json
name: dev-env-global
name: dev-env-global
- configMap:
defaultMode: 420
items:
- key: shield.json
path: shield.json
name: shield-global
name: shield-global
- configMap:
defaultMode: 420
items:
- key: settings_local.py
path: settings_local.py
name: sun-settings-local
name: sun-settings-local
status:
availableReplicas: 1
conditions:
- lastTransitionTime: 2019-08-21T09:44:49Z
lastUpdateTime: 2019-08-21T09:44:49Z
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
- lastTransitionTime: 2019-08-21T09:44:48Z
lastUpdateTime: 2019-08-21T09:44:49Z
message: ReplicaSet "sun-deploy-77b4c6776f" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
observedGeneration: 1
readyReplicas: 1
replicas: 1
updatedReplicas: 1
# deployment
---
# secrets
#
apiVersion: v1
data:
ca.crt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3JMbkRtSUlwMkd6RGFYbFVXNnBna2lrdUxYYXVBTkNvX0RlcVhtc3Vmb09PdTNBVGxwZDhxemJPYmstR3c0OVhfQzNER2pjdFBrdGdEQVMwY0lTdmV0aE85eWl3UkNGVGI4OGk2aDZtdG9ZRXRPd1Z6OGVVOUJiMUdMZ0lXd3ZmTEN3MkJXUXhzdndRNzRzUUV1T0hQNmNDVXZGWmVqOFU1N2I5TDVOTjZMN3NIc1I1U0hMbmVSc0I3OGJMdWVwMUxGVEg3YVpPNk1mWVI1UTVGeTVEeDZhQ21pUWg3OWdpZTlzbm1zRlNUa1RKbzlrNGZEZ0Jtc0hGVFh0ajBLTFQtZnlmUThPX2RTWl9WNWhQQ2o0YWVDcldDX2FQMVB3WVFrNGY5OTA0S3dBSm5OaGln
kind: Secret
metadata:
annotations:
kubernetes.io/service-account.name: default
name: default-token-mw44b
type: kubernetes.io/service-account-token
---
apiVersion: v1
data:
.dockerconfigjson: ewogICAgICAgICJhdXRocyI6IHsKICAgICAgICAgICAgICAgICJjY3IuY2NzLnRlbmNlbnR5dW4uY29tIjogewogICAgICAgICAgICAgICAgICAgICAgICAiYXV0aCI6ICJNVEF3TURBNU1UWTRPVFF5T2pOdE5GWWpWRTF5VlZSVFNXVmlkakU9IgogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICJudmNyLmlvIjogewogICAgICAgICAgICAgICAgICAgICAgICAiYXV0aCI6ICJKRzloZFhSb2RHOXJaVzQ2V20xR2IwNVhhekZPVjNScVpHcENlR0ZIVG5KT2FsVjRZbTVOTTA5WVFtMU5NbFUyVFdwb2JFOVVWVFZQUkUxMFRrUkthazFETURCWmFtUm9URlJyZWs0eVdYUk5SR3N3V2tkV2FWbHFWVEZhVjFFdyIKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAicmVnaXN0cnkuY24tYmVpamluZy5hbGl5dW5jcy5jb20iOiB7CiAgICAgICAgICAgICAgICAgICAgICAgICJhdXRoIjogImNtVm5hWE4wY25rdGRYTmxja0JuYldWcE9sZGhibTFsYVRFeU15RT0iCiAgICAgICAgICAgICAgICB9CiAgICAgICAgfSwKICAgICAgICAiSHR0cEhlYWRlcnMiOiB7CiAgICAgICAgICAgICAgICAiVXNlci1BZ2VudCI6ICJEb2NrZXItQ2xpZW50LzE4LjA5LjQgKGxpbnV4KSIKICAgICAgICB9Cn0=
kind: Secret
metadata:
annotations:
name: gm-secret
type: kubernetes.io/dockerconfigjson
---
# config maps
#
apiVersion: v1
data:
nginx.conf: |-
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
daemon off;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
server {
listen 80 default_server;
listen [::]:80 default_server;
root /srv/apps/alpha/release/;
index index.html index.htm index.nginx-debian.html;
server_name earth-k8s.gmapp.env;
location /alpha/ {
try_files $uri $uri /index.html;
}
}
}
kind: ConfigMap
metadata:
name: alpha-nginx-conf
---
apiVersion: v1
data:
resource.json: |
{
"mysql": {
"prod": {
"host": "mysql-service",
"db": "zhengxing_test"
},
"slave": {
"host": "mysql-service",
"db": "zhengxing_test"
},
"hera":{
"host": "mysql-service",
"db": "hera_test"
},
"doris":{
"host": "mysql-service",
"db": "doris_test"
}
},
"elasticsearch": {
"index": "gm_test"
}
}
kind: ConfigMap
metadata:
name: dev-env-global
---
apiVersion: v1
data:
settings_local.py: |-
import helios
from .log_settings import LOG_DIR
#SENTRY_CELERY_ENDPOINT = 'http://45b0ef6a79204d6988b59c32c9dd4bef:fa018677fb4f49be88d2ba61cdc7ee32@sentry.igengmei.com/135'
USER_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_DOMAIN_IGENGMEI = '.gmapp.env'
TMP_STATIC_DOMAIN = "earth.gmapp.env"
def GM_LOGGING():
from engine.logger import RequestInfoExtractor
return {
'request_info_extractor_class': RequestInfoExtractor,
'log': {
'basedir': LOG_DIR,
'prefix': 'hera',
'buffered': not DEBUG,
}
}
GMTRACER_PARSER = 'engine.setup_tracer'
QINIU_FACE_BUCKET = 'alpha-s'
DEBUG = True
DEBUG_PROPAGATE_EXCEPTIONS = True
RPC_INVOKER = helios.rpc.create_default_invoker(debug=DEBUG)
REDIS_HOST = '172.21.52.8'
REDIS_GROUP = {
'similar_topic_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'desc_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 3, 'password': 'Gengmei123'},
'qq_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 3, 'password': 'Gengmei123'},
'visit_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 4, 'password': 'Gengmei123'}, # 访问缓存,用于防爬
'trilateral_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 15, 'password': 'Gengmei123'}, # 三方账号缓存,用户记录取消绑定的状态
'switch_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'}, # 降级开关
}
#BROKER_URL = 'redis://:Gengmei123@r-2zede14dae9de8d4.redis.rds.aliyuncs.com:6379/5'
BROKER_URL = 'redis://:Gengmei123@172.21.52.8:6379/5'
CELERY_BROKER_URL = 'redis://:Gengmei123@172.21.52.8:6379/5'
#QINIU_ACCESS_KEY = "ln5otz9s46t3LcpAFXcA1faYO8y1K34f6cvVBXiz"
#QINIU_SECRET_KEY = "hDZJAfVecAn0qj3pCONyd9ba-cTiekQZs2HIJalI"
FACE_SHARE_URL = 'http://earth.igengmei.env/alpha/fitting/'
TRACKING_COOKIE_NAME = '_gtid'
TRACKING_COOKIE_AGE = 365 * 24 * 60 * 60
FACE_TOP_N_CNT = 3
SHARE_URL = 'http://earth.gmapp.env' # 测试
WECHATPUB_APPID = 'wx5dcbb1544163c77c'
WECHATPUB_APPSECRET = 'e137f065c4cca4b1360e8063c7ba3a65'
INS_GRAB_DEMAIN = "http://150.109.100.156:9010/"
INS_BIND = True
TRACE_SAMPLE_RATE = 100.0
SCAN_FACE_TURN_ON = True
SPACIFY_OPERATION_TOPIC = [2, 3, 6, 7]
FIX_OPERATION_TOPIC = 4
# 版本兼容
CLIENT_VERSION = '1.5.1'
# 扫脸开关
CONFIG_LAUNCHSCAN= True # 启动流程
CONFIG_HOMESCAN = True # 首页入口
kind: ConfigMap
metadata:
name: earth-settings-local
---
apiVersion: v1
data:
static_route_table.json: |
{
"gaia": {
"api_url":"http://127.0.0.1:8082/api/"
},
"rpcd_map": {
" ": {
"service_list": [
"poll"
],
"url": "http://gm-poll.test.gengmei:6501/"
},
"venus": {
"service_list": [
"venus"
],
"url": "http://venus/"
},
"sms": {
"service_list": [
"sms"
],
"url": "http://sms/"
},
"push": {
"service_list": [
"push"
],
"url": "http://push/"
},
"neptune": {
"service_list": [
"neptune"
],
"url": "http://neptune/"
},
"physical": {
"service_list": [
"physical"
],
"url": "http://physical/"
},
"antispam": {
"url":"http://antispam.gmapp.env",
"service_list": [
"antispam"
]
},
"saber": {
"url":"http://saber.gmapp.env/",
"service_list": [
"saber"
]
},
"saber_search": {
"url":"http://saber-search.gmapp.env/",
"service_list": [
"saber_search"
]
},
"jupiter": {
"url":"http://jupiter.gmapp.env/",
"service_list": [
"jupiter"
]
},
"mercury": {
"service_list": [
"mercury"
],
"url": "http://mercury.gmapp.env/"
}
}
}
kind: ConfigMap
metadata:
name: helios-global
---
apiVersion: v1
data:
global_important_sentry.json: |
{
"dsn": "http://45b0ef6a79204d6988b59c32c9dd4bef:fa018677fb4f49be88d2ba61cdc7ee32@sentry.igengmei.com/135"
}
kafka.json: |
{
"kafka": {
"hosts": [{
"host": "172.21.40.14",
"port": 9092
}],
"default_topic": "gm-logging-test",
"topics": {
"inspect": "gm-logging-test.inspect",
"app": "doris"
}
}
}
kind: ConfigMap
metadata:
name: logging-global
---
apiVersion: v1
data:
celery.json: |
{
"broker_url": "pyamqp://localhost//"
}
kind: ConfigMap
metadata:
name: mq-global
---
apiVersion: v1
data:
app_conf.xml: |-
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="app" version="1.0"/>
<config name="log_dir" value="/data/log/neptune/app"/>
<config name="sentry_dsn" value="http://45b0ef6a79204d6988b59c32c9dd4bef:fa018677fb4f49be88d2ba61cdc7ee32@sentry.igengmei.com/135"/>
<config name="statuses" value="checker:check" />
<config name="application_name" value="neptune"/>
<config name="service_list">
<element value="neptune"/>
</config>
<config name="initializer_list">
<element value="neptune.django_init"/>
<element value="neptune.views"/>
</config>
</gm_rpcd_config>
kind: ConfigMap
metadata:
name: neptune-app-conf
---
apiVersion: v1
data:
settings_local.py: |-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'commodity',
'USER': 'work',
'PASSWORD': 'Gengmei123!',
#'HOST': 'BJ-Alp-Test-Cos-test001',
'HOST': '172.21.36.6',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
},
#'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'alpha',
# 'USER': 'work',
# 'PASSWORD': 'Gengmei123!',
# # 'HOST': 'rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com',
# 'HOST': '172.21.36.6',
# 'PORT': '3306',
# 'OPTIONS': {
# "init_command": "SET foreign_key_checks = 0;",
# "charset": "utf8mb4",
# },
#},
}
kind: ConfigMap
metadata:
name: neptune-settings-local
---
apiVersion: v1
data:
app_conf.xml: |-
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="app" version="1.0"/>
<config name="log_dir" value="/data/log/physical/app"/>
<config name="application_name" value="physical"/>
<config name="service_list">
<element value="physical"/>
</config>
<config name="initializer_list">
<element value="physical.django_init"/>
<element value="search.views.topic"/>
<element value="search.views.business_topic"/>
<element value="search.views.pick"/>
<element value="search.views.group"/>
<element value="search.views.user"/>
<element value="search.views.tag"/>
<element value="search.views.contrast_similar"/>
<element value="injection.data_sync.tasks"/>
<element value="search.views.contrast_similar"/>
<element value="search.views.search_hotword"/>
<element value="search.views.product"/>
</config>
</gm_rpcd_config>
kind: ConfigMap
metadata:
name: physical-app-conf
---
apiVersion: v1
data:
settings_local.py: |-
# coding=utf-8
import os
#from log_settings import *
from datetime import timedelta
from celery.schedules import crontab
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '^j3sg)sj8rc@du74%fb$c2926tv!!4g(kp-=rx1)c5!1&1(dq='
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = []
# Application definition
SENTRY_CELERY_ENDPOINT="http://60b0004c8884420f8067fb32fc3ed244:20f97fc73ffa4aad9735d0e6542a6d78@sentry.igengmei.com/140"
BROKER_URL = "redis://:Gengmei123@172.21.52.16:6379/8"
# CELERY_SEND_EVENTS = True
# CELERY_SEND_TASK_SENT_EVENT = True
#
# CELERY_DEFAULT_EXCHANGE = 'celery'
# CELERY_DEFAULT_EXCHANGE_TYPE = 'direct'
# CELERY_DEFAULT_ROUTING_KEY = 'celery'
#
# CELERY_QUEUES = {
# 'celery': {
# 'exchange': CELERY_DEFAULT_EXCHANGE,
# 'routing_key': CELERY_DEFAULT_ROUTING_KEY,
# },
# 'order': {
# 'exchange': 'order',
# 'routing_key': 'order',
# },
# }
CELERY_BROKER_URL = "redis://:Gengmei123@172.21.52.16:6379/8"
CELERY_TIMEZONE = 'Asia/Shanghai'
CELERY_ROUTES = ['physical.celery_task_router.CeleryTaskRouter']
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'trans2es',
'search',
'injection.data_sync',
)
CELERYBEAT_SCHEDULE = {
'sync_face_similar_data_to_redis': {
'task': 'injection.data_sync.tasks.sync_face_similar_data_to_redis',
'schedule': timedelta(seconds=120),
'args': ()
},
'set_tag_count': {
'task': 'injection.data_sync.tasks.get_tag_count',
'schedule': timedelta(seconds=1),
'args': ()
},
}
"""
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
"""
ROOT_URLCONF = 'physical.urls'
WSGI_APPLICATION = 'physical.wsgi.application'
DATABASE_ROUTERS = ['physical.DBRouter.DBRouter']
REDIS_URL = "redis://:Gengmei123@172.21.52.16:6379"
# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'alpha',
'USER': 'work',
'PASSWORD': 'Gengmei123!',
'HOST': '172.21.36.16',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
},
'face': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'face',
'USER': 'work',
'PASSWORD': 'Gengmei123!',
'HOST': '172.21.36.16',
'PORT': '3306',
#'CONN_MAX_AGE': None,
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
},
'commodity': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'commodity',
'USER': 'work',
'PASSWORD': 'Gengmei123!',
'HOST': '172.21.36.16',
'PORT': '3306',
# 'CONN_MAX_AGE': None,
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
}
}
ES_INFO_LIST = [
{
"host": "172.21.40.14",
"port": 9200
}
]
TAG_ES_INFO_LIST = [
{
"host": "172.21.40.14",
"port": 9200
}
]
# KAFKA_BROKER_LIST = "192.168.13.114:9092,192.168.13.116:9092,192.168.13.115:9092"
# KAFKA_TOPIC_NAME = "alpha-maidian-data"
KAFKA_BROKER_LIST = "172.21.40.14:9092"
KAFKA_TOPIC_NAME = "gm-maidian-data"
ES_INDEX_PREFIX="gm-dbmw"
SLAVE_DB_NAME = 'default'
MIDDLEWARE_CLASSES = (
'gm_tracer.middleware.TracerMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'helios.DjangoL5dMiddleware',
)
# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
# Internationalization
# https://docs.djangoproject.com/en/1.10/topics/i18n/
# LANGUAGE_CODE = 'en-us'
#
TIME_ZONE = 'Asia/Shanghai'
#
USE_I18N = True
USE_L10N = True
#
# USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
STATIC_URL = '/static/'
kind: ConfigMap
metadata:
name: physical-settings-local
---
apiVersion: v1
data:
app_conf.xml: |-
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="app" version="1.0"/>
<config name="log_dir" value="/data/log/push/app"/>
<config name="sentry_dsn" value="http://c5b4ede52bc6452182565b529735a090:0324e8fff118445a9b38576213b8e759@sentry.igengmei.com/120"/>
<config name="statuses" value="checker:check" />
<config name="application_name" value="push"/>
<config name="service_list">
<element value="push"/>
</config>
<config name="initializer_list">
<element value="push.django_init"/>
<element value="push.views"/>
</config>
</gm_rpcd_config>
kind: ConfigMap
metadata:
name: push-app-conf
---
apiVersion: v1
data:
settings_local.py: |-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'alpha',
'USER': 'work',
'PASSWORD': 'Gengmei123!',
'HOST': '172.21.36.6',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
},
}
DEBUG = True
SENTRY_CELERY_ENDPOINT = 'http://45b0ef6a79204d6988b59c32c9dd4bef:fa018677fb4f49be88d2ba61cdc7ee32@sentry.igengmei.com/135'
REDIS_HOST = '172.21.52.8'
REDIS_TOPIC = {
'vote_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
}
BROKER_URL = 'redis://:Gengmei123@172.21.52.8:6379/0'
CELERY_ONCE_URL = 'redis://:Gengmei123@172.21.52.8:6379/1'
USER_JPUSH_SETTINGS = {
'key': 'd8d81916f6d83d4d6825b6bb',
'secret': '8cca1a10e4a251636845bbea',
}
kind: ConfigMap
metadata:
name: push-settings-local
---
apiVersion: v1
data:
current.index: ""
kind: ConfigMap
metadata:
name: aber-index-config
---
apiVersion: v1
data:
settings_local.py: |-
from celery.schedules import crontab
#coding:utf8
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # 设置为mysql数据库
'NAME': 'saber',
'USER': 'work',
'PASSWORD': 'Gengmei123!',
'HOST': '172.21.36.9',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4", # 为了支持emoji表情
},
}
}
PROJECT_MODE = 'detect'
PROJECT_NAME = 'saber'
CELERY_BROKER_URL = 'redis://:Gengmei123@172.21.52.16:6379/0'
CELERYBEAT_SCHEDULE = {
'saber_index_refresh': {
'task': 'saber.tasks.update_index',
# 'schedule': timedelta(seconds=1),
'schedule': crontab(hour=2, minute=0),
}
}
from .log_settings import *
kind: ConfigMap
metadata:
name: saber-settings-local
---
apiVersion: v1
data:
app_conf.xml: |-
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="app" version="1.0"/>
<config name="sentry_dsn" value="http://39f1236352c04a80826878f459ef1b05:333fbf94113c4879addaf656f233eb8e@sentry.igengmei.com/138"/>
<config name="application_name" value="earth"/>
<config name="service_list">
<element value="earth"/>
</config>
<config name="initializer_list">
<element value="earth.django_init"/>
</config>
</gm_rpcd_config>
kind: ConfigMap
metadata:
name: saturn-app-conf
---
apiVersion: v1
data:
settings_local.py: |-
import helios
DEBUG = True
# QINIU_ACCESS_KEY = "ln5otz9s46t3LcpAFXcA1faYO8y1K34f6cvVBXiz"
# QINIU_SECRET_KEY = "hDZJAfVecAn0qj3pCONyd9ba-cTiekQZs2HIJalI"
SENTRY_CELERY_ENDPOINT = 'http://45b0ef6a79204d6988b59c32c9dd4bef:fa018677fb4f49be88d2ba61cdc7ee32@sentry.igengmei.com/135'
REDIS_HOST = '172.21.52.8'
REDIS_GROUP = {
'ins_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
}
# ALLOWED_HOSTS = ["xxx"]
USER_COOKIE_NAME = 'sessionid'
RPC_INVOKER = helios.rpc.create_default_invoker(debug=DEBUG)
DEBUG_PROPAGATE_EXCEPTIONS = True
TMP_STATIC_DOMAIN = "earth.igengmei.com"
SESSION_COOKIE_DOMAIN_IGENGMEI = '127.0.0.1'
kind: ConfigMap
metadata:
name: saturn-settings-local
---
apiVersion: v1
data:
shield.json: |
{
"redis": {
"host": "redis-service",
"pass": "Gengmei1!",
"port": 6379,
"db": 15
},
"expire": 60,
"dsn": ""
}
kind: ConfigMap
metadata:
name: shield-global
---
apiVersion: v1
data:
app_conf.xml: |-
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="app" version="1.0"/>
<config name="statuses" value="checker:check_api" />
<config name="application_name" value="sms"/>
<config name="log_dir" value="/data/log/sms/app"/>
<config name="service_list">
<element value="sms"/>
</config>
<config name="initializer_list">
<element value="sms.django_init"/>
<element value="sms.views"/>
</config>
</gm_rpcd_config>
kind: ConfigMap
metadata:
name: sms-app-conf
---
apiVersion: v1
data:
settings_local.py: |2-
# -*- coding:utf-8 -*-
# artemis local settings template
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': '172.21.52.8:6379:3',
'TIMEOUT': 86400, # 3600 x 24
},
}
BROKER_URL = 'redis://172.21.52.8:6379/8'
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"HOST": "172.21.36.6",
"NAME": "alpha",
"OPTIONS": {
"charset": "utf8mb4",
"init_command": "SET foreign_key_checks = 0;"
},
"PASSWORD": "Gengmei123!",
"PORT": 3306,
"USER": "work"
},
'slave': {
"ENGINE": "django.db.backends.mysql",
"HOST": "172.21.36.6",
"NAME": "alpha",
"OPTIONS": {
"charset": "utf8mb4",
"init_command": "SET foreign_key_checks = 0;"
},
"PASSWORD": "Gengmei123!",
"PORT": 3306,
"USER": "work"
}
}
DEBUG = False
SENTRY_CELERY_ENDPOINT = ''
kind: ConfigMap
metadata:
name: sms-settings-local
---
apiVersion: v1
data:
settings_local.py: |-
BROKER_URL = 'redis://:Gengmei123@172.21.52.8:6379/2'
CELERY_BROKER_URL = 'redis://:Gengmei123@172.21.52.8:6379/2'
CELERY_ACCEPT_CONTENT = ['pickle', 'json']
CELERY_TASK_SERIALIZER = 'pickle'
CELERY_RESULT_SERIALIZER = 'pickle'
kind: ConfigMap
metadata:
name: sun-settings-local
---
apiVersion: v1
data:
proxy.js: |-
var api = require('./api')
//
// const target = 'http://doctor.test.env'
// const target = 'http://172.30.8.131:8000'
// const target = 'http://172.30.8.156:10000'
// const target = 'http://192.168.1.9:8000'
// const target = 'http://sun.gmapp.com'
const target = 'http://sun/'
// const target = 'http://172.30.8.156:10000'
// const target = 'http://sun.alpha.newdev'
// 可以修改请求内容
const onProxyReq = proxyReq => {}
module.exports = api.reduce((result, curr) => {
result[curr] = {
target,
onProxyReq,
changeOrigin: true
}
return result
}, {})
kind: ConfigMap
metadata:
name: tony-settings-local
---
apiVersion: v1
data:
app_conf.xml: |-
<?xml version="1.0" encoding="utf-8"?>
<gm_rpcd_config>
<info config_name="app" version="1.0"/>
<config name="log_dir" value="/data/log/venus/app"/>
<config name="sentry_dsn" value="http://45b0ef6a79204d6988b59c32c9dd4bef:fa018677fb4f49be88d2ba61cdc7ee32@sentry.igengmei.com/135"/>
<config name="statuses" value="checker:check" />
<config name="application_name" value="venus"/>
<config name="service_list">
<element value="venus"/>
</config>
<config name="initializer_list">
<element value="venus.django_init"/>
<element value="venus.views"/>
</config>
</gm_rpcd_config>
kind: ConfigMap
metadata:
name: venus-app-conf
---
apiVersion: v1
data:
settings_local.py: |-
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'alpha',
'USER': 'work',
'PASSWORD': 'Gengmei123!',
#'HOST': 'BJ-Alp-Test-Cos-test001',
'HOST': '172.21.36.6',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
},
#'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'alpha',
# 'USER': 'work',
# 'PASSWORD': 'Gengmei123!',
# # 'HOST': 'rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com',
# 'HOST': '172.21.36.6',
# 'PORT': '3306',
# 'OPTIONS': {
# "init_command": "SET foreign_key_checks = 0;",
# "charset": "utf8mb4",
# },
#},
'saber': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'saber',
'USER': 'work',
'PASSWORD': 'Gengmei123',
# 'HOST': 'rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com',
'HOST': 'rm-2zeaut61u9sm21m0b.mysql.rds.aliyuncs.com',
'PORT': '3306',
'OPTIONS': {
"init_command": "SET foreign_key_checks = 0;",
"charset": "utf8mb4",
},
},
}
DEBUG = True
BROKER_URL = 'redis://:Gengmei123@172.21.52.8:6379/6'
FILES_PWD = u'files'
VIDEO_HOST = u'http://alpha-video.gmeiapp.com/'
REDIS_HOST = '172.21.52.8'
REDIS_TOPIC = {
'vote_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'vfc_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'fail_limit_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'new_user_lock_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'new_user_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 0, 'password': 'Gengmei123'}, # user_id db 0-- 独占
'onoff_user_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 0, 'password': 'Gengmei123'}, #下线用户 db 0-- 独占
'similar_user_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'user_count_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'pick_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'}, # pick 相关缓存
'onoff_demotion_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'}, #降级开关
'aifashion_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'}, #ai_fashion access_token 缓存
'user_shadow_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'common_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 15, 'password': 'Gengmei123'},
'register_tag_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'operation_read_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'push_tack_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 2, 'password': 'Gengmei123'},
'pictorial_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 1, 'password': 'Gengmei123'},
'topic_count_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 3, 'password': 'Gengmei123'},
'message_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 3, 'password': 'Gengmei123'},
'celery_task_id_cache': {'host': REDIS_HOST, 'port': 6379, 'db': 3, 'password': 'Gengmei123'},
}
MAX_OPERATION_NUM = 5
CELERYBEAT_SCHEDULE = {}
OPERATOR_USER_ID = 241406969
PUSH_RATE_LIMIT_HOUR = 2
PUSH_RATE_LIMIT_WHOLE = 5
kind: ConfigMap
metadata:
name: venus-settings-local
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment