四、配置管理客户端
1. 客户端环境说明
操作系统 Ubuntu12.04.2 64位
注意,客户端只需要是Linux,就可以正常操作,这里以Ubuntu 12.04.2为例。
操作用户:root和xiaoyuwang(sudoer用户)
2. 安装必要的openstack管理工具
root@localhost:~# sudo apt-get install euca2ools python-novaclient unzip
3. 创建必要的工作目录
xiaoyuwang@localhost:~$ cd
xiaoyuwang@localhost:~$ mkdir openstack
xiaoyuwang@localhost:~$ cd openstack
xiaoyuwang@localhost:~/openstack$
3. 远程复制nova.zip到本地xiaoyuwang目录下
xiaoyuwang@localhost:~/openstack$ scp openstack@172.16.0.1:nova.zip .
The authenticity of host '172.16.0.1 (172.16.0.1)' can't be established.
ECDSA key fingerprint is a0:dd:a1:68:aa:8b:22:7c:4b:17:54:70:5a:d5:78:f2.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.16.0.1' (ECDSA) to the list of known hosts.
openstack@172.16.0.1's password:
Permission denied, please try again.
openstack@172.16.0.1's password:
nova.zip 100% 5930 5.8KB/s 00:00
4. 解压nova.zip
xiaoyuwang@localhost:~/openstack$ unzip nova.zip
Archive: nova.zip
extracting: novarc
extracting: pk.pem
extracting: cert.pem
extracting: cacert.pem
5. 配置环境变量
xiaoyuwang@localhost:~/openstack$ . novarc
xiaoyuwang@localhost:~/openstack$
6. 配置访问虚拟机实例的密钥对
xiaoyuwang@localhost:~/openstack$ euca-add-keypair openstack > openstack.pem
设置文件的访问权限
xiaoyuwang@localhost:~/openstack$ chmod 0600 *.pem
文件内容如图:
我们也可以通过下面的命令来生成密钥对,这和上面的命令是一致的。
nova keypair-add openstack > openstack.pem
chmod 0600.pem
本文转自xiaoyuwang 51CTO博客,原文链接:http://blog.51cto.com/wangxiaoyu/1297738,如需转载请自行联系原作者