mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
Adapt CI/vagrant to run without sample inventory
This commit is contained in:
3
Vagrantfile
vendored
3
Vagrantfile
vendored
@@ -58,8 +58,7 @@ $subnet ||= "172.18.8"
|
|||||||
$subnet_ipv6 ||= "fd3c:b398:0698:0756"
|
$subnet_ipv6 ||= "fd3c:b398:0698:0756"
|
||||||
$os ||= "ubuntu2004"
|
$os ||= "ubuntu2004"
|
||||||
$network_plugin ||= "flannel"
|
$network_plugin ||= "flannel"
|
||||||
$inventory ||= "inventory/sample"
|
$inventories ||= []
|
||||||
$inventories ||= [$inventory]
|
|
||||||
# Setting multi_networking to true will install Multus: https://github.com/k8snetworkplumbingwg/multus-cni
|
# Setting multi_networking to true will install Multus: https://github.com/k8snetworkplumbingwg/multus-cni
|
||||||
$multi_networking ||= "False"
|
$multi_networking ||= "False"
|
||||||
$download_run_once ||= "True"
|
$download_run_once ||= "True"
|
||||||
|
|||||||
@@ -9,19 +9,22 @@ create-tf:
|
|||||||
delete-tf:
|
delete-tf:
|
||||||
./scripts/delete-tf.sh
|
./scripts/delete-tf.sh
|
||||||
|
|
||||||
create-packet: init-packet
|
$(INVENTORY_DIR):
|
||||||
|
mkdir $@
|
||||||
|
|
||||||
|
create-packet: init-packet | $(INVENTORY_DIR)
|
||||||
ansible-playbook cloud_playbooks/create-packet.yml -c local \
|
ansible-playbook cloud_playbooks/create-packet.yml -c local \
|
||||||
-e @"files/${CI_JOB_NAME}.yml" \
|
-e @"files/${CI_JOB_NAME}.yml" \
|
||||||
-e test_name="$(subst .,-,$(CI_PIPELINE_ID)-$(CI_JOB_ID))" \
|
-e test_name="$(subst .,-,$(CI_PIPELINE_ID)-$(CI_JOB_ID))" \
|
||||||
-e branch="$(CI_COMMIT_BRANCH)" \
|
-e branch="$(CI_COMMIT_BRANCH)" \
|
||||||
-e pipeline_id="$(CI_PIPELINE_ID)" \
|
-e pipeline_id="$(CI_PIPELINE_ID)" \
|
||||||
-e inventory_path=$(INVENTORY_DIR)
|
-e inventory_path=$|
|
||||||
|
|
||||||
delete-packet: ;
|
delete-packet: ;
|
||||||
|
|
||||||
create-vagrant:
|
create-vagrant: | $(INVENTORY_DIR)
|
||||||
vagrant up
|
vagrant up
|
||||||
cp $(CI_PROJECT_DIR)/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $(INVENTORY_DIR)
|
cp $(CI_PROJECT_DIR)/.vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory $|
|
||||||
|
|
||||||
delete-vagrant:
|
delete-vagrant:
|
||||||
vagrant destroy -f
|
vagrant destroy -f
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ fi
|
|||||||
export ANSIBLE_REMOTE_USER=$SSH_USER
|
export ANSIBLE_REMOTE_USER=$SSH_USER
|
||||||
export ANSIBLE_BECOME=true
|
export ANSIBLE_BECOME=true
|
||||||
export ANSIBLE_BECOME_USER=root
|
export ANSIBLE_BECOME_USER=root
|
||||||
export ANSIBLE_INVENTORY=${CI_PROJECT_DIR}/inventory/sample/
|
export ANSIBLE_INVENTORY=/tmp/inventory/
|
||||||
|
|
||||||
make -C tests INVENTORY_DIR=${ANSIBLE_INVENTORY} create-${CI_PLATFORM} -s
|
make -C tests INVENTORY_DIR=${ANSIBLE_INVENTORY} create-${CI_PLATFORM} -s
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,10 @@
|
|||||||
vars:
|
vars:
|
||||||
test_image_repo: registry.k8s.io/e2e-test-images/agnhost
|
test_image_repo: registry.k8s.io/e2e-test-images/agnhost
|
||||||
test_image_tag: "2.40"
|
test_image_tag: "2.40"
|
||||||
|
# TODO: source those from kubespray-defaults instead.
|
||||||
|
# Needs kubespray-defaults to be decoupled from no-proxy stuff
|
||||||
bin_dir: "/usr/local/bin"
|
bin_dir: "/usr/local/bin"
|
||||||
|
kube_pods_subnet: 10.233.64.0/18
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user