60일차

#플라스크 배포 모드 설정
sudo systemctl restart nginx
sudo systemctl restart mysite
> 설정이 잘 되어있다면 192.168.0.11만 쳐도 들어가짐

syslog에 들어가지지 않는 에러발생
> 개발 모드에서는 에러가 안나지만 배포모드에서만 남
> internal server 에러가 남

config\production.py
SQLALCHEMY_DATABASE_URI='mysql+pymysql://rsyslog:123456@192.168.0.95/Syslog'
> syslog 데이터베이스를 넣어준다
> restart nginx, mysite해주면 잘뜸

#openstack 설치
vmware > 서버용 22.04 or gui용 22.04

Ubuntu 22.04 LTS / ram 24G / HDD 300G /
bridge mode 1개 nat mode 1개 (192.168.0.0/24 제외)
> power off한 상태에서 edit virtual machine settings
> add > network adapter > 하나는 NAT, 하나는 bridge
> vbox1이 bridge, vbox6가 NAT
> 우분투 세팅 > 네트워크 add > custom에서 vbox1 or vbox6으로 설정 가능

ip addr
> 192.168.0.51

sudo apt update
sudo apt -y install openssh-server
sudo systemctl enable ssh

> xshell로 ssh 192.168.0.51로 접속
> master 123456

sudo apt -y update
sudo apt-get -y dist-upgrade
sudo apt -y install apache2
sudo apt -y install python3 python3-pip git

sudo useradd -s /bin/bash -d /opt/stack -m stack
sudo chmod +x /opt/stack
sudo echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
sudo -u stack -i
git clone https://opendev.org/openstack/devstack

cd devstack
sudo git checkout
sudo chown -R stack.stack /opt/stack/devstack
> 스냅샷 걸어줌

ip addr
> ens33, ip: 192.168.0.51

https://gam1532.tistory.com/30
> 참고 링크

su stack
cd ~
cd de[tab]
cp ./samples/local.conf local.conf

nano local.conf
---------------------------------
ADMIN_PASSWORD=openstack
DATABASE_PASSWORD=openstack
RABBIT_PASSWORD=openstack
SERVICE_PASSWORD=openstack

HOST_IP=192.168.0.51
---------------------------------
> 스냅샷 걸음

./stack.sh
> 설치 명령어

에러발생시
./unstack.sh 취소
./clean.sh 제거

#에러발생
opt/stack에 있는 것들 싹 지우고
> git clone https://opendev.org/openstack/devstack

cd devstack
cp ./samples/local.conf local.conf

nano local.conf
-------------------
password
password
password
admin password

192.168.0.51
------------------

cd ~

git clone https://github.com/openstack/nova.git /opt/stack/nova
git clone https://github.com/openstack/placement.git /opt/stack/placement
git clone https://github.com/openstack/cinder.git /opt/stack/cinder
git clone https://github.com/openstack/swift.git /opt/stack/swift
git clone https://github.com/openstack/manila.git /opt/stack/manila
git clone https://github.com/openstack/zun.git /opt/stack/zun
git clone https://github.com/openstack/octavia.git /opt/stack/octavia
git clone https://github.com/openstack/designate.git /opt/stack/designate
git clone https://github.com/openstack/ironic.git /opt/stack/ironic
git clone https://github.com/openstack/cyborg.git /opt/stack/cyborg
git clone https://github.com/openstack/barbican.git /opt/stack/barbican
git clone https://github.com/openstack/horizon.git /opt/stack/horizon
git clone https://github.com/openstack/skyline-apiserver.git /opt/stack/skyline
git clone https://github.com/openstack/magnum.git /opt/stack/magnum
git clone https://github.com/openstack/trove.git /opt/stack/trove
git clone https://github.com/openstack/masakari.git /opt/stack/masakari
git clone https://github.com/openstack/heat.git /opt/stack/heat
git clone https://github.com/openstack/mistral.git /opt/stack/mistral
git clone https://github.com/openstack/aodh.git /opt/stack/aodh
git clone https://github.com/openstack/zaqar.git /opt/stack/zaqar
git clone https://github.com/openstack/blazar.git /opt/stack/blazar

>> 수동으로 다 다운로드 받아주기

./stack.sh

다음날에 에러 발생 메뉴얼이 아닌 본래 메뉴얼로 다시 했더니 openstack 뜸