Packstack is primarily a tool for rapid deployment of proof-of-concept (PoC) environments from Redhat.
Packstack is a command line tool that uses Python to encapsulate the Puppet module to deploy OpenStack on a server via SSH, using Packstack to quickly deploy a set of OpenStack environments. It is suitable for beginners to experience the features of OpenStack and get familiar with the basic OpenStack commands. However, since the technical details are hidden, you need to check the official OpenStack documentation carefully and then install each OpenStack component step by step manually to deepen your understanding of OpenStack.
OpenStack and CentOS compatibility
OpenStack |
RedHat6/CentOS6 |
RedHat7/CentOS7 |
RedHat8/CentOS8 |
RedHat9/CentOS9 |
Diablo |
√ |
× |
x |
x |
Essex |
√ |
× |
x |
x |
Folsom |
√ |
× |
x |
x |
Grizzly |
√ |
× |
x |
x |
Havana |
√ |
× |
x |
x |
Icehouse |
√ |
√ |
x |
x |
Juno |
x |
√ |
x |
x |
Kilo |
x |
√ |
x |
x |
Liberty |
x |
√ |
x |
x |
Mitaka |
x |
√ |
x |
x |
Newton |
x |
√ |
x |
x |
Ocata |
x |
√ |
x |
x |
Pike |
x |
√ |
x |
x |
Queens |
x |
√ |
x |
x |
Rocky |
x |
√ |
x |
x |
Stein |
x |
√ |
x |
x |
Train |
x |
√ |
√ |
x |
Ussuri |
x |
x |
√ |
x |
Victoria |
x |
x |
√ |
x |
Wallaby |
x |
x |
√ |
x |
Xena |
x |
x |
√ |
x |
Yoga |
x |
x |
√ |
√ |
Zed |
x |
x |
x |
√ |
Environment
Hostname |
Configuration |
Operating System |
IP Address |
OpenStack Version |
Remarks |
allinone |
4 Cores 8G |
CentOS7.9 (Minimal Installation) |
10.211.55.4 |
Rocky |
Enabling Nested Virtualization |
System initialization
1
|
hostnamectl set-hostname allinone
|
Add host resolution
1
2
3
|
cat >> /etc/hosts << EOF
10.211.55.4 allinone
EOF
|
Shut down the NetworkManager service
1
2
|
systemctl stop NetworkManager
systemctl disable NetworkManager
|
Stop the firewall
1
2
|
systemctl stop firewalld
systemctl disable firewalld
|
Shut down selinux
1
2
3
|
setenforce 0
sed -i "s/^SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
reboot
|
Installing software libraries
Update the installed packages.
Install the RDO library.
1
|
yum install https://rdo.fedorapeople.org/rdo-release.rpm
|
Note: The latest version of OpenStack Train is supported on CentOS7, so the above command installs the RDO library of OpenStack Train version, if you want to install the previous version of OpenStack, you can visit https://repos.fedorapeople.org/repos/openstack/ to find the rpm file for the corresponding version. For example, if you want to install OpenStack Rocky version in this article, the installation command is as follows.
1
|
yum install https://repos.fedorapeople.org/repos/openstack/openstack-rocky/rdo-release-rocky-2.noarch.rpm
|
Install Packstack
1
|
yum install openstack-packstack -y
|
Install OpenStack
Quick Run
Execute the following command to deploy all services on the local machine.
Note: You can query the command parameters by executing packstack --help
, and select which services to install and specify some configurations according to the actual situation. The following are the commands I use to eliminate some non-required services and add external NIC configuration parameters, where the NIC name of the os-neutron-ovs-bridge-interfaces
parameter needs to be modified according to the actual environment
1
|
packstack --allinone --os-swift-install=n --os-aodh-install=n --os-heat-install=n --os-heat-cfn-install=n --os-ceilometer-install=n --provision-demo=n --provision-tempest=n --os-neutron-ovs-bridge-mappings=extnet:br-ex --os-neutron-ovs-bridge-interfaces=br-ex:eth0
|
Run non-interactively
Use the following command to generate an answer file
.
1
|
packstack --gen-answer-file=config.txt
|
Edit the answer file
file, each configuration item contains detailed instructions, for example, we don’t want to install glance, just set CONFIG_GLANCE_INSTALL
to n
.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
[general]
# Path to a public key to install on servers. If a usable key has not
# been installed on the remote servers, the user is prompted for a
# password and this key is installed so the password will not be
# required again.
CONFIG_SSH_KEY=/root/.ssh/id_rsa.pub
# Default password to be used everywhere (overridden by passwords set
# for individual services or users).
CONFIG_DEFAULT_PASSWORD=
# The amount of service workers/threads to use for each service.
# Useful to tweak when you have memory constraints. Defaults to the
# amount of cores on the system.
CONFIG_SERVICE_WORKERS=%{::processorcount}
# Specify 'y' to install MariaDB. ['y', 'n']
CONFIG_MARIADB_INSTALL=y
# Specify 'y' to install OpenStack Image Service (glance). ['y', 'n']
CONFIG_GLANCE_INSTALL=y
......
|
Run the following command under the terminal to specify the appropriate configuration file.
1
|
packstack --answer-file=config.txt
|
The prompt **** Installation completed successfully ******
will appear after a successful installation, similar to the following.
1
2
3
4
5
6
7
8
9
10
|
**** Installation completed successfully ******
Additional information:
* A new answerfile was created in: /root/packstack-answers-20230131-235826.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* File /root/keystonerc_admin has been created on OpenStack client host 10.211.55.4. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://10.211.55.4/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* The installation log file is available at: /var/tmp/packstack/20230131-235826-wDHV9o/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20230131-235826-wDHV9o/manifests
|
Visit http://10.211.55.4/dashboard
to open the OpenStack Dashboard, and the login password is available in /root/keystonerc_admin
.
Ref
https://www.bookstack.cn/read/deployopenstackwithpuppet/deployment_tool-packstack.md
https://blog.csdn.net/Q0717168/article/details/114156717
https://www.rdoproject.org/install/packstack/