openstack安装(el7 + RDO Quickstart)和简单虚拟机创建

来源:互联网 发布:jquery–1.4.2.min.js 编辑:程序博客网 时间:2024/06/06 00:02

使用RDO 安装openstack 比较简单,根据官方教程就可以,我把官方教程简单梳理一下:

1. 安装

1) 安装centos 7 或者 rhel 7 (需要配置centos yum 源)

这个不用多说了

2) 更新系统,安装RDO  源

#yum update -y
#yum install -y https://rdoproject.org/repos/rdo-release.rpm


3) 安装packstack

#yum install -y openstack-packstack

4)安装openstack

#packstack --allinone

运行该命令时可能会出错,基本上都是安装包yum 安装问题,常见的错误就是yum源下载问题,主要和国内的网络有关系,可以根据错误一一解决。

5) 安装 成功

安装完成后登录: http://$YOURIP/dashboard.

 username : "admin".

password :在/root/keystonerc_admin内


2. 创建虚拟机:

就直接用官网的了“

Step 1: Visit the Dashboard

Log in to the Openstack dashboard at http://CONTROL_NODE/dashboard - the username is "demo". The password can be found in the file keystonerc_demo in the /root/ directory of the control node.

Note: make sure you use the "demo" username here.

Step 2: Enable SSH on your default security group.

Once logged in to the OpenStack dashboard, click the "Project" tab in the left-side navigation menu, and then click "Access & Security" under the heading "Compute."

Access security.png

Under the "Security Groups" heading, click the "Edit Rules" button for the "default" security group. Click the "Add Rule" button, and in the resulting dialog, enter "22" in the "Port" field, and then click the "Add" button.

Step 3: Create or import a key pair.

In the left-side navigation menu, click "Access & Security" under the heading "Compute." In the main portion of the screen, click the tab labeled "Keypairs," and choose either to "Create Keypair" or "Import Keypair." The "Create Keypair" dialog will prompt you to supply a keypair name before downloading a private key to your client.

The "Import Keypair" option will prompt you to provide a name and a public key to use with an existing private key on your client. For name, choose something to identify that key (like your username, for example) and for key, use the contents of your public key file, usually in ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub on the machine from which you will be ssh-ing in.

Step 4: Add an image.

In the left-side navigation menu, click "Images & Snapshots" under the heading "Manage Compute." Click the "Create Image" button, located in the upper-right portion of the screen. In the resulting dialog box, enter "Fedora22" in the "Name" field, "mirrors.ustc.edu.cn/fedora/linux/releases/22/Cloud/x86_64/Images/Fedora-Cloud-Base-22-20150521.x86_64.qcow2" in the "Image Location" field, choose "QCOW2" from the "Format" drop-down menu, leave the "Minimum Disk" and "Minimum Ram" fields blank, leave the "Public" box unchecked, and click the "Create Image" button.

For a collection of links to alternative cloud-ready images, check out image resources.

Step 5: Launch the instance.

在实例界面直接创建就可以了,我就不引用了。

Step 6: Associate Floating IP

In the main portion of the screen, under the "Instances" heading, click the "More" button, followed by the "Associate Floating IP" link for the instance you just launched. You should see both public and private IP addresses listed in the "IP Address" column for your instance.

For additional details, please read how to set a floating IP range.

Step 7: SSH to Your Instance

Using the key pair file from step 3, ssh into the running vm using its floating ip address:

$ ssh -l root -i my_key_pair.pem floating_ip_address

3. Keystone:

keystone  --os-auth-url http://10.1.82.163:5000/v2.0/ --os-username admin --os-password 2de7a9cc14a04e3f --os-tenant-name admin --os-region-name RegionOne user-list

配置参数均来自: /root/keystonerc_admin


4. Swift:


swift -A  http://10.1.82.163:5000/v2.0/  -U admin:admin -K 2de7a9cc14a04e3f  list  -V 2

配置参数均来自: /root/keystonerc_admin

admin:admin: tenant_name:user_name



0 0
原创粉丝点击