@@ -6,15 +6,6 @@ AP := ansible-playbook -vv -c local -i localhost, -e ansible_python_interpreter=
6
6
# "By default, Ansible runs as if --tags all had been specified."
7
7
# https://docs.ansible.com/ansible/latest/user_guide/playbooks_tags.html#special-tags
8
8
TAGS ?= all
9
- VAGRANT_SSH_PORT = "$(shell cd containers && vagrant ssh-config | awk '/Port/{print $$2}') "
10
- VAGRANT_SSH_USER = "$(shell cd containers && vagrant ssh-config | awk '/User/{print $$2}') "
11
- VAGRANT_SSH_GUEST = "$(shell cd containers && vagrant ssh-config | awk '/HostName/{print $$2}') "
12
- VAGRANT_SSH_IDENTITY_FILE = "$(shell cd containers && vagrant ssh-config | awk '/IdentityFile/{print $$2}') "
13
- VAGRANT_SSH_CONFIG = $(shell cd containers && vagrant ssh-config | awk 'NR>1 {print " -o "$$1"="$$2}')
14
- VAGRANT_SHARED_DIR = "/vagrant"
15
-
16
- CENTOS_VAGRANT_BOX = CentOS-Stream-Vagrant-8-latest.x86_64.vagrant-libvirt.box
17
- CENTOS_VAGRANT_URL = https://cloud.centos.org/centos/8-stream/x86_64/images/$(CENTOS_VAGRANT_BOX )
18
9
19
10
CRC_PULL_SECRET ?= "$(shell cat secrets/openshift-local-pull-secret.yml) "
20
11
@@ -63,28 +54,11 @@ move-stable:
63
54
[[ -d move_stable_repositories ]] || scripts/move_stable.py init
64
55
scripts/move_stable.py move-all
65
56
66
- oc-cluster-create :
67
- # vagrant pointer is broken...
68
- [[ -f $(CENTOS_VAGRANT_BOX) ]] || wget $(CENTOS_VAGRANT_URL)
69
- cd containers && vagrant up
70
-
71
- oc-cluster-destroy :
72
- cd containers && vagrant destroy
73
-
74
- oc-cluster-up :
75
- cd containers && vagrant up
76
- cd containers && vagrant ssh -c " cd $( VAGRANT_SHARED_DIR) && $( AP) --extra-vars user=vagrant playbooks/oc-cluster-run.yml"
77
-
78
- oc-cluster-down :
79
- cd containers && vagrant halt
80
-
81
- oc-cluster-ssh : oc-cluster-up
82
- ssh $(VAGRANT_SSH_CONFIG ) localhost
83
-
84
- test-deploy :
85
- # to be run inside VM where the oc cluster && tmt is running! Call make tmt-vagrant-tests instead from outside the vagrant machine.
57
+ # to be run inside VM where the oc cluster && tmt is running!
58
+ # cd containers; make tmt-vagrant-tests instead for testing in the vagrant machine.
86
59
# SHARED_DIR could be /vagrant or /home/tmt/deployment, it depends on the VM where tmt is being run
87
60
# look inside deployment.fmf to find out the value of SHARED_DIR
61
+ test-deploy :
88
62
DEPLOYMENT=dev $(AP ) playbooks/generate-local-secrets.yml
89
63
DEPLOYMENT=dev $(AP ) -e ' {"user": $(USER), "src_dir": $(SHARED_DIR)}' playbooks/test_deploy_setup.yml
90
64
cd $(SHARED_DIR ) ; DEPLOYMENT=dev $(AP ) -e ' {"container_engine": "podman", "registry": "default-route-openshift-image-registry.apps-crc.testing", "registry_user": "kubeadmin", "user": $(USER), "src_dir": $(SHARED_DIR)}' playbooks/test_deploy.yml
@@ -94,12 +68,6 @@ test-deploy:
94
68
check-pull-secret :
95
69
if [ ! -f secrets/openshift-local-pull-secret.yml ] && [ ! -n " $( CRC_PULL_SECRET) " ]; then echo " no pull secret available create secrets/openshift-local-pull-secret.yml file or set CRC_PULL_SECRET variable" ; exit 1; else echo " pull secret found" ; fi
96
70
97
- # Execute tmt deployment test on a vagrant virtual machine
98
- # The virtual machine has to be already up and running,
99
- # using the target oc-cluster-up
100
- tmt-vagrant-test : check-pull-secret
101
- tmt run --all provision --how connect --user vagrant --guest $(VAGRANT_SSH_GUEST ) --port $(VAGRANT_SSH_PORT ) --key $(VAGRANT_SSH_IDENTITY_FILE ) plan --name deployment/vagrant
102
-
103
71
# Execute tmt deployment test on a local virtual machine provisioned by tmt
104
72
#
105
73
# tmt local provisioned virtual machine have by default 2 cpu cores
@@ -110,7 +78,7 @@ tmt-vagrant-test: check-pull-secret
110
78
# github action, there are no other ways (at the moment) to deal with
111
79
# the secrets (in our case the pull_request Openshift Local secret).
112
80
# For this reason the deployment/remote plan is not called by this file
113
- # but is called from the testing farm github action configured in this PR
81
+ # instead it is called from the testing farm github action
114
82
#
115
83
# Useful tmt/virsh commands to debug this test are listed below
116
84
# tmt run --id deployment --until execute
0 commit comments