设为首页 收藏本站
查看: 1897|回复: 0

[经验分享] Ubuntu Openstack Django 十分钟快速部署openstack 云计算

[复制链接]

尚未签到

发表于 2016-1-8 15:34:18 | 显示全部楼层 |阅读模式
安装git
sudo su
apt-get update
apt-get install git
  获取快速安装脚本
  

git clone git://github.com/StackGeek/openstackgeek.git
cd openstackgeek使用基础脚本安装依赖包  
  

./openstack_base_1.sh完成脚本使用后,编辑interface  
  

vim /etc/network/interfaces修改为  
  

auto eth0
iface eth0 inet static
address 10.0.1.20
network 10.0.1.0
netmask 255.255.255.0
broadcast 10.0.1.255
gateway 10.0.1.1
dns-nameservers 8.8.8.8
auto eth1完成设置后,进行下一步。  
  

/etc/init.d/networking restart
./openstack_base_2.sh


几分钟完成。需要创建新的分区。  
  

root@precise:/home/kord/openstackgeek# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xb39fe7af.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Partition type:
p   primary (0 primary, 0 extended, 4 free)
e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-62914559, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-62914559, default 62914559):
Using default value 62914559
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
root@precise:/home/kord/openstackgeek# pvcreate -ff /dev/sdb1
Physical volume "/dev/sdb1" successfully created
root@precise:/home/kord/openstackgeek# vgcreate nova-volumes /dev/sdb1
Volume group "nova-volumes" successfully created
root@precise:/home/kord/openstackgeek#
  
  


安装Mysql  

./openstack_mysql.sh


设置默认密码(这里使用的是f00bar)  
  

Enter a password to be used for the OpenStack services to talk to MySQL (users nova, glance, keystone): f00bar


安装时,需要提供密码。
mysql start/running, process 8796
#######################################################################################
Creating OpenStack databases and users.  Use your database password when prompted.
Run './openstack_keystone.sh' when the script exits.
#######################################################################################
Enter password:


Mysql开始运行后,可以登录任意Openstck  
  

mysql -u root -pf00bar
mysql -u nova -pf00bar nova
mysql -u keystone -pf00bar keystone
mysql -u glance -pf00bar glance


安装keystone  
  使用脚本方式安装。
  

./openstack_keystone.sh


你会被提示一个token,OpenStack里的服务输入的密码,您的电子邮件地址。电子邮件地址是用来填充用户的数据库中的信息。  
  

Enter a token for the OpenStack services to auth wth keystone: r4th3rb3t0k3n
Enter the password you used for the MySQL users (nova, glance, keystone): f00bar
Enter the email address for service accounts (nova, glance, keystone): user@foobar.com然后  
  

source stackrc


接着我们可以看到用户和结果  
  

. ./stackrc
keystone user-list


例如  
  

+----------------------------------+---------+------------------------+--------+
|                id                | enabled |         email          |  name  |
+----------------------------------+---------+------------------------+--------+
| b32b9017fb954eeeacb10bebf14aceb3 | True    | kordless@foobar222.com | demo   |
| bfcbaa1425ae4cd2b8ff1ddcf95c907a | True    | kordless@foobar222.com | glance |
| c1ca1604c38443f2856e3818c4ceb4d4 | True    | kordless@foobar222.com | nova   |
| dd183fe2daac436682e0550d3c339dde | True    | kordless@foobar222.com | admin  |
+----------------------------------+---------+------------------------+--------+


安装Glance./openstack_glance.sh


这时候会被要求下载个ubuntu could img,我是使用迅雷下载,而后放里面的。估计,如果网速不如的话会压力的。  
  

glance index


就可以看到  
  

ID                                   Name                           Disk Format          Container Format     Size         
------------------------------------ ------------------------------ -------------------- -------------------- --------------
71b8b5d5-a972-48b3-b940-98a74b85ed6a Ubuntu 12.04 LTS               qcow2                ovf                       226426880


安装Nova  
  依旧使用脚本


./openstack_nova.sh


需要填写一些关于网络的资料,以及IP地址等等  
  

#############################################################################################################
The IP address for eth0 is probably 10.0.1.35. Keep in mind you need an eth1 for this to work.
#############################################################################################################
Enter the primary ethernet interface IP: 10.0.1.35
Enter the fixed network (eg. 10.0.2.32/27): 10.0.2.32/27
Enter the fixed starting IP (eg. 10.0.2.33): 10.0.2.33
#######################################################################################
The floating range can be a subset of your current network.  Configure your DHCP server
to block out the range before you choose it here.  An example would be 10.0.1.224-255
#######################################################################################
Enter the floating network (eg. 10.0.1.224/27): 10.0.1.224/27
Enter the floating netowrk size (eg. 32): 32


完成安装后,输入命令  
  

nova image-list


输出  
  

root@precise:/home/kord/openstackgeek# nova image-list
+--------------------------------------+------------------+--------+--------+
|                  ID                  |       Name       | Status | Server |
+--------------------------------------+------------------+--------+--------+
| 71b8b5d5-a972-48b3-b940-98a74b85ed6a | Ubuntu 12.04 LTS | ACTIVE |        |
+--------------------------------------+------------------+--------+--------+


安装Horizon./openstack_horizon.sh

  
  然后
  

env |grep OS_PASSWORD


  
  

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-161995-1-1.html 上篇帖子: OpenStack及其构成简介 下篇帖子: openstack常用命令
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表