Skip to content

Commit

Permalink
Merge pull request #50 from Azure/gk/fix-deps
Browse files Browse the repository at this point in the history
fix order-service
  • Loading branch information
thegovind authored Jun 20, 2024
2 parents 4fa23ac + ac5a7c8 commit 1867623
Show file tree
Hide file tree
Showing 28 changed files with 835 additions and 132 deletions.
50 changes: 50 additions & 0 deletions accounting-service/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
spring:
application:
name: accounting-service
kafka:
producer:
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
properties:
spring:
json:
type:
mapping: ordersummary:com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto
sasl:
mechanism: ${KAFKASASLMECHANISM:PLAIN}
jaas:
config: ${KAFKASASLJAASCONFIG}
bootstrap-servers: ${KAFKABOOTSTRAPSERVERS:localhost:9092}
security:
protocol: ${KAFKASECURITYPROTOCOL:PLAINTEXT}
config:
import: optional:classpath:.env[.properties]
banner:
location: static/banner.txt
cosmos:
queryMetricsEnabled: 'true'
key: ${AZURECOSMOSDBKEY}
secondaryKey: ${AZURECOSMOSDBSECONDARYKEY}
databaseName: ${AZURECOSMOSDBDATABASENAME}
uri: ${AZURECOSMOSDBURI}
eureka:
client:
register-with-eureka: false
fetch-registry: false
enabled: false
server:
port: '8707'
topic:
name:
producer: ${KAFKATOPICNAME:reddog.orders}
logging:
level:
org:
hibernate:
stat: DEBUG
SQL: DEBUG
springdoc:
api-docs:
path: /api-docs
swagger-ui:
path: /swagger
enabled: true
50 changes: 50 additions & 0 deletions accounting-service/src/main/resources/application-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
spring:
application:
name: accounting-service
kafka:
producer:
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
properties:
spring:
json:
type:
mapping: ordersummary:com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto
sasl:
mechanism: ${KAFKASASLMECHANISM:PLAIN}
jaas:
config: ${KAFKASASLJAASCONFIG}
bootstrap-servers: ${KAFKABOOTSTRAPSERVERS:localhost:9092}
security:
protocol: ${KAFKASECURITYPROTOCOL:PLAINTEXT}
config:
import: optional:classpath:.env[.properties]
banner:
location: static/banner.txt
cosmos:
queryMetricsEnabled: 'true'
key: ${AZURECOSMOSDBKEY}
secondaryKey: ${AZURECOSMOSDBSECONDARYKEY}
databaseName: ${AZURECOSMOSDBDATABASENAME}
uri: ${AZURECOSMOSDBURI}
eureka:
client:
register-with-eureka: false
fetch-registry: false
enabled: false
server:
port: '8707'
topic:
name:
producer: ${KAFKATOPICNAME:reddog.orders}
logging:
level:
org:
hibernate:
stat: DEBUG
SQL: DEBUG
springdoc:
api-docs:
path: /api-docs
swagger-ui:
path: /swagger
enabled: true
18 changes: 1 addition & 17 deletions accounting-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
spring:
profiles:
active: dev, key-vault
application:
name: accounting-service
config:
import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/}
---
spring:
config:
activate:
on-profile: key-vault
cloud:
azure:
keyvault:
secret:
property-sources:
- name: key-vault-property-source
endpoint: ${AZURE_KEY_VAULT_ENDPOINT}
active: dev
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spring:
jms:
servicebus:
connection-string: ${SERVICEBUSCONNECTIONSTRING}
pricing-tier: ${SERVICEBUSPRICINGTIER:Basic}
pricing-tier: ${SERVICEBUSPRICINGTIER:standard}
datasource:
driverClassName: com.mysql.cj.jdbc.Driver
password: ${MYSQLPASSWORD}
Expand Down
2 changes: 1 addition & 1 deletion config-server/order-service-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spring:
jms:
servicebus:
connection-string: ${SERVICEBUSCONNECTIONSTRING}
pricing-tier: ${SERVICEBUSPRICINGTIER:Basic}
pricing-tier: ${SERVICEBUSPRICINGTIER:standard}
datasource:
driverClassName: com.mysql.cj.jdbc.Driver
password: ${MYSQLPASSWORD}
Expand Down
2 changes: 1 addition & 1 deletion config-server/order-service-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spring:
jms:
servicebus:
connection-string: ${SERVICEBUSCONNECTIONSTRING}
pricing-tier: ${SERVICEBUSPRICINGTIER:Basic}
pricing-tier: ${SERVICEBUSPRICINGTIER:standard}
datasource:
driverClassName: com.mysql.cj.jdbc.Driver
password: ${MYSQLPASSWORD}
Expand Down
2 changes: 1 addition & 1 deletion docs/initial-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Follow the steps below to deploy Red Dog to your Azure Spring Apps instance depl
--memory 2Gi \
--instance-count 1 \
--system-assigned true \
--env AZURECOSMOSDBURI=$AZURECOSMOSDBURI AZURECOSMOSDBDATABASENAME='reddog' KAFKABOOTSTRAPSERVERS=$KAFKABOOTSTRAPSERVERS KAFKASECURITYPROTOCOL='SASL_SSL' KAFKASASLMECHANISM='PLAIN' KAFKATOPICNAME='reddog' MYSQLURL=$MYSQLURL AZUREREDISHOST=$AZUREREDISHOST AZUREREDISPORT=6380 AZURESTORAGEACCOUNTNAME=$AZURESTORAGEACCOUNTNAME AZURESTORAGEENDPOINT=$AZURESTORAGEENDPOINT KAFKATOPICGROUP=$SERVICE_NAME KAFKACONSUMERGROUPID=$SERVICE_NAME KAFKACOMPLETEDORDERSTOPIC='make-line-completed' AZURE_KEY_VAULT_ENDPOINT=$AZURE_KEY_VAULT_ENDPOINT
--env AZURECOSMOSDBURI=$AZURECOSMOSDBURI AZURECOSMOSDBDATABASENAME='reddog' KAFKABOOTSTRAPSERVERS=$KAFKABOOTSTRAPSERVERS KAFKASECURITYPROTOCOL='SASL_SSL' KAFKASASLMECHANISM='PLAIN' KAFKATOPICNAME='reddog' MYSQLURL=$MYSQLURL AZUREREDISHOST=$AZUREREDISHOST AZUREREDISPORT=6380 AZURESTORAGEACCOUNTNAME=$AZURESTORAGEACCOUNTNAME AZURESTORAGEENDPOINT=$AZURESTORAGEENDPOINT KAFKATOPICGROUP=$SERVICE_NAME KAFKACONSUMERGROUPID=$SERVICE_NAME KAFKACOMPLETEDORDERSTOPIC='make-line-completed' AZUREKEYVAULTENDPOINT=$AZUREKEYVAULTENDPOINT

