先电IaaS私有云V2.2平台部署

准备软件:

XianDian-IaaS-v2.2.iso

CentOS-7-x86_64-DVD-1810.iso

虚拟机:centos系统、100G硬盘、计算节点要再加一块100G的

目录:

1.配置网络,主机名(双节点)

2.永久闭防火墙和selinux(双节点)

3.配置YUM源(双节点)

4.写入/etc/fstab,并挂载镜像(控制节点)

5.安装iaas相关软件包(双节点)

6.划分磁盘作为swift和cinder(计算节点)

7.修改环境变量(双节点)

8.配置NTP服务

9.通过脚本安装服务(双节点)

10.通过IP访问云平台

1.配置网络,主机名(双节点)

4H4G 100G

规划:虚拟机环境可以就用一个网卡也行--这里只用内部网卡

处理器要开启虚拟化

添加一块100G硬盘后边作为cinder和swift使用

主机

主机名

内部网卡

外部网卡

控制节点

controller01

192.168.1.10

192.168.2.10

计算节点

compute01

192.168.1.20

192.168.2.20

controller配置:

[root@controller ~]# hostnamectl set-hostname controller01

[root@controller ~]# su

配置网卡:

重启网络

关机直接克隆compute

compute配置:

[root@compute ~]# hostnamectl set-hostname compute01

[root@compute ~]# su

记得拉取两个镜像!!!(只需要在controller节点拉取)

2.永久闭防火墙和selinux(双节点)

[root@controller yum.repos.d]# systemctl stop firewalld

[root@controller yum.repos.d]# systemctl disable firewalld

Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

[root@controller yum.repos.d]# setenforce 0

[root@controller yum.repos.d]# vi /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of three two values:

#     targeted - Targeted processes are protected,

#     minimum - Modification of targeted policy. Only selected processes are protected.

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

[root@compute yum.repos.d]# systemctl stop firewalld

[root@compute yum.repos.d]# systemctl disable firewalld

Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.

[root@compute yum.repos.d]# setenforce 0

[root@compute yum.repos.d]# vi /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of three two values:

#     targeted - Targeted processes are protected,

#     minimum - Modification of targeted policy. Only selected processes are protected.

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted

3.配置YUM源(双节点)

配置主机名映射

[root@controller ~]# vi /etc/hosts

192.168.1.10 controller

192.168.1.20 compute

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

[root@compute ~]# vi /etc/hosts

192.168.1.10 controller

192.168.1.20 compute

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

挂载使用本地yum源

[root@controller ~]# cd /etc/yum.repos.d/

[root@controller yum.repos.d]# rm -rf *

[root@controller yum.repos.d]# cat local.repo

[centos]

name=centos

baseurl=file:///opt/centos

gpgcheck=0

enabled=1

[iaas]

name=iaas

baseurl=file:///opt/iaas-repo

gpgcheck=0

enabled=1

compute01:

[root@compute ~]# cd /etc/yum.repos.d/

[root@compute yum.repos.d]# rm -rf *

[root@compute yum.repos.d]# cat local.repo

[centos]

name=centos

baseurl=ftp://controller01/centos

gpgcheck=0

enabled=1

[iaas]

name=iaas

baseurl=ftp://controller01/iaas-repo

gpgcheck=0

enabled=1

4.写入/etc/fstab,并挂载镜像

[root@controller ~]# ls

anaconda-ks.cfg  CentOS-7-x86_64-DVD-1511.iso  XianDian-IaaS-v2.2.iso

[root@controller ~]# mkdir /opt/centos

抽取yum源:

[root@controller ~]# mount -o loop CentOS-7-x86_64-DVD-1804.iso  /mnt/

[root@controller ~]# cp -rvf /mnt/* /opt/centos/

[root@controller ~]# umount  /mnt/

另一个镜像也这样操作

[root@controller ~]# mount -o loop XianDian-IaaS-v2.4.iso  /mnt/

[root@controller ~]# cp -rvf /mnt/* /opt/

[root@controller ~]# umount  /mnt/

[root@controller ~]# yum list

yum clean all && yum makecache

[root@controller ~]# yum install -y vim

[root@controller ~]# yum install -y vsftpd

[root@controller ~]# cat /etc/vsftpd/vsftpd.conf (在第一行添加下面内容,点点不用写)

anon_root=/opt/

[root@controller ~]# systemctl restart vsftpd

[root@controller ~]# systemctl enable vsftpd

Created symlink from /etc/systemd/system/multi-user.target.wants/vsftpd.service to /usr/lib/systemd/system/vsftpd.service.

5.安装iaas相关软件包

controller & compute:

# yum install -y iaas-xiandian

6.划分磁盘作为swift和cinder

这里我们新建一个磁盘挂载上然后分区即可

