zoukankan      html  css  js  c++  java
  • goreman 多进程管理工具

    Linux下多进程管理工具对开发和运维都很有用,常见的功能全面的主流工具主要有monit、supervisor。不过开发中使用则推荐轻量级小工具goreman

    举个例子:coreos的etcd就是使用的goreman来一键启停单机版的etcd集群。

    参考配置

    # Use goreman to run `go get github.com/mattn/goreman`
    etcd1: bin/etcd --name infra1 --listen-client-urls http://127.0.0.1:12379 --advertise-client-urls http://127.0.0.1:12379 --listen-peer-urls http://127.0.0.1:12380 --initial-advertise-peer-urls http://127.0.0.1:12380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'infra1=http://127.0.0.1:12380,infra2=http://127.0.0.1:22380,infra3=http://127.0.0.1:32380' --initial-cluster-state new --enable-pprof
    etcd2: bin/etcd --name infra2 --listen-client-urls http://127.0.0.1:22379 --advertise-client-urls http://127.0.0.1:22379 --listen-peer-urls http://127.0.0.1:22380 --initial-advertise-peer-urls http://127.0.0.1:22380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'infra1=http://127.0.0.1:12380,infra2=http://127.0.0.1:22380,infra3=http://127.0.0.1:32380' --initial-cluster-state new --enable-pprof
    etcd3: bin/etcd --name infra3 --listen-client-urls http://127.0.0.1:32379 --advertise-client-urls http://127.0.0.1:32379 --listen-peer-urls http://127.0.0.1:32380 --initial-advertise-peer-urls http://127.0.0.1:32380 --initial-cluster-token etcd-cluster-1 --initial-cluster 'infra1=http://127.0.0.1:12380,infra2=http://127.0.0.1:22380,infra3=http://127.0.0.1:32380' --initial-cluster-state new --enable-pprof
    proxy: bin/etcd --name infra-proxy1 --proxy=on --listen-client-urls http://127.0.0.1:2379 --initial-cluster 'infra1=http://127.0.0.1:12380,infra2=http://127.0.0.1:22380,infra3=http://127.0.0.1:32380' --enable-pprof

     
    参考github 代码
    https://github.com/rongfengliang/goremanlearning
     
  • 相关阅读:
    hdu1010 Tempter of the Bone(深搜+剪枝问题)
    08-Objective-C特有语法:@property、@synthesize
    Servlet的Response.setContentLength无效
    Java Future
    android一些若干回调测试
    那些有趣的Webview细节
    androidlog日志之 Klog (StackTraceElement)
    曾几何时遇到的bug(viewpager+fragment)
    Android acache读后感
    11-8 定时器this
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/8490898.html
Copyright © 2011-2022 走看看