Add a k8s cluster for the k8s related FT in zuul
This patch add a kubernetes cluster for the kubernetes related
functional tests of the VNF LCM in the zuul environment.
There is no impact to the existing jobs because this patch only
add a new job, however we may need to watch the load on the Zuul
environment due to its parallel jobs.
A new node-set consists of four nodes;
* Controller: Keystone, Nova, Neutron, Glance, Cinder, Octavia,
MySQL, MQ, ETCD
* Controller-tacker: Tacker, Tacker-conductor
* Controller-k8s: kuryr-k8s, kuryr-CNI, k8s-api, kubelet
* Compute: Nova-compute
All kubernetes resources are created on the controller-k8s node.
This patch includes the following changes:
* Added a execution command for the functional test of related
k8s for the VNF LCM in tox.ini.
* Registered a vim of the `kubernetes` type by ansible. Also
added related materials.
* Moved the functional test files for k8s to other new directory.
* Fixed a minor invalid definition in the definition file used
for functional testing.
Change-Id: I1621b904450e94d6793b4c524de6785520f2e805
2020-12-14 05:45:04 +00:00
|
|
|
#!/bin/bash -xe
|
|
|
|
|
|
|
|
# This script is used to set up default vim
|
|
|
|
# for functional testing, which cannot be put
|
|
|
|
# in devstack/plugin.sh because new zuul3 CI
|
|
|
|
# cannot keep the devstack plugins order
|
|
|
|
#
|
|
|
|
# Also, this script updates the following
|
|
|
|
# parameter which has been modified
|
|
|
|
# unintentionally by ansible playbook
|
|
|
|
# `roles/setup-default-vim/tasks/main.yaml`
|
|
|
|
# according to the execution environment of
|
|
|
|
# Zuul.
|
|
|
|
#
|
|
|
|
# --os-auth-url
|
|
|
|
# --config-file
|
|
|
|
|
2022-08-01 07:32:34 +00:00
|
|
|
conf_dir=/opt/stack/tacker/tacker/tests/etc/samples
|
|
|
|
|
|
|
|
register_vim() {
|
|
|
|
openstack vim register \
|
|
|
|
--os-username nfv_user \
|
|
|
|
--os-project-name nfv \
|
|
|
|
--os-password devstack \
|
|
|
|
--os-auth-url http://127.0.0.1/identity \
|
|
|
|
--os-project-domain-name Default \
|
|
|
|
--os-user-domain-name Default \
|
|
|
|
--description "Kubernetes VIM" \
|
|
|
|
--config-file $1 \
|
|
|
|
$2
|
|
|
|
}
|
|
|
|
|
|
|
|
# regiter vim with bearer token
|
|
|
|
register_vim $conf_dir/local-k8s-vim.yaml vim-kubernetes
|
|
|
|
|
|
|
|
# regiter vim with OpenID Connect info
|
|
|
|
if [ -f $conf_dir/local-k8s-vim-oidc.yaml ]
|
|
|
|
then
|
|
|
|
register_vim $conf_dir/local-k8s-vim-oidc.yaml vim-kubernetes-oidc
|
|
|
|
fi
|