Skip to content

Commit

Permalink
Switching e2e tests to v3.0.0 (#282)
Browse files Browse the repository at this point in the history
* Switching e2e tests to v3.0.0

* Update cluster.yml

* Branch adjustments for OAI

* Further changes to OAI tests

* Quick fix for HTTP Error 403: Forbidden on community.general ansible collection

* Changing VM provisioning model from spot preemptive to classic

* Downgrading kubernetes.core ansible collection

* Downgrading kubernetes.core ansible collection once again

* Update catalog repo branch from main to v3.0.0

* Switching location for tests

* Removing few main references

* Adjusting revision in defaultswq

* Adjusting vm.mmap_rnd_bits for kernel 6.5

* Package revision fix from Liam

* Fixing uearansim version

* Default package revision to v1

* Adding origin prefix to package version

* Increasing timeout for CU-CP

* Increasing timeouts to 1800
  • Loading branch information
radoslawc authored Jul 17, 2024
1 parent cd7ceaa commit 4d8ad72
Show file tree
Hide file tree
Showing 29 changed files with 56 additions and 71 deletions.
3 changes: 2 additions & 1 deletion e2e/defaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
export HOME=${HOME:-/home/ubuntu/}
export TESTDIR=${TESTDIR:-$E2EDIR/tests/${E2ETYPE:-free5gc}}
export LIBDIR=${LIBDIR:-$E2EDIR/lib}
export REVISION=${REVISION:-main}
export REVISION=${REVISION:-R3}
export PACKAGE_REVISION=${PACKAGE_REVISION:-v1}
4 changes: 2 additions & 2 deletions e2e/provision/galaxy-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ roles:

collections:
- name: community.general
version: 9.1.0
version: 8.6.2
- name: kubernetes.core
version: 5.0.0
version: 2.4.0
- name: community.docker
version: 3.10.4
- name: ansible.posix
Expand Down
5 changes: 3 additions & 2 deletions e2e/provision/playbooks/cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
fs.inotify.max_user_instances: 512
kernel.keys.maxkeys: 500000
kernel.keys.maxbytes: 1000000
vm.mmap_rnd_bits: 28
- name: Install kubectl command-line
ansible.builtin.include_role:
name: andrewrothstein.kubectl
Expand Down Expand Up @@ -137,7 +138,7 @@
become_user: root
ansible.builtin.unarchive:
remote_src: true
src: https://github.com/nephio-project/porch/releases/download/main/porchctl.tgz
src: https://github.com/nephio-project/porch/releases/download/v3.0.0/porchctl_3.0.0_linux_amd64.tar.gz
dest: /usr/local/bin/
creates: /usr/local/bin/porchctl
roles:
Expand All @@ -162,7 +163,7 @@
repo_uri: "{{ nephio_catalog_repo_uri }}"
local_dest_directory: "{{ item.dest }}"
pkg: "{{ item.pkg }}"
version: main
version: v3.0.0
for_deployment: true
context: "{{ k8s.context }}"
kpt_async: 900
Expand Down
2 changes: 1 addition & 1 deletion e2e/provision/playbooks/roles/bootstrap/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ kind:
enabled: true

nephio_catalog_repo_uri: https://github.com/nephio-project/catalog.git
nephio_catalog_revision: main
nephio_catalog_revision: v3.0.0

gitea:
enabled: true
Expand Down
14 changes: 7 additions & 7 deletions e2e/provision/playbooks/roles/install/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ gitea:
password: secret

nephio_catalog_repo_uri: https://github.com/nephio-project/catalog.git
nephio_catalog_branch: main
nephio_catalog_branch: v3.0.0

nephio_stock_repos:
- name: catalog-distros-sandbox
Expand All @@ -43,7 +43,7 @@ nephio_stock_repos:
- name: oai-core-packages
repo: https://github.com/OPENAIRINTERFACE/oai-packages.git
directory: /
branch: r2
branch: r3
- name: catalog-workloads-oai-ran
repo: "{{ nephio_catalog_repo_uri }}"
directory: /workloads/oai
Expand All @@ -66,22 +66,22 @@ nephio:
packages:
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: nephio/core/porch
version: main
version: origin/v3.0.0
async: 480
poll: 5
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: nephio/core/nephio-operator
version: main
version: origin/v3.0.0
async: 480
poll: 5
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: nephio/core/configsync
version: main
version: origin/v3.0.0
async: 240
poll: 5
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: nephio/optional/network-config
version: main
version: origin/v3.0.0
async: 480
poll: 0

Expand All @@ -92,4 +92,4 @@ nephio_webui:
package:
repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: nephio/optional/webui
version: main
version: origin/v3.0.0
18 changes: 0 additions & 18 deletions e2e/terraform/modules/gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,6 @@ provider "google" {
zone = var.zone
}

provider "google-beta" {
credentials = file(var.credentials)
project = var.project
region = var.region
zone = var.zone
}

resource "random_string" "vm-name" {
length = 6
upper = false
Expand Down Expand Up @@ -55,7 +48,6 @@ resource "google_compute_instance" "lab_instances" {
}

resource "google_compute_instance" "e2e_instances" {
provider = google-beta
count = var.nephio_e2e_nodes
name = local.vm-name
machine_type = var.instance
Expand Down Expand Up @@ -111,14 +103,4 @@ resource "google_compute_instance" "e2e_instances" {
"sudo -E FAIL_FAST=${var.nephio_e2e_fail_fast} E2ETYPE=${var.nephio_e2e_type} NEPHIO_REPO_DIR=/home/${var.ansible_user}/test-infra NEPHIO_DEBUG=true NEPHIO_RUN_E2E=true NEPHIO_USER=${var.ansible_user} ./init.sh"
]
}
scheduling {
max_run_duration {
seconds = 2 * 60 * 60
}
instance_termination_action = "DELETE"
on_host_maintenance = "TERMINATE"
preemptible = true
automatic_restart = false
provisioning_model = "SPOT"
}
}
4 changes: 2 additions & 2 deletions e2e/terraform/modules/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ variable "project" {

variable "region" {
description = "GCP region to deploy CI instances"
default = "us-central1"
default = "europe-west9"
type = string
}

variable "zone" {
description = "GCP zone to deploy CI instances"
default = "us-central1-c"
default = "europe-west9-a"
type = string
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/002-edge-clusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
upstream:
repo: catalog-infra-capi
package: nephio-workload-cluster
revision: main
revision: v3.0.0
targets:
- repositories:
- name: mgmt
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/002-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
upstream:
repo: catalog-distros-sandbox
package: network
revision: main
revision: v3.0.0
downstream:
repo: mgmt
package: network
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/004-free5gc-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
upstream:
repo: catalog-workloads-free5gc
package: free5gc-operator
revision: main
revision: v3.0.0
targets:
- objectSelector:
apiVersion: infra.nephio.org/v1alpha1
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/004.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ k8s_apply "$TESTDIR/004-free5gc-operator.yaml"
kubeconfig="$HOME/.kube/config"
for cluster in $(kubectl get cl -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' --kubeconfig "$kubeconfig"); do
k8s_wait_exists "packagevariant" "free5gc-operator-$cluster-free5gc-operator"
porch_wait_published_packagerev "free5gc-operator" "$cluster"
porch_wait_published_packagerev "free5gc-operator" "$cluster" "$PACKAGE_REVISION"
kpt_wait_pkg "$cluster" "free5gc-operator"
k8s_wait_ready_replicas "deployment" "free5gc-operator" "$(k8s_get_capi_kubeconfig "$cluster")" "free5gc"
done
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/005-edge-free5gc-upf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
upstream:
repo: catalog-workloads-free5gc
package: pkg-example-upf-bp
revision: main
revision: v3.0.0
targets:
- objectSelector:
apiVersion: infra.nephio.org/v1alpha1
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/005.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ k8s_apply "$TESTDIR/005-edge-free5gc-upf.yaml"

for cluster in "edge01" "edge02"; do
k8s_wait_exists "packagevariant" "edge-free5gc-upf-${cluster}-free5gc-upf"
porch_wait_published_packagerev "free5gc-upf" "$cluster"
porch_wait_published_packagerev "free5gc-upf" "$cluster" "$PACKAGE_REVISION"
kpt_wait_pkg "$cluster" "free5gc-upf"
k8s_wait_ready_replicas "deployment" "upf-${cluster}" "$(k8s_get_capi_kubeconfig "$cluster")" "free5gc-upf"
done
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/006-regional-free5gc-amf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
upstream:
repo: catalog-workloads-free5gc
package: pkg-example-amf-bp
revision: main
revision: v3.0.0
targets:
- objectSelector:
apiVersion: infra.nephio.org/v1alpha1
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/006-regional-free5gc-smf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
upstream:
repo: catalog-workloads-free5gc
package: pkg-example-smf-bp
revision: main
revision: v3.0.0
targets:
- objectSelector:
apiVersion: infra.nephio.org/v1alpha1
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/006.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cluster_kubeconfig=$(k8s_get_capi_kubeconfig "regional")
# check the NFs
for nf in amf smf; do
k8s_wait_exists "packagevariant" "regional-free5gc-$nf-regional-free5gc-$nf"
porch_wait_published_packagerev "free5gc-$nf" "regional"
porch_wait_published_packagerev "free5gc-$nf" "regional" "$PACKAGE_REVISION"
kpt_wait_pkg "regional" "free5gc-$nf"
k8s_wait_ready_replicas "deployment" "$nf-regional" "$cluster_kubeconfig" "free5gc-cp"
done
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/007-edge01-ueransim.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
upstream:
repo: catalog-workloads-tools
package: ueransim
revision: main
revision: v3.0.0
downstream:
repo: edge01
package: ueransim
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/free5gc/007.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ curl -s -X GET -H 'Token: admin' "http://${ip}:${port}/api/subscriber"
# Deploy UERANSIM to edge01
k8s_apply "$TESTDIR/007-edge01-ueransim.yaml"
k8s_wait_ready "packagevariant" "edge01-ueransim"
porch_wait_published_packagerev "ueransim" "edge01"
porch_wait_published_packagerev "ueransim" "edge01" "$PACKAGE_REVISION"
edge01_kubeconfig=$(k8s_get_capi_kubeconfig "edge01")
k8s_wait_ready_replicas "deployment" "ueransimgnb-edge01" "$edge01_kubeconfig" "ueransim"
k8s_wait_ready_replicas "deployment" "ueransimue-edge01" "$edge01_kubeconfig" "ueransim"
Expand Down
6 changes: 3 additions & 3 deletions e2e/tests/oai/001-infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
upstream:
repo: catalog-infra-capi
package: nephio-workload-cluster
revision: main
revision: v3.0.0
downstream:
repo: mgmt
package: core
Expand All @@ -37,7 +37,7 @@ spec:
upstream:
repo: catalog-infra-capi
package: nephio-workload-cluster
revision: main
revision: v3.0.0
targets:
- repositories:
- name: mgmt
Expand All @@ -61,7 +61,7 @@ spec:
upstream:
repo: catalog-infra-capi
package: nephio-workload-cluster
revision: main
revision: v3.0.0
targets:
- repositories:
- name: mgmt
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/oai/001-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
upstream:
repo: catalog-distros-sandbox
package: network
revision: main
revision: v3.0.0
downstream:
repo: mgmt
package: network
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/oai/001b-infra-metal-lb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ function _define_ip_address_pool {
}

_define_ip_address_pool "core" "172.18.16.0/20"
_define_ip_address_pool "edge" "172.18.48.0/20"
2 changes: 1 addition & 1 deletion e2e/tests/oai/002-database.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
upstream:
repo: oai-core-packages
package: database
revision: r2
revision: r3
targets:
- objectSelector:
apiVersion: infra.nephio.org/v1alpha1
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/oai/002-operators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
upstream:
repo: oai-core-packages
package: oai-cp-operators
revision: r2
revision: r3
downstream:
repo: core
package: oai-cp-operators
Expand All @@ -33,7 +33,7 @@ spec:
upstream:
repo: oai-core-packages
package: oai-up-operators
revision: r2
revision: r3
downstream:
repo: edge
package: oai-up-operators
Expand All @@ -51,7 +51,7 @@ spec:
upstream:
repo: catalog-workloads-oai-ran
package: oai-ran-operator
revision: main
revision: v3.0.0
downstream:
repo: edge
package: oai-ran-operator
Expand All @@ -69,7 +69,7 @@ spec:
upstream:
repo: catalog-workloads-oai-ran
package: oai-ran-operator
revision: main
revision: v3.0.0
downstream:
repo: regional
package: oai-ran-operator
Expand Down
2 changes: 1 addition & 1 deletion e2e/tests/oai/003-core-network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function _wait_for_pfcp_session {

info "waiting for PFCP session to be established"
timeout=600
until kubectl logs -l workload.nephio.org/oai=upf -n oai-core -c upf-edge --kubeconfig "$kubeconfig" --tail -1 | grep -q 'Received SX HEARTBEAT REQUEST'; do
until kubectl logs -l workload.nephio.org/oai=upf -n oai-core -c upf-edge --kubeconfig "$kubeconfig" --tail -1 | grep 'Received SX HEARTBEAT REQUEST'; do
if [[ $timeout -lt 0 ]]; then
kubectl logs -l workload.nephio.org/oai=upf -n oai-core -c upf-edge --kubeconfig "$kubeconfig" --tail 50
error "Timed out waiting for PFCP session"
Expand Down
Loading

0 comments on commit 4d8ad72

Please sign in to comment.