From f3e0b2271ad91ee499cc25d76a5c1cc8b0119085 Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Tue, 29 Mar 2022 08:46:30 +0530 Subject: [PATCH] initial commit Signed-off-by: Amneesh Singh --- .gitignore | 2 + bots/main.tf | 10 +++ bots/singh3.nomad | 81 +++++++++++++++++++ concourse/concourse-worker.nomad | 61 ++++++++++++++ concourse/concourse.nomad | 133 +++++++++++++++++++++++++++++++ concourse/main.tf | 16 ++++ concourse/terraform.tfstate | 8 ++ gitea/gitea.nomad | 98 +++++++++++++++++++++++ gitea/main.tf | 9 +++ 9 files changed, 418 insertions(+) create mode 100644 .gitignore create mode 100644 bots/main.tf create mode 100644 bots/singh3.nomad create mode 100644 concourse/concourse-worker.nomad create mode 100644 concourse/concourse.nomad create mode 100644 concourse/main.tf create mode 100644 concourse/terraform.tfstate create mode 100644 gitea/gitea.nomad create mode 100644 gitea/main.tf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfe8974 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.terraform* +*.tstate diff --git a/bots/main.tf b/bots/main.tf new file mode 100644 index 0000000..c24c86a --- /dev/null +++ b/bots/main.tf @@ -0,0 +1,10 @@ +provider "nomad" {} +//Set everything via environment variables + +resource "nomad_job" "singh3" { + jobspec = file("./singh3.nomad") + purge_on_destroy = true + hcl2 { + enabled = true + } +} diff --git a/bots/singh3.nomad b/bots/singh3.nomad new file mode 100644 index 0000000..8cbb861 --- /dev/null +++ b/bots/singh3.nomad @@ -0,0 +1,81 @@ +job "singh3" { + region = "global" + datacenters = ["nazrin"] + type = "service" + + group "svc" { + count = 1 + + network { + mode = "bridge" + + port "db" { + static = 5454 + to = 5432 + } + } + + vault { + policies = ["singh3-policy"] + } + + service { + name = "singh3-db" + port = "db" + } + + task "db" { + template { + data = <