将计算节点的100G的sdb分出两个40G的分区:sdb1、sdb2   

[root@computer ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x0002f10c

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1            2048     4196351     2097152   82  Linux swap / Solaris

/dev/sda2   *     4196352    41943039    18873344   83  Linux

Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

[root@computer ~]# fdisk /dev/sdb

Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

Device does not contain a recognized partition table

Building a new DOS disklabel with disk identifier 0xa5eb8d25.

Command (m for help): n

Partition type:

   p   primary (0 primary, 0 extended, 4 free)

   e   extended

Select (default p):

Using default response p

Partition number (1-4, default 1):

First sector (2048-209715199, default 2048):

Using default value 2048

Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199): +40G  

Partition 1 of type Linux and of size 40 GiB is set

Command (m for help): n

Partition type:

   p   primary (1 primary, 0 extended, 3 free)

   e   extended

Select (default p):

Using default response p

Partition number (2-4, default 2):

First sector (62916608-209715199, default 62916608):

Using default value 62916608

Last sector, +sectors or +size{K,M,G} (62916608-209715199, default 209715199): +40G

Partition 2 of type Linux and of size 40 GiB is set

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

[root@computer ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0x0002f10c

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1            2048     4196351     2097152   82  Linux swap / Solaris

/dev/sda2   *     4196352    41943039    18873344   83  Linux

Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk label type: dos

Disk identifier: 0xa5eb8d25

   Device Boot      Start         End      Blocks   Id  System

/dev/sdb1            2048    62916607    31457280   83  Linux

/dev/sdb2        62916608   125831167    31457280   83  Linux

[root@compute ~]# mkfs.xfs /dev/sdb1

[root@compute ~]# mkfs.xfs /dev/sdb2

7.修改环境变量

[root@controller ~]# cat /etc/xiandian/openrc.sh

##--------------------system Config--------------------##

##Controller Server Manager IP. example:x.x.x.x

HOST_IP=192.168.1.10      

#控制节点内部网卡地址

##Controller Server hostname. example:controller

HOST_NAME=controller

##Compute Node Manager IP. example:x.x.x.x

HOST_IP_NODE=192.168.1.20       

#计算节点内部网卡地址

##Compute Node hostname. example:compute

HOST_NAME_NODE=compute

##--------------------Rabbit Config ------------------##

##user for rabbit. example:openstack

RABBIT_USER=openstack

##Password for rabbit user .example:000000

RABBIT_PASS=000000

##--------------------MySQL Config---------------------##

##Password for MySQL root user . exmaple:000000

DB_PASS=000000

##--------------------Keystone Config------------------##

##Password for Keystore admin user. exmaple:000000

DOMAIN_NAME=demo                 

#域的名称

ADMIN_PASS=000000

DEMO_PASS=000000

##Password for Mysql keystore user. exmaple:000000

KEYSTONE_DBPASS=000000

##--------------------Glance Config--------------------##

##Password for Mysql glance user. exmaple:000000

GLANCE_DBPASS=000000

##Password for Keystore glance user. exmaple:000000

GLANCE_PASS=000000

##--------------------Nova Config----------------------##

##Password for Mysql nova user. exmaple:000000

NOVA_DBPASS=000000

##Password for Keystore nova user. exmaple:000000

NOVA_PASS=000000

##--------------------Neturon Config-------------------##

##Password for Mysql neutron user. exmaple:000000

NEUTRON_DBPASS=000000

##Password for Keystore neutron user. exmaple:000000

NEUTRON_PASS=000000

##metadata secret for neutron. exmaple:000000

METADATA_SECRET=000000

##External Network Interface. example:eth1

INTERFACE_NAME=ens33  

#外部网卡名称

##First Vlan ID in VLAN RANGE for VLAN Network. exmaple:101

#minvlan=

##Last Vlan ID in VLAN RANGE for VLAN Network. example:200

#maxvlan=

##--------------------Cinder Config--------------------##

##Password for Mysql cinder user. exmaple:000000

CINDER_DBPASS=000000

##Password for Keystore cinder user. exmaple:000000

CINDER_PASS=000000

##Cinder Block Disk. example:md126p3

BLOCK_DISK=sdb1

#cinder分区

##--------------------Trove Config--------------------##

##Password for Mysql Trove User. exmaple:000000

TROVE_DBPASS=000000

##Password for Keystore Trove User. exmaple:000000

TROVE_PASS=000000

##--------------------Swift Config---------------------##

##Password for Keystore swift user. exmaple:000000

SWIFT_PASS=000000

##The NODE Object Disk for Swift. example:md126p4.

OBJECT_DISK=sdb2

##The NODE IP for Swift Storage Network. example:x.x.x.x.

STORAGE_LOCAL_NET_IP=192.168.1.20               

#计算节点内部网卡

##--------------------Heat Config----------------------##

##Password for Mysql heat user. exmaple:000000

HEAT_DBPASS=000000

##Password for Keystore heat user. exmaple:000000

HEAT_PASS=000000

##--------------------Ceilometer Config----------------##

##Password for Mysql ceilometer user. exmaple:000000

CEILOMETER_DBPASS=000000

##Password for Keystore ceilometer user. exmaple:000000

CEILOMETER_PASS=000000

##--------------------AODH Config----------------##

##Password for Mysql AODH user. exmaple:000000

AODH_DBPASS=000000

##Password for Keystore AODH user. exmaple:000000

AODH_PASS=000000

将文件传到计算节点

[root@controller ~]# scp /etc/xiandian/openrc.sh root@compute01:/etc/xiandian/openrc.sh

8.配置NTP服务

新版本不用更改

9.通过脚本安装服务

控制节点:

iaas-pre-host.sh

reboot

iaas-install-mysql.sh

iaas-install-keystone.sh

iaas-install-glance.sh

上传镜像:

source /etc/keystone/admin-openrc.sh

发到计算节点

scp /etc/keystone/admin-openrc.sh root@compute01:/root/

glance image-create --name "CentOS7.6" --disk-format qcow2  --container-format bare --progress <      /root/CentOS-7-x86_64-DVD-1810.iso

iaas-install-nova-controller.sh

iaas-install-neutron-controller.sh

iaas-install-dashboard.sh

iaas-install-cinder-controller.sh

iaas-install-swift-controller.sh

iaas-install-ceilometer-controller.sh

计算节点

iaas-pre-host.sh

reboot

iaas-install-nova-compute.sh

iaas-install-neutron-compute.sh

iaas-install-cinder-compute.sh

iaas-install-swift-compute.sh

iaas-install-ceilometer-compute.sh

计算节点安装virt:

yum -y install virt-install

10.通过IP访问云平台

http://192.168.1.10/dashboard

11.底层验证:

nova\cinder\glance\neutron\openstack、命令正常

  • 10
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: xiandian-iaas-v2.2.iso是一个镜像文件,可以用于安装和部署虚拟化平台。您可以在官方网站或其他可靠的下载站点上下载该文件。下载完成后,您可以使用虚拟化软件将其加载到虚拟机中,并开始安装和配置虚拟化平台。请注意,安装和配置虚拟化平台需要一定的技术知识和经验。 ### 回答2: Xiandian-iaas-v2.2.iso是一个运行在x86硬件平台上的虚拟化操作系统。它提供了一套完整的云计算解决方案,支持虚拟机、存储、网络、安全等多项服务。该操作系统基于CentOS 7做了许多优化,可以支持x86、64位CPU,具有高性能、高可用性和高安全性等特点。 下载Xiandian-iaas-v2.2.iso需要先访问官方网站,并注册一个账号。注册成功后,用户可以在网站上下载Xiandian-iaas-v2.2.iso镜像文件。下载完成后,用户需要将该文件镜像刻录到DVD光盘或USB盘中,并将其插入需要安装xiandian iaas操作系统的计算机中。 安装Xiandian-iaas-v2.2.iso操作系统需要一定的计算机硬件要求,如CPU需要支持虚拟化技术、内存大小至少为4GB、硬盘空间至少为100GB等。在安装过程中,用户需要进行一系列的配置,如选择安装磁盘、设置网络等。安装完成后,用户可以通过SSH连接方式访问该操作系统。 总之,Xiandian-iaas-v2.2.iso操作系统是一款高性能、高可用性和高安全性的云计算解决方案。用户可以通过下载并安装该操作系统实现虚拟化、存储、网络、安全等多项服务的部署和运行。 ### 回答3: xiandian-iaas-v2.2.iso是一种开源的虚拟化操作系统的镜像文件。该操作系统是基于OpenStack 平台开发的云计算操作系统,旨在通过提供丰富的功能和简化的管理界面支持构建和管理私有云、公共云和混合云。 下载xiandian-iaas-v2.2.iso可以帮助用户搭建一套可持续发展的云计算架构,包含一系列的云计算组件,如计算、网络、存储等,支持多租户和弹性可扩展的云计算服务。用户可以通过这个操作系统来建立自己的私有云环境,也可用来对公共云提供商的云资源进行管理。 该操作系统可以运行在OpenStack平台中,也可以在其他的虚拟化平台中运行,如KVM、VMware。此外,它还提供了一个基于Web的可视化管理界面,可以帮助用户轻松地管理整个云计算环境。 总之,xiandian-iaas-v2.2.iso是一种高度可定制化的云计算操作系统,可用于搭建私有云或公共云,支持弹性扩展和多租户管理,提供了丰富的功能和管理界面,是构建云计算环境的优秀选择。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值