openstack-operator/playbooks/functional/run.yaml

58 lines
1.9 KiB
YAML
Executable File

---
# Copyright (c) 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.
- hosts: all
pre_tasks:
- name: Create secret for DevStack credentials
shell: |
cat <<EOF | kubectl apply -f-
apiVersion: v1
kind: Secret
metadata:
name: devstack
stringData:
OS_INSECURE: "true"
OS_AUTH_URL: http://{{ hostvars['controller']['nodepool']['private_ipv4'] }}/identity
OS_AUTH_TYPE: password
OS_PROJECT_DOMAIN_ID: default
OS_PROJECT_NAME: admin
OS_USER_DOMAIN_ID: default
OS_USERNAME: admin
OS_PASSWORD: secretadmin
OS_REGION_NAME: RegionOne
EOF
# NOTE(alex): To resolve the minikube issue
# https://github.com/kubernetes/minikube/issues/7218
- include_tasks: storage-provisioner.yaml
- name: Copy mysql operator into devstack working directory
git:
repo: https://github.com/presslabs/mysql-operator
dest: /opt/stack/mysql-operator
become: true
roles:
- role: helm-template
vars:
helm_release_name: mysql-operator
helm_chart: /opt/stack/mysql-operator/charts/mysql-operator
helm_values_file: /opt/stack/mysql-operator/charts/mysql-operator/values.yaml
- role: helm-template
vars:
helm_release_name: openstack-operator
helm_chart: ./chart
helm_values_file: ./chart/test-values.yaml
- import_playbook: devstack.yaml