Skip to content

Commit

Permalink
NOMAD_VAR_BIND_MOUNTS => NOMAD_VOLUMES
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Feb 28, 2024
1 parent 7936c93 commit 0df92c8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 25 deletions.
2 changes: 1 addition & 1 deletion hashiconf/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@
[project.nomad](https://gitlab.com/internetarchive/nomad/-/blob/master/project.nomad)

```
NOMAD_VAR_BIND_MOUNTS
NOMAD_VAR_CHECK_PROTOCOL
NOMAD_VAR_COUNT
NOMAD_VAR_CPU
Expand All @@ -353,6 +352,7 @@
NOMAD_VAR_PORTS
NOMAD_VAR_PV
NOMAD_VAR_PV_DB
NOMAD_VOLUMES
```
<div class="fragment">
Add any ☝🏽 to your `.gitlab-ci.yml`<br>
Expand Down
4 changes: 2 additions & 2 deletions hashiconf/talk.htm
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,6 @@
[project.nomad](https://gitlab.com/internetarchive/nomad/-/blob/master/project.nomad)

```
NOMAD_VAR_BIND_MOUNTS
NOMAD_VAR_CHECK_PROTOCOL
NOMAD_VAR_COUNT
NOMAD_VAR_CPU
Expand All @@ -967,6 +966,7 @@
NOMAD_VAR_PORTS
NOMAD_VAR_PV
NOMAD_VAR_PV_DB
NOMAD_VOLUMES
```
<pre>

Expand All @@ -980,7 +980,6 @@
[project.nomad](https://gitlab.com/internetarchive/nomad/-/blob/master/project.nomad)

```
NOMAD_VAR_BIND_MOUNTS
NOMAD_VAR_CHECK_PROTOCOL
NOMAD_VAR_COUNT
NOMAD_VAR_CPU
Expand All @@ -993,6 +992,7 @@
NOMAD_VAR_PORTS
NOMAD_VAR_PV
NOMAD_VAR_PV_DB
NOMAD_VOLUMES
```
<div class="">
Add any ☝🏽 to your `.gitlab-ci.yml`<br>
Expand Down
2 changes: 1 addition & 1 deletion hashitalks-2022/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ <h1 class="fragment">🚀</h1>
[project.nomad](https://gitlab.com/internetarchive/nomad/-/blob/master/project.nomad)

```
NOMAD_VAR_BIND_MOUNTS
NOMAD_VAR_CHECK_PATH
NOMAD_VAR_CHECK_PROTOCOL
NOMAD_VAR_CHECK_TIMEOUT
Expand All @@ -409,6 +408,7 @@ <h1 class="fragment">🚀</h1>
NOMAD_VAR_PORTS
NOMAD_VAR_PV
NOMAD_VAR_PV_DB
NOMAD_VOLUMES
```
<div class="fragment">
Add any ☝🏽 to your `cicd.yml`<br>
Expand Down
30 changes: 9 additions & 21 deletions hashitalks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -528,12 +528,11 @@
default = ["group-project-branch-slug.example.com"]
}

variable "BIND_MOUNTS" {
# Pass in a list of [host VM => container] direct pass through of readonly volumes, eg:
# NOMAD_VAR_BIND_MOUNTS='["/opt/something", "/tmp/beer"]'
# As of now you have to pass in 2 and only 2... 🤦‍♀️
variable "VOLUMES" {
# Pass in a list of [host VM => container] direct pass through volumes, eg:
# NOMAD_VAR_VOLUMES='["/opt/something:/opt/something", "/var/work:/var/work:ro"]'
type = list(string)
default = ["/usr/games", "/usr/local/games"]
default = []
}

variable "PG" {
Expand Down Expand Up @@ -677,25 +676,14 @@

ports = [for portnumber, portname in var.PORTS : portname]

volumes = [
"/kv/${var.SLUG}:/kv"
]
volumes = concat(
["/kv/${var.SLUG}:/kv"],
var.VOLUMES
)

# The MEMORY var now becomes a **soft limit**
# We will 10x that for a **hard limit**
memory_hard_limit = "${var.MEMORY * 10}"

mounts = [{
type = "bind"
readonly = true
source = "${var.BIND_MOUNTS[0]}"
target = "${var.BIND_MOUNTS[0]}"
}, {
type = "bind"
readonly = true
source = "${var.BIND_MOUNTS[1]}"
target = "${var.BIND_MOUNTS[1]}"
}]
}

resources {
Expand Down Expand Up @@ -983,7 +971,6 @@
Optional CI/CD variables to customize the `project.nomad`.
Add one or more key/values to your `.gitlab-ci.yml`.
```
NOMAD_VAR_BIND_MOUNTS
NOMAD_VAR_CHECK_PROTOCOL
NOMAD_VAR_COUNT
NOMAD_VAR_CPU
Expand All @@ -997,6 +984,7 @@
NOMAD_VAR_PORTS
NOMAD_VAR_PV
NOMAD_VAR_PV_DB
NOMAD_VOLUMES
```

---
Expand Down

0 comments on commit 0df92c8

Please sign in to comment.