Skip to content

Commit 2c70497

Browse files
docs: add Habitat to operations guides
1 parent 94a98e0 commit 2c70497

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- [Release Process](./operations/release-process.md)
1313
- [The `chime-live` Cluster](./operations/chime-live-cluster.md)
1414
- [Deploy to Heroku](./operations/heroku.md)
15+
- [Deploy with Chef Habitat](./operations/habitat.md)
1516
- [Deploy to Your Own Cluster](./operations/byok8s.md)
1617
- [Manual Validation](./operations/manual-validation.md)
1718
- [Limited Cluster Access for Deployment](./operations/limited-kubeconfigs/limited-kubeconfigs.md)

docs/operations/habitat.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Operations: Deploy with Chef Habitat
2+
3+
CHIME can be quickly deployed to any Linux system with [Chef Habitat](https://habitat.sh):
4+
5+
```bash
6+
hab svc load codeforphilly/chime
7+
```
8+
9+
This will download the latest CHIME build from [bldr.habitat.sh](bldr.habitat.sh) and start it as a service, serving the interface on the default port of [`8000`](http://localhost:8000)
10+
11+
## Enable HTTPS access
12+
13+
Providing HTTPS access can be easily done by making use of [Caddy](https://caddyserver.com/) and its built-in automatic HTTPS.
14+
15+
First, start the `jarvus/caddy-proxy` service with your CHIME service instance bound to the `backend` slot:
16+
17+
```bash
18+
hab svc load jarvus/caddy-proxy --bind backend:chime.default
19+
```
20+
21+
This will open an HTTP interface on port `80` that proxies to the CHIME service on port `8000`.
22+
23+
To enable the HTTPS interface, configure an email address and at least one publicly-resolvable hostname so that Caddy can use [Let's Encrypt](https://letsencrypt.org/) to automatically obtain a free SSL certificate:
24+
25+
```bash
26+
mkdir -p /hab/user/caddy-proxy/config
27+
28+
# use the editor of your choice:
29+
vim /hab/user/caddy-proxy/config/user.toml
30+
```
31+
32+
```toml
33+
hostnames = [
34+
"mydomain.org"
35+
]
36+
37+
[tls]
38+
39+
```
40+
41+
After you save `user.toml`, the Habitat supervisor will automatically detect the change and apply it. CHIME should now be available via HTTPS, with the HTTP port automatically redirecting.

0 commit comments

Comments
 (0)