본문 바로가기

Openstack Ansible

Openstack Deploy 복구 후 증설

Deploy가 모종의 이유로 유실되었으나, Compute node 증설 요청이 있을 경우 사용하는 방법

 

 

Compute node 증설 외의 Ansible을 통한 openstack service 추가 설치에서는 사용 불가

 

새로운 deploy 노드가 될 서버가 필요

해당 deploy 노드는 openstack ansible github를 clone 해오는 과정까지 진행되어야 하고, 기존 openstack이 사용하던 network에 접속할 수 있어야 함

Configure the deployment — openstack-ansible 28.1.0.dev11 documentation

이 과정 중 Configure the deployment까지 필요한데, 아래 과정은 실행하지 않음

 

cd /opt/openstack-ansible
# ./scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml

실행하여도 기존에 사용하던 secret 정보와 달라지기 때문에 의미 없음

 

현재 설정되어 있는 정보들을 바탕으로 컴퓨트 노드를 증설 할 때 필요한 정보들을 수집

compute 

/etc/nova/nova.conf

nova_oslomsg_rpc_password: fe0e38f362b04fba8
> transport_url = rabbit://nova:fe0e38f362b04fba8@10.20.10.177:5672//nova?ssl=0
neutron_service_password: 3b5572b3f49eea4f58b7a4f613f5bca5e6986b8b090d4a781c
> [neutron] password = 3b5572b3f49eea4f58b7a4f613f5bca5e6986b8b090d4a781c
nova_placement_service_password: c970a8437c7e74e8ff80650d64c76a23441fee
> [placement] password = c970a8437c7e74e8ff80650d64c76a23441fee
nova_metadata_proxy_secret: b903ae293b81f814a5ead145ea
> metadata_proxy_shared_secret = b903ae293b81f814a5ead145ea
nova_service_password: 2176afbae540d454c9b3a7603d5a740
> [keystone_authtoken] password = 2176afbae540d454c9b3a7603d5a740
memcached_encryption_key: c506f0c4844ab50d97e6b282
> memcache_secret_key = c506f0c4844ab50d97e6b282

/etc/neutron/l3_agent.ini

ha_vrrp_auth_password = 2cf726de4118642a3c4d2aff0a4e37e6b90996e87b88b5c6eadb15542492004
> neutron_ha_vrrp_auth_password: 2cf726de4118642a3c4d2aff0a4e37e6b90996e87b88b5c6eadb15542492004

/etc/neutron/neutron.conf

neutron_oslomsg_rpc_password: 3f6cf02fc13fec86e9cbbf39d5d9707f259b2dab7f05e1097ea25803f67f2f4
> transport_url = rabbit://neutron:3f6cf02fc13fec86e9cbbf39d5d9707f259b2dab7f05e1097ea25803f67f2f4@10.20.10.177:5672//neutron?ssl=0

/etc/neutron/metada_agent.ini

nova_metadata_proxy_secret: b903ae293b81f814a5ead145ea
> metadata_proxy_shared_secret = b903ae293b81f814a5ead145ea
neutron_service_password: 3b5572b3f49eea4f58b7a4f613f5bca5e6986b8b090d4a781c
> password = 3b5572b3f49eea4f58b7a4f613f5bca5e6986b8b090d4a781c

컴퓨트 노드의 각 위치의 파일에서 secret 정보 수집하여 /etc/openstack_deploy/user_secrets.yml 에 입력

버전마다 변수 명이 다를 수 있으므로 역할을 잘 상기하며 변수명 확인

 

ex) oslomsg로 되어있는 아래 예시는 다른 버전에서는 rabbitmq_password 같은 변수명으로 저장될 수 있음

기본적으로 rabbitmq에서 사용하는 비밀번호이기 때문에 잘 확인할 경우 문제 없이 찾을 수 있음

neutron_oslomsg_rpc_password: 3f6cf02fc13fec86e9cbbf39d5d9707f259b2dab7f05e1097ea25803f67f2f4
> transport_url = rabbit://neutron:3f6cf02fc13fec86e9cbbf39d5d9707f259b2dab7f05e1097ea25803f67f2f4@10.20.10.177:5672//neutron?ssl=0

컨트롤러 노드의 컨테이너 정보 필요

