Browse Source

Merge "airskiff: Use Minikube for Kubernetes deployment"

changes/87/650087/1
Zuul 3 years ago
committed by Gerrit Code Review
parent
commit
ea1667a8b1
  1. 14
      doc/source/airskiff.rst
  2. 15
      tools/deployment/airskiff/common/setup-proxy.sh
  3. 1
      tools/deployment/airskiff/developer/000-install-packages.sh
  4. 13
      tools/deployment/airskiff/developer/010-deploy-k8s.sh
  5. 2
      tools/gate/playbooks/airskiff-deploy-gate.yaml

14
doc/source/airskiff.rst

@ -21,7 +21,7 @@ Airskiff is packaged with a set of deployment scripts modeled after the
These scripts:
* Download, build, and containerize the Airship components above from source.
* Deploy a Kubernetes cluster using KubeADM.
* Deploy a Kubernetes cluster using Minikube.
* Deploy Armada, Deckhand, and Shipyard using the latest `Armada image`_.
* Deploy OpenStack using the Airskiff site and charts from the
`OpenStack-Helm project`_.
@ -59,13 +59,13 @@ environment variables:
export USE_PROXY=true
export PROXY=${http_proxy}
export no_proxy=${no_proxy},172.17.0.1,.svc.cluster.local
export NO_PROXY=${NO_PROXY},172.17.0.1,.svc.cluster.local
export no_proxy=${no_proxy},10.0.2.15,.svc.cluster.local
export NO_PROXY=${NO_PROXY},10.0.2.15,.svc.cluster.local
.. note:: The ``.svc.cluster.local`` address is required to allow the OpenStack
client to communicate without being routed through proxy servers. The IP
address ``172.17.0.1`` is the advertised IP address for the Kubernetes API
server. Replace the addresses if your configuration does not match the one
address ``10.0.2.15`` is the advertised IP address of the minikube Kubernetes
cluster. Replace the addresses if your configuration does not match the one
defined above.
Deploy Airskiff
@ -110,8 +110,8 @@ Alternatively, this step can be performed by running the script directly:
./tools/deployment/airskiff/developer/005-clone-dependencies.sh
Deploy Kubernetes with KubeADM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Deploy Kubernetes with Minikube
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. literalinclude:: ../../tools/deployment/airskiff/developer/010-deploy-k8s.sh
:language: shell

15
tools/deployment/airskiff/common/setup-proxy.sh

@ -28,19 +28,4 @@ sed -i -e "/\s type:/a\ proxy_server: ${PROXY}" \
sed -i -e "/type: git/a\ proxy_server: ${PROXY}" \
tools/deployment/airskiff/manifests/airship.yaml
# Configure OpenStack-Helm proxy variables
cd ${INSTALL_PATH}
tee -a openstack-helm-infra/tools/gate/devel/local-vars.yaml << EOF
proxy:
http: ${PROXY}
https: ${PROXY}
noproxy: localhost,127.0.0.1,172.17.0.1,.svc.cluster.local
EOF
# Add DNS nameservers present in /etc/resolv.conf to OSH playbook vars
sed -ne "s/nameserver //p" /etc/resolv.conf | while read -r ns; do
sed -i -e "/external_dns_nameservers:/ a\ - ${ns}" \
openstack-helm-infra/tools/images/kubeadm-aio/assets/opt/playbooks/vars.yaml
done
cd "${CURRENT_DIR}"

1
tools/deployment/airskiff/developer/000-install-packages.sh

@ -26,6 +26,7 @@ sudo apt-get install --no-install-recommends -y \
jq \
nmap \
curl \
python-pip \
uuid-runtime \
apt-transport-https \
ca-certificates \

13
tools/deployment/airskiff/developer/010-deploy-k8s.sh

@ -1,7 +1,6 @@
#!/bin/bash
# Copyright 2017 The Openstack-Helm Authors.
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
# Copyright 2019, AT&T Intellectual Property
#
# 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
@ -25,10 +24,10 @@ if [ -n "${PROXY}" ]; then
. tools/deployment/airskiff/common/setup-proxy.sh
fi
# Deploy a kubeadm-administered cluster.
cd ${OSH_INFRA_PATH}
make dev-deploy setup-host
make dev-deploy k8s
cd "${CURRENT_DIR}"
# Deploy K8s with Minikube
cd "${OSH_INFRA_PATH}"
bash -c "./tools/deployment/common/005-deploy-k8s.sh"
kubectl label nodes --all --overwrite ucp-control-plane=enabled
cd "${CURRENT_DIR}"

2
tools/gate/playbooks/airskiff-deploy-gate.yaml

@ -21,7 +21,7 @@
chdir: "{{ zuul.project.src_dir }}"
become: yes
- name: Deploy Kubernetes with KubeADM
- name: Deploy Kubernetes with Minikube
shell: |
./tools/deployment/airskiff/developer/010-deploy-k8s.sh
args:

Loading…
Cancel
Save