Merge "airskiff: Use Minikube for Kubernetes deployment"

This commit is contained in:
Zuul 2019-04-03 23:28:28 +00:00 committed by Gerrit Code Review
commit ea1667a8b1
5 changed files with 15 additions and 30 deletions

View File

@ -21,7 +21,7 @@ Airskiff is packaged with a set of deployment scripts modeled after the
These scripts: These scripts:
* Download, build, and containerize the Airship components above from source. * 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 Armada, Deckhand, and Shipyard using the latest `Armada image`_.
* Deploy OpenStack using the Airskiff site and charts from the * Deploy OpenStack using the Airskiff site and charts from the
`OpenStack-Helm project`_. `OpenStack-Helm project`_.
@ -59,13 +59,13 @@ environment variables:
export USE_PROXY=true export USE_PROXY=true
export PROXY=${http_proxy} export PROXY=${http_proxy}
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},172.17.0.1,.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 .. note:: The ``.svc.cluster.local`` address is required to allow the OpenStack
client to communicate without being routed through proxy servers. The IP 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 address ``10.0.2.15`` is the advertised IP address of the minikube Kubernetes
server. Replace the addresses if your configuration does not match the one cluster. Replace the addresses if your configuration does not match the one
defined above. defined above.
Deploy Airskiff 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 ./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 .. literalinclude:: ../../tools/deployment/airskiff/developer/010-deploy-k8s.sh
:language: shell :language: shell

View File

@ -28,19 +28,4 @@ sed -i -e "/\s type:/a\ proxy_server: ${PROXY}" \
sed -i -e "/type: git/a\ proxy_server: ${PROXY}" \ sed -i -e "/type: git/a\ proxy_server: ${PROXY}" \
tools/deployment/airskiff/manifests/airship.yaml 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}" cd "${CURRENT_DIR}"

View File

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

View File

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
# Copyright 2017 The Openstack-Helm Authors. # Copyright 2019, AT&T Intellectual Property
# Copyright 2018 AT&T Intellectual Property. All other rights reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); you may # 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 # 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 . tools/deployment/airskiff/common/setup-proxy.sh
fi fi
# Deploy a kubeadm-administered cluster. # Deploy K8s with Minikube
cd ${OSH_INFRA_PATH} cd "${OSH_INFRA_PATH}"
make dev-deploy setup-host bash -c "./tools/deployment/common/005-deploy-k8s.sh"
make dev-deploy k8s
cd "${CURRENT_DIR}"
kubectl label nodes --all --overwrite ucp-control-plane=enabled kubectl label nodes --all --overwrite ucp-control-plane=enabled
cd "${CURRENT_DIR}"

View File

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