openstack-operator/devstack/lib/keystone

69 lines
2.1 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.
# install_keystone() - Collect source and prepare
function install_keystone {
# rollout keystone
kubernetes_rollout_restart daemonset/keystone
kubernetes_rollout_status daemonset/keystone
# Get right service port for testing
local service_port=$KEYSTONE_SERVICE_PORT
local auth_protocol=$KEYSTONE_AUTH_PROTOCOL
if is_service_enabled tls-proxy; then
service_port=$KEYSTONE_SERVICE_PORT_INT
auth_protocol="http"
fi
proxy_pass_to_kubernetes /identity_admin keystone keystone-wsgi-admin
proxy_pass_to_kubernetes /identity keystone keystone-wsgi-public
echo "Waiting for keystone to start..."
# Check that the keystone service is running. Even if the tls tunnel
# should be enabled, make sure the internal port is checked using
# unencryted traffic at this point.
# If running in Apache, use the path rather than port.
local service_uri=$auth_protocol://$KEYSTONE_SERVICE_HOST/identity/v$IDENTITY_API_VERSION/
if ! wait_for_service $SERVICE_TIMEOUT $service_uri; then
die $LINENO "keystone did not start"
fi
}
export -f install_keystone
# configure_keystone() - Set config files, create data dirs, etc
function configure_keystone {
echo noop
}
# init_keystone() - Initialize databases, etc.
function init_keystone {
echo noop
}
export -f init_keystone
# start_keystone() - Start running processes
function start_keystone {
echo noop
}
export -f start_keystone
# bootstrap_keystone() - Initialize user, role and project
function bootstrap_keystone {
echo noop
}
export -f bootstrap_keystone