DEST=/opt/stack/ocata # use TryStack git mirror GIT_BASE=http://git.trystack.cn NOVNC_REPO=http://git.trystack.cn/kanaka/noVNC.git SPICE_REPO=http://git.trystack.cn/git/spice/spice-html5.git
#OFFLINE=True RECLONE=False
# Define images to be automatically downloaded during the DevStack built process. DOWNLOAD_DEFAULT_IMAGES=False IMAGE_URLS=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"
This is your host IP address: 127.0.0.1 This is your host IPv6 address: ::1 Horizon is now available at http://127.0.0.1/dashboard Keystone is serving at http://127.0.0.1/identity/ The default users are: admin and demo The password: pass
完成docker镜像的生成后,使用docker run -d -w /root/cosbench/ --rm -P s3test:performance命令运行容器。然后通过docker ps查看可访问的端口。
1 2 3
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ed37db78178a s3test:performance "/root/entry.sh" 19 hours ago Up 19 hours 0.0.0.0:32771->18088/tcp, 0.0.0.0:32770->19088/tcp unruffled_mahavira
2017-07-11 07:26:42,297 [INFO] [Log4jLogManager] - will append log to file /root/cosbench/log/mission/MA308B012AE.log 2017-07-11 07:26:42,574 [INFO] [NoneStorage] - performing GET at /testp2/myobjects38 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects43 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp1/myobjects43 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects31 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp1/myobjects7 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects26 2017-07-11 07:26:42,574 [INFO] [NoneStorage] - performing GET at /testp1/myobjects34 2017-07-11 07:26:42,574 [INFO] [NoneStorage] - performing GET at /testp2/myobjects25 2017-07-11 07:26:42,574 [INFO] [NoneStorage] - performing GET at /testp2/myobjects45 2017-07-11 07:26:42,574 [INFO] [NoneStorage] - performing GET at /testp1/myobjects7 2017-07-11 07:26:42,574 [INFO] [NoneStorage] - performing GET at /testp2/myobjects43 2017-07-11 07:26:42,576 [INFO] [NoneStorage] - performing GET at /testp2/myobjects16 2017-07-11 07:26:42,576 [INFO] [NoneStorage] - performing GET at /testp2/myobjects23 2017-07-11 07:26:42,576 [INFO] [NoneStorage] - performing GET at /testp1/myobjects15 2017-07-11 07:26:42,576 [INFO] [NoneStorage] - performing GET at /testp1/myobjects36 2017-07-11 07:26:42,576 [INFO] [NoneStorage] - performing GET at /testp2/myobjects34 2017-07-11 07:26:42,576 [INFO] [NoneStorage] - performing GET at /testp1/myobjects34 2017-07-11 07:26:42,576 [INFO] [NoneStorage] - performing GET at /testp2/myobjects27 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects49 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp1/myobjects27 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects24 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp1/myobjects35 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects2 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects47 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp1/myobjects39 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp1/myobjects50 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp1/myobjects8 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects21 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects24 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects15 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp1/myobjects4 2017-07-11 07:26:42,575 [INFO] [NoneStorage] - performing GET at /testp2/myobjects1 2017-07-11 07:26:45,476 [ERROR] [AbstractOperator] - worker 8 fail to perform operation testp1/myobjects7 com.amazonaws.AmazonClientException: Unable to verify integrity of data download. Client calculated content hash didn't match hash calculated by Amazon S3. The data may be corrupt. at com.amazonaws.services.s3.internal.DigestValidationInputStream.validateMD5Digest(DigestValidationInputStream.java:79) at com.amazonaws.services.s3.internal.DigestValidationInputStream.read(DigestValidationInputStream.java:61) at com.amazonaws.internal.SdkFilterInputStream.read(SdkFilterInputStream.java:72) at com.amazonaws.services.s3.model.S3ObjectInputStream.read(S3ObjectInputStream.java:155) at com.amazonaws.services.s3.model.S3ObjectInputStream.read(S3ObjectInputStream.java:147) at com.intel.cosbench.driver.operator.Reader.copyLarge(Reader.java:120) at com.intel.cosbench.driver.operator.Reader.doRead(Reader.java:92) at com.intel.cosbench.driver.operator.Reader.operate(Reader.java:69) at com.intel.cosbench.driver.operator.AbstractOperator.operate(AbstractOperator.java:76) at com.intel.cosbench.driver.agent.WorkAgent.performOperation(WorkAgent.java:197) at com.intel.cosbench.driver.agent.WorkAgent.doWork(WorkAgent.java:177) at com.intel.cosbench.driver.agent.WorkAgent.execute(WorkAgent.java:134) at com.intel.cosbench.driver.agent.AbstractAgent.call(AbstractAgent.java:44) at com.intel.cosbench.driver.agent.AbstractAgent.call(AbstractAgent.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) 2017-07-11 07:26:45,476 [INFO] [NoneStorage] - performing GET at /testp1/myobjects14 2017-07-11 07:26:46,880 [INFO] [NoneStorage] - performing GET at /testp2/myobjects14 2017-07-11 07:26:49,806 [INFO] [NoneStorage] - performing GET at /testp1/myobjects43 2017-07-11 07:26:51,514 [INFO] [NoneStorage] - performing GET at /testp2/myobjects31 2017-07-11 07:26:54,021 [INFO] [NoneStorage] - performing GET at /testp1/myobjects5
################################################### # # EXPORT # # To function, all that is required is an EXPORT # # Define the absolute minimal export # ###################################################
EXPORT { # Export Id (mandatory, each EXPORT must have a unique Export_Id) Export_Id = 1;
# Exported path (mandatory) Path = "nfs_bucket";
# Pseudo Path (required for NFS v4) Pseudo = "/nfs_bucket";
# Required for access (default is None) # Could use CLIENT blocks instead Access_Type = RW; Protocols = 4; Transports = TCP;
加密的一个简单但又实用的任务就是发送加密电子邮件。多年来,为电子邮件进行加密的标准一直是PGP(Pretty Good Privacy)。程序员Phil Zimmermann特别为电子邮件的保密编写的PGP。这个软件非常好用,迅速流传开来,成了许多程序员的必备工具。但是,它是商业软件,不能自由使用。作为PGP的替代,如今已经有一个开放源代码的类似产品可供使用。GPG(Gnu Privacy Guard),它不包含专利算法,能够无限制的用于商业应用。
环境
RHEL7.2 默认以安装GPG
GPG 2.0.22 libgcrypt 1.5.3
使用方法
生成密钥
使用--gen-key生成一副新的密钥对
1 2 3 4 5 6 7 8 9 10 11
$ gpg --gen-key gpg (GnuPG) 2.0.22; Copyright (C) 2013 Free Software Foundation, Inc. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
请选择您要使用的密钥种类: (1) RSA and RSA (default) (2) DSA and Elgamal (3) DSA (仅用于签名) (4) RSA (仅用于签名) 您的选择?
第一段是版权声明,然后让用户自己选择加密算法。默认选择第一个选项,表示加密和签名都使用RSA算法。
1 2
RSA 密钥长度应在 1024 位与 4096 位之间。 您想要用多大的密钥尺寸?(2048)
这一步要让我们输入密钥长度,长度越长越安全,默认为2048。
1 2 3 4 5 6 7 8
您所要求的密钥尺寸是 2048 位 请设定这把密钥的有效期限。 0 = 密钥永不过期 <n> = 密钥在 n 天后过期 <n>w = 密钥在 n 周后过期 <n>m = 密钥在 n 月后过期 <n>y = 密钥在 n 年后过期 密钥的有效期限是?(0)
You need a user ID to identify your key; the software constructs the user ID from the Real Name, Comment and Email Address in this form: "Heinrich Heine (Der Dichter) <heinrichh@duesseldorf.de>"
gpg --verify test.txt.sig test.txt gpg: Signature made Wed 17 May 2017 04:12:50 PM CST using RSA key ID 74A64469 gpg: Good signature from "Zhang San <zhangsan@163.com>" gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: 0B77 E327 B365 316D F112 4521 ABC0 9164 6058 BC49
$ sudo brctl addif xennet0 enp0s6 $ brctl show bridge name bridge id STP enabled interfaces docker0 8000.0242df249633 no xennet0 8000.0242688f16c2 no enp0s6
创建固定IP容器 创建容器需要分配固定IP,该IP需要业务层分配,并与bridge同网段。 eg:
1 2 3 4 5 6 7 8
$ docker run -d --name c1 --network xennet --ip 10.37.129.100 centos:7.3.1611 /usr/sbin/init $ docker run -d --name c2 --network xennet --ip 10.37.129.200 centos:7.3.1611 /usr/sbin/init $ brctl show bridge name bridge id STP enabled interfaces docker0 8000.0242df249633 no xennet0 8000.0242688f16c2 no enp0s6 veth990ee82 vethf1f6fcb