上周介绍了zabbix监控cdn带宽,这次在介绍一下ansible结合docker来一键化安装与测试mysqltpcc,然后通过tpcc测试OLTP系统性能。写这个的原因就是重复性的安装太麻烦,浪费时间,而且我这里新业务不断上线,上线前使用tpcc进行OLTP测试对整体系统性能上也有了解。一、MyqlTpcc介..
分类:
数据库 时间:
2014-08-26 11:55:16
阅读次数:
639
1 change docker password #cat /ect/redhat-relase #passwd root If you have error like this /usr/share/cracklib/pw_dict.pwd: No such file or directory P...
分类:
其他好文 时间:
2014-08-26 11:18:55
阅读次数:
231
Interface定义:type Namer interface { Method1(param_list) return_type Method2(param_list) return_type ...}注:1. interface中不能包含变量2. 一个类型不用显式去定义实现某...
分类:
编程语言 时间:
2014-08-26 00:27:15
阅读次数:
265
原题戳我Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You ha...
分类:
其他好文 时间:
2014-08-26 00:14:25
阅读次数:
334
docker 默认的桥接网卡是docker0
它只会在本机桥接所有的容器网卡,举例来说容器的虚拟网卡在主机上看一般叫做veth*** 而docker只是把所有这些网卡桥接在一起,如下图:
在容器中看到的地址一般是像下面这样的地址:
这样就可以把这个网络看成是一个私有的网络,通过nat 连接外网,如果要让外网连接到容器中,就需要做端口映射,即-p参数
(更多原理参见本人的另...
分类:
其他好文 时间:
2014-08-25 17:10:54
阅读次数:
282
AFHTTPRequestOperation *op = [[AFHTTPRequestOperation alloc] initWithRequest:request];
[op setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"上传完成");
} failure:^(AFHTTPRequestOperation *operation, N...
分类:
Web程序 时间:
2014-08-25 13:28:24
阅读次数:
240
In concurrent programming, an operation (or set of operations) is atomic, linearizable, indivisible or uninterruptible if
it appears to the rest of the system to occur instantaneously. Atomicity is ...
分类:
其他好文 时间:
2014-08-25 11:52:54
阅读次数:
331
function和method关系method是针对某一类型定义的function,function可以单独调用,method必须针对某一类型的实例进行调用//function 调用方式packageName.FuncName()//method 调用方式var t packageName.Type...
分类:
编程语言 时间:
2014-08-24 17:56:42
阅读次数:
254
Docker Security
Adapted from Containers
& Docker: How Secure are They?
There are three major areas to consider when reviewing Docker security:
评估docker的安全性时,主要考虑3个方面
the intrinsic secu...
分类:
其他好文 时间:
2014-08-22 16:18:59
阅读次数:
324
安装tomcat镜像
准备好需要的jdk tomcat等软件放到home目录下面
启动一个虚拟机
docker run -t -i -v /home:/opt/data --name mk_tomcat ubuntu /bin/bash
这条命令挂载本地home目录到虚拟机的/opt/data目录,虚拟机内目录若不存在,则会自动创建
接下来就是tomcat的基本配置,jdk...
分类:
Web程序 时间:
2014-08-22 12:55:18
阅读次数:
343