Skip to content

Commit

Permalink
[PDP-3220] adjust provisioner chart for new GUI (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
syan-tibco authored Sep 11, 2024
1 parent 2e864ac commit c47a416
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 42 deletions.
2 changes: 1 addition & 1 deletion charts/platform-provisioner-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

apiVersion: v2
name: platform-provisioner-ui
version: 1.0.1
version: "1.0.2"
appVersion: "2.0.0"
description: A Helm chart for platform-provisioner-ui
type: application
Expand Down
6 changes: 3 additions & 3 deletions charts/platform-provisioner-ui/config/menuContent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ aws:
defaultValue: 'us-west-2'
menuConfig:
- label: "Pipelines"
to: "/pipelines"
url: "/pipelines"
icon: 'pi pi-fw pi-list'
- label: "Status"
to: "/status"
url: "/status"
icon: 'pi pi-fw pi-cog' # see the list in https://primevue.org/icons/#list
- label: "Docs"
icon: 'pi pi-fw pi-book'
items:
- label: "Connect K8S"
to: "/connect"
url: "/connect"
icon: 'pi pi-fw pi-link'

16 changes: 14 additions & 2 deletions charts/platform-provisioner-ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,20 @@ spec:
env:
- name: PIPELINE_NAMESPACE
value: "{{ .Values.guiConfig.pipelineNamespace }}"
- name: PIPELINE_TEMPLATE_LABEL_KEY
value: "{{ .Values.guiConfig.pipelineTemplateLabelKey }}"
- name: PIPELINE_TEMPLATE_LABEL_KEY_ACCOUNT
value: "{{ .Values.guiConfig.pipelineTemplateLabelKeyAccount }}"
- name: PIPELINE_TEMPLATE_LABEL_KEY_ACTION
value: "{{ .Values.guiConfig.pipelineTemplateLabelKeyAction }}"
- name: PIPELINE_TEMPLATE_LABEL_KEY_CONFIG
value: "{{ .Values.guiConfig.pipelineTemplateLabelKeyConfig }}"
- name: PIPELINE_TEMPLATE_LABEL_KEY_CONFIG_GROUPS
value: "{{ .Values.guiConfig.pipelineTemplateLabelKeyConfigGroups }}"
- name: PIPELINE_TEMPLATE_LABEL_KEY_CREATE_BY
value: "{{ .Values.guiConfig.pipelineTemplateLabelKeyCreateBy }}"
- name: PIPELINE_TEMPLATE_LABEL_KEY_NAME
value: "{{ .Values.guiConfig.pipelineTemplateLabelKeyName }}"
- name: PIPELINE_TEMPLATE_LABEL_KEY_NOTE
value: "{{ .Values.guiConfig.pipelineTemplateLabelKeyNote }}"
- name: PIPELINE_TEMPLATE_LABEL_VALUE
value: "{{ .Values.guiConfig.pipelineTemplateLabelValue }}"
- name: PIPELINE_RUN_CANCELLED
Expand Down
8 changes: 7 additions & 1 deletion charts/platform-provisioner-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,13 @@ affinity: {}

guiConfig:
pipelineNamespace: "tekton-tasks"
pipelineTemplateLabelKey: "env.cloud.tibco.com/config"
pipelineTemplateLabelKeyAccount: "env.cloud.tibco.com/account"
pipelineTemplateLabelKeyAction: "env.cloud.tibco.com/action"
pipelineTemplateLabelKeyConfig: "env.cloud.tibco.com/config"
pipelineTemplateLabelKeyConfigGroups: "env.cloud.tibco.com/config-groups"
pipelineTemplateLabelKeyCreateBy: "env.cloud.tibco.com/create-by"
pipelineTemplateLabelKeyName: "env.cloud.tibco.com/name"
pipelineTemplateLabelKeyNote: "env.cloud.tibco.com/note"
pipelineTemplateLabelValue: "pipeline-gui-config"
pipelineRunCancelled: "Cancelled"
startLocally: "false"
Expand Down
2 changes: 1 addition & 1 deletion charts/provisioner-config-local/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ apiVersion: v2
name: provisioner-config-local
description: Platform Provisioner local config
type: application
version: "1.0.32"
version: "1.0.35"
appVersion: "2.0.0"
home: https://github.com/TIBCOSoftware/tp-helm-charts
maintainers:
Expand Down
36 changes: 18 additions & 18 deletions charts/provisioner-config-local/config/menuContent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,64 +22,64 @@ menuConfig:
- label: "TP Cluster"
items:
- label: "TP base on-prem"
to: "/pipelines/helm-install?title=tp-base-on-prem"
url: "/pipelines/helm-install?title=tp-base-on-prem"
config: pp-deploy-tp-base-on-prem.yaml
- label: "TP base on-perm with certificate"
to: "/pipelines/helm-install?title=tp-base-on-prem-cert"
url: "/pipelines/helm-install?title=tp-base-on-prem-cert"
config: pp-deploy-tp-base-on-prem-cert.yaml
- separator: true
- label: "Data Plane"
items:
- label: "Register Data Plane"
items:
- label: "Register Dev DP"
to: "/pipelines/generic-runner?title=dp-register-dev-dp"
url: "/pipelines/generic-runner?title=dp-register-dev-dp"
config: pp-register-dp-dev.yaml
- label: "Register Production DP"
to: "/pipelines/generic-runner?title=dp-register-production-dp"
url: "/pipelines/generic-runner?title=dp-register-production-dp"
config: pp-register-dp-prod.yaml
- label: "Control Plane"
items:
- label: "Deploy Control Plane"
items:
- label: "Standard Control Plane"
to: "/pipelines/helm-install?title=cp-deploy-on-prem"
url: "/pipelines/helm-install?title=cp-deploy-on-prem"
config: pp-deploy-cp-core-on-prem.yaml
- separator: true
- label: "Observability"
items:
- label: "O11y fully Stack"
to: "/pipelines/helm-install?title=Deploy-o11y-stack"
url: "/pipelines/helm-install?title=Deploy-o11y-stack"
config: pp-o11y-full.yaml
- label: "dp-config-es"
to: "/pipelines/helm-install?title=dp-config-es"
url: "/pipelines/helm-install?title=dp-config-es"
config: pp-o11y-dp-config-es.yaml
- label: "OTel Collector deamonset"
to: "/pipelines/helm-install?title=OTel Collector deamonset"
url: "/pipelines/helm-install?title=OTel Collector deamonset"
config: pp-o11y-otel-daemon.yaml
- label: "Ingress"
items:
- label: "ingress tracing"
to: "/pipelines/helm-install?title=Deploy ingress tracing"
url: "/pipelines/helm-install?title=Deploy ingress tracing"
config: pp-ingress-tracing.yaml
disabled: true
- label: "Secrets"
items:
- label: "TIBCO Hub"
to: "/pipelines/generic-runner?title=secret-tibco-hub"
url: "/pipelines/generic-runner?title=secret-tibco-hub"
config: pp-deploy-secret-tibco-hub.yaml
- label: "Undeploy"
icon: 'pi pi-fw pi-cloud-download'
items:
- label: "Data Plane"
items:
- label: "Data Plane"
to: "/pipelines/generic-runner?title=undeploy-dp"
url: "/pipelines/generic-runner?title=undeploy-dp"
config: pp-undeploy-dp.yaml
- label: "Control Plane"
items:
- label: "Control Plane"
to: "/pipelines/generic-runner?title=undeploy-cp"
url: "/pipelines/generic-runner?title=undeploy-cp"
config: pp-undeploy-cp.yaml
- label: "Maintenance"
icon: 'pi pi-fw pi-wrench'
Expand All @@ -88,23 +88,23 @@ menuConfig:
icon: 'pi pi-th-large'
items:
- label: "TP Cluster Info"
to: "/pipelines/generic-runner?title=tp-info"
url: "/pipelines/generic-runner?title=tp-info"
config: pp-maintain-tp-info.yaml
- label: "Reset Postgres DB"
to: "/pipelines/helm-install?title=reset-postgres-db"
url: "/pipelines/helm-install?title=reset-postgres-db"
config: pp-maintain-tp-reset-postgres-db.yaml
- label: "Refresh Docker Registry token"
to: "/pipelines/generic-runner?title=refresh-docker-registry-token"
url: "/pipelines/generic-runner?title=refresh-docker-registry-token"
config: pp-maintain-tp-refresh-docker-token.yaml
- label: "Pipelines"
to: "/pipelines"
url: "/pipelines"
icon: 'pi pi-fw pi-list'
- label: "Status"
to: "/status"
url: "/status"
icon: 'pi pi-fw pi-cog' # see the list in https://primevue.org/icons/#list
- label: "Docs"
icon: 'pi pi-fw pi-book'
items:
- label: "Connect K8S"
to: "/docs/connectDetailsPage"
url: "/docs/connectDetailsPage"
icon: 'pi pi-fw pi-link'
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ options:
reference: "meta.guiEnv.GUI_CP_CHART_REPO"
description: |
The helm chart repository to deploy CP. The default value is public repo. To use private repo set: https://${GITHUB_TOKEN}@raw.githubusercontent.com/tibco/tp-helm-charts/gh-pages
- name: "GUI_DP_CHART_REPO"
type: string
guiType: input
reference: "meta.guiEnv.GUI_DP_CHART_REPO"
description: |
The helm chart repository to deploy DP. The default value is public repo. To use private repo set: https://raw.githubusercontent.com/tibco/tp-helm-charts/gh-pages and set `GUI_DP_CHART_REPO_TOKEN`
- name: "GUI_DP_CHART_REPO_TOKEN"
type: string
guiType: input
reference: "meta.guiEnv.GUI_DP_CHART_REPO_TOKEN"
description: "The helm chart registry password to deploy DP"
- name: "GUI_CP_ADMIN_EMAIL"
type: string
guiType: input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ meta:
GUI_GITHUB_TOKEN: ""
GUI_CP_CHART_REPO: "https://tibcosoftware.github.io/tp-helm-charts"
GUI_CP_ADMIN_EMAIL: "[email protected]"
GUI_DP_CHART_REPO: "https://tibcosoftware.github.io/tp-helm-charts"
GUI_DP_CHART_REPO_TOKEN: ""
# env
GUI_CP_INSTANCE_ID: cp1
GUI_CP_ENV: vagrant
Expand All @@ -37,10 +39,12 @@ meta:
PIPELINE_LOG_DEBUG: false
PIPELINE_CHECK_DOCKER_STATUS: false
# GitHub credentials
GITHUB_TOKEN: "${GUI_GITHUB_TOKEN}" # You need to set GITHUB_TOKEN for local use.
GITHUB_TOKEN: "${GUI_GITHUB_TOKEN}" # You need to set GITHUB_TOKEN for local use. For pipeline, it will be set by pipeline
GITHUB_USER_NAME: ${GUI_GITHUB_USER_NAME:-"cp-test"}
CP_CHART_REPO: ${GUI_CP_CHART_REPO:-"https://tibcosoftware.github.io/tp-helm-charts"} # TIBCO Platform public repo
DP_CHART_REPO: ${GUI_DP_CHART_REPO:-"https://tibcosoftware.github.io/tp-helm-charts"} # The repo that Data Plane will use
DP_CHART_REPO_TOKEN: ${GUI_DP_CHART_REPO_TOKEN:-""}
DP_CHART_REPO_USER_NAME: ${GUI_DP_CHART_REPO_USER_NAME:-"cp-test"}
# env
CP_INSTANCE_ID: ${GUI_CP_INSTANCE_ID:-"cp1"}
CP_PROVIDER: ${GUI_CP_PROVIDER:-local} # deployment target. Example: aws, azure, local.
Expand Down Expand Up @@ -379,8 +383,8 @@ helmCharts:
- alias: default
conf:
auth:
password: ${GITHUB_TOKEN}
username: ${GITHUB_USER_NAME}
password: ${DP_CHART_REPO_TOKEN}
username: ${DP_CHART_REPO_USER_NAME}
repoUrl: ${DP_CHART_REPO}
default: true
type: chart-museum
Expand Down Expand Up @@ -584,6 +588,7 @@ helmCharts:
PRODUCTION_PATH: "" # TODO PCP-5070
deleteDBOnUninstall: "${CP_DB_DELETE_ON_UNINSTALL}"
external:
helmRepo: ${GUI_CP_CHART_REPO}
db_host: ${CP_DB_HOST}
db_name: ${CP_DB_NAME}
db_password: ${CP_DB_PASSWORD}
Expand All @@ -607,7 +612,6 @@ helmCharts:
enableLogging: false
environment: ${CP_ENVIRONMENT}
IDENTITY_MANAGEMENT_JWT_KEY_STORE_PASSWORD: "${CP_IDM_IDENTITY_MANAGEMENT_JWT_KEY_STORE_PASSWORD}"
REGION_SECRET: "${CP_IDM_REGION_SECRET}"
SENDGRID_SERVICE_API_KEY: "${CP_IDM_SENDGRID_SERVICE_API_KEY}" # for email service
CP_ENCRYPTION_SECRET: "${CP_IDM_CP_ENCRYPTION_SECRET}"
tp-cp-integration:
Expand Down
29 changes: 18 additions & 11 deletions dev/platform-provisioner-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
[[ -z "${PIPELINE_SKIP_TEKTON_DASHBOARD}" ]] && export PIPELINE_SKIP_TEKTON_DASHBOARD=${PIPELINE_SKIP_TEKTON_DASHBOARD:-true}
[[ -z "${TEKTON_PIPELINE_RELEASE}" ]] && export TEKTON_PIPELINE_RELEASE=${TEKTON_PIPELINE_RELEASE:-"v0.59.0"}
[[ -z "${TEKTON_DASHBOARD_RELEASE}" ]] && export TEKTON_DASHBOARD_RELEASE=${TEKTON_DASHBOARD_RELEASE:-"v0.46.0"}
[[ -z "${PIPELINE_CHART_VERSION_COMMON}" ]] && export PIPELINE_CHART_VERSION_COMMON=${PIPELINE_CHART_VERSION_COMMON:-"^1.0.0"}
[[ -z "${PIPELINE_CHART_VERSION_GENERIC_RUNNER}" ]] && export PIPELINE_CHART_VERSION_GENERIC_RUNNER=${PIPELINE_CHART_VERSION_GENERIC_RUNNER:-"^1.0.0"}
[[ -z "${PIPELINE_CHART_VERSION_HELM_INSTALL}" ]] && export PIPELINE_CHART_VERSION_HELM_INSTALL=${PIPELINE_CHART_VERSION_HELM_INSTALL:-"^1.0.0"}
[[ -z "${PIPELINE_CHART_VERSION_PROVISIONER_CONFIG_LOCAL}" ]] && export PIPELINE_CHART_VERSION_PROVISIONER_CONFIG_LOCAL=${PIPELINE_CHART_VERSION_PROVISIONER_CONFIG_LOCAL:-"^1.0.0"}
[[ -z "${PIPELINE_CHART_VERSION_PROVISIONER_UI}" ]] && export PIPELINE_CHART_VERSION_PROVISIONER_UI=${PIPELINE_CHART_VERSION_PROVISIONER_UI:-"^1.0.0"}

if [[ ${PIPELINE_SKIP_PROVISIONER_UI} == "false" ]]; then
# your ECR read-only token
Expand All @@ -50,19 +55,21 @@ if [[ ${PIPELINE_SKIP_PROVISIONER_UI} == "false" ]]; then
exit 1
fi
[[ -z "${PIPELINE_GUI_DOCKER_IMAGE_USERNAME}" ]] && export PIPELINE_GUI_DOCKER_IMAGE_USERNAME=${PIPELINE_GUI_DOCKER_IMAGE_USERNAME:-"AWS"}
[[ -z "${PIPELINE_GUI_DOCKER_IMAGE_REPO_FULL_URL}" ]] && export PIPELINE_GUI_DOCKER_IMAGE_REPO_FULL_URL=${PIPELINE_GUI_DOCKER_IMAGE_REPO_FULL_URL:-"${PIPELINE_GUI_DOCKER_IMAGE_REPO}/stratosphere/cic2-provisioner-webui"}
[[ -z "${PIPELINE_GUI_DOCKER_IMAGE_REPO}" ]] && export PIPELINE_GUI_DOCKER_IMAGE_REPO=${PIPELINE_GUI_DOCKER_IMAGE_REPO:-"ghcr.io"}
[[ -z "${PIPELINE_GUI_DOCKER_IMAGE_PATH}" ]] && export PIPELINE_GUI_DOCKER_IMAGE_PATH=${PIPELINE_GUI_DOCKER_IMAGE_PATH:-"tibco/cicinfra-cic2-provisioner-webui/cic2-web-server"}
[[ -z "${PIPELINE_GUI_DOCKER_IMAGE_TAG}" ]] && export PIPELINE_GUI_DOCKER_IMAGE_TAG=${PIPELINE_GUI_DOCKER_IMAGE_TAG:-"latest"}
fi

# The tekton version to install
kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/${TEKTON_PIPELINE_RELEASE}/release.yaml
kubectl apply -f "https://storage.googleapis.com/tekton-releases/pipeline/previous/${TEKTON_PIPELINE_RELEASE}/release.yaml"
if [[ $? -ne 0 ]]; then
echo "failed to install tekton pipeline"
exit 1
fi

if [[ ${PIPELINE_SKIP_TEKTON_DASHBOARD} != "true" ]]; then
echo "#### installing tekton dashboard"
kubectl apply --filename https://storage.googleapis.com/tekton-releases/dashboard/previous/${TEKTON_DASHBOARD_RELEASE}/release.yaml
kubectl apply --filename "https://storage.googleapis.com/tekton-releases/dashboard/previous/${TEKTON_DASHBOARD_RELEASE}/release.yaml"
if [[ $? -ne 0 ]]; then
echo "failed to install tekton dashboard"
exit 1
Expand All @@ -76,7 +83,7 @@ function k8s-waitfor-deployment() {
_deployment_name=$2
_timeout=$3
echo "waiting for ${_deployment_name} in namespace: ${_deployment_namespace} to be ready..."
kubectl wait --for=condition=available -n ${_deployment_namespace} "deployment/${_deployment_name}" --timeout=${_timeout}
kubectl wait --for=condition=available -n "${_deployment_namespace}" "deployment/${_deployment_name}" --timeout="${_timeout}"
if [ $? -ne 0 ]; then
echo "Timeout: Deployment '${_deployment_name}' did not become available within ${_timeout}."
return 1
Expand All @@ -97,15 +104,15 @@ export PIPELINE_NAMESPACE=${PIPELINE_NAMESPACE:-"tekton-tasks"}

# install a sample pipeline with docker image that can run locally
helm upgrade --install -n "${PIPELINE_NAMESPACE}" common-dependency common-dependency \
--version ^1.0.0 --repo "${PLATFORM_PROVISIONER_PIPELINE_REPO}" \
--version "${PIPELINE_CHART_VERSION_COMMON}" --repo "${PLATFORM_PROVISIONER_PIPELINE_REPO}" \
--set githubToken="${GITHUB_TOKEN}"
if [[ $? -ne 0 ]]; then
echo "failed to install common-dependency"
exit 1
fi

helm upgrade --install -n "${PIPELINE_NAMESPACE}" generic-runner generic-runner \
--version ^1.0.0 --repo "${PLATFORM_PROVISIONER_PIPELINE_REPO}" \
--version "${PIPELINE_CHART_VERSION_GENERIC_RUNNER}" --repo "${PLATFORM_PROVISIONER_PIPELINE_REPO}" \
--set serviceAccount=pipeline-cluster-admin \
--set pipelineImage="${PIPELINE_DOCKER_IMAGE}"
if [[ $? -ne 0 ]]; then
Expand All @@ -114,7 +121,7 @@ if [[ $? -ne 0 ]]; then
fi

helm upgrade --install -n "${PIPELINE_NAMESPACE}" helm-install helm-install \
--version ^1.0.0 --repo "${PLATFORM_PROVISIONER_PIPELINE_REPO}" \
--version "${PIPELINE_CHART_VERSION_HELM_INSTALL}" --repo "${PLATFORM_PROVISIONER_PIPELINE_REPO}" \
--set serviceAccount=pipeline-cluster-admin \
--set pipelineImage="${PIPELINE_DOCKER_IMAGE}"
if [[ $? -ne 0 ]]; then
Expand All @@ -130,7 +137,7 @@ fi

# install provisioner config
helm upgrade --install -n "${PIPELINE_NAMESPACE}" provisioner-config-local provisioner-config-local \
--version ^1.0.0 --repo "${PLATFORM_PROVISIONER_PIPELINE_REPO}"
--version "${PIPELINE_CHART_VERSION_PROVISIONER_CONFIG_LOCAL}" --repo "${PLATFORM_PROVISIONER_PIPELINE_REPO}"
if [[ $? -ne 0 ]]; then
echo "failed to install provisioner-config-local"
exit 1
Expand All @@ -151,9 +158,9 @@ fi

# install provisioner web ui
helm upgrade --install -n "${PIPELINE_NAMESPACE}" platform-provisioner-ui platform-provisioner-ui --repo "${PLATFORM_PROVISIONER_PIPELINE_REPO}" \
--version ^1.0.0 \
--set image.repository="${PIPELINE_GUI_DOCKER_IMAGE_REPO_FULL_URL}" \
--set image.tag=latest \
--version "${PIPELINE_CHART_VERSION_PROVISIONER_UI}" \
--set image.repository="${PIPELINE_GUI_DOCKER_IMAGE_REPO}/${PIPELINE_GUI_DOCKER_IMAGE_PATH}" \
--set image.tag="${PIPELINE_GUI_DOCKER_IMAGE_TAG}" \
--set "imagePullSecrets[0].name=${_image_pull_secret_name}" \
--set guiConfig.onPremMode=true \
--set guiConfig.pipelinesCleanUpEnabled=true \
Expand Down
1 change: 0 additions & 1 deletion dev/platform-provisioner-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
# Returns:
# 0 if thing was deleted, non-zero on error
# Notes:
# This script needs to be run in the dev folder
# Recipe: The full path of the recipe file. The script will automatically load this recipe as input
# Docker run command: It will mount necessary folder and bring environment variables to the container.
# It will also run the command defined in all pipeline task.
Expand Down

0 comments on commit c47a416

Please sign in to comment.