consul service
摘要:{ "name": "consul-agent (host:{{ .MONITOR_CONSUL }})", "command": ["/usr/local/bin/consul", "agent", "-data-dir=/data2", "-config-dir=/config2", "-rej
阅读全文
Centos7 vnc
摘要:这是一个关于怎样在你的 CentOS 7 上安装配置 VNC 服务的教程。当然这个教程也适合 RHEL 7 。在这个教程里,我们将学习什么是 VNC 以及怎样在 CentOS 7 上安装配置 VNC 服务器。 我们都知道,作为一个系统管理员,大多数时间是通过网络管理服务器的。在管理服务器的过程中很少
阅读全文
Centos7 創建快捷方式
摘要:usr/share/applications 創建文件 Gogland.desktop [Desktop Entry]Version=1Type=ApplicationName=GoglandGenericName=Text EditorComment=Go IDEExec=/root/packet
阅读全文
Consul Session
摘要:consul馆提供session机制,可用于构建分布式锁。 session作为节点,健康检查和key/value数据之间的绑定层。 它们旨在提供粒度锁定,并受到“The Chubby Lock Service for Loosely-Coupled Distributed Systems的极大启发。
阅读全文
python consul
摘要:install pip install python-consul
阅读全文
python 形参
摘要:def fun(x="dx",y="dy"): print "fun " print x print yfun()fun("aa","bb")fun(x="ha",y="la")ct = dict(x="haha",y="lala")fun(**ct) fun dxdyfun aabbfun hal
阅读全文
python mysql connector
摘要:install pip install mysql-connector-python-rf 报错 从https://dev.mysql.com/downloads/connector/python/ 下载 [root@mhc 下载]# rpm -ivh mysql-connector-python-
阅读全文
python json5
摘要:install pip install json5 test a.json:
阅读全文
Containerpilot 配置文件reload
摘要:containerpilot -reload -config ./containerpilot.json 进程号不变,重新加载配置文件
阅读全文
Containerpilot 配置文件模板
摘要:{ "consul": "{{ .CONSUL }}:8500", "logging": { "level": "INFO", "format": "default", "output": "stdout" }, "jobs": [ { "name": '{{ .SERVICE_NAME|defau
阅读全文
Manta
摘要:安装python客户端: pip install manta
阅读全文
Containerpilot 配置文件 之 Telemetry
摘要:如果提供telemetry选项,ContainerPilot将公开可用于刮擦性能telemetry的Prometheus HTTP客户端界面。 telemetry接口被公告为consul服务。 telemetry服务的每个metric为Prometheus客户端库配置收集器。 然后,Promethe
阅读全文
Containerpilot 配置文件 之 Watches
摘要:watch是在consul进行监视的服务配置。 watch轮询服务的状态,并在服务变得健康,变得不健康或者实例数量发生变化时发出事件。 请注意,watch不包括行为; watch只发出事件,以便job可以消耗该事件。 watch配置仅包括以下字段: 每当发生变化时, changed事件。 每当观看的
阅读全文
Containerpilot 配置文件示例
摘要:{ consul: "localhost:8500", logging: { level: "INFO", format: "default", output: "stdout" }, jobs: [ { name: "app", exec: "/bin/app", restarts: "unlim
阅读全文
Containerpilot 配置文件 之 Jobs
摘要:ContainerPilot job是用户定义的进程和规则,用于何时执行它,如何进行健康检查,以及如何向Consul做广告。 这些规则旨在允许灵活性覆盖几乎可能要运行的任何类型的进程。 一些可能的job配置包括: 一个长时间运行的应用程序,如Web服务器,如果崩溃,需要重新启动。 一次性设置任务,在
阅读全文
Containerpilot 配置文件 之 consul
摘要:Consul ContainerPilot使用Hashicorp的consul在作为服务的容器中注册工作。 Watches查询consul找出其他服务的状态。 Client configuration ContainerPilot配置文件中的consul域配置ContainerPilot的Consu
阅读全文
Redis cli 操作
摘要:备份 root@575e8088b5fb:/data# redis-cli LASTSAVE(integer) 1500273743root@575e8088b5fb:/data# redis-cli BGSAVE Background saving startedroot@575e8088b5fb
阅读全文
Autopilot Pattern Redis
摘要:https://github.com/autopilotpattern/redis Architecture 正在运行的群集包括以下组件: Redis :我们使用的是Redis 3.2。 Redis Sentinel :管理故障转移。 ContainerPilot :包含在我们的Redis容器中,以
阅读全文
autopilot
摘要:https://github.com/autopilotpattern/
阅读全文
Redis 入门
摘要:1.redis是什么2.redis的作者何许人也3.谁在使用redis4.学会安装redis5.学会启动redis6.使用redis客户端7.redis数据结构 – 简介8.redis数据结构 – strings9.redis数据结构 – lists10.redis数据结构 – 集合11.redis
阅读全文
org.springframework.stereotype 注解
摘要:org.springframework.stereotype1、@controller 控制器(注入服务) 2、@service 服务(注入dao) 3、@repository dao(实现dao访问) 4、@component (把普通pojo实例化到spring容器中,相当于配置文件中的<bea
阅读全文
linux curl
摘要:执行curl命令时,会返回这样的% Total % Received % 统计信息 如何关闭这个统计信息的显示? 使用curl的-s 选项即可 curl -Lsfo /zookeeper.tar.gz http://mirror.bit.edu.cn/apache/zookeeper/zookeep
阅读全文
Maven
摘要:set proxy in settings.xml: <settings> <proxies> <proxy> <id>my-proxy</id> <active>true</active> <protocol>http</protocol> <host>109.105.4.17</host> <p
阅读全文
Ansible develop module
摘要:def cnf(action,configs,path): message = "Modify %s\n" %path changed = False if action == "get": with open(path,"r") as f: message = f.read() return ch
阅读全文
Ansible Galaxy
摘要:命令行工具 ansible-galaxy命令与Ansible捆绑在一起,您可以使用它从Galaxy或直接从基于git的SCM安装角色。 您还可以使用它在Galaxy网站上创建新角色,删除角色或执行任务。 默认情况下,命令行工具使用服务器地址https://galaxy.ansible.com与Gal
阅读全文
mysql 用户及赋予权限
摘要:查询用户: use mysql; select host,user from mysql.user; 创建用户: create user 'mhc'@'%' identified by 'mhc.123'; 查看权限: show grants for mhc@'%';
阅读全文