Coder Social home page Coder Social logo

gosuv's Introduction

概述

使用

# 下载编译代码
git clone https://github.com/wfxiang08/gosuv.git
cd gosuv/src
glide install
go build cmds/tool_gosuv.go

# 配置数据库
mysql -u root -p < conf/programs.sql

# 运行Demo:
./tool_gosuv -c conf/config.yml start
# 创建一个program: + New Program,输入如下信息:
名字: ping_test
命令: ping 127.0.0.1
工作目录: /
# 添加完毕之后就可以对program进行启动,关闭等操作,可以查看日志

RunImage

详细了解配置文件

  • conf/config.yml
server:
  ldap:
    enabled: true # 是否开启ldap认证
    host: xxxx
    base: ou=xxx,dc=test,dc=org
    port: 10489
    use_ssl: false
    bind_dn: uid=bind,ou=test,dc=org,dc=xx
    bind_password: xxx
    user_filter: (uid=%s)
    attributes:
    - givenName
    - sn
    - mail
    - uid
  addr: :11313
db:
  db_type: mysql
  db_dsn: root:@tcp(localhost:3306)/log?tls=skip-verify&autocommit=true
host: test # 可以通过 http://localhost:11313/test或http://localhost:11313/来访问,
admins:
- xiaogao

日志文件

  • 日志的使用: ./tool_gosuv -c conf/config.yml start -L /data/logs/service.log
  • 实际的日志:
    • gosuv日志: /data/logs/service.log-20170617
    • 程序日志: /data/logs/event_trigger.log-20170617

权限管理

  • 每个Program都绑定一个Author, 只有Author和amdins可以对该Program进行管理和重启

服务的重启

  • /usr/local/service/gosuv/tool_gosuv -c /usr/local/service/gosuv/config.yml restart

部署

  • scripts/gosuv.service
    • 通过systemctl来管理gosuv
  • scripts/scp_suv.sh
    • 将gosuv的配置文件,静态资源等部署到目标机器
  • conf/nginx.conf
    • gosuv如何和nginx集成

gosuv's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

foxhack

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.