Water's Home

Just another Life Style

0%

Install RabbitMQ

[root@controller ~]# yum install erlang -y
[root@controller ~]# yum install rabbitmq-server -y

Start RabbitMQ Service

[root@controller ~]# systemctl enable rabbitmq-server.service
[root@controller ~]# systemctl restart rabbitmq-server.service
[root@controller ~]# systemctl status rabbitmq-server.service

List RabbitMQ Service

[root@controller ~]# systemctl list-unit-files grep rabbitmq-server.service
rabbitmq-server.service enable

Configure RabbitMQ

[root@controller ~]# rabbitmqctl add_user openstack password
[root@controller ~]# rabbitmqctl set_permissions openstack “.*“ “.*“ “.*“
[root@controller ~]# rabbitmqctl set_user_tags openstack administrator
[root@controller ~]# rabbitmqctl list_users

Check The Status

[root@controller ~]# netstat -ntlp grep 5672
tcp 0 0 0.0.0.0:15672 0.0.0.0:* LISTEN 1025/beam
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 1025/beam
tcp6 0 0 :::5672 :::* LISTEN 1025/beam

List Plugin

[root@controller ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins list
[E] amqp_client 3.3.5
[ ] cowboy 0.5.0-rmq3.3.5-git4b93c2d
[ ] eldap 3.3.5-gite309de4
[E] mochiweb 2.7.0-rmq3.3.5-git680dba8
[ ] rabbitmq_amqp1_0 3.3.5
[ ] rabbitmq_auth_backend_ldap 3.3.5
[ ] rabbitmq_auth_mechanism_ssl 3.3.5
[ ] rabbitmq_consistent_hash_exchange 3.3.5
[ ] rabbitmq_federation 3.3.5
[ ] rabbitmq_federation_management 3.3.5
[E] rabbitmq_management 3.3.5
[E] rabbitmq_management_agent 3.3.5
[ ] rabbitmq_management_visualiser 3.3.5
[ ] rabbitmq_mqtt 3.3.5
[ ] rabbitmq_shovel 3.3.5
[ ] rabbitmq_shovel_management 3.3.5
[ ] rabbitmq_stomp 3.3.5
[ ] rabbitmq_test 3.3.5
[ ] rabbitmq_tracing 3.3.5
[E] rabbitmq_web_dispatch 3.3.5
[ ] rabbitmq_web_stomp 3.3.5
[ ] rabbitmq_web_stomp_examples 3.3.5
[ ] sockjs 0.3.4-rmq3.3.5-git3132eb9
[E] webmachine 1.10.3-rmq3.3.5-gite9359c7

Enable Plugin

[root@controller ~]# /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management mochiweb webmachine rabbitmq_web_dispatch amqp_client rabbitmq_management_agent

Restart RabbitMQ Service

[root@controller ~]# systemctl restart rabbitmq-server

Now, Take the Browser

img/rabbitMQ_login.png) 

username/password :

guest/guest openstack/password

Install MariaDB

[root@controller ~]# yum install mariadb mariadb-server -y

Configure MariaDB For OpenStack

[root@controller ~]# cat /etc/my.cnf.d/mariadb-openstack.cnf
[mysqld]
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = ‘SET NAMES utf8’
character-set-server = utf8
bind-address = 10.1.1.61

Start MariaDB Service

[root@controller ~]# systemctl enable mariadb.service
[root@controller ~]# systemctl restart mariadb.service
[root@controller ~]# systemctl status mariadb.service

List MariaDB Service

[root@controller ~]# systemctl list-unit-files grep mariadb.service
mariadb.service enabled

MariaDB Installation

[root@controller ~]# mysql_secure_installation

[root@controller ~]# mysql -u root -p

Create Database For OpenStack

CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone‘@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone‘@’%’ IDENTIFIED BY ‘password’;

CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO ‘glance‘@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON glance.* TO ‘glance‘@’%’ IDENTIFIED BY ‘password’;

CREATE DATABASE nova;
CREATE DATABASE nova_api;
CREATE DATABASE nova_cell0;

GRANT ALL PRIVILEGES ON nova.* TO ‘nova‘@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON nova.* TO ‘nova‘@’%’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON nova_api.* TO ‘nova‘@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON nova_api.* TO ‘nova‘@’%’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON nova_cell0.* TO ‘nova‘@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON nova_cell0.* TO ‘nova‘@’%’ IDENTIFIED BY ‘password’;
FLUSH PRIVILEGES;

CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@’localhost’ IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron‘@’%’ IDENTIFIED BY ‘password’;

CentOS 7.4 Minimum Install

Firewalls Configure

[root@controller ~]# systemctl stop firewalld.service
[root@controller ~]# systemctl disable firewalld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.

Install Tools

[root@controller ~]# yum install net-tools wget vim ntpdate bash-completion -y

Network Configure

external:9.1.1.0/24 admin manage:10.1.1.0/24 tunnel:10.2.2.0/24 internet:10.0.2.0/24

Controller:

List all the network adapter:

[root@controller ~]# ls -al /etc/sysconfig/network-scripts/ifcfg-*
-rw-r–r–. 1 root root 284 Oct 16 02:13 /etc/sysconfig/network-scripts/ifcfg-enp0s10
-rw-r–r– 1 root root 347 Oct 26 22:42 /etc/sysconfig/network-scripts/ifcfg-enp0s3
-rw-r–r– 1 root root 365 Oct 19 03:27 /etc/sysconfig/network-scripts/ifcfg-enp0s8
-rw-r–r– 1 root root 365 Oct 19 03:28 /etc/sysconfig/network-scripts/ifcfg-enp0s9
-rw-r–r–. 1 root root 254 May 3 2017 /etc/sysconfig/network-scripts/ifcfg-lo

Update the 1st network adapter:

