From 9ea994275a0373d600b25bac415960c473e9bbb6 Mon Sep 17 00:00:00 2001 From: Kristina Pathak Date: Wed, 13 Apr 2022 18:17:36 -0700 Subject: [PATCH] initial setup to locally test hecate --- deploy/docker-compose/deploy.sh | 9 ++- deploy/docker-compose/docFiles/sns.yaml | 35 ++++++++++++ deploy/docker-compose/docFiles/tr1d1um.yaml | 62 +++++++++++++++++++++ deploy/docker-compose/docker-compose.yml | 24 ++++++++ 4 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 deploy/docker-compose/docFiles/sns.yaml create mode 100644 deploy/docker-compose/docFiles/tr1d1um.yaml diff --git a/deploy/docker-compose/deploy.sh b/deploy/docker-compose/deploy.sh index 6b9738b..726b45c 100755 --- a/deploy/docker-compose/deploy.sh +++ b/deploy/docker-compose/deploy.sh @@ -10,10 +10,17 @@ if [[ "$(docker images -q xmidt/simulator:latest 2> /dev/null)" == "" ]]; then fi popd +echo "Building goaws..." +git clone git@github.com:kcajmagic/goaws.git /tmp/goaws +pushd /tmp/goaws +git checkout feature/improve_docker_file +docker build -t goaws:local . +popd + echo "Running services..." CADUCEUS_VERSION=${CADUCEUS_VERSION:-latest} \ ARGUS_VERSION=${ARGUS_VERSION:-latest} \ -TR1D1UM_VERSION=${TR1D1UM_VERSION:-latest} \ +TR1D1UM_VERSION=${TR1D1UM_VERSION:-0.5.1} \ SCYTALE_VERSION=${SCYTALE_VERSION:-latest} \ PETASOS_VERSION=${PETASOS_VERSION:-latest} \ TALARIA_VERSION=${TALARIA_VERSION:-latest} \ diff --git a/deploy/docker-compose/docFiles/sns.yaml b/deploy/docker-compose/docFiles/sns.yaml new file mode 100644 index 0000000..a02c6be --- /dev/null +++ b/deploy/docker-compose/docFiles/sns.yaml @@ -0,0 +1,35 @@ +Local: # Environment name that can be passed on the command line + # (i.e.: ./goaws [Local | Dev] -- defaults to 'Local') + Host: goaws # hostname of the goaws system (for docker-compose this is the tag name of the container) +# you can now use either 1 port for both sns and sqs or alternatively you can comment out Port and use SqsPort + SnsPort for compatibilyt with +# yopa and (fage-sns + face-sqs). If both ways are in the config file on the one "Port" will be used by GoAws + Port: 4100 # port to listen on. +# SqsPort: 9324 # alterante Sqs Port +# SnsPort: 9292 # alternate Sns Port + Region: us-east-1 + LogMessages: true # Log messages (true/false) + LogFile: ./goaws_messages.log # Log filename (for message logging + QueueAttributeDefaults: # default attributes for all queues + VisibilityTimeout: 30 # message visibility timeout + ReceiveMessageWaitTimeSeconds: 0 # receive message max wait time + Topics: # List of topic to create at startup + - Name: xmidt-local-caduceus # Topic name - no Subscriptions + +Dev: # Another environment + Host: goaws + Port: 4100 +# SqsPort: 9324 +# SnsPort: 9292 + LogMessages: true + LogFile: ./goaws_messages.log + Queues: + - Name: dev-queue1 + - Name: dev-queue2 + Topics: + - Name: dev-topic1 + Subscriptions: + - QueueName: dev-queue3 + Raw: false + - QueueName: dev-queue4 + Raw: true + - Name: dev-topic2 \ No newline at end of file diff --git a/deploy/docker-compose/docFiles/tr1d1um.yaml b/deploy/docker-compose/docFiles/tr1d1um.yaml new file mode 100644 index 0000000..9c939a7 --- /dev/null +++ b/deploy/docker-compose/docFiles/tr1d1um.yaml @@ -0,0 +1,62 @@ +--- + fqdn: tr1d1um + env: test + scheme: http + hooksScheme: http + + primary: + address: ":6100" + health: + address: ":6101" + options: + - "PayloadsOverZero" + - "PayloadsOverHundred" + - "PayloadsOverThousand" + - "PayloadsOverTenThousand" + readTimeout: "15s" + idleTimeout: "15s" + pprof: + address: ":6102" + readTimeout: "15s" + idleTimeout: "15s" + metric: + address: ":6103" + metricsOptions: + namespace: "webpa" + subsystem: "tr1d1um" + readTimeout: "15s" + idleTimeout: "15s" + log: + file: "stdout" + level: "INFO" + json: false + reducedLoggingResponseCodes: [200, 504] + + webhooksEnabled: true + + start: + duration: 1 + apiPath: tr1d1um:6100/hooks + + waitForDns: 0 + + aws: + accessKey: "supbro" + secretKey: "nahbro" + env: local-dev + sns: + awsEndpoint: http://goaws:4100 + region: "us-east-1" + topicArn: arn:aws:sns:us-east-1:000000000000:xmidt-local-caduceus + urlPath: "/api/v2/aws/sns" + + authHeader: ["dXNlcjpwYXNz"] + targetURL: http://scytale:6300 + WRPSource: "dns:tr1d1um.example.net" + supportedServices: + - "config" + clientTimeout: "135s" + respWaitTimeout: "129s" + netDialerTimeout: "5s" + requestRetryInterval: "2s" + requestMaxRetries: 2 \ No newline at end of file diff --git a/deploy/docker-compose/docker-compose.yml b/deploy/docker-compose/docker-compose.yml index 8e1cc6c..04b3601 100644 --- a/deploy/docker-compose/docker-compose.yml +++ b/deploy/docker-compose/docker-compose.yml @@ -66,6 +66,28 @@ services: - xmidt ports: - "8000:8000" + goaws: + image: goaws:local + container_name: goaws + ports: + - 4100:4100 + networks: + - xmidt + volumes: + - ./docFiles/sns.yaml:/conf/goaws.yaml + hecate: + container_name: hecate + depends_on: + - goaws + environment: + - AWS_ACCESS_KEY=supbro + - AWS_SECRET_KEY=nahbro + hostname: hecate + image: "xmidt/hecate:latest" + networks: + - xmidt + ports: + - "6700-6703:6700-6703" petasos: container_name: petasos depends_on: @@ -180,6 +202,8 @@ services: - TRACING_PROVIDER_NAME=zipkin - "TRACING_PROVIDER_ENDPOINT=http://zipkin:9411/api/v2/spans" image: "xmidt/tr1d1um:${TR1D1UM_VERSION}" + volumes: + - ./docFiles/tr1d1um.yaml:/etc/tr1d1um/tr1d1um.yaml networks: - xmidt ports: