ModuleAB:基於beego框架開發的阿里雲備份/歸檔解決方案

Xiphin發表於2016-10-26

ModuleAB 第一個正式版本釋出了,ModuleAB 是阿里雲備份/歸檔解決方案。

作者介紹:

TonyChyi

專案託管:

環境要求:

  1. bower >= 1.7.6
  2. go >= 1.6
  3. beego framework >= 1.6.1
  4. redis >= 3.0.0
  5. mysql >= 5.6

服務端構建:

mkdir -p project/src
cd project/src
git clone --recursive https://github.com/ProjectModu ... erver moduleab_server
cd moduleab_server
go get -v
go get github.com/beego/bee
export PATH="$GOPATH/bin:$PATH"
make  # you will get 'moduleab_agent.tar.gz'

客戶端構建:

mkdir -p project/src
cd project/src
git clone --recursive https://github.com/ProjectModu ... Agent moduleab_agent
cd moduleab_agent
go get -v
make  # you will get 'moduleab_agent.tar.gz'

PS: Then use the moduleab_server.tar.gz and moduleab_agent.tar.gz to deploy anywhere you want.(然後用moduleab_server.tar.gz、moduleab_agent.tar.gz部署到任何你想要的位置。)

服務端配置:

appname = moduleab_server
httpport = 7001
# run mode has following options:
# dev: development mode
# deb: debug mode, log will be HUGE!
# initdb: create data in database, DONT USE if you already have data in database.
# proc: production mode.
runmode = dev
autorender = false
copyrequestbody = true
EnableDocs = false

EnableAdmin = false
AdminHttpAddr = "localhost"
AdminHttpPort = 8088

sessionon = true

loginkey = 61oETzKXQAGaYdkL5gEmGeJJFuYh7EQnp2XdTP1o

logFile = "logs/moduleab_server.log"
pidFile = "logs/moduleab_server.pid"

[database]
mysqluser = "ModulesAB"
mysqlpass = "ModulesAB"
mysqlurl = "127.0.0.1:3306"
mysqldb   = "ModuleAB"
mysqlprefex = ""

[aliapi]
apikey= "TestAbcd" # Ali api key
secret="TestAAA"   # Ali api secret
oasport=80
oasusessl=false

[redis]
host = "127.0.0.1:6379"
password = ""
key = "ModuleAB"

[websocket]
timeout=10
pingperiod=5

# policyrun use cron-like syntax: "s m h dom mon dow"
[misc]
checkoasjobperiod=10
policyrun="0 * * * * 1"

客戶端配置:

server=http://localhost:7001
# you need to set this with the conf on server.
loginkey=guess?
# loglevel might be
# debug, info, warn, error, fatal
loglevel=debug
uploadthreads=5
pidfile=moduleab.pid

本次改動如下:

  1. 客戶端(Agent)的執行狀態可以在服務端顯示了
  2. 所有的可執行檔案實現守護程式,自動執行於後臺
  3. 客戶端新增低記憶體模式,可執行於記憶體小於 1G 的機器
  4. 修復不能自動釋放 TCP 連線的問題
  5. 修復當上傳的檔案帶有字尾空格時引發阿里雲 OSS 錯誤

問題反饋:

https://github.com/ProjectModuleAngelaBaby/ProjectModuleAB_Server/issues

相關文章