[root@controller ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s3
HWADDR=08:00:27:6a:0e:c6
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s3
UUID=213e8c02-7e99-4380-a080-a845923d5088
DEVICE=enp0s3
ONBOOT=yes
IPADDR=9.1.1.61
NETMASK=255.255.255.0

Update the 2nd network adapter:

[root@controller ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
HWADDR=08:00:27:01:4e:3a
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s8
UUID=edaf67ed-cc12-41a3-97aa-b71a497d7ac0
DEVICE=enp0s8
ONBOOT=yes
IPADDR=10.1.1.61
NETMASK=255.255.255.0
GATEWAY=10.1.1.1

Update the 3rd network adapter:

[root@controller ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s9
HWADDR=08:00:27:66:23:8c
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s9
UUID=7f5ab86f-efb6-4a93-b09a-af2fe80ea347
DEVICE=enp0s9
ONBOOT=yes
IPADDR=10.2.2.61
NETMASK=255.255.255.0
GATEWAY=10.2.2.1

Update the 4th network adapter:

[root@controller ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s10
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s10
UUID=ad48bc1f-4e7b-4643-b35a-f6cd457a75a0
DEVICE=enp0s10
ONBOOT=yes

Compute:

List all the network adapter:

[root@compute ~]# ls -al /etc/sysconfig/network-scripts/ifcfg-*
-rw-r–r–. 1 root root 284 Oct 16 02:13 /etc/sysconfig/network-scripts/ifcfg-enp0s10
-rw-r–r– 1 root root 365 Oct 18 12:35 /etc/sysconfig/network-scripts/ifcfg-enp0s8
-rw-r–r– 1 root root 365 Oct 18 12:36 /etc/sysconfig/network-scripts/ifcfg-enp0s9
-rw-r–r–. 1 root root 254 May 3 2017 /etc/sysconfig/network-scripts/ifcfg-lo

Update the 1st network adapter:

[root@compute ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
HWADDR=08:00:27:b8:bd:60
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s8
UUID=edaf67ed-cc12-41a3-97aa-b71a497d7ac0
DEVICE=enp0s8
ONBOOT=yes
IPADDR=10.1.1.62
NETMASK=255.255.255.0
GATEWAY=10.1.1.1

Update the 2nd network adapter:

[root@compute ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s9
HWADDR=08:00:27:42:5a:df
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s9
UUID=7f5ab86f-efb6-4a93-b09a-af2fe80ea347
DEVICE=enp0s9
ONBOOT=yes
IPADDR=10.2.2.62
NETMASK=255.255.255.0
GATEWAY=10.2.2.1

Update the 3rd network adapter:

[root@compute ~]# cat /etc/sysconfig/network-scripts/ifcfg-enp0s10
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp0s10
UUID=ad48bc1f-4e7b-4643-b35a-f6cd457a75a0
DEVICE=enp0s10
ONBOOT=yes

Update hostname

Controller:

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

Compute:

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

Controller & Compute:

[root@controller ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.1.1.61 controller
10.1.1.62 compute

synchronize system time ( important)

[root@controller ~]# yum install ntp -y
[root@controller ~]# systemctl enable ntpd && systemctl restart ntpd
[root@controller ~]# ntpq -p
[root@controller ~]# date

Environment

 Intel Core i7 processor

16GB memory

512GB storage

For example:

 15-inch MacBook Pro 2017:

Touch Bar and Touch ID

2.9GHz Processor 

512GB Storage

2.9GHz quad-core 7th-generation Intel Core i7 processor

Turbo Boost up to 3.9GHz

16GB 2133MHz LPDDR3 memory

512GB SSD storage1

Radeon Pro 560 with 4GB memory

Four Thunderbolt 3 ports

Touch Bar and Touch ID

Virtual Box for OpenStack Requirement

1 * Controller:

Memory : 8G

Storage : 256G

Network : 4 (extenel, admin, tunnel, net)

 

1 * Compute:

Memory : 4G

Storage : 256G

Network : 3 (admin, tunnel, net)

    

Summary for the impatient

[root@localhost ~]# yum install -y centos-release-openstack-pike
[root@localhost ~]# yum update -y
[root@localhost ~]# yum install -y openstack-packstack
[root@localhost ~]# packstack –allinone

The Log

Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20171018-213803-Gj17Wj/openstack-setup.log
Packstack changed given value to required value /root/.ssh/id_rsa.pub

Installing:

Clean Up [ DONE ]
Discovering ip protocol version [ DONE ]
Setting up ssh keys [ DONE ]
Preparing servers [ DONE ]
Pre installing Puppet and discovering hosts’ details [ DONE ]
Preparing pre-install entries [ DONE ]
Setting up CACERT [ DONE ]
Preparing AMQP entries [ DONE ]
Preparing MariaDB entries [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries [ DONE ]
Preparing Glance entries [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries [ DONE ]
Preparing Nova API entries [ DONE ]
Creating ssh keys for Nova migration [ DONE ]
Gathering ssh host keys for Nova migration [ DONE ]
Preparing Nova Compute entries [ DONE ]
Preparing Nova Scheduler entries [ DONE ]
Preparing Nova VNC Proxy entries [ DONE ]
Preparing OpenStack Network-related Nova entries [ DONE ]
Preparing Nova Common entries [ DONE ]
Preparing Neutron LBaaS Agent entries [ DONE ]
Preparing Neutron API entries [ DONE ]
Preparing Neutron L3 entries [ DONE ]
Preparing Neutron L2 Agent entries [ DONE ]
Preparing Neutron DHCP Agent entries [ DONE ]
Preparing Neutron Metering Agent entries [ DONE ]
Checking if NetworkManager is enabled and running [ DONE ]
Preparing OpenStack Client entries [ DONE ]
Preparing Horizon entries [ DONE ]
Preparing Swift builder entries [ DONE ]
Preparing Swift proxy entries [ DONE ]
Preparing Swift storage entries [ DONE ]
Preparing Gnocchi entries [ DONE ]
Preparing MongoDB entries [ DONE ]
Preparing Redis entries [ DONE ]
Preparing Ceilometer entries [ DONE ]
Preparing Aodh entries [ DONE ]
Preparing Puppet manifests [ DONE ]
Copying Puppet modules and manifests [ DONE ]
Applying 192.168.78.134_controller.pp
192.168.78.134_controller.pp: [ DONE ]
Applying 192.168.78.134_network.pp
192.168.78.134_network.pp: [ DONE ]
Applying 192.168.78.134_compute.pp
192.168.78.134_compute.pp: [ DONE ]
Applying Puppet manifests [ DONE ]
Finalizing [ DONE ]

**** Installation completed successfully ******

Additional information:
* A new answerfile was created in: /root/packstack-answers-20171018-213808.txt
* Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
* Warning: NetworkManager is active on 192.168.78.134. OpenStack networking currently does not work on systems that have the Network Manager service enabled.
* File /root/keystonerc_admin has been created on OpenStack client host 192.168.78.134. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://192.168.78.134/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* Because of the kernel update the host 192.168.78.134 requires reboot.
* The installation log file is available at: /var/tmp/packstack/20171018-213803-Gj17Wj/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20171018-213803-Gj17Wj/manifests
You have new mail in /var/spool/mail/root

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!