본문 바로가기
Openstack/Install Guide

Openstack Install Guide - Victoria - CentOS 7.8

by Miners1205 2023. 8. 10.
반응형

Openstack Install Guide(Victoria - CentOS)

  • CentOS 8.2 환경 기준 설치

 

1. OS 환경

1.1 CentOS 8.2

1.2 All-in-One 기준 구성

1.3 기본적으로 네트워크 외부 통신 연결 가능상태

1.4 네트워크 포토 최소 2~4개 필요

2. Openstack OS 기본 설정

  • 모든 서버에 같은 설정
  • 네트워크 서비스 기본 설정 완료 상태

 

2.1 기본 툴 설치

$ yum install vim net-tools -y          ### 기본 툴
$ yum install nfs-utils -y                 ### NAS 스토리지 연결시 필요

 

2.2 네트워크 설정

  • IPv6 중지 및 설정 확인
$ vim /etc/sysctl.conf 
net.ipv6.conf.all.disable_ipv6 = 1 
net.ipv6.conf.default.disable_ipv6 = 1 
net.ipv6.conf.lo.disable_ipv6 = 1

$ sysctl -p  
  • 방화벽 중지
$ systemctl stop firewalld
$ systemctl disable firewalld

2.3 SSH KEY 설정

  • 모든 서버 동시 수행
$ ssh-keygen -t rsa
$ ssh-copy-id root@{모든 서버}

 

2.4 SELINUX 비활성화

$ vim /etc/selinux/config

  SELINUX=disabled

$ reboot

 

2.5 Openvswitch 설치 및 패키지 설치

$ dnf install epel-release -y

$ dnf install python3-devel libffi-devel gcc openssl-devel python3-libselinux -y

$ dnf install python3-pip -y

$ pip3 install -U pip

$ dnf install ansible        ### (==2.9.18)  
### 2021.03.30 2.9.18 ansible version 설치
### 2021.07.02 2.9.23 ansible version 설치

$ pip3 install 'ansible==2.9.18'

### $ yum install -y centos-release-openstack-victoria  ### 참고
-> OVS 설치 레포

$ yum install -y openvswitch

$ modprobe ip_vs

$ modprobe ip6_tables

$ modprobe openvswitch

$ vi /etc/modules-load.d/ip_vs.conf 
   ip_vs 

$ vi /etc/modules-load.d/ip6_tables.conf 
   ip6_tables

$ systemctl enable openvswitch

$ systemctl start openvswitch

$ yum install network-scripts

### centos7 과 동일 하게 사용
$ service network start  

3. Openstack 설치 구성

3.1 Openstack 설치 패키지 구성

 

### kolla-ansible 구성 설치

### Openstack Victoria 버전 
$ pip3 install kolla-ansible==11.0.0   


### ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

### 에러 발생시 대처
$ pip3 install --ignore-installed PyYAML

$ mkdir -p /etc/kolla

