https://github.com/jsabo/gremlin-boshrelease
https://github.com/jsabo/gremlin-boshrelease
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jsabo/gremlin-boshrelease
- Owner: jsabo
- Created: 2025-01-20T17:41:05.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-20T19:29:46.000Z (over 1 year ago)
- Last Synced: 2025-01-20T20:30:21.533Z (over 1 year ago)
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gremlin-boshrelease
A BOSH release for the Gremlin Chaos Engineering client (`gremlin`) and daemon (`gremlind`).
Use this release to deploy Gremlin into any BOSH-managed environment (e.g. Cloud Foundry Diego cells).
---
## π Repository Layout
```
.
βββ VERSION # current release version
βββ Makefile # helpers for building & uploading releases
βββ config/
β βββ blobs.yml # blobstore config for `bosh create-release`
β βββ vars.yaml # dev ops-file variables
β βββ final.yml # final ops-file variables
βββ scripts/
β βββ prepare-gremlin-blobs.sh # download & extract upstream .deb packages
βββ blobs/gremlin/ # local blobstore (gitignored)
βββ packages/gremlin/ # gremlin CLI package spec
βββ jobs/gremlind/ # gremlind job spec, Monit config & templates
βββ example/ # example runtime-configs and ops-files (e.g. for cf-deployment)
```
---
## π Getting Started
### Prerequisites
- [BOSH CLI v2](https://bosh.io/docs/cli-v2)
- A live BOSH Director and creds
- Internet access to `https://deb.gremlin.com/`
### 1. Prepare the blobs
```bash
make blobs
```
Downloads the latest `gremlin` & `gremlind` `.deb` packages and stages their binaries under `blobs/gremlin/`.
### 2. Cut a **dev** release
```bash
make cut_release
```
Builds `gremlin-$(cat VERSION)-dev.$(date +%Y%m%d%H%M%S).tgz`.
### 3. Upload the **dev** release
```bash
make upload
```
Runs `bosh upload-release` for the freshly built tarball.
### 4. Cut & upload a **final** release
1. Bump `VERSION` to your target (e.g. `1.2.3`).
2. Run:
```bash
make final
bosh upload-release gremlin-$(cat VERSION).tgz
```
---
## π― Using in Your BOSH Deployment
1. **Add** the release to your manifest:
```yaml
releases:
- name: gremlin
version: ((release_version))
```
2. **Wire in** the `gremlind` job:
```yaml
instance_groups:
- name: diego-cell
jobs:
- name: gremlind
release: gremlin
properties:
gremlin:
team_id: ((gremlin.team_id))
team_certificate: ((gremlin.team_certificate))
team_private_key: ((gremlin.team_private_key))
tags: ((gremlin.tags))
```
3. **Deploy** with your variables:
```bash
bosh -e -d deploy manifest.yml \
-v release_version=$(cat VERSION) \
-v gremlin.team_id="$(< platform-team-id)" \
-v gremlin.team_certificate="$(< platform-team-client.pub_cert.pem)" \
-v gremlin.team_private_key="$(< platform-team-client.priv_key.pem)" \
--vars-store creds.yml \
-o operations/gremlin.yml \
[other ops-files]
```
---
## π Tips & Best Practices
- Keep secrets out of Git. Use `--vars-store creds.yml` or a CredHub ops-file.
- `.gitignore` should exclude build artifacts and local blob caches:
```
blobs/
.dev_builds/
.final_builds/
*.tgz
config/private.yml
```
- Always bump `VERSION` for final releases. CI pipelines can tag and publish automatically.
- Directory permissions for `/var/lib/gremlin` and `/var/log/gremlin` are set to `750` in the `pre-start` hook.
---
## β Troubleshooting
- Monit looks for the PID at `/var/vcap/sys/run/gremlind/gremlind.pid`βthe releaseβs templates handle this.
```
bosh -d cf ssh diego-cell/0 sudo monit summary
```