Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
willdavsmith committed Oct 12, 2023
1 parent 8707935 commit e39b8d6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 75 deletions.
3 changes: 0 additions & 3 deletions samples/eshop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,4 @@ This reference app is a "radified" version of the [eShop on containers](https://
1. Deploy the application:
```bash
rad deploy eshop.bicep

# Containers (requires SQL admin username to be "SA"
rad deploy eshop.bicep -p adminLogin=sa
```
8 changes: 4 additions & 4 deletions samples/eshop/environments/aws.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ resource awsEshopEnv 'Applications.Core/environments@2023-10-01-preview' = {
}
recipes: {
'Applications.Datastores/sqlDatabases': {
sqldatabase: {
default: {
templateKind: 'bicep'
templatePath: 'radius.azurecr.io/recipes/aws/sqldatabases:edge'
templatePath: 'radiusdev.azurecr.io/recipes/aws/sqldatabases:pr-35'
parameters: {
eksClusterName: eksClusterName
}
}
}
'Applications.Datastores/redisCaches': {
rediscache: {
default: {
templateKind: 'bicep'
templatePath: 'radius.azurecr.io/recipes/aws/rediscaches:edge'
parameters: {
Expand All @@ -44,7 +44,7 @@ resource awsEshopEnv 'Applications.Core/environments@2023-10-01-preview' = {
// Use containerized RabbitMQ instead of Amazon SQS
// https://github.com/radius-project/bicep-types-aws/blob/main/docs/reference/limitations.md
'Applications.Messaging/rabbitMQQueues': {
rabbitmqmessagequeue: {
default: {
templateKind: 'bicep'
templatePath: 'radius.azurecr.io/recipes/local-dev/rabbitmqmessagequeues:edge'
}
Expand Down
6 changes: 3 additions & 3 deletions samples/eshop/environments/azure.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ resource azureEShopEnv 'Applications.Core/environments@2023-10-01-preview' = {
}
recipes: {
'Applications.Datastores/sqlDatabases': {
sqldatabase: {
default: {
templateKind: 'bicep'
templatePath: 'radius.azurecr.io/recipes/azure/sqldatabases:latest'
templatePath: 'radiusdev.azurecr.io/recipes/azure/sqldatabases:pr-35'
}
}
'Applications.Datastores/redisCaches': {
rediscache: {
default: {
templateKind: 'bicep'
templatePath: 'radius.azurecr.io/recipes/azure/rediscaches:latest'
}
Expand Down
6 changes: 3 additions & 3 deletions samples/eshop/environments/containers.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ resource containersEShopEnv 'Applications.Core/environments@2023-10-01-preview'
}
recipes: {
'Applications.Datastores/sqlDatabases': {
sqldatabase: {
default: {
templateKind: 'bicep'
templatePath: 'radius.azurecr.io/recipes/local-dev/sqldatabases:edge'
}
}
'Applications.Datastores/redisCaches': {
rediscache: {
default: {
templateKind: 'bicep'
templatePath: 'radius.azurecr.io/recipes/local-dev/rediscaches:edge'
}
}
'Applications.Messaging/rabbitMQQueues': {
rabbitmqmessagequeue: {
default: {
templateKind: 'bicep'
templatePath: 'radius.azurecr.io/recipes/local-dev/rabbitmqmessagequeues:edge'
}
Expand Down
16 changes: 3 additions & 13 deletions samples/eshop/eshop.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,15 @@ import radius as rad

// Parameters -------------------------------------------------------

@description('Name of the application. Defaults to "eshop"')
param applicationName string = 'eshop'

@description('Radius environment ID. Set automatically by Radius')
param environment string

@description('SQL administrator username')
param adminLogin string = 'sqladmin'

@description('SQL administrator password')
@secure()
param adminPassword string = newGuid()
@description('Container image tag to use for eshop images. Defaults to "linux-dotnet7".')
param TAG string = 'linux-dotnet7'

// Variables ---------------------------------------------------------

@description('Container image tag to use for eshop images')
var TAG = 'linux-dotnet7'
var applicationName = 'eshop'

// Get the environment name from the environment ID
var environmentName = last(split(environment, '/'))
Expand Down Expand Up @@ -46,8 +38,6 @@ module infra 'infra/infra.bicep' = {
params: {
application: eshopApplication.id
environment: environment
adminLogin: adminLogin
adminPassword: adminPassword
AZURESERVICEBUSENABLED: AZURESERVICEBUSENABLED
}
}
Expand Down
49 changes: 0 additions & 49 deletions samples/eshop/infra/infra.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ param environment string
@description('Radius application ID')
param application string

@description('SQL administrator username')
@secure()
param adminLogin string

@description('SQL administrator password')
@secure()
param adminPassword string

@description('Use Azure Service Bus for messaging. Allowed values: "True", "False".')
@allowed([
'True'
Expand All @@ -28,14 +20,6 @@ resource sqlIdentityDb 'Applications.Datastores/sqlDatabases@2023-10-01-preview'
properties: {
application: application
environment: environment
recipe: {
name: 'sqldatabase'
parameters: {
database: 'IdentityDb'
adminLogin: adminLogin
adminPassword: adminPassword
}
}
}
}

Expand All @@ -44,14 +28,6 @@ resource sqlCatalogDb 'Applications.Datastores/sqlDatabases@2023-10-01-preview'
properties: {
application: application
environment: environment
recipe: {
name: 'sqldatabase'
parameters: {
database: 'CatalogDb'
adminLogin: adminLogin
adminPassword: adminPassword
}
}
}
}

Expand All @@ -60,14 +36,6 @@ resource sqlOrderingDb 'Applications.Datastores/sqlDatabases@2023-10-01-preview'
properties: {
application: application
environment: environment
recipe: {
name: 'sqldatabase'
parameters: {
database: 'OrderingDb'
adminLogin: adminLogin
adminPassword: adminPassword
}
}
}
}

Expand All @@ -76,14 +44,6 @@ resource sqlWebhooksDb 'Applications.Datastores/sqlDatabases@2023-10-01-preview'
properties: {
application: application
environment: environment
recipe: {
name: 'sqldatabase'
parameters: {
database: 'WebhooksDb'
adminLogin: adminLogin
adminPassword: adminPassword
}
}
}
}

Expand All @@ -92,9 +52,6 @@ resource redisKeystore 'Applications.Datastores/redisCaches@2023-10-01-preview'
properties: {
application: application
environment: environment
recipe: {
name: 'rediscache'
}
}
}

Expand All @@ -103,9 +60,6 @@ resource redisBasket 'Applications.Datastores/redisCaches@2023-10-01-preview' =
properties: {
application: application
environment: environment
recipe: {
name: 'rediscache'
}
}
}

Expand All @@ -114,9 +68,6 @@ resource rabbitmq 'Applications.Messaging/rabbitMQQueues@2023-10-01-preview' = i
properties: {
application: application
environment: environment
recipe: {
name: 'rabbitmqmessagequeue'
}
}
}

Expand Down

0 comments on commit e39b8d6

Please sign in to comment.