diff --git a/roles/deploy-env/defaults/main.yaml b/roles/deploy-env/defaults/main.yaml index 563aef9b1..8af86fe6e 100644 --- a/roles/deploy-env/defaults/main.yaml +++ b/roles/deploy-env/defaults/main.yaml @@ -14,11 +14,15 @@ kube_version_repo: "v1.29" # the list of k8s package versions are available here # https://pkgs.k8s.io/core:/stable:/{{ kube_version_repo }}/deb/Packages kube_version: "1.29.5-1.1" +calico_setup: true calico_version: "v3.27.0" calico_manifest_url: "https://raw.githubusercontent.com/projectcalico/calico/{{ calico_version }}/manifests/calico.yaml" helm_version: "v3.6.3" crictl_version: "v1.26.1" +cilium_setup: false +cilium_version: "1.15.6" + kubectl: user: zuul group: zuul diff --git a/roles/deploy-env/tasks/cilium.yaml b/roles/deploy-env/tasks/cilium.yaml new file mode 100644 index 000000000..b27d85eb0 --- /dev/null +++ b/roles/deploy-env/tasks/cilium.yaml @@ -0,0 +1,22 @@ +--- +- name: Download Cilium + shell: | + CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt) + CLI_ARCH=amd64 + curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum} + sha256sum --check cilium-linux-${CLI_ARCH}.tar.gz.sha256sum + tar xzvfC cilium-linux-${CLI_ARCH}.tar.gz /usr/local/bin + rm cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum} + args: + executable: /bin/bash + chdir: /tmp + when: inventory_hostname in (groups['primary'] | default([])) + +- name: Deploy Cilium + become: false + shell: | + cilium install --version {{ cilium_version }} + args: + executable: /bin/bash + when: inventory_hostname in (groups['primary'] | default([])) +... diff --git a/roles/deploy-env/tasks/main.yaml b/roles/deploy-env/tasks/main.yaml index 3d30421ad..d699d2896 100644 --- a/roles/deploy-env/tasks/main.yaml +++ b/roles/deploy-env/tasks/main.yaml @@ -51,6 +51,12 @@ - name: Include K8s Calico tasks include_tasks: file: calico.yaml + when: calico_setup + +- name: Include Cilium tasks + include_tasks: + file: cilium.yaml + when: cilium_setup - name: Include coredns resolver tasks include_tasks: diff --git a/tools/deployment/db/mariadb.sh b/tools/deployment/db/mariadb.sh index 091647cb2..0f049056e 100755 --- a/tools/deployment/db/mariadb.sh +++ b/tools/deployment/db/mariadb.sh @@ -14,19 +14,25 @@ set -xe -: ${OSH_INFRA_EXTRA_HELM_ARGS_MARIADB:="$(helm osh get-values-overrides -c mariadb ${FEATURES})"} +: ${OSH_INFRA_HELM_REPO:="../openstack-helm-infra"} +: ${OSH_INFRA_PATH:="../openstack-helm-infra"} +: ${OSH_INFRA_EXTRA_HELM_ARGS_MARIADB:="$(helm osh get-values-overrides ${DOWNLOAD_OVERRIDES:-} -p ${OSH_INFRA_PATH} -c mariadb ${FEATURES})"} +: ${NAMESPACE:="osh-infra"} +: ${RUN_HELM_TESTS:="yes"} #NOTE: Deploy command helm upgrade --install mariadb ./mariadb \ - --namespace=osh-infra \ + --namespace=${NAMESPACE} \ --set monitoring.prometheus.enabled=true \ - ${OSH_INFRA_EXTRA_HELM_ARGS:=} \ + ${OSH_INFRA_EXTRA_HELM_ARGS} \ ${OSH_INFRA_EXTRA_HELM_ARGS_MARIADB} #NOTE: Wait for deploy helm osh wait-for-pods osh-infra -# Delete the test pod if it still exists -kubectl delete pods -l application=mariadb,release_group=mariadb,component=test --namespace=osh-infra --ignore-not-found -#NOTE: Validate the deployment -helm test mariadb --namespace osh-infra +if [ "x${RUN_HELM_TESTS}" != "xno" ]; then + # Delete the test pod if it still exists + kubectl delete pods -l application=mariadb,release_group=mariadb,component=test --namespace=${NAMESPACE} --ignore-not-found + #NOTE: Validate the deployment + helm test mariadb --namespace ${NAMESPACE} +fi diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 7b83f1990..5e9198d25 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -102,7 +102,10 @@ ceph_osd_data_device: /dev/loop100 kube_version_repo: "v1.29" kube_version: "1.29.5-1.1" + calico_setup: true calico_version: "v3.27.0" + cilium_setup: false + cilium_version: "1.15.6" helm_version: "v3.6.3" yq_version: "v4.6.0" crictl_version: "v1.26.1" @@ -263,6 +266,39 @@ - ^memcached/.* - ^openvswitch/.* +- job: + name: openstack-helm-infra-keystone-cilium-2024-1-ubuntu_jammy + parent: openstack-helm-infra-deploy + nodeset: openstack-helm-3nodes-ubuntu_jammy + files: + - ^helm-toolkit/.* + - ^roles/.* + - ^rabbitmq/.* + - ^mariadb/.* + - ^memcached/.* + vars: + osh_params: + openstack_release: "2024.1" + container_distro_name: ubuntu + container_distro_version: jammy + calico_setup: false + cilium_setup: true + gate_scripts: + - ./tools/deployment/common/prepare-k8s.sh + - ./tools/deployment/common/prepare-charts.sh + - ./tools/deployment/common/ingress.sh + - ./tools/deployment/ceph/ceph-rook.sh + - ./tools/deployment/ceph/ceph-adapter-rook.sh + - ./tools/deployment/common/setup-client.sh + - | + export NAMESPACE=openstack + export OSH_INFRA_EXTRA_HELM_ARGS="--set pod.replicas.server=1 ${OSH_INFRA_EXTRA_HELM_ARGS}" + export RUN_HELM_TESTS=no + ./tools/deployment/db/mariadb.sh + - ./tools/deployment/common/rabbitmq.sh + - ./tools/deployment/common/memcached.sh + - ./tools/deployment/openstack/keystone.sh + - job: name: openstack-helm-infra-cinder-2023-1-ubuntu_focal description: | diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 84783a1c8..c32171911 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -32,6 +32,7 @@ - openstack-helm-infra-cinder-2024-1-ubuntu_jammy - openstack-helm-infra-tls-2024-1-ubuntu_jammy - openstack-helm-infra-compute-kit-dpdk-2023-2-ubuntu_jammy + - openstack-helm-infra-keystone-cilium-2024-1-ubuntu_jammy gate: jobs: - openstack-helm-lint