generated from finos-labs/project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #204 from willtsai/deploy-with-radius
Add radius app definition file
- Loading branch information
Showing
4 changed files
with
327 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
workspace: | ||
application: "radius-traderx" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Deploy TraderX Using Radius | ||
|
||
Radius can be used to deploy and run the [TraderX](https://github.com/finos/traderX) application. | ||
|
||
## Prerequisites | ||
|
||
- Install and set up [Radius](https://docs.radapp.io/getting-started/) and local Kubernetes cluster | ||
- Optionally set up an [Azure](https://docs.radapp.io/providers/azure/) or [AWS](https://docs.radapp.io/providers/aws/) provider and environment in Radius | ||
|
||
## Instructions | ||
|
||
To deploy the TraderX app using Radius, you can run the commands directly in this directory. | ||
|
||
First, initialize Radius: | ||
```bash | ||
rad init | ||
``` | ||
|
||
>Select `Yes` when prompted to setup an application in the current directory | ||
To deploy and run the app in your local environment: | ||
```bash | ||
rad run traderx.bicep | ||
``` | ||
|
||
If you have an Azure environment set up, you can deploy the app there as well (in this example the Azure environment is associated with the `prod-azure` workspace): | ||
```bash | ||
rad deploy traderx.bicep -w prod-azure | ||
``` | ||
|
||
If you have an AWS environment set up, you can deploy the app there as well (in this example the AWS environment is associated with the `prod-aws` workspace): | ||
```bash | ||
rad deploy traderx.bicep -w prod-aws | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,280 @@ | ||
extension radius | ||
|
||
// Parameters | ||
param application string | ||
|
||
resource database 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'database' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/database:latest' | ||
ports: { | ||
tcp: { | ||
containerPort: 18082 | ||
} | ||
pg:{ | ||
containerPort: 18083 | ||
} | ||
web: { | ||
containerPort: 18084 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource referencedata 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'reference-data' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/reference-data:latest' | ||
ports: { | ||
web: { | ||
containerPort: 18085 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource tradefeed 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'trade-feed' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/trade-feed:latest' | ||
ports: { | ||
web: { | ||
containerPort: 18086 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource peopleservice 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'people-service' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/people-service:latest' | ||
ports: { | ||
web: { | ||
containerPort: 18089 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource accountservice 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'account-service' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/account-service:latest' | ||
ports: { | ||
web: { | ||
containerPort: 18088 | ||
} | ||
} | ||
env: { | ||
DATABASE_TCP_HOST: { | ||
value: database.name | ||
} | ||
PEOPLE_SERVICE_HOST: { | ||
value: peopleservice.name | ||
} | ||
} | ||
} | ||
connections: { | ||
peopleservice: { | ||
source: peopleservice.id | ||
} | ||
db: { | ||
source: database.id | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource positionservice 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'position-service' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/position-service:latest' | ||
ports: { | ||
web: { | ||
containerPort: 18090 | ||
} | ||
} | ||
env: { | ||
DATABASE_TCP_HOST: { | ||
value: database.name | ||
} | ||
} | ||
} | ||
connections: { | ||
db: { | ||
source: database.id | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource tradeservice 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'trade-service' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/trade-service:latest' | ||
ports: { | ||
web: { | ||
containerPort: 18092 | ||
} | ||
} | ||
env: { | ||
DATABASE_TCP_HOST: { | ||
value: database.name | ||
} | ||
PEOPLE_SERVICE_HOST: { | ||
value: peopleservice.name | ||
} | ||
ACCOUNT_SERVICE_HOST: { | ||
value: accountservice.name | ||
} | ||
REFERENCE_DATA_HOST: { | ||
value: referencedata.name | ||
} | ||
TRADE_FEED_HOST: { | ||
value: tradefeed.name | ||
} | ||
} | ||
} | ||
connections: { | ||
db: { | ||
source: database.id | ||
} | ||
peopleservice: { | ||
source: peopleservice.id | ||
} | ||
accountservice: { | ||
source: accountservice.id | ||
} | ||
referencedata: { | ||
source: referencedata.id | ||
} | ||
tradefeed: { | ||
source: tradefeed.id | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource tradeprocessor 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'trade-processor' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/trade-processor:latest' | ||
ports: { | ||
web: { | ||
containerPort: 18091 | ||
} | ||
} | ||
env: { | ||
DATABASE_TCP_HOST: { | ||
value: database.name | ||
} | ||
TRADE_FEED_HOST: { | ||
value: tradefeed.name | ||
} | ||
} | ||
} | ||
connections: { | ||
db: { | ||
source: database.id | ||
} | ||
tradefeed: { | ||
source: tradefeed.id | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource webfrontend 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'web-front-end-angular' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/web-front-end-angular:latest' | ||
ports: { | ||
web: { | ||
containerPort: 18093 | ||
} | ||
} | ||
env: { | ||
DATABASE_TCP_HOST: { | ||
value: database.name | ||
} | ||
} | ||
} | ||
connections: { | ||
db: { | ||
source: database.id | ||
} | ||
tradefeed: { | ||
source: tradefeed.id | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource ingress 'Applications.Core/containers@2023-10-01-preview' = { | ||
name: 'ingress' | ||
properties: { | ||
application: application | ||
container: { | ||
image: 'ghcr.io/finos/traderx/ingress:latest' | ||
ports: { | ||
web: { | ||
containerPort: 8080 | ||
} | ||
} | ||
env: { | ||
DATABASE_TCP_HOST: { | ||
value: database.name | ||
} | ||
} | ||
} | ||
connections: { | ||
db: { | ||
source: database.id | ||
} | ||
tradefeed: { | ||
source: tradefeed.id | ||
} | ||
peopleservice: { | ||
source: peopleservice.id | ||
} | ||
accountservice: { | ||
source: accountservice.id | ||
} | ||
positionservice: { | ||
source: positionservice.id | ||
} | ||
tradeservice: { | ||
source: tradeservice.id | ||
} | ||
tradeprocessor: { | ||
source: tradeprocessor.id | ||
} | ||
webfrontend: { | ||
source: webfrontend.id | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"experimentalFeaturesEnabled": { | ||
"extensibility": true, | ||
"extensionRegistry": true, | ||
"dynamicTypeLoading": true | ||
}, | ||
"extensions": { | ||
"radius": "br:biceptypes.azurecr.io/radius:0.38", | ||
"aws": "br:biceptypes.azurecr.io/aws:0.38" | ||
} | ||
} |