YUMSERV
Published 2021. 5. 23. 12:14
[Victoria] Octavia 설치 OpenStack
반응형

 

 

1. Octavia 데이터베이스 생성

MariaDB [(none)]> create database octavia;
Query OK, 1 row affected (0.001 sec)

MariaDB [(none)]> grant all privileges on octavia.* to octavia@'localhost' identified by 'OCTAVIA_DBPASS';
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> grant all privileges on octavia.* to octavia@'%' identified by 'OCTAVIA_DBPASS'
;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> exit
Bye

 

 

2. 사용자 생성, Endpoint 생성

root@controller:~# openstack user create --domain default --project service --password OCTAVIA_PASS octavia
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| default_project_id | 05f524f57d074aefafab4ff538fea9fb |
| domain_id | default |
| enabled | True |
| id | 9cb82ed487ee49269c766995321eef44 |
| name | octavia |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+

root@controller:~# root@controller:~# openstack role add --project service --user octavia admin
root@controller:~# root@controller:~# openstack service create --name octavia --description "OpenStack LBaaS" load-balancer
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack LBaaS |
| enabled | True |
| id | 3fa33f097a9743d48a2f2e021896fc98 |
| name | octavia |
| type | load-balancer |
+-------------+----------------------------------+

root@controller:~# openstack endpoint create --region Region01 load-balancer public http://network:9876
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | e1f533da2e2a41aeabe2b00aed28eb81 |
| interface | public |
| region | Region01 |
| region_id | Region01 |
| service_id | 3fa33f097a9743d48a2f2e021896fc98 |
| service_name | octavia |
| service_type | load-balancer |
| url | http://network:9876 |
+--------------+----------------------------------+

root@controller:~# openstack endpoint create --region Region01 load-balancer internal http://network:9876
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 4940d9f2f5d247c98109aa9dc2fc255f |
| interface | internal |
| region | Region01 |
| region_id | Region01 |
| service_id | 3fa33f097a9743d48a2f2e021896fc98 |
| service_name | octavia |
| service_type | load-balancer |
| url | http://network:9876 |
+--------------+----------------------------------+

root@controller:~# openstack endpoint create --region Region01 load-balancer admin http://network:9876
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | dfedac5693564119bd28c2c63fe41f2e |
| interface | admin |
| region | Region01 |
| region_id | Region01 |
| service_id | 3fa33f097a9743d48a2f2e021896fc98 |
| service_name | octavia |
| service_type | load-balancer |
| url | http://network:9876 |
+--------------+----------------------------------+

 

 

3. Octavia 설치 및 사용할 인증서 생성

패키지 설치

root@network:~# apt -y install octavia-api octavia-health-manager octavia-housekeeping octavia-worker

 

인증서 생성

root@network:~# mkdir -p /etc/octavia/certs/private
root@network:~# mkdir ~/work
root@network:~# cd ~/work/
root@network:~/work# git clone https://opendev.org/openstack/octavia.git
Cloning into 'octavia'...
remote: Enumerating objects: 47256, done.
remote: Counting objects: 100% (47256/47256), done.
remote: Compressing objects: 100% (21299/21299), done.
remote: Total 47256 (delta 34015), reused 37580 (delta 25480)
Receiving objects: 100% (47256/47256), 7.65 MiB | 5.96 MiB/s, done.
Resolving deltas: 100% (34015/34015), done.

root@network:~/work# cd octavia/bin/
root@network:~/work/octavia/bin# ./create_dual_intermediate_CA.sh

root@network:~/work/octavia/bin# cd dual_ca/etc/octavia/certs/ root@network:~/work/octavia/bin/dual_ca/etc/octavia/certs# cp -arp *key.pem /etc/octavia/certs/private/
root@network:~/work/octavia/bin/dual_ca/etc/octavia/certs# cp -arp `ls . | grep -v key` /etc/octavia/certs/

root@network:~/work/octavia/bin/dual_ca/etc/octavia/certs# ll /etc/octavia/certs/
total 12
drwxr-xr-x 3 root root 105 5월 17 09:20 ./
drwxr-x--- 3 root octavia 58 5월 17 09:08 ../
-r--r--r-- 1 root root 2729 5월 17 09:11 client_ca.cert.pem
drwxr-xr-x 2 root root 62 5월 17 09:19 private/
-r--r--r-- 1 root root 2729 5월 17 09:11 server_ca-chain.cert.pem
-r-------- 1 root root 1346 5월 17 09:11 server_ca.cert.pem

root@network:~/work/octavia/bin/dual_ca/etc/octavia/certs# chown -R octavia /etc/octavia/certs/

 

 

4. Octavia 설정

