Skip to content

Commit

Permalink
Merge pull request #35 from advancedtelematic/feat/PRO-2618/deploy-in…
Browse files Browse the repository at this point in the history
…ternal

Deploy internal service as well
  • Loading branch information
Jerry Trieu authored Mar 2, 2017
2 parents be79e08 + 4e3aef2 commit 7e2e5a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
17 changes: 15 additions & 2 deletions deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,22 @@ fi
# Merge service environment variables with secrets from this vault endpoint.
export CATALOG_ADDR="http://catalog.gw.prod01.internal.advancedtelematic.com"

REQ=$(envsubst < deploy/service.json)
curl --show-error --silent --fail \
function deploy {
REQ=$(envsubst < deploy/service.json)
curl --show-error --silent --fail \
--header "X-Vault-Token: ${VAULT_TOKEN}" \
--request POST \
--data "$REQ" \
${CATALOG_ADDR}/service/${VAULT_ENDPOINT}
}

export SERVICE_SCOPE="public"
export AUTH_PROTOCOL="oauth.accesstoken"
export AUTH_VERIFICATION="auth-plus"
deploy

export JOB_NAME="${JOB_NAME}-internal"
export SERVICE_SCOPE="internal"
export AUTH_PROTOCOL="none"
export AUTH_VERIFICATION="none"
deploy
6 changes: 3 additions & 3 deletions deploy/service.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
},
"env": {
"SERVICE_NAME": "${JOB_NAME}",
"SERVICE_SCOPE": "public",
"SERVICE_SCOPE": "${SERVICE_SCOPE}",
"SERVICE_TYPE": "http",
"SERVICE_IMAGE": "${IMAGE_ARTIFACT}",
"SERVICE_HEALTH_CHECK": "curl --show-error --silent %<host>s:%<port>s/health",
"BIND_HOST": "0.0.0.0",
"BIND_PORT": "8084",
"AUTH_PROTOCOL": "oauth.accesstoken",
"AUTH_VERIFICATION": "auth-plus",
"AUTH_PROTOCOL": "${AUTH_PROTOCOL}",
"AUTH_VERIFICATION": "${AUTH_VERIFICATION}",
"DB_MIGRATE": "true",
"TREEHUB_LOCAL_STORE_PATH": "/data/treehub-repos",
"JAVA_OPTS": "${JAVA_OPTS}",
Expand Down

2 comments on commit 7e2e5a0

@atsjenkins
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OTA+ :: treehub :: treehub ci Build 233 is now running

@atsjenkins
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TeamCity OTA+ :: treehub :: treehub ci Build 233 outcome was SUCCESS
Summary: Tests passed: 19 Build time: 00:05:19

Please sign in to comment.