Skip to main content

Migrate A10 specific device configs to nlbaas

Project description

A10 nlbaas2oct

This tool has been designed to migration A10 devices and their associated neutron lbaas objects from the Neutron database to Octavia.

Installation

Install from PyPi

pip install a10-nlbaas2oct

Install from Source

git clone git@github.com:a10networks/a10-nlbaas2oct.git
cd a10-nlbaas2oct
pip install -e .

Note: This tool must be installed on the host running neutron-lbaas

Usage

Step 1: Copy the sample config file from the project to another directory

Installed from PyPi

pip show a10-nlbaas2oct | grep "Location" | cp $(awk '{print $2}')/a10_nlbaas2oct/a10_nlbaas2oct.conf /path/to/another/directory

Installed from source

cp /path/to/a10-nlbaas2oct/a10_nlbaas2oct/a10_nlbaas2oct.conf /path/to/another/directory

Sample Config File Contents

[DEFAULT]

debug = True

[migration]

# Run without making changes
# trial_run = False

# Delete the load balancer records from neutron-lbaas after migration
# delete_after_migration = False

# Octavia service account ID or username (ex: admin)
octavia_account_id =

# Example db connection string:
# connection = mysql+pymysql://root:password@127.0.0.1:3306/octavia
# Replace 127.0.0.1 above with the IP address of the database used by the
# main octavia server. (Leave it as is if the database runs on this host.)

# Connection string for the neutron database
neutron_db_connection =

# Connection string for the octavia database
octavia_db_connection =

# Connection string for the A10 database used in neutron lbaas env
# a10_nlbaas_db_connection =

# Connection string for the A10 database used in the octavia env
# a10_oct_connection =

# Path to config file. Default is /etc/a10
a10_config_path = /etc/a10

Step 2: Modify the config file

Database connection string locations

The neutron_db_connection can be found in the /etc/neutron/neutron.conf file under the database group.

[database]
connection = mysql+pymysql://user:password@127.0.0.1/neutron?charset=utf8

The octavia_db_connection can be found be found in the /etc/octavia/octavia.conffile under the database group.

[database]
connection = mysql+pymysql://root:password@127.0.0.1:3306/octavia

Config for migrating from Neutron LBaaS to Octavia on the same host

# Octavia service account ID or username (ex: admin)
octavia_account_id = admin

# Connection string for the neutron database
neutron_db_connection = mysql+pymysql://user:password@127.0.0.1/neutron?charset=utf8

# Connection string for the octavia database
octavia_db_connection = mysql+pymysql://root:password@127.0.0.1:3306/octavia

# Path to config file. Default is /etc/a10
a10_config_path = /etc/a10

Config for migrating from Neutron LBaaS to Octavia across hosts

# Octavia service account ID or username (ex: admin)
octavia_account_id = admin

# Connection string for the neutron database
neutron_db_connection = mysql+pymysql://user:password@127.0.0.1/neutron?charset=utf8

# Connection string for the octavia database
octavia_db_connection = mysql+pymysql://root:password@ip_address_of_remote_host:3306/octavia

# Path to config file. Default is /etc/a10
a10_config_path = /etc/a10

Performing cross host migration when A10 database is seperate from Neutron DB and Octavia DB

# Octavia service account ID or username (ex: admin)
octavia_account_id = admin

# Connection string for the neutron database
neutron_db_connection = mysql+pymysql://user:password@127.0.0.1/neutron?charset=utf8

# Connection string for the octavia database
octavia_db_connection = mysql+pymysql://root:password@ip_address_of_remote_host:3306/octavia

# Path to config file. Default is /etc/a10
a10_config_path = /etc/a10

# Connection string for the A10 database used in neutron lbaas env
a10_nlbaas_db_connection = mysql+pymysql://user:password@127.0.0.1/a10_db

# Connection string for the A10 database used in the octavia env
a10_oct_connection = mysql+pymysql://user:password@ip_address_of_remote_host/a10_db

Step 3: Perform the migration

Migrate a single loadbalancer and its child objects

a10_nlbaas2oct --config-file /path/to/a10_nlbaas2oct.conf --lb-id <loadbalancer_id>

Note: This takes in the UUID of the loadbalancer not the name

Migrate all lbaas objects in a project

a10_nlbaas2oct --config-file /path/to/a10_nlbaas2oct.conf --project-id <project_id>

Note: This takes in the UUID of the project not the name

Migrate all lbaas objects

a10_nlbaas2oct --config-file /path/to/a10_nlbaas2oct.conf --all

Note to Reader

The vast majority of this tooling was copied and modified from openstack's neutron-lbaas repo for ease of use purposes. The original can be found here https://github.com/openstack/neutron-lbaas/tree/stable/stein/tools/nlbaas2octavia

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

a10_nlbaas2oct-1.2.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

a10_nlbaas2oct-1.2.0-py2-none-any.whl (24.0 kB view details)

Uploaded Python 2

File details

Details for the file a10_nlbaas2oct-1.2.0.tar.gz.

File metadata

  • Download URL: a10_nlbaas2oct-1.2.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.21.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/2.7.17

File hashes

Hashes for a10_nlbaas2oct-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b674b0e9e493947d120e1b506a3ee781312357b135f36fa5ee56e72742e35a42
MD5 9ab0b715df6ded71ff07248c811becd4
BLAKE2b-256 9260c00684bfb781eeb417189791a7220bc660b5209dee948af6064825c47b41

See more details on using hashes here.

File details

Details for the file a10_nlbaas2oct-1.2.0-py2-none-any.whl.

File metadata

  • Download URL: a10_nlbaas2oct-1.2.0-py2-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.21.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/2.7.17

File hashes

Hashes for a10_nlbaas2oct-1.2.0-py2-none-any.whl
Algorithm Hash digest
SHA256 98953622f6f5c1c6e80054caf86824e4af39a55103ca6998857038550551e860
MD5 4e2c7b5662d03f0e412db539a1f6a18b
BLAKE2b-256 d01f98c3cf403c811566bfc73f0da5365a1c7e20649ef56320c6e9b127e893f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page