Migrated Neutron RabbitMQ to Kubernetes
Change-Id: I10c6e8b39e754a86ab7c3b1312c108a5d1383be2
This commit is contained in:
parent
467e8a443d
commit
40ca6cd8e0
@ -14,6 +14,48 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
function configure_mutnauq {
|
||||
_configure_neutron_common
|
||||
|
||||
kubernetes_ensure_resource secret/neutron-rabbitmq
|
||||
NEUTRON_RABBITMQ_USERNAME=$(get_data_from_secret neutron-rabbitmq openstack username)
|
||||
NEUTRON_RABBITMQ_PASSWORD=$(get_data_from_secret neutron-rabbitmq openstack password)
|
||||
iniset $NEUTRON_CONF DEFAULT transport_url "rabbit://$NEUTRON_RABBITMQ_USERNAME:$NEUTRON_RABBITMQ_PASSWORD@rabbitmq-neutron.openstack.svc.cluster.local:5672/"
|
||||
|
||||
if is_service_enabled q-metering; then
|
||||
_configure_neutron_metering
|
||||
fi
|
||||
if is_service_enabled q-agt q-svc; then
|
||||
_configure_neutron_service
|
||||
fi
|
||||
if is_service_enabled q-agt; then
|
||||
_configure_neutron_plugin_agent
|
||||
fi
|
||||
if is_service_enabled q-dhcp; then
|
||||
_configure_neutron_dhcp_agent
|
||||
fi
|
||||
if is_service_enabled q-l3; then
|
||||
_configure_neutron_l3_agent
|
||||
fi
|
||||
if is_service_enabled q-meta; then
|
||||
_configure_neutron_metadata_agent
|
||||
fi
|
||||
|
||||
if [[ "$Q_DVR_MODE" != "legacy" ]]; then
|
||||
_configure_dvr
|
||||
fi
|
||||
if is_service_enabled ceilometer; then
|
||||
_configure_neutron_ceilometer_notifications
|
||||
fi
|
||||
|
||||
iniset $NEUTRON_CONF DEFAULT api_workers "$API_WORKERS"
|
||||
# devstack is not a tool for running uber scale OpenStack
|
||||
# clouds, therefore running without a dedicated RPC worker
|
||||
# for state reports is more than adequate.
|
||||
iniset $NEUTRON_CONF DEFAULT rpc_state_report_workers 0
|
||||
}
|
||||
export -f configure_mutnauq
|
||||
|
||||
function init_mutnauq {
|
||||
echo noop
|
||||
}
|
||||
|
@ -33,8 +33,13 @@ def create_or_resume(spec, **_):
|
||||
start the service up for the first time.
|
||||
"""
|
||||
|
||||
if not utils.ensure_secret("openstack", "neutron-rabbitmq"):
|
||||
utils.create_or_update('neutron/secret-rabbitmq.yml.j2',
|
||||
password=utils.generate_password())
|
||||
|
||||
database.ensure_mysql_cluster("neutron")
|
||||
|
||||
utils.create_or_update('neutron/rabbitmq.yml.j2')
|
||||
utils.create_or_update('neutron/daemonset.yml.j2', spec=spec)
|
||||
utils.create_or_update('neutron/service.yml.j2')
|
||||
|
||||
|
27
openstack_operator/templates/neutron/rabbitmq.yml.j2
Normal file
27
openstack_operator/templates/neutron/rabbitmq.yml.j2
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
# Copyright 2020 VEXXHOST, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
apiVersion: infrastructure.vexxhost.cloud/v1alpha1
|
||||
kind: Rabbitmq
|
||||
metadata:
|
||||
name: neutron
|
||||
namespace: openstack
|
||||
spec:
|
||||
authSecret: neutron-rabbitmq
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/master: ""
|
||||
tolerations:
|
||||
- key: node-role.kubernetes.io/master
|
||||
effect: NoSchedule
|
@ -0,0 +1,8 @@
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: neutron-rabbitmq
|
||||
namespace: openstack
|
||||
stringData:
|
||||
username: neutron
|
||||
password: {{ password }}
|
||||
kind: Secret
|
Loading…
x
Reference in New Issue
Block a user