diff options
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | gen/platform/ansible/acme-1.tf | 1 | ||||
-rw-r--r-- | gen/platform/ansible/acme-2.tf | 1 | ||||
-rw-r--r-- | gen/platform/ansible/acme-3.tf | 1 | ||||
-rw-r--r-- | gen/platform/terraform/acme-1.tf | 26 | ||||
-rw-r--r-- | gen/platform/terraform/acme-2.tf | 26 | ||||
-rw-r--r-- | gen/platform/terraform/acme-3.tf | 26 | ||||
-rw-r--r-- | j2/platform-ansible.j2 | 1 | ||||
-rw-r--r-- | j2/terraform-machine.j2 | 26 | ||||
-rw-r--r-- | main.py | 94 | ||||
-rw-r--r-- | out/phase-1/acme-application/ci.yaml (renamed from out/phase-1/vimscore-application/ci.yaml) | 2 | ||||
-rw-r--r-- | out/phase-1/acme-application/production.yaml (renamed from out/phase-1/vimscore-application/production.yaml) | 2 | ||||
-rw-r--r-- | out/phase-1/acme-ops/acme-ops.yaml | 2 | ||||
-rw-r--r-- | out/phase-1/dba-cluster/acme-ci.yaml (renamed from out/phase-1/dba-cluster/vimscore-ci.yaml) | 2 | ||||
-rw-r--r-- | out/phase-1/dba-cluster/acme-ops.yaml (renamed from out/phase-2/dba-cluster/vimscore-ci.yaml) | 2 | ||||
-rw-r--r-- | out/phase-1/dba-cluster/acme-production.yaml | 2 | ||||
-rw-r--r-- | out/phase-1/dba-cluster/vimscore-production.yaml | 2 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-ci_4tune-api.yaml (renamed from out/phase-1/dba-container/vimscore-ci_4tune-api.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-ci_4tune-web.yaml (renamed from out/phase-1/dba-container/vimscore-ci_4tune-web.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-ci_mdb.yaml (renamed from out/phase-1/dba-container/vimscore-ci_mdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-ci_pdb.yaml (renamed from out/phase-1/dba-container/vimscore-ci_pdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-ci_statera-console.yaml (renamed from out/phase-1/dba-container/vimscore-ci_statera-console.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-ci_statera.yaml (renamed from out/phase-1/dba-container/vimscore-ci_statera.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-ops_n8n.yaml (renamed from out/phase-1/dba-container/vimscore-ops_n8n.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-ops_pdb.yaml (renamed from out/phase-1/dba-container/vimscore-ops_pdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-production_4tune-api.yaml (renamed from out/phase-1/dba-container/vimscore-production_4tune-api.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-production_4tune-web.yaml (renamed from out/phase-1/dba-container/vimscore-production_4tune-web.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-production_mdb.yaml (renamed from out/phase-1/dba-container/vimscore-production_mdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-production_pdb.yaml (renamed from out/phase-1/dba-container/vimscore-production_pdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-production_statera-console.yaml (renamed from out/phase-1/dba-container/vimscore-production_statera-console.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/dba-container/acme-production_statera.yaml (renamed from out/phase-1/dba-container/vimscore-production_statera.yaml) | 4 | ||||
-rw-r--r-- | out/phase-1/machine/acme-1.yaml | 3 | ||||
-rw-r--r-- | out/phase-1/machine/acme-2.yaml | 3 | ||||
-rw-r--r-- | out/phase-1/machine/acme-3.yaml | 3 | ||||
-rw-r--r-- | out/phase-1/vimscore-ops/vimscore-ops.yaml | 2 | ||||
-rw-r--r-- | out/phase-2/dba-cluster/acme-ci.yaml (renamed from out/phase-1/dba-cluster/vimscore-ops.yaml) | 2 | ||||
-rw-r--r-- | out/phase-2/dba-cluster/acme-ops.yaml (renamed from out/phase-2/dba-cluster/vimscore-ops.yaml) | 2 | ||||
-rw-r--r-- | out/phase-2/dba-cluster/acme-production.yaml | 2 | ||||
-rw-r--r-- | out/phase-2/dba-cluster/vimscore-production.yaml | 2 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-ci_4tune-api.yaml (renamed from out/phase-2/dba-container/vimscore-ci_4tune-api.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-ci_4tune-web.yaml (renamed from out/phase-2/dba-container/vimscore-ci_4tune-web.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-ci_mdb.yaml (renamed from out/phase-2/dba-container/vimscore-ci_mdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-ci_pdb.yaml (renamed from out/phase-2/dba-container/vimscore-ci_pdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-ci_statera-console.yaml (renamed from out/phase-2/dba-container/vimscore-ci_statera-console.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-ci_statera.yaml (renamed from out/phase-2/dba-container/vimscore-ci_statera.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-ops_n8n.yaml (renamed from out/phase-2/dba-container/vimscore-ops_n8n.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-ops_pdb.yaml (renamed from out/phase-2/dba-container/vimscore-ops_pdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-production_4tune-api.yaml (renamed from out/phase-2/dba-container/vimscore-production_4tune-api.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-production_4tune-web.yaml (renamed from out/phase-2/dba-container/vimscore-production_4tune-web.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-production_mdb.yaml (renamed from out/phase-2/dba-container/vimscore-production_mdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-production_pdb.yaml (renamed from out/phase-2/dba-container/vimscore-production_pdb.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-production_statera-console.yaml (renamed from out/phase-2/dba-container/vimscore-production_statera-console.yaml) | 4 | ||||
-rw-r--r-- | out/phase-2/dba-container/acme-production_statera.yaml (renamed from out/phase-2/dba-container/vimscore-production_statera.yaml) | 4 | ||||
-rw-r--r-- | out/phase-3/machine/acme-1.yaml | 3 | ||||
-rw-r--r-- | out/phase-3/machine/acme-2.yaml | 3 | ||||
-rw-r--r-- | out/phase-3/machine/acme-3.yaml | 3 | ||||
-rw-r--r-- | requirements.txt | 1 |
57 files changed, 274 insertions, 88 deletions
@@ -1,5 +1,10 @@ all: env/.cookie +run: env/.cookie + env/bin/python main.py + git add -A out gen + find out gen + env: virtualenv -p python3 env diff --git a/gen/platform/ansible/acme-1.tf b/gen/platform/ansible/acme-1.tf new file mode 100644 index 0000000..686275d --- /dev/null +++ b/gen/platform/ansible/acme-1.tf @@ -0,0 +1 @@ +# Ansible diff --git a/gen/platform/ansible/acme-2.tf b/gen/platform/ansible/acme-2.tf new file mode 100644 index 0000000..686275d --- /dev/null +++ b/gen/platform/ansible/acme-2.tf @@ -0,0 +1 @@ +# Ansible diff --git a/gen/platform/ansible/acme-3.tf b/gen/platform/ansible/acme-3.tf new file mode 100644 index 0000000..686275d --- /dev/null +++ b/gen/platform/ansible/acme-3.tf @@ -0,0 +1 @@ +# Ansible diff --git a/gen/platform/terraform/acme-1.tf b/gen/platform/terraform/acme-1.tf new file mode 100644 index 0000000..d488fbc --- /dev/null +++ b/gen/platform/terraform/acme-1.tf @@ -0,0 +1,26 @@ +resource "scaleway_instance_server" "acme-1" { + name = "acme-1" + type = "DEV1-S" + image = "b3042271-d2b1-4f87-b407-aedd3bbd1663" + ip_id = scaleway_instance_ip.acme-1.id + enable_dynamic_ip = false + enable_ipv6 = true +} + +resource "scaleway_instance_ip" "acme-1" {} + +resource "scaleway_instance_ip_reverse_dns" "acme-1" { + ip_id = scaleway_instance_ip.acme-1.id + reverse = "acme-1.${google_dns_managed_zone.machine.dns_name}" +} + +resource "google_dns_record_set" "acme-1" { + name = "acme-1.${google_dns_managed_zone.machine.dns_name}" + managed_zone = google_dns_managed_zone.machine.name + type = "A" + ttl = 300 + + rrdatas = [scaleway_instance_ip.acme-1.public_ip] + + depends_on = [google_dns_managed_zone.ci] +} diff --git a/gen/platform/terraform/acme-2.tf b/gen/platform/terraform/acme-2.tf new file mode 100644 index 0000000..e791c61 --- /dev/null +++ b/gen/platform/terraform/acme-2.tf @@ -0,0 +1,26 @@ +resource "scaleway_instance_server" "acme-2" { + name = "acme-1" + type = "DEV1-S" + image = "b3042271-d2b1-4f87-b407-aedd3bbd1663" + ip_id = scaleway_instance_ip.acme-2.id + enable_dynamic_ip = false + enable_ipv6 = true +} + +resource "scaleway_instance_ip" "acme-2" {} + +resource "scaleway_instance_ip_reverse_dns" "acme-2" { + ip_id = scaleway_instance_ip.acme-2.id + reverse = "acme-2.${google_dns_managed_zone.machine.dns_name}" +} + +resource "google_dns_record_set" "acme-2" { + name = "acme-2.${google_dns_managed_zone.machine.dns_name}" + managed_zone = google_dns_managed_zone.machine.name + type = "A" + ttl = 300 + + rrdatas = [scaleway_instance_ip.acme-2.public_ip] + + depends_on = [google_dns_managed_zone.ci] +} diff --git a/gen/platform/terraform/acme-3.tf b/gen/platform/terraform/acme-3.tf new file mode 100644 index 0000000..13977bd --- /dev/null +++ b/gen/platform/terraform/acme-3.tf @@ -0,0 +1,26 @@ +resource "scaleway_instance_server" "acme-3" { + name = "acme-1" + type = "DEV1-S" + image = "b3042271-d2b1-4f87-b407-aedd3bbd1663" + ip_id = scaleway_instance_ip.acme-3.id + enable_dynamic_ip = false + enable_ipv6 = true +} + +resource "scaleway_instance_ip" "acme-3" {} + +resource "scaleway_instance_ip_reverse_dns" "acme-3" { + ip_id = scaleway_instance_ip.acme-3.id + reverse = "acme-3.${google_dns_managed_zone.machine.dns_name}" +} + +resource "google_dns_record_set" "acme-3" { + name = "acme-3.${google_dns_managed_zone.machine.dns_name}" + managed_zone = google_dns_managed_zone.machine.name + type = "A" + ttl = 300 + + rrdatas = [scaleway_instance_ip.acme-3.public_ip] + + depends_on = [google_dns_managed_zone.ci] +} diff --git a/j2/platform-ansible.j2 b/j2/platform-ansible.j2 new file mode 100644 index 0000000..686275d --- /dev/null +++ b/j2/platform-ansible.j2 @@ -0,0 +1 @@ +# Ansible diff --git a/j2/terraform-machine.j2 b/j2/terraform-machine.j2 new file mode 100644 index 0000000..7a00001 --- /dev/null +++ b/j2/terraform-machine.j2 @@ -0,0 +1,26 @@ +resource "scaleway_instance_server" "{{ m.key }}" { + name = "acme-1" + type = "DEV1-S" + image = "b3042271-d2b1-4f87-b407-aedd3bbd1663" + ip_id = scaleway_instance_ip.{{ m.key }}.id + enable_dynamic_ip = false + enable_ipv6 = true +} + +resource "scaleway_instance_ip" "{{ m.key }}" {} + +resource "scaleway_instance_ip_reverse_dns" "{{ m.key }}" { + ip_id = scaleway_instance_ip.{{ m.key }}.id + reverse = "{{ m.key }}.${google_dns_managed_zone.machine.dns_name}" +} + +resource "google_dns_record_set" "{{ m.key }}" { + name = "{{ m.key }}.${google_dns_managed_zone.machine.dns_name}" + managed_zone = google_dns_managed_zone.machine.name + type = "A" + ttl = 300 + + rrdatas = [scaleway_instance_ip.{{ m.key }}.public_ip] + + depends_on = [google_dns_managed_zone.ci] +} @@ -1,19 +1,27 @@ from durable.engine import MessageObservedException from durable.lang import * +import shutil +import os +import os.path +import jinja2 from utils import * -class VimScore: +class Machine: + @staticmethod + def make(name: str): + return {"type": "machine", "key": name, "name": name} + +class Acme: @staticmethod def make(env: str, tag: str): - return {"type": "vimscore-application", "key": env, "env": env, "tag": tag} + return {"type": "acme-application", "key": env, "env": env, "tag": tag} @staticmethod def declare_rules(): - @when_all((m.type == "vimscore-application")) - def vsApp(c): - print(f"vimscoreApplication: {c.m}") - cluster = f"vimscore-{c.m.env}" + @when_all((m.type == "acme-application")) + def acmeApp(c): + cluster = f"acme-{c.m.env}" tag = f"{c.m.tag}" # c.assert_fact(dba.cluster(cluster)) for f in [ @@ -26,16 +34,16 @@ class VimScore: ]: c.assert_fact(f) -class VsOperations: +class AcmeOperations: @staticmethod def make(): - return {"type": "vimscore-ops", "key": "vimscore-ops"} + return {"type": "acme-ops", "key": "acme-ops"} @staticmethod def declare_rules(): - @when_all((m.type == "vimscore-ops")) - def vsOps(c): - cluster = "vimscore-ops" + @when_all((m.type == "acme-ops")) + def acmeOps(c): + cluster = "acme-ops" c.assert_fact(dba.cluster(cluster)) c.assert_fact(dba.container(cluster, "app", "pdb", "postgresql", "11")) c.assert_fact(dba.container(cluster, "app", "n8n", "n8n", "0.84.1")) @@ -59,8 +67,8 @@ class DockerBasedApplications: dba = DockerBasedApplications with ruleset("phase-1"): - VimScore.declare_rules() - VsOperations.declare_rules() + Acme.declare_rules() + AcmeOperations.declare_rules() @when_all(+s.exception) def second(c): @@ -68,6 +76,10 @@ with ruleset("phase-1"): print(c.s["exception"]) c.s.exception = None + @when_all(pri(1000), (m.type == 'machine')) + def defaultMachine(c): + pass + @when_all(pri(1000), (m.type == 'dba-container')) def dba_container(c): print(f"dba-container: {c.m}") @@ -107,13 +119,20 @@ with ruleset("phase-1"): # print(f"c.cluster: {c.cluster}") # pass -vimscoreCi = VimScore.make("ci", "development") -vimscoreProduction = VimScore.make("production", "master") -vsOps = VsOperations.make() +m1 = Machine.make("acme-1") +m2 = Machine.make("acme-2") +m3 = Machine.make("acme-3") -x = assert_fact("phase-1", vimscoreCi); print(f"x: {x}") -x = assert_fact("phase-1", vimscoreProduction); print(f"x: {x}") -x = assert_fact("phase-1", vsOps); print(f"x: {x}") +acmeCi = Acme.make("ci", "development") +acmeProduction = Acme.make("production", "master") +acmeOps = AcmeOperations.make() + +x = assert_fact("phase-1", acmeCi); print(f"x: {x}") +x = assert_fact("phase-1", acmeProduction); print(f"x: {x}") +x = assert_fact("phase-1", acmeOps); print(f"x: {x}") +x = assert_fact("phase-1", m1); print(f"x: {x}") +x = assert_fact("phase-1", m2); print(f"x: {x}") +x = assert_fact("phase-1", m3); print(f"x: {x}") if True: print("Facts:") @@ -178,6 +197,41 @@ with ruleset("phase-2"): print("PHASE 2") for f in [f for f in get_facts("phase-1") if f["type"] in ("dba-cluster", "dba-container")]: - assert_fact("phase-2", f) + x = assert_fact("phase-2", f); print(f"x: {x}") write_facts("phase-2") + +# Prepare +if os.path.isdir("gen"): + shutil.rmtree("gen") +os.mkdir("gen") +os.mkdir("gen/platform") +os.mkdir("gen/platform/terraform") +os.mkdir("gen/platform/ansible") + +print("PHASE 3") + +file_loader = jinja2.FileSystemLoader("j2") +j2 = jinja2.Environment(loader=file_loader) + +with ruleset("phase-3"): + @when_all(pri(1), (m.type == "machine")) + def terraformForMachine(c): + template = j2.get_template("terraform-machine.j2") + with open(f"gen/platform/terraform/{c.m.key}.tf", "w") as f: + s = template.render(**{"m": c.m}) + f.write(s.strip()) + f.write("\n") + + @when_all(pri(1), (m.type == "machine")) + def ansibleForMachine(c): + template = j2.get_template("platform-ansible.j2") + with open(f"gen/platform/ansible/{c.m.key}.tf", "w") as f: + s = template.render(**{"m": c.m}) + f.write(s.strip()) + f.write("\n") + +for f in [f for f in get_facts("phase-1") if f["type"] in ("machine")]: + x = assert_fact("phase-3", f); print(f"x: {x}") + +write_facts("phase-3") diff --git a/out/phase-1/vimscore-application/ci.yaml b/out/phase-1/acme-application/ci.yaml index aaf8edf..2feec10 100644 --- a/out/phase-1/vimscore-application/ci.yaml +++ b/out/phase-1/acme-application/ci.yaml @@ -1,4 +1,4 @@ env: ci key: ci tag: development -type: vimscore-application +type: acme-application diff --git a/out/phase-1/vimscore-application/production.yaml b/out/phase-1/acme-application/production.yaml index b9217d7..6054cec 100644 --- a/out/phase-1/vimscore-application/production.yaml +++ b/out/phase-1/acme-application/production.yaml @@ -1,4 +1,4 @@ env: production key: production tag: master -type: vimscore-application +type: acme-application diff --git a/out/phase-1/acme-ops/acme-ops.yaml b/out/phase-1/acme-ops/acme-ops.yaml new file mode 100644 index 0000000..15680bd --- /dev/null +++ b/out/phase-1/acme-ops/acme-ops.yaml @@ -0,0 +1,2 @@ +key: acme-ops +type: acme-ops diff --git a/out/phase-1/dba-cluster/vimscore-ci.yaml b/out/phase-1/dba-cluster/acme-ci.yaml index e871ca0..fccc7ed 100644 --- a/out/phase-1/dba-cluster/vimscore-ci.yaml +++ b/out/phase-1/dba-cluster/acme-ci.yaml @@ -1,2 +1,2 @@ -key: vimscore-ci +key: acme-ci type: dba-cluster diff --git a/out/phase-2/dba-cluster/vimscore-ci.yaml b/out/phase-1/dba-cluster/acme-ops.yaml index e871ca0..2735ff3 100644 --- a/out/phase-2/dba-cluster/vimscore-ci.yaml +++ b/out/phase-1/dba-cluster/acme-ops.yaml @@ -1,2 +1,2 @@ -key: vimscore-ci +key: acme-ops type: dba-cluster diff --git a/out/phase-1/dba-cluster/acme-production.yaml b/out/phase-1/dba-cluster/acme-production.yaml new file mode 100644 index 0000000..3b7eb5a --- /dev/null +++ b/out/phase-1/dba-cluster/acme-production.yaml @@ -0,0 +1,2 @@ +key: acme-production +type: dba-cluster diff --git a/out/phase-1/dba-cluster/vimscore-production.yaml b/out/phase-1/dba-cluster/vimscore-production.yaml deleted file mode 100644 index 4390af6..0000000 --- a/out/phase-1/dba-cluster/vimscore-production.yaml +++ /dev/null @@ -1,2 +0,0 @@ -key: vimscore-production -type: dba-cluster diff --git a/out/phase-1/dba-container/vimscore-ci_4tune-api.yaml b/out/phase-1/dba-container/acme-ci_4tune-api.yaml index f26244d..94e265f 100644 --- a/out/phase-1/dba-container/vimscore-ci_4tune-api.yaml +++ b/out/phase-1/dba-container/acme-ci_4tune-api.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: 4tune-api -key: vimscore-ci/4tune-api +key: acme-ci/4tune-api machineRole: app name: 4tune-api tag: development diff --git a/out/phase-1/dba-container/vimscore-ci_4tune-web.yaml b/out/phase-1/dba-container/acme-ci_4tune-web.yaml index a49e586..9127420 100644 --- a/out/phase-1/dba-container/vimscore-ci_4tune-web.yaml +++ b/out/phase-1/dba-container/acme-ci_4tune-web.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: 4tune-web -key: vimscore-ci/4tune-web +key: acme-ci/4tune-web machineRole: app name: 4tune-web tag: development diff --git a/out/phase-1/dba-container/vimscore-ci_mdb.yaml b/out/phase-1/dba-container/acme-ci_mdb.yaml index f8983a7..b49853b 100644 --- a/out/phase-1/dba-container/vimscore-ci_mdb.yaml +++ b/out/phase-1/dba-container/acme-ci_mdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: mongodb -key: vimscore-ci/mdb +key: acme-ci/mdb machineRole: db name: mdb tag: '3.2' diff --git a/out/phase-1/dba-container/vimscore-ci_pdb.yaml b/out/phase-1/dba-container/acme-ci_pdb.yaml index 81d0f47..d9ea55a 100644 --- a/out/phase-1/dba-container/vimscore-ci_pdb.yaml +++ b/out/phase-1/dba-container/acme-ci_pdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: postgresql -key: vimscore-ci/pdb +key: acme-ci/pdb machineRole: db name: pdb tag: '13' diff --git a/out/phase-1/dba-container/vimscore-ci_statera-console.yaml b/out/phase-1/dba-container/acme-ci_statera-console.yaml index 974333b..0cb0cc4 100644 --- a/out/phase-1/dba-container/vimscore-ci_statera-console.yaml +++ b/out/phase-1/dba-container/acme-ci_statera-console.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: statera-console -key: vimscore-ci/statera-console +key: acme-ci/statera-console machineRole: app name: statera-console ports: diff --git a/out/phase-1/dba-container/vimscore-ci_statera.yaml b/out/phase-1/dba-container/acme-ci_statera.yaml index 883dd2d..6a3eb98 100644 --- a/out/phase-1/dba-container/vimscore-ci_statera.yaml +++ b/out/phase-1/dba-container/acme-ci_statera.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: statera -key: vimscore-ci/statera +key: acme-ci/statera machineRole: app name: statera ports: diff --git a/out/phase-1/dba-container/vimscore-ops_n8n.yaml b/out/phase-1/dba-container/acme-ops_n8n.yaml index f82b4ba..d34efda 100644 --- a/out/phase-1/dba-container/vimscore-ops_n8n.yaml +++ b/out/phase-1/dba-container/acme-ops_n8n.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ops +cluster: acme-ops image: n8n -key: vimscore-ops/n8n +key: acme-ops/n8n machineRole: app name: n8n tag: 0.84.1 diff --git a/out/phase-1/dba-container/vimscore-ops_pdb.yaml b/out/phase-1/dba-container/acme-ops_pdb.yaml index 6c3bad0..a3aa769 100644 --- a/out/phase-1/dba-container/vimscore-ops_pdb.yaml +++ b/out/phase-1/dba-container/acme-ops_pdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ops +cluster: acme-ops image: postgresql -key: vimscore-ops/pdb +key: acme-ops/pdb machineRole: app name: pdb tag: '11' diff --git a/out/phase-1/dba-container/vimscore-production_4tune-api.yaml b/out/phase-1/dba-container/acme-production_4tune-api.yaml index 3bb27ff..aa80827 100644 --- a/out/phase-1/dba-container/vimscore-production_4tune-api.yaml +++ b/out/phase-1/dba-container/acme-production_4tune-api.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: 4tune-api -key: vimscore-production/4tune-api +key: acme-production/4tune-api machineRole: app name: 4tune-api tag: master diff --git a/out/phase-1/dba-container/vimscore-production_4tune-web.yaml b/out/phase-1/dba-container/acme-production_4tune-web.yaml index 2c7591f..6ba5f0d 100644 --- a/out/phase-1/dba-container/vimscore-production_4tune-web.yaml +++ b/out/phase-1/dba-container/acme-production_4tune-web.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: 4tune-web -key: vimscore-production/4tune-web +key: acme-production/4tune-web machineRole: app name: 4tune-web tag: master diff --git a/out/phase-1/dba-container/vimscore-production_mdb.yaml b/out/phase-1/dba-container/acme-production_mdb.yaml index 56feafe..45206fe 100644 --- a/out/phase-1/dba-container/vimscore-production_mdb.yaml +++ b/out/phase-1/dba-container/acme-production_mdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: mongodb -key: vimscore-production/mdb +key: acme-production/mdb machineRole: db name: mdb tag: '3.2' diff --git a/out/phase-1/dba-container/vimscore-production_pdb.yaml b/out/phase-1/dba-container/acme-production_pdb.yaml index 6d29602..112c678 100644 --- a/out/phase-1/dba-container/vimscore-production_pdb.yaml +++ b/out/phase-1/dba-container/acme-production_pdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: postgresql -key: vimscore-production/pdb +key: acme-production/pdb machineRole: db name: pdb tag: '13' diff --git a/out/phase-1/dba-container/vimscore-production_statera-console.yaml b/out/phase-1/dba-container/acme-production_statera-console.yaml index 3bece40..0f4fbf4 100644 --- a/out/phase-1/dba-container/vimscore-production_statera-console.yaml +++ b/out/phase-1/dba-container/acme-production_statera-console.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: statera-console -key: vimscore-production/statera-console +key: acme-production/statera-console machineRole: app name: statera-console ports: diff --git a/out/phase-1/dba-container/vimscore-production_statera.yaml b/out/phase-1/dba-container/acme-production_statera.yaml index fb2d5d4..a509810 100644 --- a/out/phase-1/dba-container/vimscore-production_statera.yaml +++ b/out/phase-1/dba-container/acme-production_statera.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: statera -key: vimscore-production/statera +key: acme-production/statera machineRole: app name: statera ports: diff --git a/out/phase-1/machine/acme-1.yaml b/out/phase-1/machine/acme-1.yaml new file mode 100644 index 0000000..9e4356e --- /dev/null +++ b/out/phase-1/machine/acme-1.yaml @@ -0,0 +1,3 @@ +key: acme-1 +name: acme-1 +type: machine diff --git a/out/phase-1/machine/acme-2.yaml b/out/phase-1/machine/acme-2.yaml new file mode 100644 index 0000000..24655d8 --- /dev/null +++ b/out/phase-1/machine/acme-2.yaml @@ -0,0 +1,3 @@ +key: acme-2 +name: acme-2 +type: machine diff --git a/out/phase-1/machine/acme-3.yaml b/out/phase-1/machine/acme-3.yaml new file mode 100644 index 0000000..d7d75ff --- /dev/null +++ b/out/phase-1/machine/acme-3.yaml @@ -0,0 +1,3 @@ +key: acme-3 +name: acme-3 +type: machine diff --git a/out/phase-1/vimscore-ops/vimscore-ops.yaml b/out/phase-1/vimscore-ops/vimscore-ops.yaml deleted file mode 100644 index cf90d11..0000000 --- a/out/phase-1/vimscore-ops/vimscore-ops.yaml +++ /dev/null @@ -1,2 +0,0 @@ -key: vimscore-ops -type: vimscore-ops diff --git a/out/phase-1/dba-cluster/vimscore-ops.yaml b/out/phase-2/dba-cluster/acme-ci.yaml index 1aaefc9..fccc7ed 100644 --- a/out/phase-1/dba-cluster/vimscore-ops.yaml +++ b/out/phase-2/dba-cluster/acme-ci.yaml @@ -1,2 +1,2 @@ -key: vimscore-ops +key: acme-ci type: dba-cluster diff --git a/out/phase-2/dba-cluster/vimscore-ops.yaml b/out/phase-2/dba-cluster/acme-ops.yaml index 1aaefc9..2735ff3 100644 --- a/out/phase-2/dba-cluster/vimscore-ops.yaml +++ b/out/phase-2/dba-cluster/acme-ops.yaml @@ -1,2 +1,2 @@ -key: vimscore-ops +key: acme-ops type: dba-cluster diff --git a/out/phase-2/dba-cluster/acme-production.yaml b/out/phase-2/dba-cluster/acme-production.yaml new file mode 100644 index 0000000..3b7eb5a --- /dev/null +++ b/out/phase-2/dba-cluster/acme-production.yaml @@ -0,0 +1,2 @@ +key: acme-production +type: dba-cluster diff --git a/out/phase-2/dba-cluster/vimscore-production.yaml b/out/phase-2/dba-cluster/vimscore-production.yaml deleted file mode 100644 index 4390af6..0000000 --- a/out/phase-2/dba-cluster/vimscore-production.yaml +++ /dev/null @@ -1,2 +0,0 @@ -key: vimscore-production -type: dba-cluster diff --git a/out/phase-2/dba-container/vimscore-ci_4tune-api.yaml b/out/phase-2/dba-container/acme-ci_4tune-api.yaml index 9a0f631..58ec759 100644 --- a/out/phase-2/dba-container/vimscore-ci_4tune-api.yaml +++ b/out/phase-2/dba-container/acme-ci_4tune-api.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: 4tune-api -key: vimscore-ci/4tune-api +key: acme-ci/4tune-api machineRole: app name: 4tune-api ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-ci_4tune-web.yaml b/out/phase-2/dba-container/acme-ci_4tune-web.yaml index 21c8c58..685dfb6 100644 --- a/out/phase-2/dba-container/vimscore-ci_4tune-web.yaml +++ b/out/phase-2/dba-container/acme-ci_4tune-web.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: 4tune-web -key: vimscore-ci/4tune-web +key: acme-ci/4tune-web machineRole: app name: 4tune-web ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-ci_mdb.yaml b/out/phase-2/dba-container/acme-ci_mdb.yaml index 2ceef55..f1b661c 100644 --- a/out/phase-2/dba-container/vimscore-ci_mdb.yaml +++ b/out/phase-2/dba-container/acme-ci_mdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: mongodb -key: vimscore-ci/mdb +key: acme-ci/mdb machineRole: db name: mdb ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-ci_pdb.yaml b/out/phase-2/dba-container/acme-ci_pdb.yaml index d4b2016..b138b1a 100644 --- a/out/phase-2/dba-container/vimscore-ci_pdb.yaml +++ b/out/phase-2/dba-container/acme-ci_pdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: postgresql -key: vimscore-ci/pdb +key: acme-ci/pdb machineRole: db name: pdb ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-ci_statera-console.yaml b/out/phase-2/dba-container/acme-ci_statera-console.yaml index 916d86f..1b6a85f 100644 --- a/out/phase-2/dba-container/vimscore-ci_statera-console.yaml +++ b/out/phase-2/dba-container/acme-ci_statera-console.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: statera-console -key: vimscore-ci/statera-console +key: acme-ci/statera-console machineRole: app name: statera-console ports: diff --git a/out/phase-2/dba-container/vimscore-ci_statera.yaml b/out/phase-2/dba-container/acme-ci_statera.yaml index 98e7346..10ecc77 100644 --- a/out/phase-2/dba-container/vimscore-ci_statera.yaml +++ b/out/phase-2/dba-container/acme-ci_statera.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ci +cluster: acme-ci image: statera -key: vimscore-ci/statera +key: acme-ci/statera machineRole: app name: statera ports: diff --git a/out/phase-2/dba-container/vimscore-ops_n8n.yaml b/out/phase-2/dba-container/acme-ops_n8n.yaml index 6aa58a8..3e7e558 100644 --- a/out/phase-2/dba-container/vimscore-ops_n8n.yaml +++ b/out/phase-2/dba-container/acme-ops_n8n.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ops +cluster: acme-ops image: n8n -key: vimscore-ops/n8n +key: acme-ops/n8n machineRole: app name: n8n ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-ops_pdb.yaml b/out/phase-2/dba-container/acme-ops_pdb.yaml index adf9083..17960c2 100644 --- a/out/phase-2/dba-container/vimscore-ops_pdb.yaml +++ b/out/phase-2/dba-container/acme-ops_pdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-ops +cluster: acme-ops image: postgresql -key: vimscore-ops/pdb +key: acme-ops/pdb machineRole: app name: pdb ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-production_4tune-api.yaml b/out/phase-2/dba-container/acme-production_4tune-api.yaml index 5e9fd63..aa61c4a 100644 --- a/out/phase-2/dba-container/vimscore-production_4tune-api.yaml +++ b/out/phase-2/dba-container/acme-production_4tune-api.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: 4tune-api -key: vimscore-production/4tune-api +key: acme-production/4tune-api machineRole: app name: 4tune-api ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-production_4tune-web.yaml b/out/phase-2/dba-container/acme-production_4tune-web.yaml index c5b87c5..853ce1f 100644 --- a/out/phase-2/dba-container/vimscore-production_4tune-web.yaml +++ b/out/phase-2/dba-container/acme-production_4tune-web.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: 4tune-web -key: vimscore-production/4tune-web +key: acme-production/4tune-web machineRole: app name: 4tune-web ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-production_mdb.yaml b/out/phase-2/dba-container/acme-production_mdb.yaml index 48a760b..9df0405 100644 --- a/out/phase-2/dba-container/vimscore-production_mdb.yaml +++ b/out/phase-2/dba-container/acme-production_mdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: mongodb -key: vimscore-production/mdb +key: acme-production/mdb machineRole: db name: mdb ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-production_pdb.yaml b/out/phase-2/dba-container/acme-production_pdb.yaml index 4f7d732..4721b75 100644 --- a/out/phase-2/dba-container/vimscore-production_pdb.yaml +++ b/out/phase-2/dba-container/acme-production_pdb.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: postgresql -key: vimscore-production/pdb +key: acme-production/pdb machineRole: db name: pdb ports_classified: true diff --git a/out/phase-2/dba-container/vimscore-production_statera-console.yaml b/out/phase-2/dba-container/acme-production_statera-console.yaml index dda5ea6..852d78c 100644 --- a/out/phase-2/dba-container/vimscore-production_statera-console.yaml +++ b/out/phase-2/dba-container/acme-production_statera-console.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: statera-console -key: vimscore-production/statera-console +key: acme-production/statera-console machineRole: app name: statera-console ports: diff --git a/out/phase-2/dba-container/vimscore-production_statera.yaml b/out/phase-2/dba-container/acme-production_statera.yaml index dcee4fa..748a8c7 100644 --- a/out/phase-2/dba-container/vimscore-production_statera.yaml +++ b/out/phase-2/dba-container/acme-production_statera.yaml @@ -1,6 +1,6 @@ -cluster: vimscore-production +cluster: acme-production image: statera -key: vimscore-production/statera +key: acme-production/statera machineRole: app name: statera ports: diff --git a/out/phase-3/machine/acme-1.yaml b/out/phase-3/machine/acme-1.yaml new file mode 100644 index 0000000..9e4356e --- /dev/null +++ b/out/phase-3/machine/acme-1.yaml @@ -0,0 +1,3 @@ +key: acme-1 +name: acme-1 +type: machine diff --git a/out/phase-3/machine/acme-2.yaml b/out/phase-3/machine/acme-2.yaml new file mode 100644 index 0000000..24655d8 --- /dev/null +++ b/out/phase-3/machine/acme-2.yaml @@ -0,0 +1,3 @@ +key: acme-2 +name: acme-2 +type: machine diff --git a/out/phase-3/machine/acme-3.yaml b/out/phase-3/machine/acme-3.yaml new file mode 100644 index 0000000..d7d75ff --- /dev/null +++ b/out/phase-3/machine/acme-3.yaml @@ -0,0 +1,3 @@ +key: acme-3 +name: acme-3 +type: machine diff --git a/requirements.txt b/requirements.txt index c12f7c8..1103fe2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ durable_rules==2.0.28 pyyaml==5.3.1 +jinja2==2.11.2 |