Skip to content

Commit

Permalink
feat(podman): initial commit of job with podman driver (#24)
Browse files Browse the repository at this point in the history
feat(podman): initial commit of job with podman driver

Signed-off-by: Bruce Becker <[email protected]>

feat(redis): add migration and update stanzas

Signed-off-by: Bruce Becker <[email protected]>

---------

Signed-off-by: Bruce Becker <[email protected]>
  • Loading branch information
brucellino authored Apr 22, 2023
1 parent d5b492b commit 9972c3d
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 9 deletions.
9 changes: 0 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,5 @@ repos:
rev: v1.26.3
hooks:
- id: tfsec-system

- repo: local
hooks:
- id: packer-fmt
name: Packer Format
language: system
types:
- hcl
entry: packer fmt
ci:
autoupdate_branch: main
49 changes: 49 additions & 0 deletions redis-podman.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
variable "redis_version" {
type = string
default = "6.0"
description = "version of redis to run"
}
job "redis" {
datacenters = ["dc1"]
type = "service"
migrate {
max_parallel = 1
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "5m"
}
update {
max_parallel = 2
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "5m"
progress_deadline = "10m"
auto_revert = true
auto_promote = true
canary = 1
stagger = "30s"
}
group "cache" {
network {
port "redis" { to = 6379 }
}
service {
tags = ["cache","redis","urlprefix-/redis"]
port = "redis"
check {
name = "redis_probe"
type = "tcp"
interval = "10s"
timeout = "1s"
}

}
task "redis" {
driver = "podman"
config {
image = "docker://redis:${var.redis_version}"
ports = ["redis"]
}
}
}
}

0 comments on commit 9972c3d

Please sign in to comment.