
This is a squashed commit, keeping previous messages intact for history. - chore(tools/gate/jarvis): remove unused http_proxy - fix(tools/gate/deploy-k8s): pre-pull Calico images By pre-pulling Calico images, we can better ensure the timeout for `kubectl wait` for `k8s-app=kube-dns` is sufficient, since most of the time spent is on pulling images. - fix(tools/gate/jarvis): skip loki Helm test when proxy is set The Loki test attempts to install `curl` and `jq`, which will fail when a proxy is required since the pod doesn't setup proxy environment variables. - feat(tools/deployment/vagrant): support providing a cert for proxy - feat(ubuntu-base/standard-container): support internal-certs The Vagrant file mounts an additional synced folder to /airship_charts/tools/gate/jarvis/ubuntu-base/internal-certs. This internal-certs dir has been added to this Git repository using a placeholder `.gitkeep` file to keep the directory non-empty. This directory has also been added to .gitignore to prevent any changes such as the mounted internal certs from being committed. The ubuntu-base image sets the proxy env vars as well as contains the internal certs. The standard container is then based on the ubuntu-base image. The ubuntu-base image is published as library/ubuntu:focal in harbor. - fix(tools/gate/jarvis): support Harbor behind proxy with cert Change-Id: I602dfa3b04b798a1a2096242ffb6dfe7f2ba92e4
58 lines
2.0 KiB
Ruby
58 lines
2.0 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure("2") do |config|
|
|
config.vm.box = "generic/ubuntu2004"
|
|
|
|
if Vagrant.has_plugin?("vagrant-proxyconf")
|
|
config.proxy.http = ENV["HTTP_PROXY"]
|
|
config.proxy.https = ENV["HTTPS_PROXY"]
|
|
if ENV["NO_PROXY"].nil?
|
|
config.proxy.no_proxy = "localhost,127.0.0.1,10.96.0.0/12,192.168.49.0/24,192.168.99.0/24,10.0.2.15,10.244.0.0/16,172.28.0.0/30,.minikube.internal,.svc,.svc.cluster.local,jarvis.local"
|
|
else
|
|
config.proxy.no_proxy = ENV["NO_PROXY"]
|
|
end
|
|
end
|
|
|
|
config.vm.synced_folder "../../../", "/airship_charts"
|
|
|
|
if ENV["INTERNAL_CERTS_DIR"]
|
|
# for guest OS to trust proxy itself
|
|
config.vm.synced_folder ENV["INTERNAL_CERTS_DIR"], "/usr/local/share/ca-certificates/internal-certs/"
|
|
# for containerd/docker to trust proxy when pulling images within kubernetes cluster
|
|
config.vm.synced_folder ENV["INTERNAL_CERTS_DIR"], "/etc/containerd/cert.d/"
|
|
# for use by ubuntu-base to trust proxy
|
|
config.vm.synced_folder ENV["INTERNAL_CERTS_DIR"], "/airship_charts/tools/gate/jarvis/ubuntu-base/internal-certs/"
|
|
end
|
|
|
|
config.vm.network "private_network", ip: "192.168.56.10"
|
|
|
|
config.vm.provider "libvirt" do |libvirt|
|
|
libvirt.cpus = 4
|
|
libvirt.memory = 8192
|
|
end
|
|
|
|
config.vm.provider "virtualbox" do |vb|
|
|
vb.gui = false
|
|
vb.cpus = 4
|
|
vb.memory = 8192
|
|
end
|
|
|
|
config.vm.provision "shell", privileged: false, env: {"PRIVATE_NS" => ENV["PRIVATE_NS"]}, inline: <<-SHELL
|
|
set -ex
|
|
cd /airship_charts/
|
|
./tools/gate/jarvis/010-pre-setup.sh
|
|
./tools/gate/jarvis/050-setup-development-ca.sh
|
|
./tools/gate/jarvis/100-deploy-k8s.sh
|
|
./tools/gate/jarvis/150-deploy-kyverno.sh
|
|
./tools/gate/jarvis/200-deploy-support.sh
|
|
./tools/gate/jarvis/300-deploy-loki.sh
|
|
./tools/gate/jarvis/400-deploy-harbor.sh
|
|
./tools/gate/jarvis/500-deploy-gerrit.sh
|
|
./tools/gate/jarvis/600-deploy-tekton.sh
|
|
./tools/gate/jarvis/650-temporary-setup.sh
|
|
./tools/gate/jarvis/700-deploy-jarvis-system.sh
|
|
./tools/gate/jarvis/800-deploy-jarvis-projects.sh
|
|
SHELL
|
|
end
|