본문 바로가기
openstack

centos8 openstack 설치

by Knowledge Store In Hyunsoft 2020. 9. 14.
firewall-cmd --permanent --add-masquerade
firewall-cmd --permanent --add-port=8080/tcp
firewall-cmd --permanent --add-port=80/tcp

트러블슈팅

apt-get autoremove --purge libapache2-mod-proxy-uwsgi

apt install libopenmpi-dev
pip3 install mpi4py
pip3 install heat


#daum으로 repo 수정
sed -i 's/kr.archive.ubuntu.com/ftp.daumkakao.com/g' /etc/apt/sources.list
sed -i 's/archive.ubuntu.com/ftp.daumkakao.com/g' /etc/apt/sources.list
sed -i 's/security.ubuntu.com/ftp.daumkakao.com/g' /etc/apt/sources.list



sudo apt update
sudo apt upgrade -y
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install python3-dev -y

sudo useradd -s /bin/bash -d /opt/stack -m stack

echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack

 #네트워크 수정 우분투 18.4
 vi /etc/netplan/50-cloud-init.yaml
 netplan apply
 
 
 
 ml2_vxlan_endpoints
 
 
 
 
#Stderr: '  Volume group "stack-volumes-lvmdriver-1" not found\n  Cannot process volume group stack-volumes-lvmdriver-1\n'
결과 /dev/loop0

losetup -f --show /opt/stack/data/stack-volumes-lvmdriver-1-backing-file
 
 sudo vgcreate stack-volumes-lvmdriver-1 /dev/loop0
 
 
 host_ip를 잘못 입력하는 경우 etcd 정보가 잘못되어서 스타트 실패함.
 
 
 우분투 미러
 https://yyman.tistory.com/1365

1. yum 사전 설치

yum install -y wget
yum install -y gcc
yum install -y python3-six
yum install -y httpd
yum groups install "Development Tools"
yum install -y debootstrap

dnf config-manager --enable PowerTools

pip install pmutt --ignore-installed PyYAML

sudo pip install --upgrade pip


source /etc/apache2/envvars
apt-get remove --purge libapache2-mod-wsgi
apt-get install libapache2-mod-wsgi
pip install mod_proxy_uwsgi

#apt-get autoremove --purge libapache2-mod-proxy-uwsgi
apt-get install libapache2-mod-proxy-uwsgi
yum install -y git
yum install -y rsyslog
yum update -y
dnf install -y redhat-lsb-core
dnf config-manager --set-enabled PowerTools
dnf install -y epel-release
dnf config-manager --save --setopt=includepkgs=debootstrap,dpkg epel
dnf -y install https://rdoproject.org/repos/rdo-release.el8.rpm
dnf makecache --timer
yum install -y bzip2
yum update
dnf -y update
dnf install -y python36 python36-devel
dnf reinstall -y acl
dnf reinstall -y bc
dnf reinstall -y conntrack-tools
dnf reinstall -y cryptsetup
dnf reinstall -y curl
dnf reinstall -y dbus
dnf reinstall -y debootstrap
dnf reinstall -y dnsmasq
dnf reinstall -y dnsmasq-utils
dnf reinstall -y dosfstools
dnf reinstall -y ebtables
dnf reinstall -y gawk
dnf reinstall -y gcc
dnf reinstall -y gcc-c++
dnf reinstall -y genisoimage
dnf reinstall -y gettext
dnf reinstall -y git-core
dnf reinstall -y golang
dnf reinstall -y graphviz
dnf reinstall -y haproxy
dnf reinstall -y httpd
dnf reinstall -y httpd-devel
dnf reinstall -y ipset
dnf reinstall -y iptables
dnf reinstall -y iptables-services
dnf reinstall -y iputils
dnf reinstall -y iscsi-initiator-utils
dnf reinstall -y java-1.8.0-openjdk-headless
dnf reinstall -y keepalived
dnf reinstall -y kernel-modules
dnf reinstall -y kpartx
dnf reinstall -y libffi-devel
dnf reinstall -y libjpeg-turbo-devel
dnf reinstall -y libosinfo
dnf reinstall -y libxml2-devel
dnf reinstall -y libxslt-devel
dnf reinstall -y libyaml-devel
dnf reinstall -y lsscsi
dnf reinstall -y lvm2
dnf reinstall -y memcached
dnf reinstall -y mod_ssl
dnf reinstall -y net-tools
dnf reinstall -y openssh-server
dnf reinstall -y openssl
dnf reinstall -y openssl-devel
dnf reinstall -y parted
dnf reinstall -y pcp-system-tools
dnf reinstall -y pcre-devel
dnf reinstall -y pkgconfig
dnf reinstall -y polkit
dnf reinstall -y postgresql-devel
dnf reinstall -y psmisc
dnf reinstall -y python3-devel
dnf reinstall -y python3-pip
dnf reinstall -y qemu-img
dnf reinstall -y redhat-rpm-config
dnf reinstall -y rsyslog
dnf reinstall -y sg3_utils
dnf reinstall -y sqlite
dnf reinstall -y sudo
dnf reinstall -y sysfsutils
dnf reinstall -y systemd-devel
dnf reinstall -y tar
dnf reinstall -y targetcli
dnf reinstall -y tcpdump
dnf reinstall -y unzip
dnf reinstall -y util-linux
dnf reinstall -y wget
dnf reinstall -y which
dnf reinstall -y zlib-devel
dnf install -y iptables-services
dnf install -y rabbitmq-server
dnf install -y mariadb-server mariadb-devel
dnf install -y radvd
dnf install -y openvswitch
dnf install -y uwsgi uwsgi-plugin-python3
dnf install -y targetcli
dnf install -y qemu-kvm
dnf install -y libvirt libvirt-devel
dnf install -y httpd python3-mod_wsgi
dnf install -y qemu-kvm
dnf install -y python3-nose
dnf install -y httpd python3-mod_wsgi
dnf install -y sqlite-devel openldap-devel
dnf makecache --timer
dnf -y reinstall python3-six
dnf -y reinstall python3-decorator
git clone https://github.com/openstack-dev/devstack.git

