Case 1: Configure yum warehouse
1. Three clone virtual machine settings ip, and named
真机]#base-vm openstack nova01 nova02 openstack(192.168.1.10),nova01(192.168.1.11),nova02(192.168.1.12)
2. base-vm openstack nova01 nova02
真机]#virsh start openstack
Real machine] #virsh start nova
Real machine ] #virsh start nova02
3. Set the size of opensatck 50G, nova01 nova02 to 100G
[真机]virsh blockresize --path /var/lib/libvirt/images.openstack.img --size 50G openstack
4. virtual machine as an example openstack
[Virtual openstack] / usr / bin / growpart / dev / vda 1 # extended partition
/ Usr / sbin / xfs_growfs / # extended file system
df -h to view the three machines were disk is divided into many
5. Three static IP Host Configuration (In a Case) vim / etc / sysconfig / network-scrips / ifcfg-eth0
- IPADDR=192.168.1.10
6. The three hosts modify the host name, configuration / etc / hosts, and /etc/resolv.conf files (with a, for example, changing for the better scp to the remaining two)
- 192.168.1.10 openstack
- 192.168.1.11 nova01
- 192.168.1.12 nova02
7. Three modified host memory (openstack6G, nova01 and nova02 4G) In a Case (OpenStack)
Real machine] #virsh edit openstack
- <memory unit='KiB'>6588282</memory>
- <currentMemory unit='KiB'>6588282</currentMemory>
8. Configure yum repository (to openstack virtual machine, for example)
cd /linux-soft/04/openstack/
ls
mkdir /var/ftp/RHEL7-extras
mkdir /var/ftp/RHEL7OSP-10
mount RHEL7-extras.iso /var/ftp/RHEL7-extras/
mount RHEL7OSP-10.iso /var/ftp/RHEL7OSP-10/
vim /etc/yum.repo.d/local.repo
[local_repo]
name=CentOS-$releasever - Base
baseurl="ftp://192.168.1.254/centos-1804"
enabled=1
gpgcheck=1
[RHEL7-extras]
name=RHEL7-extras
baseurl="ftp://192.168.1.254/RHEL7-extras"
enabled=1
gpgcheck=0
[RHEL7OSP-package]
name=RHEL7OSP-package
baseurl="ftp://192.168.1.254/RHEL7OSP-10/rhel-7-server-openstack-10-rpms"
enabled=1
gpgcheck=0
[RHEL7OSP-devtools]
name=RHEL7OSP-devtools
baseurl="ftp://192.168.1.254/RHEL7OSP-10/rhel-7-server-openstack-10-devtools-rpms"
enabled=1
gpgcheck=0
Further scp passed two machines
scp /etc/yum.repos.d/local.repo 192.168.1.11:/etc/yum.repos.d/
scp /etc/yum.repos.d/local.repo 192.168.1.12:/etc/yum.repos.d/
yum repolist # (a total of 10,670 packages)
Case 2: Testing time server (to openstack virtual machine, for example)
1. change the configuration file (after modifications to the remaining two machine scp)
vim /etc/chrony.conf
server 192.168.1.254 iburst
systemctl restart chronyd
2. Verify
chronyc sources -v
Gateway * ^ . 3 . 6 37 [ . 6 -93ns [ + 903ns ] +/- 26ms occurs # ^ * success
Case 4: Check the basic environment
- Install additional packages
- Whether NetworkManager and unloading firewalld
- Check the host network configuration parameters (static IP)
- Hostname must be able to ping each other
- Check Host Configuration yum source (4, 10 670)
- Dependent packages are installed
- Check the NTP server is available
- Check the /etc/resolv.conf search can not have at the beginning of the line
1) installation of additional software packages (three machines operate here with a case study)
yum install -y qemu-kvm libvirt-client libvirt-daemon libvirt-daemon-driver-qemu python-setuptools
2) whether NetworkManager and unloading firewalld
the rpm qa | NetworkManager grep *
rpm -qa | grep firewalld*
3) Check the host network configuration parameters
vim /etc/sysconfig/network-scripts/ifcfg-eth0
4) Verify that the host name is interoperability
ping openstack nova01 nova02
5) Check the configuration source host yum
yum repolist
6) Check the time synchronization is available
chronyc sources -v
7) Check the /etc/resolv.conf search can not have at the beginning of the line
vim /etc/resolv.conf
5 Case 5: Deploy Openstack
This case required to complete the following configuration by packstack:
- By deploying Openstack packstack
- According to the relevant log files to troubleshoot
1. Install packstack
yum install -y openstack-packstack
2. Generate an answer file
packstack --gen-answer-file answer.ini
vim answer.ini
42 CONFIG_SWIFT_INSTALL=n
CONFIG_CEILOMETER_INSTALL 45 = n- // charging related module
CONFIG_AODH_INSTALL 49 = n- // charging related module
CONFIG_GNOCCHI_INSTALL 53 is = n- // charging related module
CONFIG_NTP_SERVERS 75 = 192.168.1.254 address // Time Server
98 CONFIG_COMPUTE_HOSTS=192.168.1.11
102 CONFIG_NETWORK_HOSTS=192.168.1.10,192.168.1.11
CONFIG_KEYSTONE_ADMIN_PW 333 = A // change the administrator's password
CONFIG_NEUTRON_ML2_TYPE_DRIVERS 840 = Flat , VXLAN // drive type
CONFIG_NEUTRON_ML2_VXLAN_GROUP 876 = 239.1.1.5 // set multicast address, the last one is not free to 0 and 255, other fixed
CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS 910 = physnet1 : br -ex name // physical bridge
CONFIG_NEUTRON_OVS_BRIDGE_IFACES 921 = br -ex : eth0 Name and eth0 // br-ex bridge connection management eth0, which bridges the physical network adapter is connected
CONFIG_PROVISION_DEMO 1179 = the n- // DEMO test whether
3. Installation OpenStack (wait about 20 minutes)
packstack --answer-file=answer.ini
6 Case 6: Network Management
This case requires the use of OVS complete the following configurations:
- View OVS bridge and external port
- OVS verify the configuration
1) Check br-ex bridge configuration (br-ex is a bridge device OVS)
cat /etc/sysconfig/network-scripts/ifcfg-br-ex
2) Check eth0 NIC configuration (the bridge interface card is OVS)
cat /etc/sysconfig/network-scripts/ifcfg-eth0
3) Verify the configuration OVS
ovs-vsctl show
7 Case 7: Log openstack
1. Modify /etc/httpd/conf.d/15-horizon_vhost.conf configuration file so that it can successfully log openstack
35 WSGIProcessGroup apache
WSGIApplicationGroup 36 % {the GLOBAL } // add this line
2. reload: apache graceful
3. The browser access openstack
firefox 192.168.1.10
4. Enter a username and password in the Firefox browser, the login page shown in FIG -7: