summaryrefslogtreecommitdiff
path: root/README.md
blob: e385b866162ac861d8282ec15e1550c94031e885 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# [hollyhock.sorantics.com][hollyhock]

Remote infrastructure.

## Local setup

```sh
$ git clone git@github.com:luskjh/infra
$ cd infra
$ make install
$ make install-pre
$ echo '<vault password>' > .vault_pass
```

## Makefile targets

### Helper targets

_Listed in alphabetical order._

| Target             | Description             |
| ------------------ | ----------------------- |
| `edit`             | Edit ansible vault      |
| `install`          | Install dependencies    |
| `install-pre`      | Install pre-commit hook |
| `lint`             | Run ansible lint        |
| `ping`<sup>*</sup> | Ping hollyhock host     |

### Playbook targets

_Listed in applicable order._

| Target                  | Description        |
| ----------------------- | ------------------ |
| `bootstrap`<sup>*</sup> | Bootstrap access   |
| `security`              | Security hardening |
| `http`                  | Web server         |
| `https`                 | SSL certificates          |

### <sup>*</sup>Pre-bootstraped targets

Before the automation user is created, the `ping` and `bootstrap`
targets need to initially connect to the server host using an existing
user. Set `ANSIBLE_USER` to override the default connection user, and
set `ANSIBLE_PORT` to override the SSH port before the `bootstrap`
playbook has updated it to the port specified in `vault.yaml`:

```sh
$ make ping ANSIBLE_USER=root ANSIBLE_PORT=22
$ make bootstrap ANSIBLE_USER=root ANSIBLE_PORT=22
```

## CI / deployments

There is a CI workflow that runs the same pre-commit hooks on GitHub as
run locally, but deployments are currently only administered from a
local machine.

[hollyhock]: //hollyhock.sorantics.com