Files
openstack-operator/devstack/lib/neutron-legacy
Mohammed Naser f2f13f9098 Migrate neutron-server to Kubernetes
Depends-On: https://review.opendev.org/746820
Change-Id: Ifcacea22a259134ffde03d2d8ca510f57dbe626d
2020-08-18 20:45:39 -04:00

42 lines
1.4 KiB
Bash

#!/bin/bash
#
# 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.
function init_mutnauq {
recreate_database $Q_DB_NAME
}
export -f init_mutnauq
function start_neutron_service_and_check {
neutron_plugin_configure_common
kubectl -n openstack create secret generic neutron-config \
--from-file=/etc/neutron/neutron.conf \
--from-file=/etc/neutron/api-paste.ini \
--from-file=/etc/neutron/policy.json
kubectl -n openstack create secret generic neutron-ml2-config \
--from-file=/etc/neutron/plugins/ml2/ml2_conf.ini
kubernetes_rollout_restart daemonset/neutron
kubernetes_rollout_status daemonset/neutron
proxy_pass_to_kubernetes /networking neutron neutron-api
neutron_url=$Q_PROTOCOL://${Q_HOST}/networking/
if ! wait_for_service $SERVICE_TIMEOUT $neutron_url; then
die $LINENO "neutron-api did not start"
fi
}
export -f start_neutron_service_and_check