• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






会飞の鱼

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

07 2017 档案

 
consul service
摘要:{ "name": "consul-agent (host:{{ .MONITOR_CONSUL }})", "command": ["/usr/local/bin/consul", "agent", "-data-dir=/data2", "-config-dir=/config2", "-rej 阅读全文
posted @ 2017-07-31 15:45 会飞の鱼 阅读(412) 评论(0) 推荐(0)
Centos7 vnc
摘要:这是一个关于怎样在你的 CentOS 7 上安装配置 VNC 服务的教程。当然这个教程也适合 RHEL 7 。在这个教程里,我们将学习什么是 VNC 以及怎样在 CentOS 7 上安装配置 VNC 服务器。 我们都知道,作为一个系统管理员,大多数时间是通过网络管理服务器的。在管理服务器的过程中很少 阅读全文
posted @ 2017-07-27 10:48 会飞の鱼 阅读(974) 评论(0) 推荐(0)
Centos7 創建快捷方式
摘要:usr/share/applications 創建文件 Gogland.desktop [Desktop Entry]Version=1Type=ApplicationName=GoglandGenericName=Text EditorComment=Go IDEExec=/root/packet 阅读全文
posted @ 2017-07-27 10:20 会飞の鱼 阅读(244) 评论(0) 推荐(0)
Consul Session
摘要:consul馆提供session机制,可用于构建分布式锁。 session作为节点,健康检查和key/value数据之间的绑定层。 它们旨在提供粒度锁定,并受到“The Chubby Lock Service for Loosely-Coupled Distributed Systems的极大启发。 阅读全文
posted @ 2017-07-24 13:41 会飞の鱼 阅读(1741) 评论(0) 推荐(0)
python consul
摘要:install pip install python-consul 阅读全文
posted @ 2017-07-24 13:17 会飞の鱼 阅读(198) 评论(0) 推荐(0)
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 阅读全文
posted @ 2017-07-24 11:10 会飞の鱼 阅读(128) 评论(0) 推荐(0)
python mysql connector
摘要:install pip install mysql-connector-python-rf 报错 从https://dev.mysql.com/downloads/connector/python/ 下载 [root@mhc 下载]# rpm -ivh mysql-connector-python- 阅读全文
posted @ 2017-07-24 11:09 会飞の鱼 阅读(323) 评论(0) 推荐(0)
python json5
摘要:install pip install json5 test a.json: 阅读全文
posted @ 2017-07-24 10:25 会飞の鱼 阅读(1206) 评论(0) 推荐(0)
Containerpilot 配置文件reload
摘要:containerpilot -reload -config ./containerpilot.json 进程号不变,重新加载配置文件 阅读全文
posted @ 2017-07-24 10:15 会飞の鱼 阅读(157) 评论(0) 推荐(0)
Containerpilot 配置文件模板
摘要:{ "consul": "{{ .CONSUL }}:8500", "logging": { "level": "INFO", "format": "default", "output": "stdout" }, "jobs": [ { "name": '{{ .SERVICE_NAME|defau 阅读全文
posted @ 2017-07-24 10:02 会飞の鱼 阅读(189) 评论(0) 推荐(0)
mysql 备份
摘要:qwe 阅读全文
posted @ 2017-07-21 17:32 会飞の鱼 阅读(101) 评论(0) 推荐(0)
Manta
摘要:安装python客户端: pip install manta 阅读全文
posted @ 2017-07-21 17:30 会飞の鱼 阅读(541) 评论(0) 推荐(0)
Containerpilot 配置文件 之 Telemetry
摘要:如果提供telemetry选项,ContainerPilot将公开可用于刮擦性能telemetry的Prometheus HTTP客户端界面。 telemetry接口被公告为consul服务。 telemetry服务的每个metric为Prometheus客户端库配置收集器。 然后,Promethe 阅读全文
posted @ 2017-07-19 17:19 会飞の鱼 阅读(858) 评论(0) 推荐(0)
Containerpilot 配置文件 之 Watches
摘要:watch是在consul进行监视的服务配置。 watch轮询服务的状态,并在服务变得健康,变得不健康或者实例数量发生变化时发出事件。 请注意,watch不包括行为; watch只发出事件,以便job可以消耗该事件。 watch配置仅包括以下字段: 每当发生变化时, changed事件。 每当观看的 阅读全文
posted @ 2017-07-19 17:06 会飞の鱼 阅读(162) 评论(0) 推荐(0)
Containerpilot 配置文件示例
摘要:{ consul: "localhost:8500", logging: { level: "INFO", format: "default", output: "stdout" }, jobs: [ { name: "app", exec: "/bin/app", restarts: "unlim 阅读全文
posted @ 2017-07-19 16:37 会飞の鱼 阅读(398) 评论(0) 推荐(0)
Containerpilot 配置文件 之 Jobs
摘要:ContainerPilot job是用户定义的进程和规则,用于何时执行它,如何进行健康检查,以及如何向Consul做广告。 这些规则旨在允许灵活性覆盖几乎可能要运行的任何类型的进程。 一些可能的job配置包括: 一个长时间运行的应用程序,如Web服务器,如果崩溃,需要重新启动。 一次性设置任务,在 阅读全文
posted @ 2017-07-19 16:35 会飞の鱼 阅读(341) 评论(0) 推荐(0)
Containerpilot 配置文件 之 consul
摘要:Consul ContainerPilot使用Hashicorp的consul在作为服务的容器中注册工作。 Watches查询consul找出其他服务的状态。 Client configuration ContainerPilot配置文件中的consul域配置ContainerPilot的Consu 阅读全文
posted @ 2017-07-19 16:05 会飞の鱼 阅读(859) 评论(0) 推荐(0)
Redis cli 操作
摘要:备份 root@575e8088b5fb:/data# redis-cli LASTSAVE(integer) 1500273743root@575e8088b5fb:/data# redis-cli BGSAVE Background saving startedroot@575e8088b5fb 阅读全文
posted @ 2017-07-19 08:54 会飞の鱼 阅读(139) 评论(0) 推荐(0)
Autopilot Pattern Redis
摘要:https://github.com/autopilotpattern/redis Architecture 正在运行的群集包括以下组件: Redis :我们使用的是Redis 3.2。 Redis Sentinel :管理故障转移。 ContainerPilot :包含在我们的Redis容器中,以 阅读全文
posted @ 2017-07-18 10:31 会飞の鱼 阅读(283) 评论(0) 推荐(0)
autopilot
摘要:https://github.com/autopilotpattern/ 阅读全文
posted @ 2017-07-18 09:38 会飞の鱼 阅读(555) 评论(0) 推荐(0)
Redis 入门
摘要:1.redis是什么2.redis的作者何许人也3.谁在使用redis4.学会安装redis5.学会启动redis6.使用redis客户端7.redis数据结构 – 简介8.redis数据结构 – strings9.redis数据结构 – lists10.redis数据结构 – 集合11.redis 阅读全文
posted @ 2017-07-17 15:09 会飞の鱼 阅读(172) 评论(0) 推荐(0)
swagger
摘要:使用swagger editor: 阅读全文
posted @ 2017-07-14 18:08 会飞の鱼 阅读(121) 评论(0) 推荐(0)
org.springframework.stereotype 注解
摘要:org.springframework.stereotype1、@controller 控制器(注入服务) 2、@service 服务(注入dao) 3、@repository dao(实现dao访问) 4、@component (把普通pojo实例化到spring容器中,相当于配置文件中的<bea 阅读全文
posted @ 2017-07-14 15:23 会飞の鱼 阅读(11270) 评论(0) 推荐(0)
linux curl
摘要:执行curl命令时,会返回这样的% Total % Received % 统计信息 如何关闭这个统计信息的显示? 使用curl的-s 选项即可 curl -Lsfo /zookeeper.tar.gz http://mirror.bit.edu.cn/apache/zookeeper/zookeep 阅读全文
posted @ 2017-07-13 09:34 会飞の鱼 阅读(205) 评论(0) 推荐(0)
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 阅读全文
posted @ 2017-07-07 13:48 会飞の鱼 阅读(138) 评论(0) 推荐(0)
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 阅读全文
posted @ 2017-07-05 18:19 会飞の鱼 阅读(485) 评论(0) 推荐(0)
Ansible Playbook 循环
摘要:Ansible Playbook 循环 阅读全文
posted @ 2017-07-05 15:04 会飞の鱼 阅读(6453) 评论(0) 推荐(0)
Ansible Playbook Conditionals
摘要:playbook中的条件判断 阅读全文
posted @ 2017-07-05 14:29 会飞の鱼 阅读(527) 评论(0) 推荐(0)
Ansible Playbook Variables
摘要:Ansible Playbook 中的变量 阅读全文
posted @ 2017-07-05 13:34 会飞の鱼 阅读(6805) 评论(0) 推荐(0)
Ansible Playbook Roles and Include Statements
摘要:Playbook角色和包含语句 阅读全文
posted @ 2017-07-05 11:37 会飞の鱼 阅读(2563) 评论(0) 推荐(0)
Ansible Galaxy
摘要:命令行工具 ansible-galaxy命令与Ansible捆绑在一起,您可以使用它从Galaxy或直接从基于git的SCM安装角色。 您还可以使用它在Galaxy网站上创建新角色,删除角色或执行任务。 默认情况下,命令行工具使用服务器地址https://galaxy.ansible.com与Gal 阅读全文
posted @ 2017-07-05 10:13 会飞の鱼 阅读(7695) 评论(0) 推荐(1)
mysql 用户及赋予权限
摘要:查询用户: use mysql; select host,user from mysql.user; 创建用户: create user 'mhc'@'%' identified by 'mhc.123'; 查看权限: show grants for mhc@'%'; 阅读全文
posted @ 2017-07-03 13:07 会飞の鱼 阅读(154) 评论(0) 推荐(0)