# Set the access policy for this app
APP_MANAGED_IDENTITY_OBJECT_ID=$(az spring app identity show \
Expand Down
2 changes: 1 addition & 1 deletion gateway-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spring:
secret:
property-sources:
- name: key-vault-property-source
endpoint: ${AZURE_KEY_VAULT_ENDPOINT}
endpoint: ${AZUREKEYVAULTENDPOINT}
58 changes: 58 additions & 0 deletions loyalty-service/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
spring:
config:
import: optional:file:.env[.properties]
application:
name: loyalty-service
banner:
location: static/banner.txt
redis:
host: ${AZUREREDISHOST}
port: ${AZUREREDISPORT}
password: ${AZUREREDISACCESSKEY}
ssl: true
connect-timeout: 5000
kafka:
topic:
name: ${KAFKATOPICNAME}
group: ${KAFKATOPICGROUP:loyalty-service}
bootstrap-servers: ${KAFKABOOTSTRAPSERVERS:localhost:9092}
security:
protocol: ${KAFKASECURITYPROTOCOL:PLAINTEXT}
consumer:
group-id: ${KAFKA_CONSUMER_GROUP_ID:loyaltyservice}
auto-offset-reset: latest
properties:
spring:
json:
trusted.packages: "*"
type.mapping: ordersummary:com.microsoft.gbb.reddog.loyaltyservice.dto.OrderSummaryDto
sasl:
jaas.config: ${KAFKASASLJAASCONFIG}
mechanism: ${KAFKASASLMECHANISM:PLAIN}
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
eureka:
client:
register-with-eureka: false
fetch-registry: false
enabled: false
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
server:
port: 8703
springdoc:
api-docs:
path: /api-docs
swagger-ui:
path: /swagger
enabled: true
---
spring:
profiles: dev
application:
name: loyalty-service
58 changes: 58 additions & 0 deletions loyalty-service/src/main/resources/application-prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
spring:
config:
import: optional:file:.env[.properties]
application:
name: loyalty-service
banner:
location: static/banner.txt
redis:
host: ${AZUREREDISHOST}
port: ${AZUREREDISPORT}
password: ${AZUREREDISACCESSKEY}
ssl: true
connect-timeout: 5000
kafka:
topic:
name: ${KAFKATOPICNAME}
group: ${KAFKATOPICGROUP:loyalty-service}
bootstrap-servers: ${KAFKABOOTSTRAPSERVERS:localhost:9092}
security:
protocol: ${KAFKASECURITYPROTOCOL:PLAINTEXT}
consumer:
group-id: ${KAFKA_CONSUMER_GROUP_ID:loyaltyservice}
auto-offset-reset: latest
properties:
spring:
json:
trusted.packages: "*"
type.mapping: ordersummary:com.microsoft.gbb.reddog.loyaltyservice.dto.OrderSummaryDto
sasl:
jaas.config: ${KAFKASASLJAASCONFIG}
mechanism: ${KAFKASASLMECHANISM:PLAIN}
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
eureka:
client:
register-with-eureka: false
fetch-registry: false
enabled: false
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
server:
port: 8703
springdoc:
api-docs:
path: /api-docs
swagger-ui:
path: /swagger
enabled: true
---
spring:
profiles: dev
application:
name: loyalty-service
18 changes: 1 addition & 17 deletions loyalty-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
spring:
profiles:
active: dev, key-vault
application:
name: loyalty-service
config:
import: optional:configserver:${CONFIG_SERVER_URL:http://localhost:8888/}
---
spring:
config:
activate:
on-profile: key-vault
cloud:
azure:
keyvault:
secret:
property-sources:
- name: key-vault-property-source
endpoint: ${AZURE_KEY_VAULT_ENDPOINT}
active: dev
87 changes: 87 additions & 0 deletions makeline-service/src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
spring:
application:
name: makeline-service
main:
allow-bean-definition-overriding: true
banner:
location: static/banner.txt
redis:
host: ${AZUREREDISHOST}
port: ${AZUREREDISPORT}
password: ${AZUREREDISACCESSKEY}
ssl: true
connect-timeout: 5000
# cloud:
# stream:
# default-binder: kafka
kafka:
topic:
name: ${KAFKATOPICNAME}
completed-orders-name: ${KAFKA_COMPLETED_ORDERS_TOPIC:orderscompleted}
group: ${KAFKATOPICGROUP:makeline-service}
bootstrap-servers: ${KAFKABOOTSTRAPSERVERS:localhost:9092}
security:
protocol: ${KAFKASECURITYPROTOCOL:PLAINTEXT}
producer:
value-serializer: org.springframework.kafka.support.serializer.JsonSerializer
properties:
sasl:
mechanism: ${KAFKASASLMECHANISM:PLAIN}
jaas:
config: ${KAFKASASLJAASCONFIG}
spring:
json:
type:
mapping: ordersummary:com.microsoft.gbb.reddog.makelineservice.dto.OrderSummaryDto
consumer:
group-id: ${KAFKA_CONSUMER_GROUP_ID:makelineservice}
auto-offset-reset: latest
properties:
spring:
json:
trusted.packages: "*"
type.mapping: ordersummary:com.microsoft.gbb.reddog.makelineservice.dto.OrderSummaryDto
sasl:
jaas:
config: ${KAFKASASLJAASCONFIG}
mechanism: ${KAFKASASLMECHANISM:PLAIN}
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
messaging:
pubsub:
enabled: true
TOPIC_NAME: makeline-service-topic
SUB_NAME: pubsub
eureka:
client:
register-with-eureka: false
fetch-registry: false
enabled: false
cosmos:
uri: ${AZURECOSMOSDBURI}
key: ${AZURECOSMOSDBKEY}
secondaryKey: ${AZURECOSMOSDBSECONDARYKEY}
databaseName: ${AZURECOSMOSDBDATABASENAME}
queryMetricsEnabled: true
containerName: ${AZURE_COSMOSDB_CONTAINER_NAME:reddog}
requestUnits: ${AZURE_COSMOSDB_REQUEST_UNITS:400}
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
server:
port: 8704
springdoc:
api-docs:
path: /api-docs
swagger-ui:
path: /swagger
enabled: true
---
spring:
profiles: dev
application:
name: makeline-service
Loading

0 comments on commit 1867623

Please sign in to comment.