Skip to content

Commit

Permalink
Update the list of Nephio stocks repositories (nephio-project#229)
Browse files Browse the repository at this point in the history
* Update Nephio stocks repositories

Signed-off-by: Victor Morales <v.morales@samsung.com>

* Use latest porch catalog version

Signed-off-by: Victor Morales <v.morales@samsung.com>

* Bump kpt cli version to 1.0.0-beta.49

Signed-off-by: Victor Morales <v.morales@samsung.com>

* Deprecated nephio-example-packages repository

Signed-off-by: Victor Morales <v.morales@samsung.com>

* Fix gitea deployment process

Signed-off-by: Victor Morales <v.morales@samsung.com>

* Use catalog-workloads-tools repo for free5gc e2e test

Signed-off-by: Victor Morales <v.morales@samsung.com>

* Increase kpt waiting time for OAI NFs

* Drop free5gc-packages repository reference

Signed-off-by: Victor Morales <v.morales@samsung.com>

* Remove unused reference to catalog-workloads-oai repo

Signed-off-by: Victor Morales <v.morales@samsung.com>

---------

Signed-off-by: Victor Morales <v.morales@samsung.com>
  • Loading branch information
electrocucaracha authored and dkosteck committed Aug 15, 2024
1 parent 10c2360 commit 11c7c64
Show file tree
Hide file tree
Showing 31 changed files with 162 additions and 201 deletions.
2 changes: 1 addition & 1 deletion e2e/provision/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Vagrant.configure('2') do |config|
NEPHIO_RUN_E2E: ENV.fetch('NEPHIO_RUN_E2E', false),
NEPHIO_USER: ENV.fetch('NEPHIO_USER', 'vagrant'),
NEPHIO_REPO_DIR: '/opt/test-infra',
ANSIBLE_CMD_EXTRA_VAR_LIST: "k8s.context='kind-kind' nephio_pkg_version= '#{ENV['NEPHIO_PKG_VERSION'] || 'main'}' nephio_example_repo_uri='#{ENV['NEPHIO_EXAMPLE_REPO_URI'] || 'https://github.com/nephio-project/nephio-example-packages.git'}'",
ANSIBLE_CMD_EXTRA_VAR_LIST: "k8s.context='kind-kind' nephio_catalog_repo_uri='#{ENV['NEPHIO_CATALOG_REPO_URI'] || 'https://github.com/nephio-project/nephio-catalog-packages.git'}'",
E2EDIR: '/opt/test-infra/e2e',
E2ETYPE: ENV.fetch('E2ETYPE', 'free5gc')
}
Expand Down
5 changes: 2 additions & 3 deletions e2e/provision/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ RUN_E2E=${NEPHIO_RUN_E2E:-$(get_metadata nephio-run-e2e "false")}
REPO=${NEPHIO_REPO:-$(get_metadata nephio-test-infra-repo "https://github.com/nephio-project/test-infra.git")}
BRANCH=${NEPHIO_BRANCH:-$(get_metadata nephio-test-infra-branch "main")}
NEPHIO_USER=${NEPHIO_USER:-$(get_metadata nephio-user "ubuntu")}
NEPHIO_PKG_VERSION=${NEPHIO_PKG_VERSION:-$(get_metadata nephio-pkg-version "main")}
NEPHIO_EXAMPLE_REPO_URI=${NEPHIO_EXAMPLE_REPO_URI:-$(get_metadata nephio-example-repo-uri "https://github.com/nephio-project/nephio-example-packages.git")}
export ANSIBLE_CMD_EXTRA_VAR_LIST="nephio_pkg_version='$NEPHIO_PKG_VERSION' nephio_example_repo_uri='$NEPHIO_EXAMPLE_REPO_URI'"
NEPHIO_CATALOG_REPO_URI=${NEPHIO_CATALOG_REPO_URI:-$(get_metadata nephio-catalog-repo-uri "https://github.com/nephio-project/catalog.git")}
export ANSIBLE_CMD_EXTRA_VAR_LIST="nephio_catalog_repo_uri='$NEPHIO_CATALOG_REPO_URI'"
HOME=${NEPHIO_HOME:-/home/$NEPHIO_USER}
REPO_DIR=${NEPHIO_REPO_DIR:-$HOME/test-infra}
DOCKERHUB_USERNAME=${DOCKERHUB_USERNAME:-""}
Expand Down
22 changes: 11 additions & 11 deletions e2e/provision/playbooks/cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@
ansible.builtin.include_role:
name: andrewrothstein.kpt
vars:
kpt_ver: '1.0.0-beta.38'
kpt_ver: '1.0.0-beta.49'
kpt_checksums:
'1.0.0-beta.38':
linux_amd64: sha256:e58b13b6069c70a5f0c4154aa2a548b09a9d21b9e9e7c2d935807f9943d92db4
linux_arm64: sha256:168fd10c69e446e8e9d408a338e937b51ba4d7bd3bf986691c1e97c52a1e3d7d
darwin_amd64: sha256:488943eca09e2a994a2a57d85729e49af241eac69bd0e3e6c1ad76507bcb6357
darwin_arm64: sha256:8673953ad01ae806d93b5fffcaf42482ddbace7d0cd81424391b57d6c7ad6665
'1.0.0-beta.49':
linux_amd64: sha256:8de2996018992ea946c9002aa43c85250a78d9fa3eb1c8da24c7878d7d24b9b7
linux_arm64: sha256:18dfb4540eeed32d2bdded612b3aa678cee6fdcdb14813e184c1a54b4ca35b56
darwin_amd64: sha256:558c1b082a8f1221b88cf6728178076190adda58db84e129ffb40f1e2a462759
darwin_arm64: sha256:bbaa7c6b4c7af0f9cdda694476a9b3b8d9fdd8fba3c0c0ec49f4f26687a2527a
- name: Download CNI plugins
ansible.builtin.include_role:
name: darkwizard242.cni
Expand Down Expand Up @@ -131,14 +131,14 @@
ansible.builtin.include_role:
name: kpt
loop:
- {pkg: repository, dest: /tmp/repository/mgmt}
- {pkg: rootsync, dest: /tmp/rootsync/mgmt}
- {pkg: repository, dest: /tmp/repository/mgmt-staging}
- {pkg: distros/sandbox/repository, dest: /tmp/repository/mgmt}
- {pkg: nephio/optional/rootsync, dest: /tmp/rootsync/mgmt}
- {pkg: distros/sandbox/repository, dest: /tmp/repository/mgmt-staging}
vars:
repo_uri: "{{ nephio_example_repo_uri }}"
repo_uri: "{{ nephio_catalog_repo_uri }}"
local_dest_directory: "{{ item.dest }}"
pkg: "{{ item.pkg }}"
version: "{{ nephio_pkg_version }}"
version: main
for_deployment: true
context: "{{ k8s.context }}"
kpt_async: 900
Expand Down
5 changes: 2 additions & 3 deletions e2e/provision/playbooks/roles/bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ Available variables are listed below, along with default values (see defaults/ma
| k8s.context | no | kind-kind | | Kubernetes context to create gitea resources |
| k8s.version | no | v1.27.1 | | Kubernetes version used for the management cluster |
| kind.enabled | no | true | true, false | Enable/Disable Kubernetes Cluster creation |
| nephio_pkg_version | no | v1.0.1 | | Default version for all kpt packages |
| nephio_example_repo_uri | no | https://github.com/nephio-project/nephio-example-packages.git | | Default kpt examples packages repository |
| nephio_catalog_repo_uri | no | https://github.com/nephio-project/catalog.git | | Default kpt catalog packages repository |
| gitea.enabled | no | true | true, false | Enable/Disable gitea services |
| gitea.k8s.namespace | no | gitea | | Kubernetes namespace for gitea resources |
| gitea.k8s.postgres_password | no | c2VjcmV0 | | `postgres-password` secret value for gitea database service |
Expand Down Expand Up @@ -75,7 +74,7 @@ The `install` Ansible role depends on the outcome generated by this role.
become_user: root
ansible.builtin.unarchive:
remote_src: true
src: https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.38/kpt_linux_amd64-1.0.0-beta.38.tar.gz
src: https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.49/kpt_linux_amd64-1.0.0-beta.49.tar.gz
dest: /usr/local/bin/
creates: /usr/local/bin/kpt
- name: Install KinD command-line
Expand Down
51 changes: 25 additions & 26 deletions e2e/provision/playbooks/roles/bootstrap/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ k8s:
kind:
enabled: true

nephio_pkg_version: v1.0.1
nephio_example_repo_uri: https://github.com/nephio-project/nephio-example-packages.git
nephio_catalog_repo_uri: https://github.com/nephio-project/catalog.git

gitea:
enabled: true
Expand All @@ -40,9 +39,9 @@ gitea:
- gitea
kpt:
packages:
- repo_uri: "{{ nephio_example_repo_uri }}"
pkg: gitea
version: "{{ nephio_pkg_version }}"
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: distros/sandbox/gitea
version: main
async: 780
poll: 0

Expand All @@ -53,9 +52,9 @@ resource_backend:
- backend-system
kpt:
packages:
- repo_uri: "{{ nephio_example_repo_uri }}"
pkg: resource-backend
version: "{{ nephio_pkg_version }}"
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: nephio/optional/resource-backend
version: main
async: 780
poll: 0

Expand All @@ -66,9 +65,9 @@ cert_manager:
- cert-manager
kpt:
packages:
- repo_uri: "{{ nephio_example_repo_uri }}"
pkg: cert-manager
version: "{{ nephio_pkg_version }}"
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: distros/sandbox/cert-manager
version: main
async: 660
poll: 0

Expand All @@ -82,19 +81,19 @@ cluster_api:
- capd-system
kpt:
packages:
- repo_uri: "{{ nephio_example_repo_uri }}"
pkg: cluster-capi
version: "{{ nephio_pkg_version }}"
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: infra/capi/cluster-capi
version: main
async: 900
poll: 5
- repo_uri: "{{ nephio_example_repo_uri }}"
pkg: cluster-capi-infrastructure-docker
version: "{{ nephio_pkg_version }}"
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: infra/capi/cluster-capi-infrastructure-docker
version: main
async: 780
poll: 5
- repo_uri: "{{ nephio_example_repo_uri }}"
pkg: cluster-capi-kind-docker-templates
version: "{{ nephio_pkg_version }}"
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: infra/capi/cluster-capi-kind-docker-templates
version: main
async: 1500
poll: 0

Expand All @@ -105,13 +104,13 @@ metallb:
- metallb-system
kpt:
packages:
- repo_uri: "{{ nephio_example_repo_uri }}"
pkg: metallb
version: "{{ nephio_pkg_version }}"
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: distros/sandbox/metallb
version: main
async: 1020
poll: 5
- repo_uri: "{{ nephio_example_repo_uri }}"
pkg: metallb-sandbox-config
version: "{{ nephio_pkg_version }}"
- repo_uri: "{{ nephio_catalog_repo_uri }}"
pkg: distros/sandbox/metallb-sandbox-config
version: main
async: 660
poll: 0
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
become_user: root
ansible.builtin.unarchive:
remote_src: true
src: https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.38/kpt_linux_amd64-1.0.0-beta.38.tar.gz
src: https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.49/kpt_linux_amd64-1.0.0-beta.49.tar.gz
dest: /usr/local/bin/
creates: /usr/local/bin/kpt
33 changes: 27 additions & 6 deletions e2e/provision/playbooks/roles/bootstrap/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,32 @@
ansible.builtin.include_tasks: create-mgmt.yml
when: kind.enabled

- name: Create Gitea K8s resources
ansible.builtin.include_tasks: prep-gitea.yml
when:
- gitea.enabled
- nephio_pkg_version is match("v([0-9]+)\.([0-9]+)\.([0-9]+)") and nephio_pkg_version | replace("v",'') is version('1.0.1', '<=')

- name: Apply kpt packages
ansible.builtin.include_tasks: apply-pkgs.yml

- name: Create docker hub secret
when:
- lookup('ansible.builtin.env', 'DOCKERHUB_USERNAME') | length > 0
- lookup('ansible.builtin.env', 'DOCKERHUB_TOKEN') | length > 0
vars:
username: "{{ lookup('ansible.builtin.env', 'DOCKERHUB_USERNAME') }}"
token: "{{ lookup('ansible.builtin.env', 'DOCKERHUB_TOKEN') }}"
block:
- name: Create docker-registry secret
ansible.builtin.command: >
kubectl create secret docker-registry dockerhub --docker-username={{ username }}
--docker-password={{ token }} -n {{ gitea.k8s.namespace }}
changed_when: false
- name: Create docker-registry service account
no_log: true
kubernetes.core.k8s:
context: "{{ k8s.context }}"
state: present
definition:
apiVersion: v1
kind: ServiceAccount
imagePullSecrets:
- name: dockerhub
metadata:
name: default
namespace: "{{ gitea.k8s.namespace }}"
81 changes: 0 additions & 81 deletions e2e/provision/playbooks/roles/bootstrap/tasks/prep-gitea.yml

This file was deleted.

5 changes: 2 additions & 3 deletions e2e/provision/playbooks/roles/install/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ Available variables are listed below, along with default values (see defaults/ma
| k8s.context | no | kind-kind | | Kubernetes context to create resources |
| gitea.k8s.username | no | nephio | | Gitea admin user name |
| gitea.k8s.password | no | secret | | Gitea admin password |
| nephio_pkg_version | no | v1.0.1 | | Default version for all kpt packages |
| nephio_example_repo_uri | no | https://github.com/nephio-project/nephio-example-packages.git | | Default kpt examples packages repository |
| nephio_catalog_repo_uri | no | https://github.com/nephio-project/catalog.git | | Default kpt catalog packages repository |
| nephio.k8s.namespaces | no | | | List of Kubernetes namespaces to watch for Nephio deployment resources |
| nephio.kpt.packages | no | | | List of Nephio kpt packages |
| nephio_webui.k8s.namespace | no | nephio-webui | | Kubernetes namespace for Nephio WebUI resources |
Expand Down Expand Up @@ -52,7 +51,7 @@ None
become_user: root
ansible.builtin.unarchive:
remote_src: true
src: https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.38/kpt_linux_amd64-1.0.0-beta.38.tar.gz
src: https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.49/kpt_linux_amd64-1.0.0-beta.49.tar.gz
dest: /usr/local/bin/
creates: /usr/local/bin/kpt
- name: Install Docker Engine
Expand Down
Loading

0 comments on commit 11c7c64

Please sign in to comment.