local.conf

[[local|localrc]]
#PASSWORD CONFIGURATION
ADMIN_PASSWORD=root
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

# USB LAN CARD IP ADDRESS
HOST_IP=192.168.77.4
FLAT_INTERFACE=eno3

FLOATING_RANGE=192.168.101.0/24
#COMPUTE NODE
MULTI_HOST=True

GIT_BASE=https://opendev.org

enable_service s-proxy s-object s-container s-account
enable_plugin heat https://git.openstack.org/openstack/heat
enable_plugin heat-dashboard https://git.openstack.org/openstack/heat-dashboard.git

enable_service h-eng h-api h-api-cfn h-api-cw heat-dashboard

# Neutron
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron
ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api
#NEUTRON_CREATE_INITIAL_NETWORKS=False

#Octavia
enable_plugin octavia https://opendev.org/openstack/octavia
enable_plugin octavia-dashboard https://opendev.org/openstack/octavia-dashboard.git

[[local|localrc]]
#PASSWORD CONFIGURATION
ADMIN_PASSWORD=root
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

# USB LAN CARD IP ADDRESS
HOST_IP=192.168.117.200
# MANUAL INTERFACE NAME
FLAT_INTERFACE=eno3

FLOATING_RANGE=192.168.117.0/24
FIXED_RANGE=10.10.10.0/20
FIXED_NETWORK_SIZE=256

#PASSWORD CONFIGURATION
ADMIN_PASSWORD=root
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

#COMPUTE NODE
MULTI_HOST=True

#LOG CONFIGURATION
LOGFILE=/opt/stack/devstack.log
LOGDAYS=2
LOG_COLOR=True

# Nova
ENABLED_SERVICES+=,n-api,n-crt,n-cpu,n-cond,n-sch,n-api-meta,n-sproxy
ENABLED_SERVICES+=,placement-api,placement-client

# Glance
ENABLED_SERVICES+=,g-api,g-reg

# Neutron
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron
ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api
#NEUTRON_CREATE_INITIAL_NETWORKS=False

# Tempest
ENABLED_SERVICES+=,tempest
ENABLED_SERVICES+=,barbican

#Octavia
enable_plugin octavia https://opendev.org/openstack/octavia stable/ussuri
enable_plugin octavia-dashboard https://opendev.org/openstack/octavia-dashboard.git stable/ussuri
#enable_plugin octavia https://opendev.org/openstack/octavia
#enable_plugin octavia-dashboard https://opendev.org/openstack/octavia-dashboard.git


#heat
enable_service h-eng h-api h-api-cfn h-api-cw
enable_plugin heat https://git.openstack.org/openstack/heat stable/ussuri

#Mistral
enable_plugin mistral https://github.com/openstack/mistral.git stable/ussuri

#Tacker
enable_plugin tacker https://github.com/openstack/tacker.git stable/ussuri
enable_plugin networking-sfc https://git.openstack.org/openstack/networking-sfc stable/ussuri

#Rally
enable_plugin rally https://git.openstack.org/openstack/rally-openstack

#Vitrage
enable_plugin vitrage https://git.openstack.org/openstack/vitrage stable/ussuri
enable_plugin vitrage-dashboard https://git.openstack.org/openstack/vitrage-dashboard stable/ussuri

#barbican
enable_plugin barbican https://opendev.org/openstack/barbican stable/ussuri

[[post-config|$NOVA_CONF]]
[DEFAULT]
notification_topics = notifications,vitrage_notifications
notification_driver=messagingv2

[[post-config|$NEUTRON_CONF]]
[DEFAULT]
notification_topics = notifications,vitrage_notifications
notification_driver=messagingv2

[[post-config|$CINDER_CONF]]
[DEFAULT]
notification_topics = notifications,vitrage_notifications
notification_driver=messagingv2

[[post-config|$HEAT_CONF]]
[DEFAULT]
notification_topics = notifications,vitrage_notifications
notification_driver=messagingv2

disable_service swift
ovs-vsctl add-port br-ex eno3

 

computer - node

[[local|localrc]]
ADMIN_PASSWORD=root
HOST_IP=192.168.77.6
SERVICE_HOST=192.168.77.4
MYSQL_HOST=$SERVICE_HOST
RABBIT_HOST=$SERVICE_HOST
GLANCE_HOSTPORT=$SERVICE_HOST4:9292

MULTI_HOST=1

ADMIN_PASSWORD=root
ADMIN_PASSWORD=$ADMIN_PASSWORD
MYSQL_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
# Neutron options
PUBLIC_INTERFACE=eno3
ENABLED_SERVICES=n-cpu,n-novnc,rabbit,q-agt
LOGDIR=$DEST/logs
LOGFILE=$LOGDIR/stack.sh.log
LOGDAYS=7

NOVA_VNC_ENABLED=True
NOVVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_auto.html"
VNCSERVER_LISTEN=$HOST_IP
VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTEN

 

설치중에 수행한 command 정리중

. demorc.sh
/bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
/opt/stack/cinder/cinder/volume/flows/common.py
/usr/local/bin/neutron-l3-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/l3_agent.ini
/usr/local/bin/neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf
/usr/local/bin/neutron-openvswitch-agent --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini
/usr/local/bin/swift-proxy-server /etc/swift/proxy-server.conf -v
/usr/share/mysql/mysql-systemd-start pre
;nova hypervisor-list
;s
;SELECT
a2enmod
a2enmod --help
a2enmod list
a2enmod proxy_uwsgi
apache2
apache2 -t
apache2ctl configtest
apachectl
apachectl -t
brctl delbr virbr0
brctl delbr virbr0-nic
chmod 644 neutron.conf
chown root:neutron *
clear
clearl
cp -p rootwrap.conf.dpkg-old policy.json
cp -p rootwrap.conf.dpkg-old rootwrap.conf
cp -r neutron/ neutron_lbaas
cp -rp neutron neutron_lbaas
cp -rP neutron/ neutron_lbaas
cp api-paste.ini.dpkg-old api-paste.ini
cp l3_agent.ini.dpkg-old l3_agent.ini
cp neutron.conf.dpkg-old metadata_agent.ini
cp neutron/ neutron_lbaas
cp policy.json.dpkg-old policy.json
cp proxy_uwsgi.load /etc/apache2/mods-available/
date
fdisk -l
find . -name ovs_neutron_agent
find . -name ovs_neutron_agent*
fuser -c /dev/loop2
fuser -d /dev/loop2
fuser -f /dev/loop2
getenforce

http -t
httpd -t
ifcfg virbr0 down
ifcofig
ifconfig virbr0 down
ip addr
ip addr add 192.168.66.3/24 dev br-ex
ip addr add 192.168.77.3/24 dev br-ex
ip addr add 192.168.77.4/24 dev br-ex
ip addr add 192.168.77.91/24 dev eno4
ip addr del 192.168.101.1/24 dev br-ex
ip addr del 192.168.77.3/24 dev br-ex
ip addr del 192.168.77.4/24 dev eno4
ip ddr
ip link set br-ex up
ip route
losetup
losetup --help
losetup -a
losetup -D
losetup -d /dev/loop0
losetup -d /dev/loop2
losetup -d /dev/loop3
losetup -d /dev/loop4
losetup -f
losetup -f --show /opt/stack/data/stack-volumes-lvmdriver-1-backing-file

lsblk
lvchange --help /dev/stack-volumes-lvmdriver-1/
lvchange /dev/stack-volumes-lvmdriver-1/
lvremove /dev/cinder-volumes/cinder-volumes-pool
lvremove /dev/cinder-volumes/volume-287ea4fb-ab82-4dfd-87f1-3f2f504f1354
lvremove /dev/cinder-volumes/volume-aa431bc5-3b50-4cf4-aec8-c9eca4b85b8e
lvremove /dev/cinder-volumes/volume-c7700b65-b04e-463d-a4c9-52d26cfd874a
lvremove /dev/stack-volumes-lvmdriver-1/stack-volumes-lvmdriver-1-pool
lvremove /dev/stack-volumes-lvmdriver-1/volume-623ffb7c-f4f8-47c7-a028-b9e34e1802ea
lvremove /dev/stack-volumes-lvmdriver-1/volume-623ffb7c-f4f8-47c7-a028-b9e34e1802ea /dev/stack-volumes-lvmdriver-1/volume-fb687c9c-96a5-4ba9-b997-55b803d5d28f /dev/stack-volumes-lvmdriver-1/volume-d38aa611-50ca-4c06-a0eb-c0586ee9456d
lvremove /dev/stack-volumes-lvmdriver-1/volume-fb687c9c-96a5-4ba9-b997-55b803d5d28f
lvscan
mount
mount | grep loop
mount |grep lv
MULTI_HOST=True

mysql -u root -p
netplan apply
netstat -tnlp
neutron subnet-list
neutron subnet-update --dns_nameservers 8.8.8.8 8.8.4.4
neutron subnet-update heat-subnet --dns_nameservers 8.8.8.8 8.8.4.4
neutron-openvswitch-agent --version
neutron-openvswitch-agent -v

nova hypervisor-
nova hypervisor-add
nova hypervisor-list
nova serveice-list
nova service-delete
nova service-delete  00c1e7e8-58d1-4131-98ba-3c1a9e34fd31
nova service-delete  00c1e7e8-58d1-4131-98ba-3c1a9e34fd31 -h
nova service-delete  00c1e7e8-58d1-4131-98ba-3c1a9e34fd31 nova-compute
nova service-delete 00c1e7e8-58d1-4131-98ba-3c1a9e34fd31
nova service-disable 00c1e7e8-58d1-4131-98ba-3c1a9e34fd31
nova service-list
nslookup server
nteplan apply
openstack compute
openstack compute  agent list
openstack compute  service
openstack compute  service delete
openstack compute  service delete -h
openstack compute  service delete 00c1e7e8-58d1-4131-98ba-3c1a9e34fd31
openstack compute  service delete nova
openstack compute  service delete nova --host k3lab-103
openstack compute  service delete nova-compute -h k3lab-103
openstack compute  service delete nova-compute 6
openstack compute  service list
openstack compute list
openstack compute service delete  --host k3lab-103
openstack compute service delete  -h k3lab-103
openstack compute service delete  6
openstack compute service delete --help
openstack compute service delete --host k3lab-103
openstack compute service delete --host=k3lab-103
openstack compute service delete -h
openstack compute service delete 6
openstack compute service delete k3lab-103
openstack compute service list
openstack compute service list --long
openstack compute service list --service nova-compute
openstack hyper
openstack hypervisor list
openstack limit list
openstack limit show
openstack network agent delete 17054f0e-1104-4425-b934-3a8cad8fca63
openstack network agent list
openstack project list
openstack project show -f value
openstack project show -f value -c id PROJECT_NAME
openstack quota
openstack quota list
openstack quota list --compute
openstack quota list --compute default
openstack quota list --default
openstack quota list --quote all
openstack quota list all
openstack quota list defalut
openstack quota list default
openstack quota set --cores 112 default
openstack quota set --cores 112 f3e098104c4442959d58062b09a5e3ea
openstack quota set --cores 15
openstack quota set --cores 15 default
openstack quota set --cores 15 demo
openstack quota set --cores 15 f3e098104c4442959d58062b09a5e3ea
openstack quota set --cores 224 default
openstack quota set --cores 224 f3e098104c4442959d58062b09a5e3ea
openstack quota set --cores 50 default
openstack quota set --cores 50 f3e098104c4442959d58062b09a5e3ea
openstack quota set --instaces 50 f3e098104c4442959d58062b09a5e3ea
openstack quota set --instances 100 f3e098104c4442959d58062b09a5e3ea
openstack quota set --instances 20 --default
openstack quota set --instances 20 default
openstack quota set --instances 50 f3e098104c4442959d58062b09a5e3ea
openstack quota set --ram 102400 f3e098104c4442959d58062b09a5e3ea
openstack quota set --volumes 100 demo
openstack quota show
openstack quota show --defalut
openstack quota show --default
openstack quota show --defaulty
openstack quota show f3e098104c4442959d58062b09a5e3ea
openstack resource provider delete b33ebee5-8c53-4d35-b7e1-3540fe29ef72
openstack resource provider list
openstack server list
openstack service list
openstack subnet list
openstack subnet set heat-subnet --dns-nameserver 168.126.63.1
openstack subnet set heat-subnet --dns-nameserver 8.8.8.8 8.8.4.4
openstack subnet set heat-subnet --dns-nameserver 8.8.8.8,8.8.4.4
openstack subnet set heat-subnet --dns_nameserver 8.8.8.8 8.8.4.4
openstack subnet set heat-subnet --dns_nameservers 8.8.8.8 8.8.4.4
openstack subnet update heat-subnet --dns_nameservers 8.8.8.8 8.8.4.4
openstack subnet-update heat-subnet --dns_nameservers 8.8.8.8 8.8.4.4
openstack vcpu
openstack volume service list
ovs-vsctl
ovs-vsctl --help
ovs-vsctl ?
ovs-vsctl list
ovsctl
ping 192.168.77.1
ping archive.ubuntu.com
ping naver.com

