infrastructure/jobs/fabio.nomad -rw-r--r-- 1.2 KiB View raw
                                                                                
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
71
job "fabio" {
	region = "us"

	datacenters = ["us-central"]
	type = "service"

	group "fabio" {
		task "fabio" {
			driver = "exec"
			config {
				command = "fabio-1.5.11-go1.11.5-linux_amd64",
				args = [
					"-proxy.cs", "cs=mycerts;type=vault;cert=secret/fabio/certs",
					"-proxy.addr", "0.0.0.0:9999;cs=mycerts",
				]
			}

			artifact {
				source = "https://github.com/fabiolb/fabio/releases/download/v1.5.11/fabio-1.5.11-go1.11.5-linux_amd64"
			}

			vault {
				policies = ["fabio"]
			}

			env {
				VAULT_CAPATH = "/etc/ssl/vault/ca.pem"
			}

			resources {
				memory = 50  # MB
				network {
					port "ui" {
						static = 9998
					}
					port "balancer" {
						static = 9999
					}
				}
			}
		}

		task "porter" {
			driver = "raw_exec"
			config {
				command = "porter",
				args = ["-to", "localhost:9999"]
			}

			artifact {
				source = "s3::http://${MINIO_HOST}:9000/artifacts/porter/porter"
				options {
					aws_access_key_id = "${MINIO_ACCESS_KEY}"
					aws_access_key_secret = "${MINIO_SECRET_KEY}"
				}
			}

			resources {
				memory = 50  # MB
				network {
					port "http" {
						static = 80
					}
					port "https" {
						static = 443
					}
				}
			}
		}
	}
}