Skip to content

Commit

Permalink
Added a compass.yml file to manage this repository as a Compass compo…
Browse files Browse the repository at this point in the history
…nent (#212)

* Compass.yml file for config-as-code

* chore: linting

Signed-off-by: Krishna Waske <[email protected]>

* chore: linting

Signed-off-by: Krishna Waske <[email protected]>

---------

Signed-off-by: Krishna Waske <[email protected]>
Co-authored-by: atlassian-compass[bot] <89495476+atlassian-compass[bot]@users.noreply.github.com>
Co-authored-by: Krishna Waske <[email protected]>
  • Loading branch information
atlassian-compass[bot] and GHkrishna authored Nov 4, 2024
1 parent 8530cd3 commit b1493d9
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 133 deletions.
22 changes: 22 additions & 0 deletions compass.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: credo-controller
id: ari:cloud:compass:6095931c-8137-4ae1-822a-2d7411835fc7:component/9029b47a-062e-4e25-a761-a2c0fc9ebd98/b6016bde-79c2-4d3f-84cf-b25f27bc50c7
description: Controller App for Aries Framework JavaScript REST Extension
configVersion: 1
typeId: SERVICE
ownerId: ari:cloud:identity::team/6fe50e36-8efb-47a6-aab5-ea47bd10ec4e
fields:
tier: 4
links:
- name: null
type: REPOSITORY
url: https://github.com/credebl/credo-controller
relationships:
DEPENDS_ON: []
labels:
- aries
- aries-framework-javascript
- decentralized-identity
- language:typescript
- self-sovereign-identity
- source:github
customFields: null
2 changes: 1 addition & 1 deletion samples/cliConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
"rpcUrl": "https://rpc-amoy.polygon.technology",
"fileServerUrl": "https://schema.credebl.id",
"fileServerToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJBeWFuV29ya3MiLCJpZCI6ImNhZDI3ZjhjLTMyNWYtNDRmZC04ZmZkLWExNGNhZTY3NTMyMSJ9.I3IR7abjWbfStnxzn1BhxhV0OEzt1x3mULjDdUcgWHk"
}
}
113 changes: 53 additions & 60 deletions scripts/taskdef/credo-ecs-taskdef.json
Original file line number Diff line number Diff line change
@@ -1,66 +1,59 @@
{
"family": "${FAMILY}",
"containerDefinitions": [
"family": "${FAMILY}",
"containerDefinitions": [
{
"name": "Platform-admin",
"image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%",
"cpu": 154,
"memory": 307,
"portMappings": [
{
"name": "Platform-admin",
"image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%",
"cpu": 154,
"memory": 307,
"portMappings": [
{
"containerPort": 8001,
"hostPort": 8001,
"protocol": "tcp"
},
{
"containerPort": 9001,
"hostPort": 9001,
"protocol": "tcp"
}
],
"essential": true,
"command": [
"--auto-accept-connections",
"--config",
"/config.json"
],
"environment": [
{
"name": "AFJ_REST_LOG_LEVEL",
"value": "1"
}
],
"environmentFiles": [
{
"value": "${S3_ARN}",
"type": "s3"
}
],
"mountPoints": [
{
"sourceVolume": "config",
"containerPath": "/config.json",
"readOnly": true
}
],
"volumesFrom": [],
"ulimits": []
"containerPort": 8001,
"hostPort": 8001,
"protocol": "tcp"
},
{
"containerPort": 9001,
"hostPort": 9001,
"protocol": "tcp"
}
],
"essential": true,
"command": ["--auto-accept-connections", "--config", "/config.json"],
"environment": [
{
"name": "AFJ_REST_LOG_LEVEL",
"value": "1"
}
],
"environmentFiles": [
{
"value": "${S3_ARN}",
"type": "s3"
}

],
"executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole",
"placementConstraints": [],
"requiresCompatibilities": [
"EC2"
],
"cpu": "154",
"memory": "307",
"volumes": [
],
"mountPoints": [
{
"name": "config",
"host": {
"sourcePath": "${SourcePath}"
}
"sourceVolume": "config",
"containerPath": "/config.json",
"readOnly": true
}
]
],
"volumesFrom": [],
"ulimits": []
}
],
"executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole",
"placementConstraints": [],
"requiresCompatibilities": ["EC2"],
"cpu": "154",
"memory": "307",
"volumes": [
{
"name": "config",
"host": {
"sourcePath": "${SourcePath}"
}
}
]
}
133 changes: 63 additions & 70 deletions scripts/taskdef/credo-fargate-taskdef.json
Original file line number Diff line number Diff line change
@@ -1,76 +1,69 @@
{
"family": "${FAMILY}",
"containerDefinitions": [
"family": "${FAMILY}",
"containerDefinitions": [
{
"name": "Platform-admin",
"image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%",
"cpu": 0,
"portMappings": [
{
"name": "Platform-admin",
"image": "%REPOSITORY_URI%:CREDO_v_%BUILD_NUMBER%",
"cpu": 0,
"portMappings": [
{
"containerPort": 8004,
"hostPort": 8004,
"protocol": "tcp"
},
{
"containerPort": 9004,
"hostPort": 9004,
"protocol": "tcp"
}
],
"essential": true,
"command": [
"--auto-accept-connections",
"--config",
"/config/${CONFIG_FILE}"
],
"environment": [
{
"name": "AFJ_REST_LOG_LEVEL",
"value": "1"
}
],
"environmentFiles": [
{
"value": "${S3_ARN}",
"type": "s3"
}
],
"mountPoints": [
{
"sourceVolume": "config",
"containerPath": "/config",
"readOnly": false
}
],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/${FAMILY}",
"awslogs-create-group": "true",
"awslogs-region": "ap-south-1",
"awslogs-stream-prefix": "ecs"
}
}
"containerPort": 8004,
"hostPort": 8004,
"protocol": "tcp"
},
{
"containerPort": 9004,
"hostPort": 9004,
"protocol": "tcp"
}

],
"executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"placementConstraints": [],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "1024",
"memory": "2048",
"volumes": [
],
"essential": true,
"command": ["--auto-accept-connections", "--config", "/config/${CONFIG_FILE}"],
"environment": [
{
"name": "AFJ_REST_LOG_LEVEL",
"value": "1"
}
],
"environmentFiles": [
{
"name": "config",
"efsVolumeConfiguration": {
"fileSystemId": "${EFS}",
"rootDirectory": "/"
}
"value": "${S3_ARN}",
"type": "s3"
}
]
],
"mountPoints": [
{
"sourceVolume": "config",
"containerPath": "/config",
"readOnly": false
}
],
"volumesFrom": [],
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/${FAMILY}",
"awslogs-create-group": "true",
"awslogs-region": "ap-south-1",
"awslogs-stream-prefix": "ecs"
}
}
}
],
"executionRoleArn": "arn:aws:iam::${ACCOUNT_ID}:role/ecsTaskExecutionRole",
"networkMode": "awsvpc",
"placementConstraints": [],
"requiresCompatibilities": ["FARGATE"],
"cpu": "1024",
"memory": "2048",
"volumes": [
{
"name": "config",
"efsVolumeConfiguration": {
"fileSystemId": "${EFS}",
"rootDirectory": "/"
}
}
]
}
7 changes: 5 additions & 2 deletions src/cliAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,11 @@ const getModules = (

questionAnswer: new QuestionAnswerModule(),
polygon: new PolygonModule({
didContractAddress: didRegistryContractAddress ? didRegistryContractAddress : (process.env.DID_CONTRACT_ADDRESS as string),
schemaManagerContractAddress: schemaManagerContractAddress || (process.env.SCHEMA_MANAGER_CONTRACT_ADDRESS as string),
didContractAddress: didRegistryContractAddress
? didRegistryContractAddress
: (process.env.DID_CONTRACT_ADDRESS as string),
schemaManagerContractAddress:
schemaManagerContractAddress || (process.env.SCHEMA_MANAGER_CONTRACT_ADDRESS as string),
fileServerToken: fileServerToken ? fileServerToken : (process.env.FILE_SERVER_TOKEN as string),
rpcUrl: rpcUrl ? rpcUrl : (process.env.RPC_URL as string),
serverUrl: fileServerUrl ? fileServerUrl : (process.env.SERVER_URL as string),
Expand Down

0 comments on commit b1493d9

Please sign in to comment.