root@network:~# cat /etc/octavia/octavia.conf
[DEFAULT]
# RabbitMQ connection info
transport_url = rabbit://openstack:RABBIT_PASS@controller
[api_settings]
# IP address this host listens
bind_host = 192.168.198.101
bind_port = 9876
auth_strategy = keystone
api_base_uri = http://192.168.198.101:9876

# MariaDB connection info
[database]
connection = mysql+pymysql://octavia:OCTAVIA_DBPASS@controller/octavia

[health_manager]
bind_ip = 192.168.198.101
bind_port = 5555
controller_ip_port_list = 192.168.198.101:5555
heartbeat_key=insecure


# Keystone auth info
[keystone_authtoken]
www_authenticate_uri = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = octavia
password = OCTAVIA_PASS

[certificates]
ca_private_key = /etc/octavia/certs/private/server_ca.key.pem
ca_certificate = /etc/octavia/certs/server_ca.cert.pem
server_certs_key_passphrase = insecure-key-do-not-use-this-key
ca_private_key_passphrase = not-secure-passphrase

[haproxy_amphora]
server_ca = /etc/octavia/certs/server_ca-chain.cert.pem
client_cert = /etc/octavia/certs/private/client.cert-and-key.pem

[controller_worker]
client_ca = /etc/octavia/certs/client_ca.cert.pem

[oslo_messaging]
topic = octavia_prov

# Keystone auth info
[service_auth]
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = octavia
password = OCTAVIA_PASS 

root@network:~# su -s /bin/bash octavia -c "octavia-db-manage --config-file /etc/octavia/octavia.conf upgrade head"


root@network:~# systemctl restart octavia-api octavia-health-manager octavia-housekeeping octavia-worker

 

 

5. Loadbalancer 이미지 생성 

이미지 생성

root@controller:~# snap install octavia-diskimage-retrofit --beta --devmode
2021-05-17T09:26:48+09:00 INFO Waiting for automatic snapd restart...
octavia-diskimage-retrofit (beta) 0.9.10 from Frode Nordahl (fnordahl) installed

root@controller:~# cd /var/snap/octavia-diskimage-retrofit/common/tmp/

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# wget https://cloud-images.ubuntu.com/minimal/releases/focal/release/ubuntu-20.04-minimal-cloudimg-amd64.img

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# octavia-diskimage-retrofit ubuntu-20.04-minimal-cloudimg-amd64.img ubuntu-amphora-haproxy-amd64.qcow2

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# ls
ubuntu-20.04-minimal-cloudimg-amd64.img ubuntu-amphora-haproxy-amd64.qcow2 ubuntu-amphora-haproxy-amd64.qcow2.manifest

 

Glance에 Amphora 이미지 넣기

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack image create "Amphora" --tag "Amphora" --file ubuntu-amphora-haproxy-amd64.qcow2 --disk-format qcow2 --container-format bare --private --project service
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------+
| container_format | bare |
| created_at | 2021-05-17T00:39:11Z |
| disk_format | qcow2 |
| file | /v2/images/84917ad6-f0ac-415b-bbbb-e0839a3373b0/file |
| id | 84917ad6-f0ac-415b-bbbb-e0839a3373b0 |
| min_disk | 0 |
| min_ram | 0 |
| name | Amphora |
| owner | 05f524f57d074aefafab4ff538fea9fb |
| properties | os_hidden='False', owner_specified.openstack.md5='', owner_specified.openstack.object='images/Amphora', owner_specified.openstack.sha256='' |
| protected | False |
| schema | /v2/schemas/image |
| status | queued |
| tags | Amphora |
| updated_at | 2021-05-17T00:39:11Z |
| visibility | private |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------+


root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack image list
+--------------------------------------+---------+--------+
| ID | Name | Status |
+--------------------------------------+---------+--------+
| 84917ad6-f0ac-415b-bbbb-e0839a3373b0 | Amphora | active |
| 8996cd9b-b873-48ad-a706-408046aee4e9 | centos7 | active |
| 40f68bfd-1fbf-4ffe-aada-110f0112ac91 | cirros | active |
+--------------------------------------+---------+--------+

 

Amphora Flavor 생성

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack flavor create --id 100 --vcpus 1 --ram 1024 --disk 5 m1.octavia --private --project service
+----------------------------+------------+
| Field | Value |
+----------------------------+------------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | 0 |
| disk | 5 |
| id | 100 |
| name | m1.octavia |
| os-flavor-access:is_public | False |
| properties | |
| ram | 1024 |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | 1 |
+----------------------------+------------+

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack flavor list --a

