consul
摘要:python-consul import consul c = consul.Consul(host="192.168.111.111") c.kv.put("key","value") a = c.kv.get("key") print a ('107', {u'LockIndex': 0, u'
阅读全文
sdc docker连接
摘要:curl -O https://raw.githubusercontent.com/joyent/sdc-docker/master/tools/sdc-docker-setup.sh && chmod +x sdc-docker-setup.sh [root@a6c17613-5f58-ef76-
阅读全文
处理命令行参数
摘要:funcs=($(declare -F -p | cut -d " " -f 3))until if [ ! -z "$1" ]; then # check if the first arg is a function in this file, or use a default if [[ " $
阅读全文
获取本机ip
摘要:import socketimport structimport fcntldef get_ip(iface='eth0'): """ Use Linux SIOCGIFADDR ioctl to get the IP for the interface. ref http://code.activ
阅读全文
linux 杂
摘要:set -e表示一旦脚本中有命令的返回值为非0,则脚本立即退出,后续命令不再执行; set -o pipefail表示在管道连接的命令序列中,只要有任何一个命令返回非0值,则整个管道返回非0值,即使最后一个命令返回0. tput rev # reverse 命令行背景反转tput bold # bo
阅读全文
docker 配置远程访问证书验证
摘要:centos7 生成证书 工具:openssl #cd /etc/docker (docker的证书一般放这) #openssl genrsa -aes256 -passout pass:密码 -out ca-key.pem 2048 会出现: Generating RSA private key,
阅读全文
docker 配置远程访问
摘要:系统: centos 7 Docker version 1.12.6 yum 安装的 #yum install docker docker server在192.168.111.120上 # vim /lib/systemd/system/docker.service 在 ExecStart 最后追
阅读全文
triton,docker,mesos
摘要:triton user: jill /root/.sdc/docker/jill 下 root@1f6af9d8-8ed9-e940-9c6c-d9505ca25896:~/.sdc/docker/jill# lltotal 8drwxr-xr-x 2 root root 6 May 4 02:39
阅读全文
Managing Images on smartos
摘要:SmartOS依赖images。images是包含在创建新zone或虚拟机时使用的磁盘或文件系统映像和元数据的模板。images使用imgadm工具进行管理。 使用此工具,您可以: 查看和下载在公共映像服务器上可用的映像 安装本地images或者import远程images 列出,显示或打印有关im
阅读全文
vmadm命令
摘要:VMADM(1M)VMADM(1M) 名称 vmadm - 管理SmartOS虚拟机 概要 / usr / vm / sbin / vmadm <command> [-d] [-v] [特定于命令的参数] 描述 vmadm工具允许您与SmartOS上的虚拟机进行交互 系统。 全部3个:OS虚拟机(S
阅读全文
How to create a Virtual Machine in SmartOS
摘要:How to create a Virtual Machine in SmartOS
阅读全文