lxc-ls -f

root@controller1:~# lxc-ls -f
NAME                                              STATE   AUTOSTART GROUPS            IPV4                                      IPV6 UNPRIVILEGED
controller1_adjutant_container-6574ebc3           STOPPED 1         onboot, openstack -                                         -    false
controller1_aodh_container-c5e0dec8               STOPPED 1         onboot, openstack -                                         -    false
controller1_barbican_container-e280f2c3           STOPPED 1         onboot, openstack -                                         -    false
controller1_blazar_container-c9eac9db             STOPPED 1         onboot, openstack -                                         -    false
controller1_ceilometer_central_container-0ba45c3f RUNNING 1         onboot, openstack 10.0.3.46, 172.29.238.152                 -    false
controller1_cloudkitty_container-7fae803d         RUNNING 1         onboot, openstack 10.0.3.5, 172.29.239.218                  -    false
controller1_designate_container-b37af7bf          RUNNING 1         onboot, openstack 10.0.3.125, 172.29.237.177                -    false
controller1_galera_container-f023bc09             RUNNING 1         onboot, openstack 10.0.3.93, 172.29.239.178                 -    false
controller1_heat_api_container-daea27fd           RUNNING 1         onboot, openstack 10.0.3.98, 172.29.239.243                 -    false
controller1_horizon_container-5397168c            RUNNING 1         onboot, openstack 172.29.239.19                             -    false
controller1_keystone_container-56fdced1           RUNNING 1         onboot, openstack 10.0.3.190, 172.29.238.75                 -    false
controller1_magnum_container-0925a9d6             RUNNING 1         onboot, openstack 10.0.3.45, 172.29.237.171                 -    false
controller1_manila_container-b621611d             RUNNING 1         onboot, openstack 10.0.3.147, 172.29.239.237                -    false
controller1_memcached_container-d96417c2          RUNNING 1         onboot, openstack 10.0.3.95, 172.29.239.141                 -    false
controller1_metaops_console_container-ba57c88e    RUNNING 1         onboot, openstack 10.0.3.15, 172.29.237.168                 -    false
controller1_neutron_server_container-4a207d42     RUNNING 1         onboot, openstack 10.0.3.130, 172.29.238.208                -    false
controller1_nova_api_container-b4b76ce6           RUNNING 1         onboot, openstack 10.0.3.142, 172.29.237.9                  -    false
controller1_octavia_server_container-03ec7297     RUNNING 1         onboot, openstack 172.29.234.108, 172.29.239.161            -    false
controller1_placement_container-ef7265ff          RUNNING 1         onboot, openstack 172.29.238.223                            -    false
controller1_rabbit_mq_container-e81cf6fe          RUNNING 1         onboot, openstack 10.0.3.117, 172.29.239.208                -    false
controller1_repo_container-4efa7262               RUNNING 1         onboot, openstack 172.29.237.107                            -    false
controller1_senlin_container-92f101b2             RUNNING 1         onboot, openstack 10.0.3.71, 172.29.238.148                 -    false
controller1_tacker_container-8770ad3b             RUNNING 1         onboot, openstack 172.29.237.252                            -    false
controller1_trove_api_container-86f28b00          RUNNING 1         onboot, openstack 10.0.3.199, 172.29.230.68, 172.29.239.147 -    false
controller1_utility_container-28b29528            RUNNING 1         onboot, openstack 172.29.237.35                             -    false
controller1_zookeeper_container-5be4bd4c          RUNNING 1         onboot, openstack 10.0.3.249, 172.29.239.242                -    false
ubuntu-20-amd64                                   STOPPED 0         -                 -                                         -    false

컨테이너 이름과 할당된 ip가 필요

 

/opt/openstack-ansible/inventory/dynamic_inventory.py --config /etc/openstack_deploy/ 를 실행시켜 기본 inventory를 생성

vi /etc/openstack_deploy/openstack_inventory.json에서 컨테이너 이름과 ip를 수정

 

이러면 컴퓨트 증설을 위한 준비가 끝나며, 컴퓨트 노드 증설을 위한 작업을 실행

Scaling your environment — openstack-ansible 28.1.0.dev13 documentation

버전에 맞는 문서를 찾아 사용