Skip to content
Snippets Groups Projects
Commit 8e5d8908 authored by Artem Dobrynin (EPAM)'s avatar Artem Dobrynin (EPAM)
Browse files

Merge branch 'master' into gcp/feature/bucket-naming-fix

# Conflicts:
#	.gitlab-ci.yml
#	devops/gcp/configmap/values.yaml
parents 537de4f7 4985275b
No related branches found
No related tags found
1 merge request!167Improve object store bucket naming (GONRG-4608)
Pipeline #110848 failed
......@@ -11,21 +11,25 @@ variables:
OSDU_GCP_WKS_MAPPING: WksMapping
OSDU_GCP_HELM_CONFIG_SERVICE_VARS: >
--set data.wks_gcp_audiences=$GOOGLE_AUDIENCE
--set data.wks_gcp_tenant_name=$OSDU_GCP_TENANT
--set data.shared_tenant_name=$OSDU_GCP_TENANT
--set data.project_id=$OSDU_GCP_PROJECT
--set data.wks_gcp_storage_bucket_name=$OSDU_GCP_WKS_BUCKET
--set data.wks_gcp_redis_host=$REDIS_SEARCH_HOST
OSDU_GCP_HELM_CONFIG_SERVICE_VARS_DEV2: >
--set data.wks_gcp_audiences=$GOOGLE_AUDIENCE
--set data.wks_gcp_tenant_name=$OSDU_GCP_TENANT
--set data.project_id=$OSDU_GCP_PROJECT
--set data.shared_tenant_name=$OSDU_GCP_TENANT
--set data.wks_gcp_storage_bucket_name=$OSDU_GCP_WKS_BUCKET
--set data.wks_gcp_redis_host=$REDIS_SEARCH_HOST
OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS: >
--set data.image=$CI_REGISTRY_IMAGE/osdu-gcp-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.serviceAccountName=$OSDU_GCP_SERVICE-k8s
--set data.bootstrapServiceAccountName=$OSDU_GCP_BOOTSTRAP_SERVICE_ACCOUNT
--set data.bootstrap_image=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-wks:$CI_COMMIT_SHORT_SHA
--set data.bootstrap_image=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
# FIXME add value below to DEV2 pipeline
OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS_DEV2: >
--set data.bootstrapServiceAccountName=$OSDU_GCP_BOOTSTRAP_SERVICE_ACCOUNT
--set data.bootstrap_image=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-wks:${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}
--set data.bootstrap_image=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-$OSDU_GCP_SERVICE:${CI_COMMIT_TAG:-$CI_COMMIT_SHORT_SHA}
OSDU_GCP_HELM_CONFIG_SERVICE: wks-config
OSDU_GCP_HELM_DEPLOYMENT_SERVICE: wks-deploy
OSDU_GCP_HELM_PACKAGE_CHARTS: "devops/gcp/deploy devops/gcp/configmap"
......@@ -54,38 +58,5 @@ include:
file: "cloud-providers/osdu-gcp-gke.yml"
- local: "/devops/azure/bootstrap.yml"
- local: "/devops/gcp/pipeline/override-stages.yaml"
osdu-gcp-test:
variables:
OS_TARGET_SCHEMA_KIND_TENANT: $OSDU_GCP_OS_TARGET_SCHEMA_KIND_TENANT
osdu-gcp-dev2-test:
variables:
OS_TARGET_SCHEMA_KIND_TENANT: $OSDU_GCP_OS_TARGET_SCHEMA_KIND_TENANT
osdu-gcp-deploy-deployment:
variables:
OSDU_GCP_BOOTSTRAP_SERVICE: wks-bootstrap
OSDU_GCP_BOOTSTRAP_SERVICE_ACCOUNT: "datafier-workload-identity-gke"
needs: ["osdu-gcp-containerize-gitlab", "osdu-gcp-containerize-bootstrap-gitlab", "osdu-gcp-deploy-configmap"]
after_script:
- echo ----- Verify Bootstrap -----
- kubectl rollout status deployment.v1.apps/$OSDU_GCP_BOOTSTRAP_SERVICE -n $OSDU_GCP_HELM_NAMESPACE --timeout=900s
- POD=$(kubectl get pod --sort-by=.metadata.creationTimestamp -n $OSDU_GCP_HELM_NAMESPACE | grep $OSDU_GCP_BOOTSTRAP_SERVICE | tail -1 | awk '{print $1}')
- STATUS=$(kubectl wait -n $OSDU_GCP_HELM_NAMESPACE --for=condition=Ready pod/$POD --timeout=300s)
- echo $STATUS
- if [[ "$STATUS" != *"met"* ]]; then echo "POD didn't start correctly" ; exit 1 ; fi
osdu-gcp-dev2-deploy-deployment:
variables:
OSDU_GCP_BOOTSTRAP_SERVICE: wks-bootstrap
OSDU_GCP_BOOTSTRAP_NAMESPACE: config
OSDU_GCP_BOOTSTRAP_SERVICE_ACCOUNT: workload-gke-bootstrap-sa
needs: ["osdu-gcp-containerize-gitlab", "osdu-gcp-containerize-bootstrap-gitlab", "osdu-gcp-dev2-deploy-configmap"]
after_script:
- echo ----- Verify Bootstrap -----
- kubectl rollout status deployment.v1.apps/$OSDU_GCP_BOOTSTRAP_SERVICE -n $OSDU_GCP_HELM_NAMESPACE --timeout=900s
- POD=$(kubectl get pod --sort-by=.metadata.creationTimestamp -n $OSDU_GCP_HELM_NAMESPACE | grep $OSDU_GCP_BOOTSTRAP_SERVICE | tail -1 | awk '{print $1}')
- STATUS=$(kubectl wait -n $OSDU_GCP_HELM_NAMESPACE --for=condition=Ready pod/$POD --timeout=300s)
- echo $STATUS
- if [[ "$STATUS" != *"met"* ]]; then echo "POD didn't start correctly" ; exit 1 ; fi
......@@ -6,8 +6,12 @@ metadata:
name: "{{ .Values.conf.bootstrap_configmap }}"
namespace: "{{ .Release.Namespace }}"
data:
WKS_NAMESPACE: "{{ .Values.data.wks_gcp_tenant_name }}"
WKS_KIND: "{{ .Values.data.wks_gcp_datastore_mapping_info_kind }}"
WKS_TENANT: "{{ .Values.data.wks_gcp_tenant_name }}"
WKS_BUCKET: "{{ .Values.data.wks_gcp_storage_bucket_name }}"
ON_PREM_ENABLED: "{{ .Values.conf.on_prem_enabled }}"
WKS_NAMESPACE: {{ .Values.data.shared_tenant_name | quote }}
WKS_KIND: {{ .Values.data.wks_gcp_datastore_mapping_info_kind | quote }}
WKS_TENANT: {{ .Values.data.shared_tenant_name | quote }}
{{ if .Values.conf.on_prem_enabled }}
WKS_BUCKET: {{ .Values.data.wks_gcp_storage_bucket_name | quote }} #fixme change bucket logic after GONRG-4976
{{ else }}
WKS_BUCKET: {{ printf "%s-%s" .Values.data.project_id .Values.data.wks_gcp_storage_bucket_name | quote }} #fixme change bucket logic after GONRG-4976
{{ end }}
ON_PREM_ENABLED: {{ .Values.conf.on_prem_enabled | quote }}
......@@ -10,8 +10,8 @@ data:
SPRING_PROFILES_ACTIVE: "{{ .Values.data.spring_profiles_active }}"
WKS_GCP_DATASTORE_MAPPING_INFO_KIND: "{{ .Values.data.wks_gcp_datastore_mapping_info_kind }}"
WKS_GCP_STORAGE_BUCKET_NAME: "{{ .Values.data.wks_gcp_storage_bucket_name }}"
WKS_GCP_TENANT_NAME: "{{ .Values.data.wks_gcp_tenant_name }}"
WKS_GCP_RECORDS_TOPIC: "{{.Values.data.wks_gcp_records_topic}}"
WKS_GCP_TENANT_NAME: "{{ .Values.data.shared_tenant_name }}"
WKS_GCP_RECORDS_TOPIC: "{{ .Values.data.wks_gcp_records_topic }}"
WKS_GCP_REDIS_HOST: "{{ .Values.data.wks_gcp_redis_host }}"
{{- if not .Values.conf.on_prem_enabled }}
WKS_GCP_AUDIENCES: "{{ .Values.data.wks_gcp_audiences }}"
......
......@@ -4,9 +4,10 @@ data:
spring_profiles_active: "gcp"
wks_gcp_datastore_mapping_info_kind: "WksMapping" # used as table name in postgres
wks_gcp_storage_bucket_name: "wks-mapping-definitions"
wks_gcp_tenant_name: "" # data partition id, used as schema in postgres
shared_tenant_name: ""
wks_gcp_records_topic: "records-changed"
wks_gcp_redis_host: ""
wks_gcp_redis_host: "redis-search-master"
project_id: ""
# gcp
wks_gcp_audiences: ""
conf:
......
osdu-gcp-test:
variables:
OS_TARGET_SCHEMA_KIND_TENANT: $OSDU_GCP_OS_TARGET_SCHEMA_KIND_TENANT
osdu-gcp-dev2-test:
variables:
OS_TARGET_SCHEMA_KIND_TENANT: $OSDU_GCP_OS_TARGET_SCHEMA_KIND_TENANT
osdu-gcp-deploy-deployment:
variables:
OSDU_GCP_BOOTSTRAP_SERVICE: wks-bootstrap
OSDU_GCP_BOOTSTRAP_SERVICE_ACCOUNT: "datafier-workload-identity-gke"
needs: ["osdu-gcp-containerize-gitlab", "osdu-gcp-containerize-bootstrap-gitlab", "osdu-gcp-deploy-configmap"]
after_script:
- >
if [[ "$OSDU_GCP_ENABLE_BOOTSTRAP" == "true" ]];
then echo ----- Verify Bootstrap -----;
kubectl rollout status deployment.v1.apps/$OSDU_GCP_SERVICE-bootstrap -n $OSDU_GCP_HELM_NAMESPACE --timeout=900s;
POD=$(kubectl get pod --sort-by=.metadata.creationTimestamp -n $OSDU_GCP_HELM_NAMESPACE | grep $OSDU_GCP_SERVICE-bootstrap | tail -1 | awk '{print $1}');
STATUS=$(kubectl wait -n $OSDU_GCP_HELM_NAMESPACE --for=condition=Ready pod/$POD --timeout=300s);
echo $STATUS;
if [[ "$STATUS" != *"met"* ]];
then echo "POD didn't start correctly"; exit 1; fi;
fi
osdu-gcp-dev2-deploy-deployment:
variables:
OSDU_GCP_BOOTSTRAP_SERVICE: wks-bootstrap
OSDU_GCP_BOOTSTRAP_NAMESPACE: config
OSDU_GCP_BOOTSTRAP_SERVICE_ACCOUNT: workload-gke-bootstrap-sa
needs: ["osdu-gcp-containerize-gitlab", "osdu-gcp-containerize-bootstrap-gitlab", "osdu-gcp-dev2-deploy-configmap"]
after_script:
- >
if [[ "$OSDU_GCP_ENABLE_BOOTSTRAP" == "true" ]];
then echo ----- Verify Bootstrap -----;
kubectl rollout status deployment.v1.apps/$OSDU_GCP_SERVICE-bootstrap -n $OSDU_GCP_HELM_NAMESPACE --timeout=900s;
POD=$(kubectl get pod --sort-by=.metadata.creationTimestamp -n $OSDU_GCP_HELM_NAMESPACE | grep $OSDU_GCP_SERVICE-bootstrap | tail -1 | awk '{print $1}');
STATUS=$(kubectl wait -n $OSDU_GCP_HELM_NAMESPACE --for=condition=Ready pod/$POD --timeout=300s);
echo $STATUS;
if [[ "$STATUS" != *"met"* ]];
then echo "POD didn't start correctly"; exit 1; fi;
fi
......@@ -10,4 +10,4 @@ RUN pip3 install -r /opt/scripts/gcp/requirements.txt
RUN pip3 install -r /opt/scripts/anthos/requirements.txt
RUN chmod 775 /opt/bootstrap.sh
CMD ["/bin/bash", "-c", "source /opt/bootstrap.sh && sleep 365d"]
CMD ["/bin/bash", "-c", "sleep 1m && /opt/bootstrap.sh && sleep 365d"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment