分类 默认分类 下的文章

[DevOps for Developers] 读书笔记1

dev & ops 分别对change的态度, 决定了...
devOps 是随着agile实践一步步发展而来, agile 先是在开发team, 后延续到ops team. 它强调的是合作, 沟通.

dev: change code, and want to delivery quickly to production;
ops: no change for production, keep it stable;

devops 概念的萌芽发展历程

  1. Patrick Debois coined the term DevOps in 2009 while organizing the
    DevOpsDays conference in Belgium.
  2. Patrick Debois ran a session called “Agile Operations and
    Infrastructure: How Infra-gile Are You?”4 at the Agile 2008
    conference in Toronto and published a paper with a similar name.
  3. Marcel Wegermann published a e-mail list called “Agile System
    Administration.”
  4. John Allspaw gave a presentation called “10+ Deploys per Day: Dev
    and Ops Cooperation”7 at the Velocity 2009 conference in San Jose.
  5. Steven Blank published a book called Four Steps to the Epiphany.
  6. Eric Ries published The Lean Startup9 and others have written on the
    “lean startup” scene.
  7. The 451 Group published the first analyst report on DevOps (titled
    “The Rise of DevOps”10) in September 2010.

DevOps can be examined from the following overlapping perspectives:

  1. Metrics and measurement view: This aspect addresses quality and
    testing and stresses shared incentives.
  2. Process view: This aspect covers congruence and flow to gain fast
    feedback and set up a holistic process.
  3. Technical view: This aspect discusses fast feedback through
    automation, particularly automatic releasing, specification by
    example, and infrastructure as code.

Microservices architectures pros and cons 微服务架构的优缺点

这里全是引用或者从这篇文章引发的: Microservices - Not A Free Lunch!

pros:



    每个单独的服务都是以某个业务模块为中心, 不用关心其他服务, 开发简单;
    sale out, 伸缩性, HA
    rollback only involve single app
    每个服务都可以根据自己业务特性, 采用不同的内部架构, 工具, 开发语言;
    每个服务可以根据load 情况, 增加减少cluster内机器的数量;
    系统中的服务都是松耦合的, 便于开发, 维护;
    每个服务的开发团队都不至于太大, 团队之间相互独立;
    现在很多的开源的工具支持这种开发模式, 便于上手;

cons:



    原来你测试部署一个app就好了, 那么现在按照模块, 根据微服务架构拆分成了多个app, 相互提供服务, 那么你逻辑上就要有多个team, 多个app, 原来测试, 部署一个app就好了, 现在要部署测试多个app, 要有更多的开发, 测试, 生产环境;
    原来一个app 内部之间直接调用, 现在要通过网络, 要有服务注册, 发现机制; 网络之间的调用, 就有了failover;
    多个prodution cluster 在线上, 那么就需要等多的mnoitor, 报警机制, 以及分布式的log 机制;
    Substantial DevOps Skills Required
    定义接口, 单机应用的接口可以随时改变, 然后修改, 微服务的分布式架构就要求协调多个team, 按计划发布; 并且接口最好在一段时间内不要修改;
    Once we have distributed a system, we have to consider a whole host of concerns that we didn't before. Network latency, fault tolerance, message serialisation, unreliable networks, asynchronicity, versioning, varying loads within our application tiers etc.
    Asynchronicity Is Difficult!
    Testability Challenges

windows 系统无法 粘贴 复制 copy/paste not working

最近在 chrome, eclipse, outlook 中有时候没法粘贴, 复制, 不论是 Ctrl+C, Ctrl+V 还是先选中在右键复制/粘贴, 都不管用.
在最后忍无可忍的时候, 突然想起来, 以前发生过, 只要关掉 windows 远程桌面就好了.

这应该是windows 远程桌面的 rdpclip.exe 的一个 Bug, 一开始还没问题, 如果远程桌面开的时间长了, 就会出现这个问题.

小米手机充电器 拆解

不知道从那天开始, 小米手机的充电器无法充电了, 仔细检查一下, 应该是充电器接触不良, 刚插入的时候, 能冲一瞬间, 有时候, 用手使劲掰住, 也能冲一会, 一旦放开, 就又无法充电了. 于是就想打开充电器看看到底怎么回事.

首先百度搜到官方论坛的这么一个帖子: 小米充电器辛苦拆卸全程, 真是惨不忍睹, 竟然锯开, 不过还是从回帖中发现, 需要从插头那头拆开. 开始动手了, 首先说下工具:
1) 美工刀, 用来划开粘住的接缝;
2) 钳子, 用力夹住插头, 拔出里面元器件;
3) 电笔, 测试里面某些东西上有没有电;
4) 胶水, 最后把他们在粘到一块.

直接上图吧:
全套工具, 注意看充电器插头那端的接缝, 那是用美工刀的尖一点点划的结果.
IMG_20150124_173947.jpg
当用美工刀把四边都弄出缝来之后, 可以用钳子夹住插头, 活动几下, 然后拔出:
IMG_20150124_173521.jpg
IMG_20150124_173512.jpg
最后使用不带壳的充电器, 小心有电...
D8007DB4FEFE1C6D83B6E422B72CBD27.png

我这个拆开再装上, 竟然就能充电了, 装的时候, 用胶水把划开的地方全部粘一下.