Devstack single node environment actual combat configuration

Source: Internet
Author: User
Tags alphanumeric characters aliyun

This experiment is a test environment for setting up virtual machine under VMware12.

1 Pre-preparatory work

Real Machine Environment WIN10
Linux version centos-everything-7.0
VMware version VMwareworkstations12
The virtual machine is configured as follows:
8G Memory
2-core CPU (Turn on virtualization)
Network configuration for Bridging mode
/boot 500M (be sure to make a big point or you'll encounter problems later)
Swap partition 4G
All the rest of the space is divided/partitioned

To configure the Yum source, you can keep the original CentOS with the official Yum source, or use the domestic mirror, the foreign mirror used in this experiment and use Fastestmirror, if the needs of friends can download repo source automatically constructs local Yum source method.
http://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-mitaka/
http://mirrors.163.com/centos/7/cloud/x86_64/openstack-mitaka/

Installing the Fastestmirror Plugin
Yum Install Yum-plugin-fastestmirror-y
Rpm-qa | Fastestmirror
Vim/etc/yum/pluginconf.d/fastestmirror.conf
The Hostfilepath field in the configuration file defines the configuration file for the Yum source, and we can write the known Yum source to this TXT file.

Run Yum check-update Check if configuration is in effect

In general, use the default settings of the Fastestmirror plug-in to meet your usage requirements. However, in some special cases of the network, the Fastestmirror plug-in may not be accurately judged. At this point, we can modify its ping response value to save the table:
Vim/var/cache/yum/x86_64/7/timedhosts.txt

If the Yum version is high, the work is configured by Yum and we just need to check it.

2

Yum install-y git
Yum Update upgrades your existing system to avoid various package incompatibility issues as much as possible. (Don't restart Now)

3

3 Turn off SELinux
Vim/etc/selinux.config
Selinux=disabled

Turn off other firewalls to keep only iptables
Systemctl Mask Ebtables
Systemctl Mask Firewalld
Systemctl Mask Ip6tables
Systemctl Enable Iptables
Restart the machine so that the update package is applied.

If boot partition space is found to be low after update upgrade, for example "XXX more space needed on the/boot filesystem", the boot partition needs to be expanded.
Back up the old boot partition first, for example I want to back it up to the/tmp/boot folder
Mkdir/tmp/boot
Cp-r/boot/*/tmp/boot
Umount/boot

Then the existing partition to expand or create a new partition, in the author's experimental environment,/boot partition only 200M, when the update is not error but after restarting the/boot partition is full of the file system has no spare partition, This time I can only add a new 500M virtual hard disk in the new partition. This time you need to first look at the partition in the table of the original partition is what format, it is best to be divided into the same format.
Vim/etc/fstab

Here my virtual machine/boot partition is EXT4 so my newly partitioned partition needs to be formatted into EXT4 format
Fdisk-l
Here, I can see my new/DEV/SDB disk.

Fdisk/dev/sdb
Partprobe
Mkfs.ext4/dev/sdb1
Blkid
Re-writes the received UUID to the/etc/fstab
At this point, mount the boot partition to copy the/tmp/boot file to the/boot partition.

4 Preparing Devstack

Mkdir-p/var/download/devstack
Cd/var/download/devstack
git clone https://github.com/openstack-dev/devstack.git-b Stable/mitaka
You can see this branche on the GitHub official website, we do the M version of the automated deployment of course selected M version.

Now that Devstack cannot run the stack.sh file through root, you need to create a stack user to run the stack.sh script as a stack user.

Cd/var/download/devstack/tools
./create-stac-user.sh
5. Modify the Devstack directory permissions so that the stack user can run
Chown-r Stack:stack/var/download/devstack
chmod 777/dev/pts/0 (First user login, console's device file is/dev/pts/0, the second is/DEV/PTS/1, and so on. /dev/pts is the directory where the console device files are created after remote login (TELNET,SSH, etc.)
chmod 777/opt/stack-r
(This is the default installation path when you automate the deployment of OpenStack, the default installation path can be modified in the local.conf file, and if you modify it, you need to reset the file directory path here.) )

* In the virtual machine environment, be sure to set the snapshot here for easy rollback.

#5配置local. conf file
As early as 2013, the LOCALRC file was replaced by the local.conf file. Now the LOCALRC file is still available but is not recommended.
Create the local.conf file under the Devstack file path. Two simple configurations are given here.

[[LOCAL|LOCALRC]]# Use trystack git mirrorGit_base=http://git.trystack.cnNovnc_repo=http://git.trystack.cn/kanaka/novnc.gitSpice_repo=http://git.trystack.cn/git/spice/spice-html5.git#OFFLINE =trueReclone=true# Define images to be automatically downloaded during the Devstack built process.download_default_images=falseImage_urls= "Http://images.trystack.cn/cirros/cirros-0.3.4-x86_64-disk.img"host_ip=192.168.1.6# CredentialsDatabase_password=passAdmin_password=passService_password=passService_token=passRabbit_password=passHorizon_branch=stable/mitakaKeystone_branch=stable/mitakaNova_branch=stable/mitakaNeutron_branch=stable/mitakaGlance_branch=stable/mitakaCinder_branch=stable/mitaka#keystoneKeystone_token_format=uuid# #HeatHeat_branch=stable/mitakaenable_service H-eng H-api H-API-CFN H-API-CW# # SwiftSwift_branch=stable/mitakaenabled_services+=,s-proxy,s-object,s-container,s-accountSwift_replicas=1Swift_hash=011688b44136573e209e# Enabling Neutron (network) ServiceDisable_service n-netenable_service q-svcenable_service q-agtenable_service q-dhcpenable_service q-l3enable_service Q-metaenable_service Q-meteringenable_service Neutron# # Neutron OptionsQ_use_secgroup=trueFloating_range= "192.168.1.0/24"Fixed_range= "10.0.0.0/24"Q_floating_allocation_pool=start=192.168.1.10,end=192.168.1.20Public_network_gateway= "192.168.1.1"q_l3_enabled=truePublic_interface=eth0Q_use_providernet_for_public=trueOvs_physical_bridge=br-exPublic_bridge=br-exovs_bridge_mappings=public:br-ex# #VLAN configuration.Q_plugin=ml2Enable_tenant_vlans=true# LoggingLOGFILE=/opt/stack/logs/stack.sh.logVERBOSE=trueLog_color=trueScreen_logdir=/opt/stack/logs

The following configuration files are still a bit of a problem when deployed in my notebook for testing.

[[LOCAL|LOCALRC]]# Use trystack git mirrorGit_base=http://git.trystack.cnNovnc_repo=http://git.trystack.cn/kanaka/novnc.gitSpice_repo=http://git.trystack.cn/git/spice/spice-html5.git#Define BranchesHorizon_branch=stable/mitakaKeystone_branch=stable/mitakaNova_branch=stable/mitakaNeutron_branch=stable/mitakaGlance_branch=stable/mitakaCinder_branch=stable/mitakaCeilometer_branch=stable/mitakaSwift_branch=stable/mitaka#OFFLINE =trueReclone=true#DirectoryDEST=/var/openstack#Define target server IP addresshost_ip=192.168.1.6# Define images to be automatically downloaded during the Devstack built process.download_default_images=falseImage_urls= "Http://foo.bar.com/image.qcow,"Image_urls+ = "Http://foo.bar.com/image2.qcow"Image_urls+ = "Http://mirrors.aliyun.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso"# CredentialsDatabase_password=passAdmin_password=passService_password=passService_token=passRabbit_password=pass# LoggingLOGFILE= $DEST/logs/stack.sh.loglogdays=1LogDir= $DEST/logsSYSLOG=trueSyslog_host= $HOST _ipSyslog_port=516VERBOSE=trueLog_color=trueScreen_logdir=/opt/stack/logs#Python Optionuse_venv=truePip_upgrade=trueproject_venv["Glance"]=${glance_dir}. venvproject_venv["Nova"]=${nova_dir}. venvproject_venv["Keystone"]=${keystone_dir}. venvproject_venv["Neutron"]=${neutron_dir}. venvproject_venv["Cinder"]=${cinder_dir}. venvproject_venv["Swift"]=${swift_dir}. venvproject_venv["Glance"]=${glance_dir}. venvproject_venv["Heat"]=${heat_dir}. Venvadditional_venv_packages= "Python-foo,python-bar"#Define default instance standardDefault_instance_type=m1.tiny#keystoneKeystone_token_format=uuidKeystone_use_mod_wsgi= "True"ENABLE_IDENTITY_V2=false# #vncenabled_services+=,n-spice,n-novnc,n-xvnc# #Glanceenabled_services+=,g-api.g-reg# #HeatHeat_branch=stable/mitakaenable_service H-eng h-api H-API-CFN H-API-CW H-engHeat_use_mod_wsgi= "True"# # SwiftSwift_branch=stable/mitakaenabled_services+=,s-proxy,s-object,s-container,s-accountSwift_replicas=1Swift_hash=011688b44136573e209eSwift_use_mod_wsgi= "True"# Enabling Neutron (network) ServiceDisable_service n-net# #Do not use Nova networkEnable_service q-svcenable_service q-agtenable_service q-dhcpenable_service q-l3enable_service q-metaenable_service Q-meteringenable_service Neutron# # Neutron OptionsQ_use_secgroup=trueFloating_range= "192.168.1.0/24"Fixed_range= "10.0.0.0/24"Q_floating_allocation_pool=start=192.168.1.10,end=192.168.1.20Public_network_gateway= "192.168.1.1"q_l3_enabled=truePublic_interface=eth0Q_use_providernet_for_public=trueOvs_physical_bridge=br-exPublic_bridge=br-exovs_bridge_mappings=public:br-ex# #VLAN configuration.Q_plugin=ml2Enable_tenant_vlans=true# #Cinderenabled_services+=,cinder,c-api,c-vol,c-sch,c-bakCinder_use_mod_wsgi= "True"Volume_group= "Stack-volumes"Volume_name_prefix= "volume-"volume_backing_file_size=10250m# #Ceilometerenabled_services+=,ceilometer-acomputer,ceilometer-acentral,ceilometer-collector,ceilometer-apienabled_services+=,ceilometer-alarm-notify,ceilometer-alarm-evalenabled_services+=,trove,tr-api,tr-tmgr,tc-cond#Apacheapache_enabled_services+=,keystone
6 Something

If the password is not specified in the initial profile,/stack.sh will let you enter it interactively. And the password is best written in front of the configuration file location, I try to write in the back of the position or will be the same prompt me to enter the password.
ENTER A PASSWORD to use for the DATABASE.
This value would be a written To/var/download/devstack/.localrc.password file so you don't have the to enter it
Again. Use only alphanumeric characters.
If you leave this blank, a random default value would be used.
Enter a password now:
Prompt to enter rabbit password:

ENTER A PASSWORD to use for RABBIT.

This value would be a written To/var/download/devstack/.localrc.password file so you don't have the to enter it
Again. Use only alphanumeric characters.
If you leave this blank, a random default value would be used.
Enter a password now:

Prompt to enter the service password:

ENTER A Service_password to use for the SERVICE authentication.

This value would be a written To/var/download/devstack/.localrc.password file so you don't have the to enter it
Again. Use only alphanumeric characters.
If you leave this blank, a random default value would be used.
Enter a password now:
Prompt for password for Keystone and horizon:

ENTER A PASSWORD to use for HORIZON and KEYSTONE (CHARS OR less).

This value would be a written To/var/download/devstack/.localrc.password file so you don't have the to enter it
Again. Use only alphanumeric characters.
If you leave this blank, a random default value would be used.
Enter a password now:

In short, the posture will not encounter a variety of Python-related problems. And the first time you've configured it, you'll also get a problem when you use the Clean.sh script to clear it up and configure it with different configuration items. (may not have been removed cleanly before?) )
For example:

This is me. Use the second deployment file to configure an error after the first configuration file is deployed successfully. Actually my pip is installed. For this I restore the snapshot to the initial location of the reconfiguration did not find such a problem.
Finally, a successful deployment:

Devstack single node environment actual combat configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.