From d6befbe5ed0f96303de0d13b262e13a2edffb682 Mon Sep 17 00:00:00 2001 From: vimal-knoldus Date: Tue, 26 Sep 2023 14:50:35 +0530 Subject: [PATCH 1/4] Update azure yaml --- .github/workflows/car-demo-azure.yml | 5 +---- az-svc-deployment.sh | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/car-demo-azure.yml b/.github/workflows/car-demo-azure.yml index c6a3091e..48d64712 100644 --- a/.github/workflows/car-demo-azure.yml +++ b/.github/workflows/car-demo-azure.yml @@ -1,11 +1,8 @@ -name: car-demo-common-service +name: azure-car-demo-pipeline on: push: branches: [ main ] -env: - AKS_CLUSTER: ntdemocluster - AKS_NAMESPACE: default jobs: setup-build-publish-deploy: diff --git a/az-svc-deployment.sh b/az-svc-deployment.sh index 2bb806be..0ebf2a83 100644 --- a/az-svc-deployment.sh +++ b/az-svc-deployment.sh @@ -6,7 +6,7 @@ DEPLOYMENT_NAME="adminservice" RESOURCE_GROUP_NAME="az-nashtech-resource-group" sudo az aks install-cli -sudo az acr login --name ntdemocontainerregistry --username ntdemocontainerregistry --password BjGQNe5mzQquXBcYe6rh6A5aAMhDtUY5x5zs8TCzPX+ACRCQa/EP +sudo az acr login --name ntdemocontainerregistry --username ntdemocontainerregistry --password 6ClsvR5eY7l/+oBoqfAtpAe0pw4BPFfMpFx3MnNsEy+ACRCmws5F echo "---------build and deploy $SERVICE_NAME-----------" cd "$SERVICE_NAME" || exit mvn clean install @@ -16,7 +16,7 @@ echo "--------docker build done, docker push---------------" sudo docker push ntdemocontainerregistry.azurecr.io/"$SERVICE_NAME":"$GITHUB_SHA" echo "--------pushed docker image, deploy to aks cluster--------------------------" -sudo az login --service-principal -u 4535b4bf-5f2a-4d46-9f61-f5889ba6592a -p A1q8Q~tLfdWmlKUamBRCOWa3OwZIcJ6Sia6uHb.w --tenant 17742d94-229e-4be7-b2a9-75ba757f345b +sudo az login --service-principal -u 4535b4bf-5f2a-4d46-9f61-f5889ba6592a -p yeZ8Q~GNfvn..FUsVCQa2lTy02KP42ytdhKwvbdE --tenant 17742d94-229e-4be7-b2a9-75ba757f345b echo "--------getting kube config--------------------------" sudo az aks get-credentials --resource-group "$RESOURCE_GROUP_NAME" --name "$AKS_CLUSTER" # setup kustomize From f9bf6aca628e2a67de48ad6f6f115e4cf0032f79 Mon Sep 17 00:00:00 2001 From: vimal-knoldus Date: Tue, 26 Sep 2023 15:02:05 +0530 Subject: [PATCH 2/4] Update azure yaml --- admin-service/azure-deploy-service.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin-service/azure-deploy-service.yaml b/admin-service/azure-deploy-service.yaml index 74a250e4..f3496068 100644 --- a/admin-service/azure-deploy-service.yaml +++ b/admin-service/azure-deploy-service.yaml @@ -22,9 +22,9 @@ spec: protocol: TCP env: - name: COSMOS_KEY - value: xweJzyTINK8SotydeF3ZSg8cOO4e4wwW3J5UPV0isfRyBQXbGKioxFh3MnpzjuIwSwJJ6VCfviY9ACDbF7d0Wg== + value: CiA9JW2eX7qFTXtHs4rVH4ZjMQh7LWjQnLUjr707Z3t1LZ18wdQXPDbHJZv9kRQtgDAVWSoCzoHDACDbLy5Xyg== - name: COSMOS_URI - value: https://az-nashtech-db.documents.azure.com:443/ + value: https://ntdemoreactivedatabase.documents.azure.com:443/ - name: KAFKA_SERVER value: ntdemoevtnamespace.servicebus.windows.net:9093 - name: KAFKA_SECURITY_PROTOCOL @@ -32,7 +32,7 @@ spec: - name: SASL_MECHANISM value: PLAIN - name: JASS_CONFIG - value: org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="Endpoint=sb://ntdemoevtnamespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=j6cNS3qEVLKyB7JgBofWKNGHxxQguJtge+AEhHcFBsA="; + value: org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="Endpoint=sb://ntdemoevtnamespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=XzsbkMoEK5pi2GXe/+GMtHcR9GPKi5Oj1+AEhMc+byA="; - name: KEY_SERIALIZER value: org.apache.kafka.common.serialization.StringSerializer - name: VALUE_SERIALIZER From cb513bd25d34bc7a8f2c9fdeaa0a9c71ab0558d2 Mon Sep 17 00:00:00 2001 From: vimal-knoldus Date: Tue, 26 Sep 2023 15:24:41 +0530 Subject: [PATCH 3/4] Update cosmos yaml --- admin-service/src/main/resources/application-cosmos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-service/src/main/resources/application-cosmos.yml b/admin-service/src/main/resources/application-cosmos.yml index 1fabd0fb..4b7a343a 100644 --- a/admin-service/src/main/resources/application-cosmos.yml +++ b/admin-service/src/main/resources/application-cosmos.yml @@ -1,7 +1,7 @@ cosmosdb: key: ${COSMOS_KEY} uri: ${COSMOS_URI} - name: az-nashtech-db + name: ntdemodb container-name: az-car-collection eventhub: From c042e6200d79af9db16e3c11ab9893c697845396 Mon Sep 17 00:00:00 2001 From: vimal-knoldus Date: Tue, 26 Sep 2023 15:35:08 +0530 Subject: [PATCH 4/4] Update cosmos yaml --- admin-service/src/main/resources/application-cosmos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-service/src/main/resources/application-cosmos.yml b/admin-service/src/main/resources/application-cosmos.yml index 4b7a343a..76157e21 100644 --- a/admin-service/src/main/resources/application-cosmos.yml +++ b/admin-service/src/main/resources/application-cosmos.yml @@ -5,7 +5,7 @@ cosmosdb: container-name: az-car-collection eventhub: - name: eventhub + name: ntdemoeventhub apiUrl: /model_random.json?key=dcbc8750 mockaroo: