Easy secrets integration with Vault and Marathon.
go build && docker build --no-cache -t catalog:0.9 .
Assuming that you have vault
running
docker run -it \
-e VAULT_ADDR="$VAULT_ADDR" \
-e VAULT_TOKEN="$VAULT_TOKEN" \
-e MARATHON_URL="$MARATHON_URL" \
-p 8080:8080 \
catalog:0.9
[{
"id": "nginx",
"cpus": 0.1,
"mem": 128.0,
"instances": 1,
"container": {
"type": "DOCKER",
"docker": {
"image": "nginx:latest",
"forcePullImage": true,
"network": "BRIDGE",
"portMappings": [{
"containerPort": 80,
"hostPort": 0,
"protocol": "tcp"
}]
}
},
"env": {
"SERVICE_NAME": "nginx"
},
"healthChecks": [{
"protocol": "HTTP",
"path": "/",
"intervalSeconds": 30
}]
}]
#!/bin/bash
set -e
export CATALOG_ADDR="http://127.0.0.1:8080"
export VAULT_ENDPOINT="nginx"
curl --show-error --silent --fail \
-H "X-Vault-Token: ${VAULT_TOKEN}" \
-X POST \
[email protected] \
${CATALOG_ADDR}/service/${VAULT_ENDPOINT}