Create & run ECS services & tasks
Graph.Build AWS Marketplace products are Docker images which run on Amazon ECS.
You can find all the docker images on the Graph.Build page at the Amazon ECR Public Gallery.
Create an Amazon S3 bucket for Graph.Build to use for graph model staging. You will need this in the Task Definition below. We recommend creating a bucket that follows a format similar to:
s3://graph-build-{AWS_ACCOUNT_ID}Create / Update an
ecsTaskandecsTaskExecutionrole in IAM. The roles should include access to S3 (specifically the bucket from step 1) for graph model staging and configuration, CloudWatch for logging, and Neptune to be able to write to Amazon Neptune.Using the below example Task Definition as a guide, create a Task Definition that suits your requirements, referring to the Amazon ECS documentation to see how to create Task Definitions, and run ECS services and tasks.
See the below example ECS Task Definition to run a Graph.Build stack, replacing these values as necessary.
Warning: AWS Service Connect is not currently supported for setting the STUDIO_NODE_HOST environment variable
GRAPH_DATABASE_ENDPOINTTarget graph database endpoint for writing to.
https://xxx.cluster-xxxe.us-east-1.neptune.amazonaws.com:8182/
AWS_REGIONThe AWS region in which the stack will run
us-east-1
AWS_ACCOUNT_IDYour 12 digit AWS account ID
XXXXXXXXXXXX
STUDIO_NODE_HOSTThe hostname or IP address of the EC2 instance being used by this ECS cluster
145.225.875.888
The containers included to run in this example ECS Task Definition are:
Studio Node
Studio UI
Semi Structured Transformer x1
SQL Transformer x1
Graph Writer x1
{
"family": "graphbuild-full-stack",
"containerDefinitions": [
{
"name": "graph-writer",
"image": "public.ecr.aws/graph.build/graph-writer:latest",
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"name": "graph-writer-8080-tcp",
"containerPort": 8080,
"hostPort": 9610,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "GRAPH_DATABASE_TYPE",
"value": "neptune-sparql"
},
{
"name": "TRANSFORMER_RUN_STANDALONE",
"value": "true"
},
{
"name": "GRAPH_DATABASE_ENDPOINT",
"value": "https://{GRAPH_DATABASE_ENDPOINT}:8182/sparql"
},
{
"name": "DELETE_SOURCE",
"value": "true"
}
],
"mountPoints": [],
"volumesFrom": [],
"dockerLabels": {},
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/graphbuild-stack",
"awslogs-create-group": "true",
"awslogs-region": "{AWS_REGION}",
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
},
{
"name": "semi-structured-transformer",
"image": "public.ecr.aws/graph.build/semi-structured-transformer:latest",
"cpu": 512,
"memory": 2048,
"portMappings": [
{
"name": "semi-structured-8080-tcp",
"containerPort": 8080,
"hostPort": 9603,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "TRANSFORMER_DIRECTORY",
"value": "s3://graph-build-{AWS_ACCOUNT_ID}/ss/"
},
{
"name": "TRANSFORMER_RUN_STANDALONE",
"value": "true"
},
{
"name": "RECORD_PROVO",
"value": "false"
},
{
"name": "PROPERTY_GRAPH_MODE",
"value": "false"
},
{
"name": "MAX_CSV_ROWS",
"value": "50000"
}
],
"mountPoints": [],
"volumesFrom": [],
"dockerLabels": {},
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/graphbuild-stack",
"awslogs-create-group": "true",
"awslogs-region": "{AWS_REGION}",
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
},
{
"name": "sql-transformer",
"image": "public.ecr.aws/graph.build/sql-transformer:latest",
"cpu": 512,
"memory": 2048,
"portMappings": [
{
"name": "sql-transformer-8080-tcp",
"containerPort": 8080,
"hostPort": 9602,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "TRANSFORMER_DIRECTORY",
"value": "s3://graph-build-{AWS_ACCOUNT_ID}/sql/"
},
{
"name": "TRANSFORMER_RUN_STANDALONE",
"value": "true"
},
{
"name": "RECORD_PROVO",
"value": "false"
},
{
"name": "PROPERTY_GRAPH_MODE",
"value": "false"
}
],
"mountPoints": [],
"volumesFrom": [],
"dockerLabels": {},
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/graphbuild-stack",
"awslogs-create-group": "true",
"awslogs-region": "{AWS_REGION}",
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
},
{
"name": "studio-ui",
"image": "public.ecr.aws/graph.build/studio-ui:latest",
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"name": "mapping-ui-3000-tcp",
"containerPort": 80,
"hostPort": 9600,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "REACT_APP_NODEAPP_HOST",
"value": "http://{STUDIO_NODE_HOST}:9601"
}
],
"mountPoints": [],
"volumesFrom": [],
"dockerLabels": {},
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/graphbuild-stack",
"awslogs-create-group": "true",
"awslogs-region": "{AWS_REGION}",
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
},
{
"name": "studio-node",
"image": "public.ecr.aws/graph.build/studio-node:latest",
"cpu": 512,
"memory": 1024,
"portMappings": [
{
"name": "mapping-ui-node-js-8080-tcp",
"containerPort": 9601,
"hostPort": 9601,
"protocol": "tcp"
}
],
"essential": true,
"environment": [
{
"name": "NODE_ENV",
"value": "production"
},
{
"name": "DATABASE_CLIENT",
"value": "better-sqlite3"
}
],
"mountPoints": [
{
"sourceVolume": "sqlite-db",
"containerPath": "/app/dist/database/sqlite",
"readOnly": false
}
],
"volumesFrom": [],
"readonlyRootFilesystem": false,
"dockerLabels": {},
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/graphbuild-stack",
"awslogs-create-group": "true",
"awslogs-region": "{AWS_REGION}",
"awslogs-stream-prefix": "ecs"
}
},
"systemControls": []
}
],
"taskRoleArn": "arn:aws:iam::{AWS_ACCOUNT_ID}:role/graphBuildECSRole",
"executionRoleArn": "arn:aws:iam::{AWS_ACCOUNT_ID}:role/graphBuildECSRole",
"volumes": [
{
"name": "sqlite-db",
"host": {
"sourcePath": "/app/dist/database/sqlite"
}
}
],
"placementConstraints": [],
"requiresCompatibilities": [
"EC2"
],
"tags": [
{
"key": "ecs:taskDefinition:createdFrom",
"value": "ecs-console-v2"
}
]
}Navigate to "Stack Run Configurations / Amazon Elastic Container Service" for more examlpes.
Last updated

