Loading capif/.gitlab-ci.yml +25 −32 Original line number Diff line number Diff line Loading @@ -644,6 +644,9 @@ main_build_and_push: deploy_ocf_main: stage: deploy_ocf_main variables: DOMAIN_PRE_PROD: pre-prod.int IMAGE_TAG_PRE_PROD: $CI_COMMIT_REF_SLUG needs: - main_build_and_push <<: *main_common Loading @@ -657,43 +660,33 @@ deploy_ocf_main: # when: never # - if: $CI_COMMIT_BRANCH == "main" script: # - echo "### git clone OCF repo ###" # - git clone https://oauth2:${CI_JOB_TOKEN}@labs.etsi.org/rep/ocf/capif.git - echo "### install helm###" - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 - whoami # - chmod 700 get_helm.sh # - ./get_helm.sh # - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin # - kubectl version --output=yaml # - echo "### setting kubeconfig###" # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif - helm version - kubectl cluster-info - yq --version - cat helm/capif/Chart.yaml - yq e -i '.version = "$IMAGE_TAG_PRE_PROD"' helm/capif/Chart.yaml - yq e -i '.appVersion = "$IMAGE_TAG_PRE_PROD"' helm/capif/Chart.yaml - cat helm/capif/Chart.yaml - echo "### download dependencies###" - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # - helm upgrade --install -n $NAMESPACE_PRE_PROD ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_PRE_PROD \ # --set nginx.nginx.env.registerHostname=register.$DOMAIN_PRE_PROD \ # --set monitoring.prometheus.ingress.hosts[0].host=prometheus.$DOMAIN_PROD \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].path=/ \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].pathType=Prefix \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_PROD" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig # --set backOffice.frontend.env.grafanaUrl=http://grafana.$DOMAIN_PROD \ # --set parametersVault.env.vaultHostname=$VAULT_HOSTNAME \ # --set parametersVault.env.vaultPort=$VAULT_PORT \ # --set parametersVault.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ # --wait --timeout=10m --atomic \ # --create-namespace main_rf_testing: needs: ["deploy_ocf_main"] Loading capif/templates/cd-deploy-ocf.gitlab-ci.yml +43 −45 Original line number Diff line number Diff line Loading @@ -5,14 +5,17 @@ stages: - delete_ocf_dev variables: INGRESS: "10.43.32.232" NAMESPACE_DEV: "ocf-dev-$CI_JOB_USER" NAMESPACE_DEV: "ocf-dev-$CI_PROJECT_PATH_SLUG" NAMESPACE_STAGING: "ocf-staging" DOMAIN_STAGING: staging.int DOAMIN_DEV: developer.int DOMAIN_DEV: developer.int DOMAIN_PROD: prod.int CI_JOB_TOKEN: $CI_JOB_TOKEN IMAGE_TAG_DEV: $CI_COMMIT_REF_SLUG IMAGE_TAG_STAGING: $CI_COMMIT_REF_SLUG VAULT_HOSTNAME: $VAULT_HOSTNAME VAULT_PORT: $VAULT_PORT VAULT_ACCESS_TOKEN: $VAULT_ACCESS_TOKEN .main_common: &main_common only: Loading Loading @@ -66,23 +69,30 @@ deploy_ocf_staging: - kubectl cluster-info - yq --version - ls -rtt helm/capif - cat /helm/capif/Chart.yaml # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true - cat helm/capif/Chart.yaml - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml - cat helm/capif/Chart.yaml - echo "### download dependencies###" - helm dependency build helm/capif - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf-staging --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # --set nginx.nginx.env.registerHostname=register.$DOMAIN_STAGING \ # --set monitoring.prometheus.ingress.hosts[0].host=prometheus.$DOMAIN_PROD \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].path=/ \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].pathType=Prefix \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_PROD" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig # --set backOffice.frontend.env.grafanaUrl=http://grafana.$DOMAIN_PROD \ # --set parametersVault.env.vaultHostname=$VAULT_HOSTNAME \ # --set parametersVault.env.vaultPort=$VAULT_PORT \ # --set parametersVault.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ # --wait --timeout=10m --atomic \ # --create-namespace delete_ocf_staging: Loading @@ -90,7 +100,7 @@ delete_ocf_staging: <<: *staging_common script: - echo "### deleting environment $NAMESPACE_STAGING###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig # - helm uninstall -n $NAMESPACE_STAGING ocf-staging when: manual environment: name: review/staging Loading @@ -114,50 +124,38 @@ deploy_ocf_dev: # when: never # - if: $CI_COMMIT_BRANCH script: # - echo "### git clone OCF repo###" # - git clone https://oauth2:${CI_JOB_TOKEN}@labs.etsi.org/rep/ocf/capif.git # - echo "### install helm###" # - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 # - chmod 700 get_helm.sh # - sudo ./get_helm.sh - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin - kubectl version --output=yaml - echo "### setting kubeconfig###" - kubectl cluster-info # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif - yq --version - cat helm/capif/Chart.yaml - yq e -i '.version = "$IMAGE_TAG_DEV"' helm/capif/Chart.yaml - yq e -i '.appVersion = "$IMAGE_TAG_DEV"' helm/capif/Chart.yaml - cat helm/capif/Chart.yaml - echo "### download dependencies###" - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # - helm uninstall -n $NAMESPACE_DEV ocf-dev --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_DEV ocf-developer helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif-CI_PROJECT_PATH_SLUG.$DOMAIN_DEV \ # --set nginx.nginx.env.registerHostname=register-CI_PROJECT_PATH_SLUG.$DOMAIN_DEV # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_PROD" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --set parametersVault.env.vaultHostname=$VAULT_HOSTNAME \ # --set parametersVault.env.vaultPort=$VAULT_PORT \ # --set parametersVault.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig # --create-NAMESPACE_STAGING --atomic delete_ocf_dev: stage: delete_ocf_dev <<: *staging_common script: - echo "### deleting environment $NAMESPACE_DEV###" # - helm uninstall -n $NAMESPACE_DEV ocf --kubeconfig ~/cluster.kubeconfig # - helm uninstall -n $NAMESPACE_DEV ocf-dev when: manual environment: name: review/$CI_COMMIT_REF_SLUG Loading capif/templates/cd-deploy-release.gitlab-ci.yml +23 −31 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ variables: CI_REGISTRY_USER: $CI_REGISTRY_USER CI_REGISTRY: $CI_REGISTRY CAPIF_DOCKER_REGISTRY: $CAPIF_DOCKER_REGISTRY INGRESS: "10.43.32.232" NAMESPACE_PROD: "ocf-prod" DOMAIN_PROD: prod.int IMAGE_TAG_PROD: $CI_COMMIT_REF_SLUG Loading @@ -30,36 +29,29 @@ deploy_ocf_prod: script: - echo "------ A release has been created! -------" - echo "### install helm###" # - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 # - chmod 700 get_helm.sh # - ./get_helm.sh # - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin # - kubectl version --output=yaml # - echo "### setting kubeconfig###" # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif - helm version - kubectl cluster-info - yq --version - cat helm/capif/Chart.yaml - yq e -i '.version = "$IMAGE_TAG_PROD"' helm/capif/Chart.yaml - yq e -i '.appVersion = "$IMAGE_TAG_PROD"' helm/capif/Chart.yaml - cat helm/capif/Chart.yaml - echo "### download dependencies###" - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # - helm upgrade --install -n $NAMESPACE_PRE_PROD ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_PROD \ # --set nginx.nginx.env.registerHostname=register.$DOMAIN_PROD \ # --set monitoring.prometheus.ingress.hosts[0].host=prometheus.$DOMAIN_PROD \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].path=/ \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].pathType=Prefix \ # --set monitoring.prometheus.enable="true" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_PROD" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig No newline at end of file # --set backOffice.frontend.env.grafanaUrl=http://grafana.$DOMAIN_PROD \ # --set parametersVault.env.vaultHostname=$VAULT_HOSTNAME \ # --set parametersVault.env.vaultPort=$VAULT_PORT \ # --set parametersVault.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ # --wait --timeout=10m --atomic \ # --create-namespace No newline at end of file Loading
capif/.gitlab-ci.yml +25 −32 Original line number Diff line number Diff line Loading @@ -644,6 +644,9 @@ main_build_and_push: deploy_ocf_main: stage: deploy_ocf_main variables: DOMAIN_PRE_PROD: pre-prod.int IMAGE_TAG_PRE_PROD: $CI_COMMIT_REF_SLUG needs: - main_build_and_push <<: *main_common Loading @@ -657,43 +660,33 @@ deploy_ocf_main: # when: never # - if: $CI_COMMIT_BRANCH == "main" script: # - echo "### git clone OCF repo ###" # - git clone https://oauth2:${CI_JOB_TOKEN}@labs.etsi.org/rep/ocf/capif.git - echo "### install helm###" - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 - whoami # - chmod 700 get_helm.sh # - ./get_helm.sh # - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin # - kubectl version --output=yaml # - echo "### setting kubeconfig###" # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif - helm version - kubectl cluster-info - yq --version - cat helm/capif/Chart.yaml - yq e -i '.version = "$IMAGE_TAG_PRE_PROD"' helm/capif/Chart.yaml - yq e -i '.appVersion = "$IMAGE_TAG_PRE_PROD"' helm/capif/Chart.yaml - cat helm/capif/Chart.yaml - echo "### download dependencies###" - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # - helm upgrade --install -n $NAMESPACE_PRE_PROD ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_PRE_PROD \ # --set nginx.nginx.env.registerHostname=register.$DOMAIN_PRE_PROD \ # --set monitoring.prometheus.ingress.hosts[0].host=prometheus.$DOMAIN_PROD \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].path=/ \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].pathType=Prefix \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_PROD" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig # --set backOffice.frontend.env.grafanaUrl=http://grafana.$DOMAIN_PROD \ # --set parametersVault.env.vaultHostname=$VAULT_HOSTNAME \ # --set parametersVault.env.vaultPort=$VAULT_PORT \ # --set parametersVault.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ # --wait --timeout=10m --atomic \ # --create-namespace main_rf_testing: needs: ["deploy_ocf_main"] Loading
capif/templates/cd-deploy-ocf.gitlab-ci.yml +43 −45 Original line number Diff line number Diff line Loading @@ -5,14 +5,17 @@ stages: - delete_ocf_dev variables: INGRESS: "10.43.32.232" NAMESPACE_DEV: "ocf-dev-$CI_JOB_USER" NAMESPACE_DEV: "ocf-dev-$CI_PROJECT_PATH_SLUG" NAMESPACE_STAGING: "ocf-staging" DOMAIN_STAGING: staging.int DOAMIN_DEV: developer.int DOMAIN_DEV: developer.int DOMAIN_PROD: prod.int CI_JOB_TOKEN: $CI_JOB_TOKEN IMAGE_TAG_DEV: $CI_COMMIT_REF_SLUG IMAGE_TAG_STAGING: $CI_COMMIT_REF_SLUG VAULT_HOSTNAME: $VAULT_HOSTNAME VAULT_PORT: $VAULT_PORT VAULT_ACCESS_TOKEN: $VAULT_ACCESS_TOKEN .main_common: &main_common only: Loading Loading @@ -66,23 +69,30 @@ deploy_ocf_staging: - kubectl cluster-info - yq --version - ls -rtt helm/capif - cat /helm/capif/Chart.yaml # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true - cat helm/capif/Chart.yaml - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml - cat helm/capif/Chart.yaml - echo "### download dependencies###" - helm dependency build helm/capif - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf-staging --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # --set nginx.nginx.env.registerHostname=register.$DOMAIN_STAGING \ # --set monitoring.prometheus.ingress.hosts[0].host=prometheus.$DOMAIN_PROD \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].path=/ \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].pathType=Prefix \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_PROD" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig # --set backOffice.frontend.env.grafanaUrl=http://grafana.$DOMAIN_PROD \ # --set parametersVault.env.vaultHostname=$VAULT_HOSTNAME \ # --set parametersVault.env.vaultPort=$VAULT_PORT \ # --set parametersVault.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ # --wait --timeout=10m --atomic \ # --create-namespace delete_ocf_staging: Loading @@ -90,7 +100,7 @@ delete_ocf_staging: <<: *staging_common script: - echo "### deleting environment $NAMESPACE_STAGING###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig # - helm uninstall -n $NAMESPACE_STAGING ocf-staging when: manual environment: name: review/staging Loading @@ -114,50 +124,38 @@ deploy_ocf_dev: # when: never # - if: $CI_COMMIT_BRANCH script: # - echo "### git clone OCF repo###" # - git clone https://oauth2:${CI_JOB_TOKEN}@labs.etsi.org/rep/ocf/capif.git # - echo "### install helm###" # - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 # - chmod 700 get_helm.sh # - sudo ./get_helm.sh - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin - kubectl version --output=yaml - echo "### setting kubeconfig###" - kubectl cluster-info # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif - yq --version - cat helm/capif/Chart.yaml - yq e -i '.version = "$IMAGE_TAG_DEV"' helm/capif/Chart.yaml - yq e -i '.appVersion = "$IMAGE_TAG_DEV"' helm/capif/Chart.yaml - cat helm/capif/Chart.yaml - echo "### download dependencies###" - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # - helm uninstall -n $NAMESPACE_DEV ocf-dev --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_DEV ocf-developer helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif-CI_PROJECT_PATH_SLUG.$DOMAIN_DEV \ # --set nginx.nginx.env.registerHostname=register-CI_PROJECT_PATH_SLUG.$DOMAIN_DEV # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_PROD" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --set parametersVault.env.vaultHostname=$VAULT_HOSTNAME \ # --set parametersVault.env.vaultPort=$VAULT_PORT \ # --set parametersVault.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig # --create-NAMESPACE_STAGING --atomic delete_ocf_dev: stage: delete_ocf_dev <<: *staging_common script: - echo "### deleting environment $NAMESPACE_DEV###" # - helm uninstall -n $NAMESPACE_DEV ocf --kubeconfig ~/cluster.kubeconfig # - helm uninstall -n $NAMESPACE_DEV ocf-dev when: manual environment: name: review/$CI_COMMIT_REF_SLUG Loading
capif/templates/cd-deploy-release.gitlab-ci.yml +23 −31 Original line number Diff line number Diff line Loading @@ -7,7 +7,6 @@ variables: CI_REGISTRY_USER: $CI_REGISTRY_USER CI_REGISTRY: $CI_REGISTRY CAPIF_DOCKER_REGISTRY: $CAPIF_DOCKER_REGISTRY INGRESS: "10.43.32.232" NAMESPACE_PROD: "ocf-prod" DOMAIN_PROD: prod.int IMAGE_TAG_PROD: $CI_COMMIT_REF_SLUG Loading @@ -30,36 +29,29 @@ deploy_ocf_prod: script: - echo "------ A release has been created! -------" - echo "### install helm###" # - curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 # - chmod 700 get_helm.sh # - ./get_helm.sh # - helm version # - echo "### install kubectl###" # - curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" # - chmod +x kubectl # - sudo mv kubectl /usr/local/bin # - kubectl version --output=yaml # - echo "### setting kubeconfig###" # - echo $KUBECONFIG | base64 -d > ~/cluster.kubeconfig # - kubectl get nodes --kubeconfig ~/cluster.kubeconfig # - kubectl --kubeconfig /etc/rancher/rke2/rke2.yaml cluster-info --kubeconfig ~/cluster.kubeconfig #comment that when is working # - echo "### install yq###" # - sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 # - sudo chmod a+x /usr/local/bin/yq # - yq --version # - yq e -i '.version = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - yq e -i '.appVersion = "$IMAGE_TAG_STAGING"' helm/capif/Chart.yaml # - cat helm/capif/Chart.yaml # - echo "### download dependencies###" # - helm dependency build helm/capif - helm version - kubectl cluster-info - yq --version - cat helm/capif/Chart.yaml - yq e -i '.version = "$IMAGE_TAG_PROD"' helm/capif/Chart.yaml - yq e -i '.appVersion = "$IMAGE_TAG_PROD"' helm/capif/Chart.yaml - cat helm/capif/Chart.yaml - echo "### download dependencies###" - helm dependency build helm/capif # - echo "### updating capif###" # - helm uninstall -n $NAMESPACE_STAGING ocf --kubeconfig ~/cluster.kubeconfig || true # - helm upgrade --install -n $NAMESPACE_STAGING ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_STAGING \ # --set ingress_ip.oneke="$INGRESS" --atomic \ # --set monitoring.prometheus.enable="" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_STAGING" \ # - helm upgrade --install -n $NAMESPACE_PRE_PROD ocf helm/capif/ \ # --set nginx.nginx.env.capifHostname=capif.$DOMAIN_PROD \ # --set nginx.nginx.env.registerHostname=register.$DOMAIN_PROD \ # --set monitoring.prometheus.ingress.hosts[0].host=prometheus.$DOMAIN_PROD \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].path=/ \ # --set monitoring.prometheus.ingress.hosts[0].paths[0].pathType=Prefix \ # --set monitoring.prometheus.enable="true" \ # --set monitoring.grafana.ingress.hosts[0].host="grafana.$DOMAIN_PROD" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].path="/" \ # --set monitoring.grafana.ingress.hosts[0].paths[0].pathType="Prefix" \ # --wait --timeout=10m \ # --create-NAMESPACE_STAGING --kubeconfig ~/cluster.kubeconfig No newline at end of file # --set backOffice.frontend.env.grafanaUrl=http://grafana.$DOMAIN_PROD \ # --set parametersVault.env.vaultHostname=$VAULT_HOSTNAME \ # --set parametersVault.env.vaultPort=$VAULT_PORT \ # --set parametersVault.env.vaultAccessToken=$VAULT_ACCESS_TOKEN \ # --wait --timeout=10m --atomic \ # --create-namespace No newline at end of file