pip -V
pip install heat
pip install ovs_neutron_agent
pip install uwsgi
pip3 install heat
pip3 install mpi4py
pip3 install uwsgi
pip3 uninstall uwsgi
privsep-helper
privsep-helper --version
project=$(openstack project show -f value -c id PROJECT_NAME)
ps -ef | grep 192.168.77.4
pv
pv remove dev/stack-volumes-lvmdriver-1
pvcreate /dev/sdb
pvremove /dev/loop0
pvremove /dev/loop1
pvremove /dev/stack-volumes-lvmdriver-1
pvremove dev/stack-volumes-lvmdriver-1
pvscan
pwd
python ip.py
q
reboot
restart devstack@h-eng.service
rm -rf /usr/sbin/apache2 /usr/lib/apache2 /usr/include/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz
rm -rf cinder_
rm -rf conf-available  conf-enabled  mods-available  mods-enabled  sites-available  sites-enabled
rm -rf neutron_lbaas
rm -rf neutron_lbaas/
rm -rf resolv.conf
route add default gw 192.168.77.1
SELECT
service cinder-scheduler restart
service cinder-volume restart
service reslovconf restart
service tgt restart
su - stack
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose"
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" admin
su -s /bin/sh -c "nova-manage cell_v2 discover_hosts --verbose" nova
sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvchange -a y --yes -K cinder-volumes/volume-fb687c9c-96a5-4ba9-b997-55b803d5d28f
sudo ovs-vsctl add-port br-ex eno3
sudo ovs-vsctl list
sudo ovs-vsctl show
sudo su -
sudo su - stack
sudo su - stacl
sudo vgcreate cinder-volumes /dev/loop0
sudo vgcreate cinder-volumes /dev/loop1
sudo vgremove cinder-volumes
sudo vgremove stack-volumes-lvmdriver-1


umount /dev/stack-volumes-lvmdriver-1/stack-volumes-lvmdriver-1-pool
vgchange -a n stack-volumes-lvmdriver-1
vgcreate cinder-volumes /dev/sdb
vgcreate stack-volumes-lvmdriver-1 /dev/loop0
vgremove RddX6G-Bfyu-QU0x-cNP8-xqv9-0Bfl-U0jkfZ
vgremove stack-volumes-lvmdriver-1
vgscan

whereis apache2

728x90

댓글