From 1df5db5b029228c248c2d94c023e2985294a7bb3 Mon Sep 17 00:00:00 2001 From: niallthomson Date: Tue, 9 Jan 2024 15:34:29 +0000 Subject: [PATCH] Release 0.7.0 --- deploy/kubernetes/charts/assets/values.yaml | 2 +- deploy/kubernetes/charts/carts/values.yaml | 2 +- deploy/kubernetes/charts/catalog/values.yaml | 2 +- deploy/kubernetes/charts/checkout/values.yaml | 2 +- deploy/kubernetes/charts/orders/values.yaml | 2 +- deploy/kubernetes/charts/ui/values.yaml | 2 +- deploy/terraform/lib/images/generated.tf.json | 2 +- dist/docker-compose/docker-compose.yml | 45 ++++----- dist/kubernetes/deploy.yaml | 91 ++++++++----------- 9 files changed, 70 insertions(+), 80 deletions(-) diff --git a/deploy/kubernetes/charts/assets/values.yaml b/deploy/kubernetes/charts/assets/values.yaml index 8f5bccf3..f273c0fc 100644 --- a/deploy/kubernetes/charts/assets/values.yaml +++ b/deploy/kubernetes/charts/assets/values.yaml @@ -7,7 +7,7 @@ replicaCount: 1 image: repository: public.ecr.aws/aws-containers/retail-store-sample-assets pullPolicy: IfNotPresent - tag: 0.6.0 + tag: 0.7.0 imagePullSecrets: [] nameOverride: "" diff --git a/deploy/kubernetes/charts/carts/values.yaml b/deploy/kubernetes/charts/carts/values.yaml index d90afe09..df20ca72 100644 --- a/deploy/kubernetes/charts/carts/values.yaml +++ b/deploy/kubernetes/charts/carts/values.yaml @@ -7,7 +7,7 @@ replicaCount: 1 image: repository: public.ecr.aws/aws-containers/retail-store-sample-cart pullPolicy: IfNotPresent - tag: 0.6.0 + tag: 0.7.0 imagePullSecrets: [] nameOverride: "" diff --git a/deploy/kubernetes/charts/catalog/values.yaml b/deploy/kubernetes/charts/catalog/values.yaml index f5dfc4c0..1e9c65ea 100644 --- a/deploy/kubernetes/charts/catalog/values.yaml +++ b/deploy/kubernetes/charts/catalog/values.yaml @@ -7,7 +7,7 @@ replicaCount: 1 image: repository: public.ecr.aws/aws-containers/retail-store-sample-catalog pullPolicy: IfNotPresent - tag: 0.6.0 + tag: 0.7.0 imagePullSecrets: [] nameOverride: "" diff --git a/deploy/kubernetes/charts/checkout/values.yaml b/deploy/kubernetes/charts/checkout/values.yaml index 327df399..46316abb 100644 --- a/deploy/kubernetes/charts/checkout/values.yaml +++ b/deploy/kubernetes/charts/checkout/values.yaml @@ -7,7 +7,7 @@ replicaCount: 1 image: repository: public.ecr.aws/aws-containers/retail-store-sample-checkout pullPolicy: IfNotPresent - tag: 0.6.0 + tag: 0.7.0 imagePullSecrets: [] nameOverride: "" diff --git a/deploy/kubernetes/charts/orders/values.yaml b/deploy/kubernetes/charts/orders/values.yaml index 21e6db2c..9fe9b640 100644 --- a/deploy/kubernetes/charts/orders/values.yaml +++ b/deploy/kubernetes/charts/orders/values.yaml @@ -7,7 +7,7 @@ replicaCount: 1 image: repository: public.ecr.aws/aws-containers/retail-store-sample-orders pullPolicy: IfNotPresent - tag: 0.6.0 + tag: 0.7.0 imagePullSecrets: [] nameOverride: "" diff --git a/deploy/kubernetes/charts/ui/values.yaml b/deploy/kubernetes/charts/ui/values.yaml index cf1d83cb..259d5b0a 100644 --- a/deploy/kubernetes/charts/ui/values.yaml +++ b/deploy/kubernetes/charts/ui/values.yaml @@ -7,7 +7,7 @@ replicaCount: 1 image: repository: public.ecr.aws/aws-containers/retail-store-sample-ui pullPolicy: IfNotPresent - tag: 0.6.0 + tag: 0.7.0 imagePullSecrets: [] nameOverride: "" diff --git a/deploy/terraform/lib/images/generated.tf.json b/deploy/terraform/lib/images/generated.tf.json index 2100ce8d..84226791 100644 --- a/deploy/terraform/lib/images/generated.tf.json +++ b/deploy/terraform/lib/images/generated.tf.json @@ -1,6 +1,6 @@ { "locals": { - "published_tag": "0.6.0", + "published_tag": "0.7.0", "published_repository": "public.ecr.aws/aws-containers" } } diff --git a/dist/docker-compose/docker-compose.yml b/dist/docker-compose/docker-compose.yml index 3bb7f8c7..acf80327 100644 --- a/dist/docker-compose/docker-compose.yml +++ b/dist/docker-compose/docker-compose.yml @@ -1,12 +1,12 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 -# +# # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, including without limitation the rights to use, copy, modify, # merge, publish, distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, # INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A # PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT @@ -28,14 +28,14 @@ services: - ENDPOINTS_CHECKOUT=http://checkout:8080 - ENDPOINTS_ASSETS=http://assets:8080 hostname: ui - image: public.ecr.aws/aws-containers/retail-store-sample-ui:0.6.0 + image: public.ecr.aws/aws-containers/retail-store-sample-ui:0.7.0 restart: always mem_limit: 512m cap_drop: - ALL catalog: hostname: catalog - image: public.ecr.aws/aws-containers/retail-store-sample-catalog:0.6.0 + image: public.ecr.aws/aws-containers/retail-store-sample-catalog:0.7.0 restart: always environment: - GIN_MODE=release @@ -56,7 +56,7 @@ services: mem_limit: 128m carts: hostname: carts - image: public.ecr.aws/aws-containers/retail-store-sample-cart:0.6.0 + image: public.ecr.aws/aws-containers/retail-store-sample-cart:0.7.0 restart: always environment: - JAVA_OPTS=-XX:MaxRAMPercentage=75.0 -Djava.security.egd=file:/dev/urandom @@ -76,35 +76,38 @@ services: mem_limit: 256m orders: hostname: orders - image: public.ecr.aws/aws-containers/retail-store-sample-orders:0.6.0 + image: public.ecr.aws/aws-containers/retail-store-sample-orders:0.7.0 restart: always environment: - JAVA_OPTS=-XX:MaxRAMPercentage=75.0 -Djava.security.egd=file:/dev/urandom - SERVER_TOMCAT_ACCESSLOG_ENABLED=true - - SPRING_PROFILES_ACTIVE=mysql,rabbitmq - - SPRING_DATASOURCE_WRITER_URL=jdbc:mariadb://orders-db:3306/orders - - SPRING_DATASOURCE_WRITER_USERNAME=orders_user - - SPRING_DATASOURCE_WRITER_PASSWORD=${MYSQL_PASSWORD} - - SPRING_DATASOURCE_READER_URL=jdbc:mariadb://orders-db:3306/orders - - SPRING_DATASOURCE_READER_USERNAME=orders_user - - SPRING_DATASOURCE_READER_PASSWORD=${MYSQL_PASSWORD} + - SPRING_PROFILES_ACTIVE=rabbitmq + - SPRING_DATASOURCE_URL=jdbc:postgresql://orders-db:5432/orders + - SPRING_DATASOURCE_USERNAME=orders_user + - SPRING_DATASOURCE_PASSWORD=${MYSQL_PASSWORD} - SPRING_RABBITMQ_HOST=rabbitmq mem_limit: 512m cap_drop: - ALL orders-db: - image: mariadb:10.9 + image: postgres:16.1 hostname: orders-db restart: always + security_opt: + - no-new-privileges:true environment: - - MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD} - - MYSQL_ALLOW_EMPTY_PASSWORD=true - - MYSQL_DATABASE=orders - - MYSQL_USER=orders_user - - MYSQL_PASSWORD=${MYSQL_PASSWORD} + - reschedule=on-node-failure + - POSTGRES_PASSWORD=${MYSQL_PASSWORD} + - POSTGRES_DB=orders + - POSTGRES_USER=orders_user + healthcheck: + test: ["CMD-SHELL", "pg_isready -d orders -U orders_user"] + interval: 10s + timeout: 5s + retries: 30 mem_limit: 128m checkout: - image: public.ecr.aws/aws-containers/retail-store-sample-checkout:0.6.0 + image: public.ecr.aws/aws-containers/retail-store-sample-checkout:0.7.0 hostname: checkout restart: always read_only: true @@ -125,7 +128,7 @@ services: hostname: assets environment: - PORT=8080 - image: public.ecr.aws/aws-containers/retail-store-sample-assets:0.6.0 + image: public.ecr.aws/aws-containers/retail-store-sample-assets:0.7.0 restart: always mem_limit: 64m cap_drop: diff --git a/dist/kubernetes/deploy.yaml b/dist/kubernetes/deploy.yaml index 73ec0f7b..d9a1d6a4 100644 --- a/dist/kubernetes/deploy.yaml +++ b/dist/kubernetes/deploy.yaml @@ -19,7 +19,7 @@ metadata: name: catalog-db data: username: "Y2F0YWxvZw==" - password: "eFZCbUNLOW1xbFFGTGhFdw==" + password: "bGVFOE9zYThORDIyTEtqNw==" --- # Source: catalog/templates/configmap.yml apiVersion: v1 @@ -141,7 +141,7 @@ spec: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 - image: "public.ecr.aws/aws-containers/retail-store-sample-catalog:0.6.0" + image: "public.ecr.aws/aws-containers/retail-store-sample-catalog:0.7.0" imagePullPolicy: IfNotPresent ports: - name: http @@ -329,7 +329,7 @@ spec: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 - image: "public.ecr.aws/aws-containers/retail-store-sample-ui:0.6.0" + image: "public.ecr.aws/aws-containers/retail-store-sample-ui:0.7.0" imagePullPolicy: IfNotPresent ports: - name: http @@ -376,7 +376,7 @@ metadata: name: catalog-db data: username: "Y2F0YWxvZw==" - password: "amp1TEFHT3BWY3ZLNjAydQ==" + password: "ZVBoSmJ5V2J3U2YxQWh0cA==" --- # Source: catalog/templates/configmap.yml apiVersion: v1 @@ -498,7 +498,7 @@ spec: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 - image: "public.ecr.aws/aws-containers/retail-store-sample-catalog:0.6.0" + image: "public.ecr.aws/aws-containers/retail-store-sample-catalog:0.7.0" imagePullPolicy: IfNotPresent ports: - name: http @@ -712,7 +712,7 @@ spec: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 - image: "public.ecr.aws/aws-containers/retail-store-sample-cart:0.6.0" + image: "public.ecr.aws/aws-containers/retail-store-sample-cart:0.7.0" imagePullPolicy: IfNotPresent ports: - name: http @@ -786,14 +786,14 @@ metadata: app.kuberneres.io/owner: retail-store-sample app.kubernetes.io/managed-by: Helm --- -# Source: orders/templates/mysql-secret.yaml +# Source: orders/templates/postgresql-secret.yaml apiVersion: v1 kind: Secret metadata: name: orders-db data: username: "b3JkZXJz" - password: "alN6anBCUDBscWtYUGxEWA==" + password: "aEJ4b21PT21Cc3lMZWV4Zw==" --- # Source: orders/templates/rabbitmq-secret.yaml apiVersion: v1 @@ -808,33 +808,32 @@ kind: ConfigMap metadata: name: orders data: - SPRING_PROFILES_ACTIVE: mysql,rabbitmq - SPRING_DATASOURCE_READER_URL: jdbc:mariadb://orders-mysql:3306/orders - SPRING_DATASOURCE_WRITER_URL: jdbc:mariadb://orders-mysql:3306/orders + SPRING_PROFILES_ACTIVE: rabbitmq + SPRING_DATASOURCE_URL: jdbc:postgresql://orders-postgresql:5432/orders SPRING_RABBITMQ_ADDRESSES: amqp://orders-rabbitmq:5672 --- -# Source: orders/templates/mysql-service.yaml +# Source: orders/templates/postgresql-service.yaml apiVersion: v1 kind: Service metadata: - name: orders-mysql + name: orders-postgresql labels: helm.sh/chart: orders-0.0.1 app.kubernetes.io/name: orders app.kubernetes.io/instance: orders - app.kubernetes.io/component: mysql + app.kubernetes.io/component: postgresql app.kubernetes.io/managed-by: Helm spec: type: ClusterIP ports: - - port: 3306 - targetPort: mysql + - port: 5432 + targetPort: postgresql protocol: TCP - name: mysql + name: postgresql selector: app.kubernetes.io/name: orders app.kubernetes.io/instance: orders - app.kubernetes.io/component: mysql + app.kubernetes.io/component: postgresql --- # Source: orders/templates/rabbitmq-service.yaml apiVersion: v1 @@ -932,22 +931,12 @@ spec: env: - name: JAVA_OPTS value: -XX:MaxRAMPercentage=75.0 -Djava.security.egd=file:/dev/urandom - - name: SPRING_DATASOURCE_WRITER_USERNAME - valueFrom: - secretKeyRef: - name: orders-db - key: username - - name: SPRING_DATASOURCE_WRITER_PASSWORD - valueFrom: - secretKeyRef: - name: orders-db - key: password - - name: SPRING_DATASOURCE_READER_USERNAME + - name: SPRING_DATASOURCE_USERNAME valueFrom: secretKeyRef: name: orders-db key: username - - name: SPRING_DATASOURCE_READER_PASSWORD + - name: SPRING_DATASOURCE_PASSWORD valueFrom: secretKeyRef: name: orders-db @@ -964,7 +953,7 @@ spec: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 - image: "public.ecr.aws/aws-containers/retail-store-sample-orders:0.6.0" + image: "public.ecr.aws/aws-containers/retail-store-sample-orders:0.7.0" imagePullPolicy: IfNotPresent ports: - name: http @@ -990,59 +979,57 @@ spec: emptyDir: medium: Memory --- -# Source: orders/templates/mysql-statefulset.yaml +# Source: orders/templates/postgresql-statefulset.yaml apiVersion: apps/v1 kind: StatefulSet metadata: - name: orders-mysql + name: orders-postgresql labels: helm.sh/chart: orders-0.0.1 app.kubernetes.io/name: orders app.kubernetes.io/instance: orders - app.kubernetes.io/component: mysql + app.kubernetes.io/component: postgresql app.kubernetes.io/managed-by: Helm spec: replicas: 1 - serviceName: orders-mysql + serviceName: orders-postgresql selector: matchLabels: app.kubernetes.io/name: orders app.kubernetes.io/instance: orders - app.kubernetes.io/component: mysql + app.kubernetes.io/component: postgresql template: metadata: labels: app.kubernetes.io/name: orders app.kubernetes.io/instance: orders - app.kubernetes.io/component: mysql + app.kubernetes.io/component: postgresql spec: containers: - - name: mysql - image: "mysql:5.7" + - name: postgresql + image: "postgres:16.1" imagePullPolicy: IfNotPresent env: - - name: MYSQL_ROOT_PASSWORD - value: my-secret-pw - - name: MYSQL_DATABASE + - name: POSTGRES_DB value: orders - - name: MYSQL_USER + - name: POSTGRES_USER valueFrom: secretKeyRef: name: orders-db key: username - - name: MYSQL_PASSWORD + - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: orders-db key: password - args: - - "--ignore-db-dir=lost+found" + - name: PGDATA + value: /data/pgdata volumeMounts: - name: data - mountPath: /var/lib/mysql + mountPath: /data ports: - - name: mysql - containerPort: 3306 + - name: postgresql + containerPort: 5432 protocol: TCP volumes: - name: data @@ -1214,7 +1201,7 @@ spec: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 - image: "public.ecr.aws/aws-containers/retail-store-sample-checkout:0.6.0" + image: "public.ecr.aws/aws-containers/retail-store-sample-checkout:0.7.0" imagePullPolicy: IfNotPresent ports: - name: http @@ -1366,7 +1353,7 @@ spec: drop: - ALL readOnlyRootFilesystem: false - image: "public.ecr.aws/aws-containers/retail-store-sample-assets:0.6.0" + image: "public.ecr.aws/aws-containers/retail-store-sample-assets:0.7.0" imagePullPolicy: IfNotPresent ports: - name: http @@ -1500,7 +1487,7 @@ spec: readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 - image: "public.ecr.aws/aws-containers/retail-store-sample-ui:0.6.0" + image: "public.ecr.aws/aws-containers/retail-store-sample-ui:0.7.0" imagePullPolicy: IfNotPresent ports: - name: http