https://github.com/alaa/catalog
Friendly secrets integration with Vault and Marathon
https://github.com/alaa/catalog
deployment integration marathon mesos secrets vault
Last synced: 2 months ago
JSON representation
Friendly secrets integration with Vault and Marathon
- Host: GitHub
- URL: https://github.com/alaa/catalog
- Owner: alaa
- License: mit
- Created: 2016-09-07T14:46:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-18T12:33:28.000Z (almost 9 years ago)
- Last Synced: 2025-03-21T21:02:11.331Z (about 1 year ago)
- Topics: deployment, integration, marathon, mesos, secrets, vault
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Catalog
Easy secrets integration with Vault and Marathon.
# Build
```
go build && docker build --no-cache -t catalog:0.9 .
```
# Usage
Assuming that you have `vault` running
## Run catalog service:
```
docker run -it \
-e VAULT_ADDR="$VAULT_ADDR" \
-e VAULT_TOKEN="$VAULT_TOKEN" \
-e MARATHON_URL="$MARATHON_URL" \
-p 8080:8080 \
catalog:0.9
```
## Create your service file:
```
[{
"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
}]
}]
```
## Deploy the service using catalog:
```
#!/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 \
-d@nginx.json \
${CATALOG_ADDR}/service/${VAULT_ENDPOINT}
```