diff --git a/car-ui/src/app/shared/services/car-details.service.ts b/car-ui/src/app/shared/services/car-details.service.ts index 8a2f3df8..54afa45f 100644 --- a/car-ui/src/app/shared/services/car-details.service.ts +++ b/car-ui/src/app/shared/services/car-details.service.ts @@ -7,12 +7,18 @@ import { CarBrand, CarDetails } from "../module/cars-details.model"; providedIn: "root", }) export class CarDetailsService { - private brandsUrlGCP = "http://35.193.88.251/v1/data/brands"; + private const ADMIN_GCP_HOST = `localhost`; + + //GCP host + private brandsUrlGCP = "http://${this.ADMIN_GCP_HOST}/v1/data/brands"; + private carModelsUrlGCP = "http://${this.ADMIN_GCP_HOST}/v1/data/cars/"; + private addBulkDataGCP: string = "http://${this.ADMIN_GCP_HOST}/v1/data"; + + //azure host private brandsUrlAzure = "http://40.88.227.104/v1/data/brands"; private carModelsUrlAzure = "http://40.88.227.104/v1/data/cars/"; - private carModelsUrlGCP = "http://35.193.88.251/v1/data/cars/"; - private addBulkDataGCP: string = "http://35.193.88.251/v1/data"; private addBulkDataAzure: string = "http://40.88.227.104/v1/data"; + //private brandsUrlGCPSSE = "http://35.193.88.251/v1/data/brands-sse"; //private eventSource!: EventSource; //carBrands: CarBrand[] = []; diff --git a/car-ui/src/app/shared/services/cart.service.ts b/car-ui/src/app/shared/services/cart.service.ts index d5885da5..25cbf605 100644 --- a/car-ui/src/app/shared/services/cart.service.ts +++ b/car-ui/src/app/shared/services/cart.service.ts @@ -11,10 +11,12 @@ export class CartService { private cartItemCountSubject: BehaviorSubject; cartItemCount$: Observable; - private getCartItemUrl : string = "http://localhost:9094/cart/get"; - private placeOrderUrl = "http://localhost:9090/orders"; - private removeFromCartUrl :string = "http://localhost:9094/cart/remove"; - private addToCartUrl : string = "http://localhost:9094/cart/add"; + private const CART_HOST = `localhost`; + private const ORDER_HOST = 'localhost'; + private getCartItemUrl : string = "http://${this.CART_HOST}:9094/cart/get"; + private removeFromCartUrl :string = "http://${this.CART_HOST}:9094/cart/remove"; + private addToCartUrl : string = "http://${this.CART_HOST}:9094/cart/add"; + private placeOrderUrl :string = "http://${this.ORDER_HOST}:9090/orders"; constructor(private httpClient: HttpClient) { const initialCount = parseInt(localStorage.getItem('cartCount') || '0', 10); diff --git a/deployment/gcpresources/terraform/elastic-deployment.yaml b/deployment/gcpresources/terraform/elastic-deployment.yaml index ba9e33e0..1309f63d 100644 --- a/deployment/gcpresources/terraform/elastic-deployment.yaml +++ b/deployment/gcpresources/terraform/elastic-deployment.yaml @@ -2,7 +2,6 @@ apiVersion: elasticsearch.k8s.elastic.co/v1 kind: Elasticsearch metadata: name: elasticsearch - namespace: elasticsearchdemo spec: version: 7.6.0 nodeSets: diff --git a/deployment/gcpresources/terraform/main.tf b/deployment/gcpresources/terraform/main.tf index 9a909bc1..4d846f73 100644 --- a/deployment/gcpresources/terraform/main.tf +++ b/deployment/gcpresources/terraform/main.tf @@ -151,6 +151,7 @@ resource "google_container_cluster" "car-demo-gke" { services_ipv4_cidr_block = "" } enable_autopilot = true + deletion_protection = false } #GKE Cluster for axon-server @@ -162,6 +163,7 @@ resource "google_container_cluster" "axon-server-gke" { services_ipv4_cidr_block = "" } enable_autopilot = true + deletion_protection = false } resource "null_resource" "external-secret-car-demo-gke" { @@ -187,6 +189,7 @@ resource "google_container_cluster" "elasticsearch-server-gke" { services_ipv4_cidr_block = "" } enable_autopilot = true + deletion_protection = false } resource "null_resource" "elasticsearch-server-gke" { provisioner "local-exec" { diff --git a/inventory-service/gcp-deploy-service.yaml b/inventory-service/gcp-deploy-service.yaml index 4c5ef2fc..a7a2fd57 100644 --- a/inventory-service/gcp-deploy-service.yaml +++ b/inventory-service/gcp-deploy-service.yaml @@ -116,8 +116,8 @@ metadata: name: inventory-configmap data: # Configuration values can be set as key-value properties - MYSQL_HOST: 35.196.34.197 - AXON_HOST: 34.139.86.49:8124 + MYSQL_HOST: 34.148.168.181 + AXON_HOST: 35.231.81.51:8124 SERVICE_NAME: InventoryService GCP_PROJECT_ID: datamesh-2 PRODUCT_SUBSCRIPTION: inventory_subscription diff --git a/order-service/gcp-deploy-services.yaml b/order-service/gcp-deploy-services.yaml index a94d056c..8306d7c6 100644 --- a/order-service/gcp-deploy-services.yaml +++ b/order-service/gcp-deploy-services.yaml @@ -109,6 +109,6 @@ metadata: name: orderservice-configmap data: # Configuration values can be set as key-value properties - MYSQL_HOST: 34.23.67.210 - AXON_HOST: 34.138.203.107:8124 + MYSQL_HOST: 34.148.168.181 + AXON_HOST: 35.231.81.51:8124 SERVICE_NAME: OrderService diff --git a/payment-service/gcp-deploy-service.yaml b/payment-service/gcp-deploy-service.yaml index bf8e1989..30d39b7f 100644 --- a/payment-service/gcp-deploy-service.yaml +++ b/payment-service/gcp-deploy-service.yaml @@ -106,6 +106,6 @@ metadata: name: payment-configmap data: # Configuration values can be set as key-value properties - MYSQL_HOST: 34.23.67.210 - AXON_HOST: 34.138.203.107:8124 + MYSQL_HOST: 34.148.168.181 + AXON_HOST: 35.231.81.51:8124 SERVICE_NAME: PaymentService diff --git a/projects-changes-deploy.txt b/projects-changes-deploy.txt index 8b137891..0102f8a5 100644 --- a/projects-changes-deploy.txt +++ b/projects-changes-deploy.txt @@ -1 +1,5 @@ - +admin-service +inventory-service +order-service +payment-service +shipment-service diff --git a/shipment-service/gcp-deploy-service.yaml b/shipment-service/gcp-deploy-service.yaml index 6c29ceb1..df9cbe84 100644 --- a/shipment-service/gcp-deploy-service.yaml +++ b/shipment-service/gcp-deploy-service.yaml @@ -108,7 +108,6 @@ spec: remoteRef: key: car-demo-secret version: latest - --- kind: ConfigMap @@ -117,8 +116,8 @@ metadata: name: shipment-configmap data: # Configuration values can be set as key-value properties - MYSQL_HOST: 34.23.67.210 - AXON_HOST: 34.138.203.107:8124 + MYSQL_HOST: 34.148.168.181 + AXON_HOST: 35.231.81.51:8124 GCP_PROJECT_ID: datamesh-2 PUB_SUB_TOPIC_ID: shipment-notification SERVICE_NAME: ShipmentService