+--------------------------------------+------------+------+------+-----------+-------+-----------+
| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |
+--------------------------------------+------------+------+------+-----------+-------+-----------+
| 100 | m1.octavia | 1024 | 5 | 0 | 1 | False |
| 1 | m1.small | 1024 | 20 | 0 | 1 | True |
+--------------------------------------+------------+------+------+-----------+-------+-----------+

 

Security group 생성

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack security group create lb-mgmt-sec-group --project service
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| created_at | 2021-05-17T00:40:08Z |
| description | lb-mgmt-sec-group |
| id | bfa67f7f-f242-4822-ab6a-977d36f8a04e |
| name | lb-mgmt-sec-group |
| project_id | 05f524f57d074aefafab4ff538fea9fb |
| revision_number | 1 |
| rules | created_at='2021-05-17T00:40:08Z', direction='egress', ethertype='IPv4', id='16447337-8c5d-49ca-99a4-1f55d9f79be7', updated_at='2021-05-17T00:40:08Z' |
| | created_at='2021-05-17T00:40:08Z', direction='egress', ethertype='IPv6', id='b005065e-93bf-4dd9-8178-1e78d39b1fff', updated_at='2021-05-17T00:40:08Z' |
| stateful | True |
| tags | [] |
| updated_at | 2021-05-17T00:40:08Z |
+-----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack security group rule create --protocol icmp --ingress lb-mgmt-sec-group
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| created_at | 2021-05-17T00:40:16Z |
| description | |
| direction | ingress |
| ether_type | IPv4 |
| id | 9ec102b4-f299-4fe6-b771-7f83ae0fad74 |
| name | None |
| port_range_max | None |
| port_range_min | None |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| protocol | icmp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| revision_number | 0 |
| security_group_id | bfa67f7f-f242-4822-ab6a-977d36f8a04e |
| tags | [] |
| updated_at | 2021-05-17T00:40:16Z |
+-------------------+--------------------------------------+

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack security group rule create --protocol tcp --dst-port 22:22 lb-mgmt-sec-group
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| created_at | 2021-05-17T00:40:23Z |
| description | |
| direction | ingress |
| ether_type | IPv4 |
| id | 1fddafc3-8dac-447c-8967-e486a1488716 |
| name | None |
| port_range_max | 22 |
| port_range_min | 22 |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| protocol | tcp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| revision_number | 0 |
| security_group_id | bfa67f7f-f242-4822-ab6a-977d36f8a04e |
| tags | [] |
| updated_at | 2021-05-17T00:40:23Z |
+-------------------+--------------------------------------+

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack security group rule create --protocol tcp --dst-port 80:80 lb-mgmt-sec-group
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| created_at | 2021-05-17T00:40:34Z |
| description | |
| direction | ingress |
| ether_type | IPv4 |
| id | 05702245-01aa-4a0b-9b2e-dc2ab138da2c |
| name | None |
| port_range_max | 80 |
| port_range_min | 80 |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| protocol | tcp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| revision_number | 0 |
| security_group_id | bfa67f7f-f242-4822-ab6a-977d36f8a04e |
| tags | [] |
| updated_at | 2021-05-17T00:40:34Z |
+-------------------+--------------------------------------+

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack security group rule create --protocol tcp --dst-port 443:443 lb-mgmt-sec-group
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| created_at | 2021-05-17T00:40:39Z |
| description | |
| direction | ingress |
| ether_type | IPv4 |
| id | 0a614fe5-cf8b-4e59-8f50-c24a7c705d03 |
| name | None | | port_range_max | 443 
| port_range_min | 443 |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| protocol | tcp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/0 |
| revision_number | 0 |
| security_group_id | bfa67f7f-f242-4822-ab6a-977d36f8a04e |
| tags | [] |
| updated_at | 2021-05-17T00:40:39Z |
+-------------------+--------------------------------------+

root@controller:/var/snap/octavia-diskimage-retrofit/common/tmp# openstack security group rule create --protocol tcp --dst-port 9443:9443 lb-mgmt-sec-group
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+ | created_at | 2021-05-17T00:40:45Z |
| description | |
| direction | ingress |
| ether_type | IPv4 |
| id | 4c2e28c7-d239-47b3-999f-87a658354ffa |
| name | None |
| port_range_max | 9443 |
| port_range_min | 9443 |
| project_id | a9288ffbf3d242278547a49d2b10eb1b | | protocol | tcp | | remote_group_id | None | | remote_ip_prefix | 0.0.0.0/0
| | revision_number | 0 |
| security_group_id | bfa67f7f-f242-4822-ab6a-977d36f8a04e |
| tags | [] |
| updated_at | 2021-05-17T00:40:45Z |
+-------------------+--------------------------------------+

 

octavia.conf 파일 수정

root@network:~# cat /etc/octavia/octavia.conf
아래 내용 추가

[controller_worker]
client_ca = /etc/octavia/certs/client_ca.cert.pem
amp_image_tag = Amphora
# specify [flavor] ID for Amphora instance
amp_flavor_id = 100

# amphora ssh key 
amp_ssh_key_name = octavia_key 

# specify security group ID Amphora instance
amp_secgroup_list = bfa67f7f-f242-4822-ab6a-977d36f8a04e

# specify network ID to boot Amphora instance (example below specifies public network [public]) amp_boot_network_list = 4701abf9-8a2b-42c7-81d1-ed01de26110e
network_driver = allowed_address_pairs_driver
compute_driver = compute_nova_driver
amphora_driver = amphora_haproxy_rest_driver

root@network:~# systemctl restart octavia-api octavia-health-manager octavia-housekeeping octavia-worker

 

 

6. Loadbalancer 사용법

Loadbalancer 생성

root@controller:~# openstack loadbalancer create --name lb01 --vip-subnet-id private_sub
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| admin_state_up | True |
| availability_zone | None |
| created_at | 2021-05-20T06:19:34 |
| description | |
| flavor_id | None |
| id | 2735414d-fea9-4849-982c-943dcc50cec1 |
| listeners | ed1af3d3-ab30-4b46-9970-764db74e4293 |
| name | lb01 |
| operating_status | OFFLINE |
| pools | 0823598f-ae02-4272-b38e-bcfae4caecd9 |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| provider | amphora |
| provisioning_status | ACTIVE |
| updated_at | 2021-05-20T08:22:17 |
| vip_address | 10.1.3.71 |
| vip_network_id | 459bcdce-756c-4556-8cc6-231a909acfae |
| vip_port_id | 193ba8cb-faff-43a3-af71-3d608376ea8b |
| vip_qos_policy_id | None |
| vip_subnet_id | ee182480-4491-4eb6-9466-f8560061cb13 |
| tags | |
+---------------------+--------------------------------------+

 

listener 생성

root@controller:~# openstack loadbalancer listener create --name listener01 --protocol TCP --protocol-port 80 lb01
+-----------------------------+--------------------------------------+
| Field | Value |
+-----------------------------+--------------------------------------+
| admin_state_up | True |
| connection_limit | -1 |
| created_at | 2021-05-20T06:27:30 |
| default_pool_id | 0823598f-ae02-4272-b38e-bcfae4caecd9 |
| default_tls_container_ref | None |
| description | |
| id | ed1af3d3-ab30-4b46-9970-764db74e4293 |
| insert_headers | None |
| l7policies | |
| loadbalancers | 2735414d-fea9-4849-982c-943dcc50cec1 |
| name | listener01 |
| operating_status | OFFLINE |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| protocol | TCP |
| protocol_port | 80 |
| provisioning_status | ACTIVE |
| sni_container_refs | [] |
| timeout_client_data | 50000 |
| timeout_member_connect | 5000 |
| timeout_member_data | 50000 |
| timeout_tcp_inspect | 0 |
| updated_at | 2021-05-20T08:22:17 |
| client_ca_tls_container_ref | None |
| client_authentication | NONE |
| client_crl_container_ref | None |
| allowed_cidrs | None |
| tls_ciphers | None |
| tls_versions | None |
| alpn_protocols | None |
| tags | |
+-----------------------------+--------------------------------------+

 

pool 생성 후, listener의 추가

root@controller:~# openstack loadbalancer pool create --name pool01 --lb-algorithm ROUND_ROBIN --listener listener01 --protocol TCP
+----------------------+--------------------------------------+
| Field | Value |
+----------------------+--------------------------------------+
| admin_state_up | True |
| created_at | 2021-05-20T06:27:36 |
| description | |
| healthmonitor_id | |
| id | 0823598f-ae02-4272-b38e-bcfae4caecd9 |
| lb_algorithm | ROUND_ROBIN |
| listeners | ed1af3d3-ab30-4b46-9970-764db74e4293 |
| loadbalancers | 2735414d-fea9-4849-982c-943dcc50cec1 |
| members | |
| name | pool01 |
| operating_status | OFFLINE |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| protocol | TCP |
| provisioning_status | ACTIVE |
| session_persistence | None |
| updated_at | 2021-05-20T08:22:17 |
| tls_container_ref | None |
| ca_tls_container_ref | None |
| crl_container_ref | None |
| tls_enabled | False |
| tls_ciphers | None |
| tls_versions | None |
| tags | |
| alpn_protocols | |
+----------------------+--------------------------------------+

 

member 추가

root@controller:~# openstack server list
+--------------------------------------+------------+--------+---------------------------------+---------+----------+ | ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+------------+--------+---------------------------------+---------+----------+
| 20497b1a-4349-4214-a57b-32d858346b9b | test2 | ACTIVE | test=10.1.1.13 | centos7 | m1.small |
| 6229bcd8-1cdb-47c0-98d2-a2f6ebbb82c5 | test | ACTIVE | test=10.1.3.134 | centos7 | m1.small |
+--------------------------------------+------------+--------+---------------------------------+---------+----------+

root@controller:~# openstack loadbalancer member create --subnet-id test_sub --address 10.1.3.134 --protocol-port 80 pool01
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| address | 10.1.3.134 |
| admin_state_up | True |
| created_at | 2021-05-20T06:28:31 |
| id | dca18f07-0fe8-46de-babb-8bac60809307 |
| name | |
| operating_status | NO_MONITOR |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| protocol_port | 80 |
| provisioning_status | ACTIVE |
| subnet_id | ee182480-4491-4eb6-9466-f8560061cb13 |
| updated_at | 2021-05-20T06:28:32 |
| weight | 1 |
| monitor_port | None |
| monitor_address | None |
| backup | False |
| tags | |
+---------------------+--------------------------------------+

root@controller:~# openstack loadbalancer member create --subnet-id test_sub --address 10.1.1.13 --protocol-port 80 pool01
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| address | 10.1.1.13 |
| admin_state_up | True |
| created_at | 2021-05-20T06:28:17 |
| id | 381cc8b9-a236-4119-a982-8e83a6c880dc |
| name | |
| operating_status | NO_MONITOR |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| protocol_port | 80 |
| provisioning_status | ACTIVE |
| subnet_id | ee182480-4491-4eb6-9466-f8560061cb13 |
| updated_at | 2021-05-20T06:59:37 |
| weight | 1 |
| monitor_port | 80 |
| monitor_address | None |
| backup | False |
| tags | |
+---------------------+--------------------------------------+


root@controller:~# openstack loadbalancer member list pool01
+--------------------------------------+------+----------------------------------+---------------------+------------+---------------+------------------+--------+
| id | name | project_id | provisioning_status | address | protocol_port | operating_status | weight |
+--------------------------------------+------+----------------------------------+---------------------+------------+---------------+------------------+--------+
| 381cc8b9-a236-4119-a982-8e83a6c880dc | | a9288ffbf3d242278547a49d2b10eb1b | ACTIVE | 10.1.1.13 | 80 | NO_MONITOR | 1 |
| dca18f07-0fe8-46de-babb-8bac60809307 | | a9288ffbf3d242278547a49d2b10eb1b | ACTIVE | 10.1.3.134 | 80 | NO_MONITOR | 1 |
+--------------------------------------+------+----------------------------------+---------------------+------------+---------------+------------------+--------+

 

Loadbalancer의 Floating IP 생성

root@controller:~# openstack floating ip create provider
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| created_at | 2021-05-20T06:29:27Z |
| description | |
| dns_domain | None |
| dns_name | None | | fixed_ip_address | None |
| floating_ip_address | 192.168.198.120 |
| floating_network_id | 4701abf9-8a2b-42c7-81d1-ed01de26110e |
| id | c7bb207f-4c64-4ddb-8849-9a144dd20852 |
| name | 192.168.198.120 |
| port_details | None |
| port_id | None |
| project_id | a9288ffbf3d242278547a49d2b10eb1b |
| qos_policy_id | None |
| revision_number | 0 |
| router_id | None |
| status | DOWN |
| subnet_id | None |
| tags | [] |
| updated_at | 2021-05-20T06:29:27Z |
+---------------------+--------------------------------------+

root@controller:~# openstack floating ip set --port [Loadbalancer_VIP_port] [floating_ip_ID] 


root@controller:~# curl 192.168.198.120
<html>
    <h1> test1 <h1>
<body>
</body>
</html>

root@controller:~# curl 192.168.198.120
<html>
    <h1> test2 <h1>
<body>
</body>
</html>

 

 

 

monitor 설정 관련된 부분이 없음

 

 

 

반응형

'OpenStack' 카테고리의 다른 글

[Octavia] DB내용 삭제  (0) 2021.06.07
[Victoria] Octavia dashboard  (0) 2021.05.23
[Victoria] Cinder 설치  (0) 2021.05.13
[정리] Cinder 이론  (0) 2021.05.13
[Victoria] Neutron 설치  (0) 2021.04.20
profile

YUMSERV

@lena04301

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!