官术网_书友最值得收藏!

Initial steps

Before we can install OpenStack, some work must be done to prepare the system for a successful installation.

Updating the system

Before packages can be downloaded, run the following apt-get command to update package lists on all hosts:

# apt-get update

Permissions

OpenStack services can be installed either as root or as a user with sudo permissions. The latter may require that the user be added to the sudoers file on each host. For tips on configuring sudoers, visit https://help.ubuntu.com/community/RootSudo.

Note

For this installation, all commands should be run as root, unless specified otherwise.

Configuring the OpenStack repository

Installation of OpenStack on Ubuntu 14.04 LTS uses packages from the Ubuntu Cloud Archive repository when installing versions of OpenStack that are newer than what the operating system shipped with. To enable the Cloud Archive repository, download and install the Ubuntu-cloud-keyring package on all hosts:

# apt-get install ubuntu-cloud-keyring

Once installed, the Kilo repository should be added to apt sources on all hosts:

# cat > /etc/apt/sources.list.d/cloudarchive-kilo.list <<EOF
deb http://ubuntu-cloud.archive.canonical.com/ubuntu trusty-updates/kilo main
EOF

Note

The deb statement should be on one line, but is line-wrapped in this example.

Installing OpenStack utilities

The crudini utility is used throughout this book to make the configuration of various services easier and consistent. This utility overwrites or adds individual configuration settings without overwriting the entire file. The following command installs crudini and other required tools:

# apt-get install crudini curl

Setting the hostnames

Before installing OpenStack, be sure that each node in the environment has been configured with its proper hostname. Use the hostnamectl command on each host to set the hostname accordingly:

  • For controller01, use:
    hostnamectl set-hostname controller01.learningneutron.com
    
  • For compute01, use:
    hostnamectl set-hostname compute01.learningneutron.com
    
  • For compute02, use:
    hostnamectl set-hostname compute02.learningneutron.com
    

To simplify communication between hosts, it is recommended that you use DNS or a local name resolver to resolve host names. Using a text editor, update the /etc/hosts file on each node to include the management IP address and hostname of all nodes:

10.254.254.100 controller01.learningneutron.com controller01
10.254.254.101 compute01.learningneutron.com compute01
10.254.254.102 compute02.learningneutron.com compute02

Installing and configuring Network Time Protocol

A time synchronization program, such as NTP, is a requirement, as OpenStack services depend on consistent and synchronized time between hosts. For Nova Compute, having synchronized time helps avoid problems when scheduling VM launches on compute nodes. Other services can experience similar issues when the time is not synchronized.

To install NTP, issue the following commands on all nodes in the environment:

# apt-get install ntp

Upgrading the system

Before installing OpenStack, it is imperative that the kernel and other system packages on each node be upgraded to the latest version provided by Ubuntu for the 14.04 LTS release. Issue the following apt-get commands on each node, followed by a reboot to allow the changes to take effect:

# apt-get update
# apt-get dist-upgrade
# reboot
主站蜘蛛池模板: 宁远县| 逊克县| 宁化县| 桓台县| 普格县| 绥中县| 柯坪县| 庄浪县| 建阳市| 石家庄市| 昭苏县| 孝义市| 老河口市| 乌拉特前旗| 喀喇沁旗| 剑河县| 中西区| 安达市| 河曲县| 云阳县| 巍山| 集贤县| 乳山市| 永仁县| 阳城县| 如东县| 嘉荫县| 洞头县| 广水市| 金堂县| 苍溪县| 凯里市| 噶尔县| 石门县| 察雅县| 土默特右旗| 乐至县| 垫江县| 康保县| 库尔勒市| 奎屯市|