blob: 53b6ac7ec2af82a073d75403acb95f2ba9e5d317 (
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
60
61
62
63
64
65
66
67
68
69
70
|
# [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 |
| `devops`<sup>†</sup> | DevOps setup |
### <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
```
#### <sup>†</sup>Hollyhock's mTLS Protection
The subdomain `hollyhock` is secured with mTLS - once the `devops`
playbook is run succesfully, on macOS you need to add
`tmp/hollyhock.p12` to your keychain:
```sh
$ security import tmp/hollyhock.p12 -k ~/Library/Keychains/login.keychain-db -P <mtls_p12_password>
```
## 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
|