c12s-kubespray/tests/Makefile
Cristian Calin dd2d95ecdf
[calico] don't enable ipip encapsulation by default and use vxlan in CI (#8434)
* [calico] make vxlan encapsulation the default

* don't enable ipip encapsulation by default
* set calico_network_backend by default to vxlan
* update sample inventory and documentation

* [CI] pin default calico parameters for upgrade tests to ensure proper upgrade

* [CI] improve netchecker connectivity testing

* [CI] show logs for tests

* [calico] tweak task name

* [CI] Don't run the provisioner from vagrant since we run it in testcases_run.sh

* [CI] move kube-router tests to vagrant to avoid network connectivity issues during netchecker check

* service proxy mode still fails connectivity tests so keeping it manual mode

* [kube-router] account for containerd use-case
2022-03-17 18:05:39 -07:00

82 lines
2.4 KiB
Makefile

INVENTORY=$(PWD)/../inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
$(HOME)/.ssh/id_rsa:
mkdir -p $(HOME)/.ssh
echo $(PRIVATE_KEY) | base64 -d > $(HOME)/.ssh/id_rsa
chmod 400 $(HOME)/.ssh/id_rsa
init-gce: $(HOME)/.ssh/id_rsa
# echo $(GCE_PEM_FILE) | base64 -d > $(HOME)/.ssh/gce
echo "$(GCE_CREDENTIALS_B64)" | base64 -d > $(HOME)/.ssh/gce.json
init-do: $(HOME)/.ssh/id_rsa
echo $(DO_PRIVATE_KEY) | base64 -d > $(HOME)/.ssh/id_rsa
init-packet:
echo $(PACKET_VM_SSH_PRIVATE_KEY) | base64 -d > $(HOME)/.ssh/id_rsa
chmod 400 $(HOME)/.ssh/id_rsa
create-tf:
./scripts/create-tf.sh
delete-tf:
./scripts/delete-tf.sh
create-gce: init-gce
ansible-playbook cloud_playbooks/create-gce.yml -i local_inventory/hosts.cfg -c local \
$(ANSIBLE_LOG_LEVEL) \
-e @"files/${CI_JOB_NAME}.yml" \
-e gce_credentials_file=$(HOME)/.ssh/gce.json \
-e gce_project_id=$(GCE_PROJECT_ID) \
-e gce_service_account_email=$(GCE_ACCOUNT) \
-e inventory_path=$(INVENTORY) \
-e test_id=$(TEST_ID) \
-e preemptible=$(GCE_PREEMPTIBLE)
delete-gce:
ansible-playbook -i $(INVENTORY) cloud_playbooks/delete-gce.yml -c local \
$(ANSIBLE_LOG_LEVEL) \
-e @"files/${CI_JOB_NAME}.yml" \
-e test_id=$(TEST_ID) \
-e gce_project_id=$(GCE_PROJECT_ID) \
-e gce_service_account_email=$(GCE_ACCOUNT) \
-e gce_credentials_file=$(HOME)/.ssh/gce.json \
-e inventory_path=$(INVENTORY)
create-do: init-do
ansible-playbook cloud_playbooks/create-do.yml -i local_inventory/hosts.cfg -c local \
${ANSIBLE_LOG_LEVEL} \
-e @"files/${CI_JOB_NAME}.yml" \
-e inventory_path=$(INVENTORY) \
-e test_id=${TEST_ID}
delete-do:
ansible-playbook -i $(INVENTORY) cloud_playbooks/create-do.yml -c local \
$(ANSIBLE_LOG_LEVEL) \
-e @"files/${CI_JOB_NAME}.yml" \
-e state=absent \
-e test_id=${TEST_ID} \
-e inventory_path=$(INVENTORY)
create-packet: init-packet
ansible-playbook cloud_playbooks/create-packet.yml -c local \
$(ANSIBLE_LOG_LEVEL) \
-e @"files/${CI_JOB_NAME}.yml" \
-e test_id=$(TEST_ID) \
-e inventory_path=$(INVENTORY)
delete-packet:
ansible-playbook cloud_playbooks/delete-packet.yml -c local \
$(ANSIBLE_LOG_LEVEL) \
-e @"files/${CI_JOB_NAME}.yml" \
-e test_id=$(TEST_ID) \
-e inventory_path=$(INVENTORY)
create-vagrant:
vagrant up
find / -name vagrant_ansible_inventory
cp /builds/kargo-ci/kubernetes-sigs-kubespray/inventory/sample/vagrant_ansible_inventory $(INVENTORY)
delete-vagrant:
vagrant destroy -f