Openstack

Openstacklinux

1、準備環境vim

1、配置兩臺虛擬機服務器

vh01.tedu.cn 192.168.4.1/24   DNS服務器 NTP服務器網絡

vh02.tedu.cn 192.168.4.2/24 192.168.2.2/24 OPENSTACK服務器工具

    DNS指向192.168.4.1 內存4G以上,加一塊20G的額外硬盤測試

2、初始化虛擬機spa

   關閉防火牆/selinuxfirefox

3、配置yum倉庫rest

須要RHEL7安裝光盤倉庫,還須要osp光盤。osp光盤中的每個目錄都是一個倉庫server

 

2、DNS服務器

1、安裝

[root@vh01 ~]# yum install -y bind

2、主配置文件

[root@vh01 ~]# vim /etc/named.conf

        listen-on port 53 { any; };

        allow-query     { any; };

[root@vh01 ~]# vim /etc/named.rfc1912.zones

zone "tedu.cn" IN {

        type master;

        file "tedu.cn.zone";

        allow-update { none; };

};

3、區配置文件

[root@vh01 ~]# vim /var/named/tedu.cn.zone

$TTL    86400

@       IN      SOA     vh01.tedu.cn.   root.tedu.cn. (

                                20171101

                                3H

                                15M

                                1W

                                1D )

        IN      NS      vh01.tedu.cn.

$generate       1-9     vh0$    IN      A       192.168.4.$

$generate       10-254  vh$     IN      A       192.168.4.$

4、檢查語法

[root@vh01 ~]# named-checkconf /etc/named.conf

[root@vh01 ~]# named-checkconf /etc/named.rfc1912.zones

[root@vh01 ~]# named-checkzone tedu.cn /var/named/tedu.cn.zone

5、驗證

[root@vh01 ~]# systemctl start named

[root@vh01 ~]# systemctl enable named

[root@vh02 ~]# nslookup vh01.tedu.cn

 

NTP配置

1、網絡時間協議  UDP123

[root@vh01 ~]# yum install -y ntp

[root@vh01 ~]# vim /etc/ntp.conf

restrict 192.168.4.0 mask 255.255.255.0 nomodify

#server 0.rhel.pool.ntp.org iburst

#server 1.rhel.pool.ntp.org iburst

#server 2.rhel.pool.ntp.org iburst

#server 3.rhel.pool.ntp.org iburst

server 127.127.1.0 iburst

fudge 127.127.1.0 stratum 3    #第三層NTP服務器

2、測試

[root@vh01 ~]# systemctl start ntpd

[root@vh01 ~]# systemctl enable ntpd

[root@vh01 ~]# netstat -ulnp | grep :123

[root@vh02 ~]# date

[root@vh01 ~]# date -s "2017-11-28 15:34:00"

[root@vh02 ~]# ntpdate 192.168.4.1

[root@vh02 ~]# date

配置OPENSTACK

1、關閉NetworkManager

[root@vh02 ~]# systemctl stop NetworkManager

[root@vh02 ~]# systemctl disable NetworkManager

2、建立名爲cinder-volumes的卷組,用於爲雲主機提供雲硬盤

[root@vh02 ~]# pvcreate /dev/vdb

[root@vh02 ~]# vgcreate cinder-volumes /dev/vdb

3、導公鑰、安裝rpm

[root@vh02 ~]# cd openstack/

[root@vh02 openstack]# rpm --import rabbitmq-signing-key-public.asc

[root@vh02 openstack]# yum install -y rpms/*rpm

4、安裝openstack部署工具packstack

[root@vh02 openstack]# yum install -y openstack-packstack

5、生成應答文件

[root@vh02 openstack]# packstack --gen-answer-file answer.txt

[root@vh02 openstack]# vim answer.txt

CONFIG_DEFAULT_PASSWORD=redhat

CONFIG_SWIFT_INSTALL=n

CONFIG_NTP_SERVERS=192.168.4.1

ONFIG_KEYSTONE_ADMIN_PW=redhat

CONFIG_CINDER_VOLUMES_CREATE=n

CONFIG_NEUTRON_ML2_VXLAN_GROUP=239.1.1.2

CONFIG_NEUTRON_ML2_VNI_RANGES=1001:2000

CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=physnet1:br-ex

CONFIG_NEUTRON_OVS_TUNNEL_IF=eth1

CONFIG_PROVISION_DEMO=n

6、安裝openstack

[root@vh02 openstack]# packstack --answer-file answer.txt

 

網絡配置

[root@vh02 openstack]# cd /etc/sysconfig/network-scripts/

[root@vh02 network-scripts]# cp ifcfg-eth0 ifcfg-br-ex

[root@vh02 network-scripts]# vim ifcfg-br-ex

TYPE=OVSBridge

DEVICETYPE=ovs

BOOTPROTO=none

NAME=br-ex

DEVICE=br-ex

ONBOOT=yes

IPADDR=192.168.4.2

PREFIX=24

DNS1=192.168.4.1

[root@vh02 network-scripts]# vim ifcfg-eth0

TYPE=OVSPort

OVS_BRIDGE=br-ex

DEVICE=eth0

ONBOOT=yes

DEVICETYPE=ovs

[root@vh02 network-scripts]# systemctl restart network

[root@room8pc16 cloud]# firefox http://192.168.4.2 &

 

 

http://mirrors.163.com/

http://mirrors.aliyun.com/

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

IaaS:雲主機

PaaS:組件、中間件

SaaS:軟件

 

HorizonWeb管理門戶

Keystone:認證管理

Cinder:雲硬盤

Glance:鏡像管理

Neutron:網絡管理

Nova:雲主機管理

 

手工引導

1、重起系統後,在第一個菜單上按c

2、設置根分區

grub> set root=(hd0,msdos1)   至關因而vda1

3、指定內核

grub> linux16 /vmlinuz-3.10<tab> root=/dev/rhel/root

4、指定初始化內存盤的位置

grub> initrd16 /initamfs-3.10<tab>.img

5、起動

grub> boot

 

查看狀態,activeinactive都是正常的,failed是有問題的

[root@vh02 ~(keystone_admin)]# openstack-status

重啓openstack

[root@vh02 ~(keystone_admin)]# openstack-service restart

 

安裝額外計算節點

1vh03.tedu.cn

192.168.4.3/24  192.168.2.3/24  dns: 192.168.4.1

防火牆/selinux

 

[root@vh02 ~]# scp /etc/yum.repos.d/rhel7.repo 192.168.4.3:/etc/yum.repos.d/

[root@vh02 ~]# scp /etc/yum.repos.d/osp8.repo 192.168.4.3:/etc/yum.repos.d/

[root@vh02 ~]# scp -r openstack/ 192.168.4.3:/root

[root@vh03 ~]# cd openstack/

[root@vh03 openstack]# rpm --import rabbitmq-signing-key-public.asc

[root@vh03 openstack]# yum install -y rpms/*rpm

[root@vh02 openstack(keystone_admin)]# vim answer.txt

CONFIG_COMPUTE_HOSTS=192.168.4.2,192.168.4.3

[root@vh02 openstack(keystone_admin)]# packstack --answer-file answer.txt

相關文章
相關標籤/搜索