Skip to content

🔥🔥智能聚合、极速变现、专业私有、卓越升级。EasyAds Pro是倍业科技技术团队研发的一款开源聚合SDK管理项目,该项目是SDK策略引擎服务,基于OpenResty框架开发,具有较高的HTTP并发处理能力。策略引擎读取聚合管理平台(Luna)推送到Redis的配置信息获取对应广告位的流量分发管理信息,与SDK交互根据请求返回不同的SDK启动策略配置;同时策略服务还是SDK上报打点的收集服务。

License

Notifications You must be signed in to change notification settings

bayescom/EasyAds-Pro_Stella

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

运行环境

环境说明

本wiki只针对ubuntu(24.04 LTS)进行验证,其他系统请自行测试。 简单测试可以使用Docker进行镜像构建。

openresty

# 导入官方GPG密钥
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates lsb-release
wget -O - https://openresty.org/package/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/openresty.gpg
# 添加APT仓库
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list > /dev/null
# 安装openresty
sudo apt-get update
sudo apt-get -y install openresty

依赖

  • 应用
sudo apt-get install luajit
sudo apt-get install liblua5.1-0-dev
# 用于组件安装
sudo apt-get install luarocks
  • 组件
luarocks install lua-resty-jit-uuid
luarocks install lua-resty-redis
luarocks install lua-resty-http
luarocks install md5
luarocks install lua-ffi-zlib
luarocks install lua-resty-logger-socket
luarocks install net-url
opm get anjia0532/lua-resty-redis-util

部署

1.配置更新

配置项 修改说明
redis conf/conf.lua文件中 _M.redis, _M.frequency_redis,其中媒体广告位配置的地址要与Luna项目中配置的信息一致
上报服务域名 conf/conf.lua文件中_M.track.url 为Stella的服务域名
密钥 conf/conf.lua文件中_M.encryption_keys,需与SDK侧的密钥一致
日志存储 conf/conf.lua中的_M.log_type。其中 local是本地存储模式,将会写文件到本地磁盘;server是发送到远端(比如syslog-ng),conf/conf.lua_M.center_syslog_ng配置

2.应用启停

# start
sh bin/start.sh
# stop
sh bin/stop.sh
# restart
sh bin/restart.sh 

3. IP解析(可选)

因为SDK策略管理中使用地域定向,本项目提供maxmind的解析方法,用户请根据需求来酌情选择。

  • 第三方maxmind
-- 安装maxmind的相关包
apt-get install libmaxminddb0 libmaxminddb-dev
-- 安装openresty依赖组件
luarocks install lua-resty-maxminddb
  • 自定义IP解析

可修改lua/processor/ip_region_analyzer.lua文件替换为自己的IP解析,并根据自己的体系id与数据库中system_code表中code_type_id=4的地域信息进行id关系映射实现地域定向功能,映射功能和方法可参考现有使用了maxmind的映射关系代码。

Docker

1. 配置更新

根据需要更新Dockerfile中的变量,参考上述配置更新

2. 构建镜像

sudo docker build -t Stella .

3. 运行容器

sudo docker run -dit --name Stella -p 80:80 Stella

About

🔥🔥智能聚合、极速变现、专业私有、卓越升级。EasyAds Pro是倍业科技技术团队研发的一款开源聚合SDK管理项目,该项目是SDK策略引擎服务,基于OpenResty框架开发,具有较高的HTTP并发处理能力。策略引擎读取聚合管理平台(Luna)推送到Redis的配置信息获取对应广告位的流量分发管理信息,与SDK交互根据请求返回不同的SDK启动策略配置;同时策略服务还是SDK上报打点的收集服务。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published