diff --git a/deploy/docker-compose-xmidt-agent/README.md b/deploy/docker-compose-xmidt-agent/README.md index d900ea3..2473b95 100644 --- a/deploy/docker-compose-xmidt-agent/README.md +++ b/deploy/docker-compose-xmidt-agent/README.md @@ -170,4 +170,4 @@ Date: Mon, 10 Jun 2019 06:45:04 GMT Content-Length: 163 {"parameters":[{"name":"Device.DeviceInfo.X_CISCO_COM_BootloaderVersion","value":"4.2.0.45","dataType":0,"parameterCount":1,"message":"Success"}],"statusCode":200} -``` +``` \ No newline at end of file diff --git a/deploy/docker-compose-xmidt-agent/docFiles/argus-db.json b/deploy/docker-compose-xmidt-agent/docFiles/argus-db.json new file mode 100644 index 0000000..c6c1942 --- /dev/null +++ b/deploy/docker-compose-xmidt-agent/docFiles/argus-db.json @@ -0,0 +1,51 @@ +{ + "AttributeDefinitions": [ + { + "AttributeName": "bucket", + "AttributeType": "S" + }, + { + "AttributeName": "id", + "AttributeType": "S" + }, + { + "AttributeName": "expires", + "AttributeType": "N" + } + ], + "TableName": "gifnoc", + "KeySchema": [ + { + "AttributeName": "bucket", + "KeyType": "HASH" + }, + { + "AttributeName": "id", + "KeyType": "RANGE" + } + ], + "GlobalSecondaryIndexes": [ + { + "IndexName": "Expires-index", + "KeySchema": [ + { + "AttributeName": "bucket", + "KeyType": "HASH" + }, + { + "AttributeName": "expires", + "KeyType": "RANGE" + } + ], + "Projection": { + "ProjectionType": "ALL" + }, + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + } + } + ], + "BillingMode": "PAY_PER_REQUEST", + "TableClass": "STANDARD" + } \ No newline at end of file diff --git a/deploy/docker-compose-xmidt-agent/docker-compose.yml b/deploy/docker-compose-xmidt-agent/docker-compose.yml index 0e5e640..8757ba4 100644 --- a/deploy/docker-compose-xmidt-agent/docker-compose.yml +++ b/deploy/docker-compose-xmidt-agent/docker-compose.yml @@ -7,6 +7,9 @@ services: depends_on: - dynamodb environment: + - "AWS_ACCESS_KEY_ID=accessKey" + - "AWS_SECRET_ACCESS_KEY=secretKey" + - "AWS_REGION=local" - "AWS_ENDPOINT=http://dynamodb:4566" - "TRACING_PROVIDER_NAME=zipkin" - "TRACING_PROVIDER_ENDPOINT=http://zipkin:9411/api/v2/spans" @@ -214,15 +217,9 @@ services: AWS_ACCESS_KEY_ID: accessKey AWS_SECRET_ACCESS_KEY: secretKey AWS_REGION: local - command: "dynamodb --endpoint-url http://dynamodb:4566 create-table \ - --table-name gifnoc \ - --attribute-definitions \ - AttributeName=bucket,AttributeType=S \ - AttributeName=expires,AttributeType=N \ - AttributeName=id,AttributeType=S \ - --key-schema \ - AttributeName=bucket,KeyType=HASH \ - AttributeName=id,KeyType=RANGE" + command: "dynamodb --endpoint-url http://dynamodb:4566 create-table --cli-input-json file:///etc/argus-db.json" + volumes: + - "./docFiles/argus-db.json:/etc/argus-db.json" zipkin: image: openzipkin/zipkin networks: