diff options
Diffstat (limited to 'vagrant')
-rw-r--r-- | vagrant/inventory/group_vars/k8s-cluster.yml | 13 | ||||
-rwxr-xr-x | vagrant/setup.sh | 14 | ||||
-rwxr-xr-x | vagrant/tests/plugin.sh | 6 |
3 files changed, 11 insertions, 22 deletions
diff --git a/vagrant/inventory/group_vars/k8s-cluster.yml b/vagrant/inventory/group_vars/k8s-cluster.yml index 4de3a276..8f719a43 100644 --- a/vagrant/inventory/group_vars/k8s-cluster.yml +++ b/vagrant/inventory/group_vars/k8s-cluster.yml @@ -7,12 +7,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -## For some things, kubelet needs to load kernel modules. For example, dynamic kernel services are needed -## for mounting persistent volumes into containers. These may not be loaded by preinstall kubernetes -## processes. For example, ceph and rbd backed volumes. Set to true to allow kubelet to load kernel -## modules. -kubelet_load_modules: true - # Kubernetes configuration dirs and system namespace. # Those are where all the additional config stuff goes # kubernetes normally puts in /srv/kubernetes. @@ -44,17 +38,12 @@ kube_token_auth: true # Can also be set to 'cloud', which lets the cloud provider setup appropriate routing kube_network_plugin: flannel -# Settings for containerized control plane -kubelet_deployment_type: host - -# NGINX Ingress Controller -ingress_nginx_enabled: true - # Make a copy of kubeconfig on the host that runs Ansible in GITDIR/artifacts kubeconfig_localhost: true # Enable MountPropagation gate feature local_volumes_enabled: true +local_volume_provisioner_enabled: true ## Change this to use another Kubernetes version, e.g. a current beta release kube_version: v1.12.3 diff --git a/vagrant/setup.sh b/vagrant/setup.sh index 0fb1b0d6..9c65ccdb 100755 --- a/vagrant/setup.sh +++ b/vagrant/setup.sh @@ -11,8 +11,8 @@ set -o nounset set -o pipefail -vagrant_version=2.2.3 -if ! $(vagrant version &>/dev/null); then +vagrant_version=2.2.4 +if ! vagrant version &>/dev/null; then enable_vagrant_install=true else if [[ "$vagrant_version" != "$(vagrant version | awk 'NR==1{print $3}')" ]]; then @@ -78,7 +78,7 @@ case ${ID,,} in case $VAGRANT_DEFAULT_PROVIDER in virtualbox) - wget -q http://download.virtualbox.org/virtualbox/rpm/opensuse/$VERSION/virtualbox.repo -P /etc/zypp/repos.d/ + wget -q "http://download.virtualbox.org/virtualbox/rpm/opensuse/$VERSION/virtualbox.repo" -P /etc/zypp/repos.d/ $INSTALLER_CMD --enablerepo=epel dkms wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | rpm --import - packages+=(VirtualBox-5.1) @@ -124,7 +124,7 @@ case ${ID,,} in rhel|centos|fedora) PKG_MANAGER=$(which dnf || which yum) - sudo $PKG_MANAGER updateinfo + sudo "$PKG_MANAGER" updateinfo INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -q -y install" packages+=(python-devel) @@ -174,7 +174,7 @@ else fi sudo modprobe vhost_net -${INSTALLER_CMD} ${packages[@]} +${INSTALLER_CMD} "${packages[@]}" if ! which pip; then curl -sL https://bootstrap.pypa.io/get-pip.py | sudo python else @@ -184,9 +184,9 @@ sudo -H -E pip install tox if [[ ${http_proxy+x} ]]; then vagrant plugin install vagrant-proxyconf fi -if [ $VAGRANT_DEFAULT_PROVIDER == libvirt ]; then +if [ "$VAGRANT_DEFAULT_PROVIDER" == libvirt ]; then vagrant plugin install vagrant-libvirt - sudo usermod -a -G $libvirt_group $USER # This might require to reload user's group assigments + sudo usermod -a -G $libvirt_group "$USER" # This might require to reload user's group assigments sudo systemctl restart libvirtd # Start statd service to prevent NFS lock errors diff --git a/vagrant/tests/plugin.sh b/vagrant/tests/plugin.sh index 2ed37b18..b36e75f5 100755 --- a/vagrant/tests/plugin.sh +++ b/vagrant/tests/plugin.sh @@ -114,7 +114,7 @@ print_msg "Instantiate Profile" payload_raw=" { \"cloud_region_id\": \"$cloud_region_id\", - \"namespace\": \"$namespace\", + \"rb_profile_id\":\"$profile_id\", \"csar_id\": \"$csar_id\" } " @@ -122,8 +122,8 @@ payload=$(echo $payload_raw | tr '\n' ' ') vnf_id=$(curl -s -d "$payload" "${base_url}/v1/vnf_instances/" | jq -r '.vnf_id') print_msg "Validating Kubernetes" -kubectl get --no-headers=true --namespace=${namespace} deployment ${cloud_region_id}-${namespace}-${vnf_id}-${plugin_deployment_name} -kubectl get --no-headers=true --namespace=${namespace} service ${cloud_region_id}-${namespace}-${vnf_id}-${plugin_service_name} +kubectl get --no-headers=true --namespace=${namespace} deployment ${cloud_region_id}-${namespace}-${vnf_id}-test-rbprofile-vault-consul-dev +kubectl get --no-headers=true --namespace=${namespace} service ${cloud_region_id}-${namespace}-${vnf_id}-override-vault-consul echo "VNF Instance created succesfully with id: $vnf_id" print_msg "Listing VNF Instances" |