$ cp -r /usr/local/share/kolla-ansible/etc_examples/kolla/* /etc/kolla

$ cp -r /usr/local/share/kolla-ansible/ansible/inventory/ /root/


$ vim /etc/ansible/ansible.cfg
 [defaults]
 host_key_checking=False
 pipelining=True
 forks=100

3.2 All-in-One 노드 설정

$ cd /root/inventory 

### localhost -> {hostname} 으로 변경
$ sed -i s/localhost/호스트네임/g all-in-one

$ vim /root/inventory/all-in-one
[control]
all01       ansible_connection=local

[network]
all01       ansible_connection=local

[compute]
all01       ansible_connection=local

[storage]
all01       ansible_connection=local

[monitoring]
all01       ansible_connection=local

[deployment]
all01       ansible_connection=local

 

3.3 Kolla globals.yml 파일 설정

**### All-in-One 경우**
$ vim /etc/kolla/globals.yml

kolla_base_distro: "centos"           ### Docker 운영체제 선택  
kolla_install_type: "source"          ### Source, binary 설치 선택 
openstack_release: "victoria"         ### openstack 선택

kolla_internal_vip_address: "10.10.10.10"      ### 관리 network VIP 입력, 관리 network가 따로 없는 경우에는 Internal network VIP  
kolla_external_vip_address: "192.168.0.XXX"  ### External Network VIP 
network_interface: "enp1s0f1"                  ### 내부 물리 NIC (internal network(data))
kolla_external_vip_interface: "enp1s0f0"       ### 외부 물리 NIC
api_interface: "enp1s0f2"                      ### 관리 NIC (관리 네트워크 없는 경우 =network_interface) 
octavia_network_interface: "enp1s0f0"          ### 외부 물리 NIC
neutron_external_interface: "enp1s0f0"         ### 외부 물리 NIC

# 사용할 서비스를 enable(주석 해제, yes)하면됨. 
enable_cinder: "yes"
enable_cinder_backup: "yes"
# enable_cinder_backend_lvm: "yes"  # cinder에 사용할 디스크가 lvm인 경우 yes
# enable_cinder_backend_nfs: "yes"  # cinder에 사용할 디스크가 nfs인 경우 yes
# enable_horizon_neutron_lbaas: "no"# Octavia 설치 시 no 
# enable_horizon_octavia: "yes"     # Octavia 설치 시 yes
# enable_mariabackup: "yes"         # mariadb 백업 기능 사용 시 yes 
# enable_neutron_lbaas: "yes"       # Octavia 설치 시 yes
enable_openstack_core: "yes"
enable_openvswitch: "no" 
glance_enable_rolling_upgrade: "no"
nova_compute_virt_type: "kvm"       # vmware 등 가상환경에 설치 시 qemu로 변경

# database_port: 33306              # mariadb port를 변경하고 싶은 경우    

################################
# Cinder - Block Storage Options
################################

# Cinder backup 디스크가 NFS 인 경우 수정
# Valid options are [ nfs, swift, ceph ]
cinder_backup_driver: "nfs"
cinder_backup_share: "NASIP:/nfs/cinder_backup"
cinder_backup_mount_options_nfs: "vers=3"

# 입력한 정보 확인
$ grep -vE '^$|^#' /etc/kolla/globals.yml

### Multinode 경우
$ vim /etc/kolla/globals.yml

###############
# Kolla options
############### 
kolla_base_distro: "centos"  //docker에 올릴 운영체제
kolla_install_type: "source":Lq
openstack_release: "stein"   //openstack 버전 이름

kolla_internal_vip_address: "172.16.0.250" # 관리 network VIP /관리 network가 따로 없는 경우에는 Internal network VIP를 입력
kolla_external_vip_address: "192.168.0.XXX" # External Network VIP

# Multimode 파일에 NIC 인터페이스를 정의하였으므로 설정할 필요 X


# 사용할 서비스를 enable(주석 해제, yes)하면됨. 
enable_cinder: "yes"
enable_cinder_backup: "yes"
# enable_cinder_backend_lvm: "yes"  //cinder에 사용할 디스크가 lvm인 경우 yes
# enable_cinder_backend_nfs: "yes"  // cinder에 사용할 디스크가 nfs인 경우 yes
# enable_horizon_neutron_lbaas: "no"//Octavia 설치 시 no 
# enable_horizon_octavia: "yes"     //Octavia 설치 시 yes
# enable_mariabackup: "yes"         //mariadb 백업 기능 사용 시 yes 
# enable_neutron_lbaas: "yes"       //Octavia 설치 시 yes
enable_openstack_core: "yes"
enable_openvswitch: "no" 
glance_enable_rolling_upgrade: "no"
nova_compute_virt_type: "kvm"       //vmware 등 가상환경에 설치 시 qemu로 변경


################################
# Cinder - Block Storage Options
################################

# Cinder backup 디스크가 NFS 인 경우 수정
# Valid options are [ nfs, swift, ceph ]
cinder_backup_driver: "nfs"
cinder_backup_share: "NASIP:/nfs/cinder_backup"
cinder_backup_mount_options_nfs: "vers=3"

3.4 Kolla Password 설정

$ kolla-genpwd


### Openstack 서비스들의 암호를 설정하는것
$ vim /etc/kolla/passwords.yml
Database_password: openstack ### MariaDB 접속 암호 설정
Keystone_admin_password: openstack ### Horizon 접속 암호 설정


### 하단 Octavia 설치시 암호 설정
Octavia_ca_password: openstack
Octavia_database_password: openstack
Octavia_keystone_password: openstack

### 추가 서비스들에 대하여 변경하여 사용 필요.

3.5 Cinder Volume 구성

$ pvcreate /dev/sdb1

### cinder-volumes 명칭으로 구성해야한다. 명칭 변경시 하단 변경 필요
$ vgcreate cinder-volumes /dev/sdb1

3.6 Openstack 설치

$ cd ~/inventory 

### All-in-One인 경우
$ kolla-ansible -i all-in-one bootstrap-servers 
$ kolla-ansible -i all-in-one prechecks -vvv 
$ kolla-ansible -i all-in-one deploy -vvv

###  MultiNode인 경우
$ kolla-ansible -i multinode bootstrap-servers
$ kolla-ansible -i multinode prechekcs -vvv
$ kolla-ansible -i multinode deploy -vvv
$ mount /dev/sdb /var/lib/docker/volumes/nova_compute/_data/instances

### 내부 디스크 사용시 instances 권한 42436으로 변경 필요
$ chown 42436:42436 /var/lib/docker/volumes/nova_compute/_data/instances

 

  • Openstack CLI 설치
$ kolla-ansible post-deploy
$ pip install python-openstackclient

$ openstack --version
$ source /etc/kolla/admin-openrc.sh

 

  • Openstack Configuration
Openstack Router Failover

# vim /etc/kolla/neutron-l3-agent/neutron.conf
[Default]
allow_automatic_l3agent_failover = true

Openstack dnsmasq MTU 값 조정
# vim /etc/kolla/neutron-dhcp-agent/dnsmasq.conf
log-facility=/var/log/kolla/neutron/dnsmasq.log
dhcp-option-force=option:mtu,1400

# docker restart neutron_dhcp_agent

 

반응형