728x90
Centos 7 에서 Openstack 을 Packstack 방식으로 설치하는 방법을 기술한다.
Openstack Release 는 train 으로 한다.
권장 사양
종류 | 사양 |
---|---|
CPU | core 2개 이상 |
RAM | 8기가 이상 |
Storage | 40 기가 이상 |
준비
Host OS(Linux)
host OS 에서 가상화 가능여부 확인
egrep '(vmx|svm)' /proc/cpuinfo
출력이 없으면 openstack 설치 불가
KVM nested 설정
- host OS 에서 KVM nested를 설정해야 함
- host의 CPU가 AMD 인 경우
modprobe -r kvm_amd
modprobe kvm_amd nested=1
sudo vim /etc/modprobe.d/kvm.conf
options kvm_amd nested=1
cat /sys/module/kvm_amd/parameters/nested
Guest OS
disable EPEL
- 미리 설치가 되어있는 경우에는 제거해주어야 함
yum install disablerepo=epel
시스템 업데이트 혹은 패키지 업데이트를 자동으로 해주는 서비스 제거 혹은 종료
network 설정
systemctl disable --now NetworkManager
vi /etc/sysconfig/network
NOZEROCONF=yes
방화벽 설정
systemctl disable --now firewalld
yum install iptables-services
systemctl enable --now iptables
iptables -F
service iptables save
보안 설정
vi /etc/selinux/config
SELINUX=disabled
hostname 설정
hostnamectl set-hostname cent7
준비 확인
- 확인 방법, 원하는 결과
보안 확인
sestatus
SELinux status: disabled
hostname 확인
hostname
cent7
방화벽 확인
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
설치
yum install -y centos-release-openstack-train
yum install -y openstack-packstack
yum upgrade -y
- 설정 파일 생성
- 파일 이름: answer.txt
- 주의! 파일 내용 중 192.168.122.209 는 호스트의 IP 로 변경해야 한다.
[general]
# document ref : https://github.com/redhat-openstack/packstack/blob/master/docs/packstack.rst
# Global Options
CONFIG_SSH_KEY=/root/.ssh/id_rsa.pub
CONFIG_DEFAULT_PASSWORD=password
CONFIG_SERVICE_WORKERS=%{::processorcount}
CONFIG_MARIADB_INSTALL=y
CONFIG_GLANCE_INSTALL=y
CONFIG_CINDER_INSTALL=y
CONFIG_NOVA_INSTALL=y
CONFIG_NEUTRON_INSTALL=y
CONFIG_NEUTRON_METERING_AGENT_INSTALL=y
CONFIG_HORIZON_INSTALL=y
CONFIG_CLIENT_INSTALL=y
CONFIG_MANILA_INSTALL=n
CONFIG_SWIFT_INSTALL=n
CONFIG_CEILOMETER_INSTALL=n
CONFIG_AODH_INSTALL=n
CONFIG_PANKO_INSTALL=n
CONFIG_SAHARA_INSTALL=n
CONFIG_HEAT_INSTALL=n
CONFIG_MAGNUM_INSTALL=n
CONFIG_TROVE_INSTALL=n
CONFIG_IRONIC_INSTALL=n
CONFIG_AMQP_HOST=192.168.122.209
CONFIG_MARIADB_HOST=192.168.122.209
CONFIG_STORAGE_HOST=192.168.122.209
CONFIG_COMPUTE_HOSTS=192.168.122.209
CONFIG_NETWORK_HOSTS=192.168.122.209
CONFIG_KEYSTONE_LDAP_URL=ldap://192.168.122.209
CONFIG_REDIS_HOST=192.168.122.209
CONFIG_CONTROLLER_HOST=192.168.122.209
CONFIG_DEBUG_MODE=n
CONFIG_VMWARE_BACKEND=n
CONFIG_UNSUPPORTED=n
CONFIG_USE_SUBNETS=n
# SSL setup
CONFIG_SSL_CACERT_SELFSIGN=n
# Server Prepare Configs
CONFIG_ENABLE_RDO_TESTING=n
# RHEL config
CONFIG_RH_OPTIONAL=n
# AMQP Config parameters
CONFIG_AMQP_BACKEND=rabbitmq
CONFIG_AMQP_ENABLE_SSL=n
CONFIG_AMQP_ENABLE_AUTH=n
CONFIG_AMQP_AUTH_USER=amqp_user
# MariaDB Config parameters
CONFIG_MARIADB_USER=root
# Glance Config parameters
CONFIG_GLANCE_BACKEND=file
# CINDER
CONFIG_CINDER_VOLUMES_CREATE=y
CONFIG_CINDER_DB_PURGE_ENABLE=True
CONFIG_CINDER_BACKEND=lvm
CONFIG_CINDER_VOLUME_NAME=cinder-volumes
CONFIG_CINDER_VOLUMES_SIZE=20G
# NOVA
CONFIG_NOVA_MANAGE_FLAVORS=y
CONFIG_NOVA_DB_PURGE_ENABLE=True
CONFIG_NOVA_SCHED_CPU_ALLOC_RATIO=16.0
CONFIG_NOVA_SCHED_RAM_ALLOC_RATIO=1.5
CONFIG_NOVA_COMPUTE_MIGRATE_PROTOCOL=ssh
CONFIG_NOVA_LIBVIRT_VIRT_TYPE=%{::default_hypervisor}
# NEUTRON
CONFIG_NEUTRON_L3_EXT_BRIDGE=br-ex
CONFIG_NEUTRON_FWAAS=n
CONFIG_NEUTRON_VPNAAS=n
CONFIG_NEUTRON_ML2_TYPE_DRIVERS=geneve,flat
CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=geneve
CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=ovn
CONFIG_NEUTRON_ML2_FLAT_NETWORKS=*
CONFIG_NEUTRON_ML2_VNI_RANGES=10:100
CONFIG_NEUTRON_L2_AGENT=ovn
CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=extnet:br-ex
CONFIG_NEUTRON_OVS_EXTERNAL_PHYSNET=extnet
CONFIG_NEUTRON_OVS_VXLAN_UDP_PORT=4789
CONFIG_NEUTRON_OVN_BRIDGE_MAPPINGS=extnet:br-ex
CONFIG_NEUTRON_OVN_EXTERNAL_PHYSNET=extnet
# HORIZON
CONFIG_HORIZON_SSL=n
CONFIG_HORIZON_SECRET_KEY=0a27ee5bbac7406ba2464bc1fc0c80c9
# KEYSTONE
CONFIG_KEYSTONE_FERNET_TOKEN_ROTATE_ENABLE=True
CONFIG_KEYSTONE_REGION=RegionOne
CONFIG_KEYSTONE_ADMIN_TOKEN=fde1b41886374d2b87c7cb406a03bb4b
CONFIG_KEYSTONE_ADMIN_EMAIL=root@localhost
CONFIG_KEYSTONE_ADMIN_USERNAME=admin
CONFIG_KEYSTONE_API_VERSION=v3
CONFIG_KEYSTONE_TOKEN_FORMAT=FERNET
CONFIG_KEYSTONE_IDENTITY_BACKEND=sql
CONFIG_KEYSTONE_LDAP_QUERY_SCOPE=one
CONFIG_KEYSTONE_LDAP_PAGE_SIZE=-1
CONFIG_KEYSTONE_LDAP_USER_ENABLED_MASK=-1
CONFIG_KEYSTONE_LDAP_USER_ENABLED_DEFAULT=TRUE
CONFIG_KEYSTONE_LDAP_USER_ENABLED_INVERT=n
CONFIG_KEYSTONE_LDAP_USER_ALLOW_CREATE=n
CONFIG_KEYSTONE_LDAP_USER_ALLOW_UPDATE=n
CONFIG_KEYSTONE_LDAP_USER_ALLOW_DELETE=n
CONFIG_KEYSTONE_LDAP_GROUP_ALLOW_CREATE=n
CONFIG_KEYSTONE_LDAP_GROUP_ALLOW_UPDATE=n
CONFIG_KEYSTONE_LDAP_GROUP_ALLOW_DELETE=n
CONFIG_KEYSTONE_LDAP_USE_TLS=n
CONFIG_KEYSTONE_LDAP_TLS_REQ_CERT=demand
# Redis Config parameters
CONFIG_REDIS_PORT=6379
# Provisioning all-in-one ovs bridge config
CONFIG_PROVISION_OVS_BRIDGE=y
# Provisioning demo config
CONFIG_PROVISION_DEMO=n
CONFIG_PROVISION_TEMPEST=n
# Provisioning tempest config
CONFIG_RUN_TEMPEST=n
packstack --answer-file ./answer.txt
'편(編) > 설치' 카테고리의 다른 글
kubernetes 설치 - kubespray (0) | 2021.10.04 |
---|---|
gitlab 설치 (0) | 2021.09.20 |
podman 설치 (0) | 2021.09.14 |
nextcloud 설치 (0) | 2021.09.06 |
docker 설치 (0) | 2021.08.25 |