OpenStack Newton no CentOS 7.2 – Packstack All-in-One

Openstack Newton

newton-logo

Neste tutorial irei abordar a instalação do OpenStack Newton através do Packstack All-in-One.

Ambiente:

1 – Máquina virtual (VirtualBox).
Rede vboxnet0 Modo Promíscuo (Permitir Tudo)
3 – Sistema Operacional virtual (CentOS 7.2 x64)

Passo 1 – Update do sistema operacional

# yum update -y

Passo 2 – Desabilitando o Selinux (ambiente de teste, em produção não recomendo)

# vim /etc/selinux/config
SELINUX=disabled

Passo 3 – Ajustando os serviços de inicialização de rede

Obs: Por questões de controle o OpenStack não funciona em sistemas que tenham o serviço Network Manager (NetworkManager) habilitado

# systemctl stop NetworkManager
# systemctl disable NetworkManager
# systemctl mask NetworkManager
# /sbin/chkconfig network on
# systemctl restart network

Passo 3 – Reboot da máquina virtual

# reboot

Passo 4 – Instalação dos pacotes para Openstack Newton

# yum install centos-release-openstack-newton.noarch -y
# yum update -y
# yum install openstack-packstack -y

Passo 5 – Gerando o arquivo de configuração para instalação do Openstack Newton

# packstack --gen-answer-file=/root/newton-answer.txt

Passo 6 – Alterando algumas configurações do arquivo de configuração newton-answer.txt

# vim /root/newton-answer.txt 

Incluindo na instalação o Manila (Responsável pelo sistema de arquivos compartilhado) e o Heat (Responsável pelo Load Balance)

  29 CONFIG_MANILA_INSTALL=n
para
  29 CONFIG_MANILA_INSTALL=y

  60 CONFIG_HEAT_INSTALL=n
para
  60 CONFIG_HEAT_INSTALL=y

Passo 6.1 – Definindo o tamanho do volume (Storage) do Cinder

# Create Cinder’s volumes group. This should only be done for testing
# on a proof-of-concept installation of Cinder. This will create a
# file-backed volume group and is not suitable for production usage.
CONFIG_CINDER_VOLUMES_CREATE=y

# Cinder’s volumes group size. Note that actual volume size will be
# extended with 3% more space for VG metadata.
CONFIG_CINDER_VOLUMES_SIZE=20G

Passo 7 – Instalando o OpenStack com o comando packstack

# packstack --answer-file=/root/newton-answer.txt

Após a instalação teremos algo como o exemplo abaixo:

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

Additional information:
 * 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 192.168.56.120. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://192.168.56.120/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * To use Nagios, browse to http://192.168.56.120/nagios username: nagiosadmin, password: 15a01664fdff41b6
 * Because of the kernel update the host 192.168.56.120 requires reboot.
 * The installation log file is available at: /var/tmp/packstack/20161214-175346-ePto9V/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20161214-175346-ePto9V/manifests

Passo 8 – Carregando o arquivo de senha do Openstack

# source /root/keystonerc_admin

Passo 9 – Ajustando a interface de rede para trabalhar como Bridge do tipo OVS (OpenVswitch)

# vim /etc/sysconfig/network-scripts/ifcfg-br1

Bridge

DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
OVSBOOTPROTO=none
IPADDR=192.168.56.120
NETMASK=255.255.255.0
GATEWAY=192.168.56.1
DNS1=208.67.220.220
ONBOOT=yes
# vim /etc/sysconfig/network-scripts/ifcfg-enp0s3

Física

DEVICE=enp0s3
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=br-ex
ONBOOT=yes
BOOTPROTO=none

Passo 10 – Reiniciando o serviço de rede

# systemctl restart network

Passo 11 -Instalando o pacote openstack-utils

# yum install openstack-utils -y

Passo 12 – Ajustando o tipo de virtualização:
Para KVM

# crudini --set /etc/nova/nova.conf libvirt virt_type kvm
# openstack-service restart nova

Para QEMU

# crudini --set /etc/nova/nova.conf libvirt virt_type qemu
# openstack-service restart nova
# systemctl restart libvirtd

Passo 13 – Verificando o estado do Openstack com o comando openstack-status

[root@openstack ~(keystone_admin)]# openstack-status
== Nova services ==
openstack-nova-api:                     active
openstack-nova-compute:                 active
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-cert:                    active
openstack-nova-conductor:               active
openstack-nova-console:                 inactive  (disabled on boot)
openstack-nova-consoleauth:             active
openstack-nova-xvpvncproxy:             inactive  (disabled on boot)
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:              active
== Keystone service ==
openstack-keystone:                     inactive  (disabled on boot)
== Horizon service ==
openstack-dashboard:                    active
== neutron services ==
neutron-server:                         active
neutron-dhcp-agent:                     active
neutron-l3-agent:                       active
neutron-metadata-agent:                 active
neutron-openvswitch-agent:              active
neutron-metering-agent:                 active
== Cinder services ==
openstack-cinder-api:                   active
openstack-cinder-scheduler:             active
openstack-cinder-volume:                active
openstack-cinder-backup:                active
== Ceilometer services ==
openstack-ceilometer-api:               inactive  (disabled on boot)
openstack-ceilometer-central:           active
openstack-ceilometer-compute:           active
openstack-ceilometer-collector:         active
openstack-ceilometer-notification:      active
== Heat services ==
openstack-heat-api:                     active
openstack-heat-api-cfn:                 active
openstack-heat-api-cloudwatch:          inactive  (disabled on boot)
openstack-heat-engine:                  active
== Support services ==
mariadb:                                active
openvswitch:                            active
dbus:                                   active
target:                                 active
rabbitmq-server:                        active
memcached:                              active

Passo 14 – Verificando o arquivo keystonerc_admin. Neste arquivo contém a senha do usuário admin

# cat /root/keystonerc_admin 
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD=a4dd23718791434d
    export OS_AUTH_URL=http://192.168.56.120:5000/v2.0
    export PS1='[\u@\h \W(keystone_admin)]\$ '
    
export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne
    [root@openstack ~(keystone_admin)]# 

Passo 15 – Resolvendo o problema de (Virtual Interface creation failed)

# vim /etc/nova/nova.conf
3265 vif_plugging_is_fatal=True
Para
3265 vif_plugging_is_fatal=false

3281 vif_plugging_timeout=300
Para
3281 vif_plugging_timeout=0

Passo 16 – Reiniciando o nova-compute

# openstack-service restart nova-compute

Passo 17 – Habilitando o httpd para iniciar no boot do sistema operacional

# systemctl enable httpd

OBS: Para verificar os logs do compute, basta ler o arquivo abaixo:

# tail -f /var/log/nova/nova-compute.log

Passo 18 – Configurando a rede do Openstack pelo Horizion

1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16

OpenStack Newton no CentOS 7.2 – Packstack All-in-One
Tagged on:

Deixe uma resposta

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

%d blogueiros gostam disto: