diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-24 21:43:30 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-24 21:43:30 +0100 |
commit | 0037e24177fe9fc28809b8afd67a881af94037c0 (patch) | |
tree | 57de3f5c3ed2e06272d2a80086375176df4d5f3d /module/acme/src/main/resources/io/trygvis/acme/apps/apps.drl | |
parent | 35942469a41df149fe35b113d6f228b654616757 (diff) | |
download | rules-sandbox-0037e24177fe9fc28809b8afd67a881af94037c0.tar.gz rules-sandbox-0037e24177fe9fc28809b8afd67a881af94037c0.tar.bz2 rules-sandbox-0037e24177fe9fc28809b8afd67a881af94037c0.tar.xz rules-sandbox-0037e24177fe9fc28809b8afd67a881af94037c0.zip |
WIP: Optaplanner.
Diffstat (limited to 'module/acme/src/main/resources/io/trygvis/acme/apps/apps.drl')
-rw-r--r-- | module/acme/src/main/resources/io/trygvis/acme/apps/apps.drl | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/module/acme/src/main/resources/io/trygvis/acme/apps/apps.drl b/module/acme/src/main/resources/io/trygvis/acme/apps/apps.drl index e7bdfe3..670079f 100644 --- a/module/acme/src/main/resources/io/trygvis/acme/apps/apps.drl +++ b/module/acme/src/main/resources/io/trygvis/acme/apps/apps.drl @@ -1,9 +1,13 @@ -package io.trygvis.acme.apps; +package io.trygvis.acme.apps import io.trygvis.rules.machine.Machine; import io.trygvis.rules.dba.Cluster; import io.trygvis.rules.dba.Container import io.trygvis.rules.dns.DnsZone; +import io.trygvis.rules.machine.Machine +import io.trygvis.rules.machine.MachineSpecification +import io.trygvis.rules.dba.Cluster +import io.trygvis.rules.dba.Container dialect "mvel" @@ -13,8 +17,8 @@ when then var cluster = new Cluster("acme-ops"); insert(cluster); - insert(new Container(cluster, "pdb", "ops", "postgresql", "11")); - insert(new Container(cluster, "n8n", "ops", "n8n", "0.84.1")); + insert(new Container(cluster, "pdb", "ops", "postgresql", "11", null)); + insert(new Container(cluster, "n8n", "ops", "n8n", "0.84.1", null)); end rule "MyApp" @@ -31,10 +35,10 @@ then var db = $app.environment + "-db"; var tag = $app.dockerTag; - insert(new Container(cluster, "statera", app, "statera", tag)); - insert(new Container(cluster, "statera-console", app, "statera-console", tag)); - insert(new Container(cluster, "4tune-web", app, "4tune-web", tag)); - insert(new Container(cluster, "4tune-api", app, "4tune-api", tag)); - insert(new Container(cluster, "pdb", db, "postgresql", "13")); - insert(new Container(cluster, "mdb", db, "mongodb", "3.2")); + insert(new Container(cluster, "statera", app, "statera", tag, new MachineSpecification(200, 1000))); + insert(new Container(cluster, "statera-console", app, "statera-console", tag, new MachineSpecification(100, 50))); + insert(new Container(cluster, "4tune-web", app, "4tune-web", tag, new MachineSpecification(100, 50))); + insert(new Container(cluster, "4tune-api", app, "4tune-api", tag, new MachineSpecification(200, 200))); + insert(new Container(cluster, "pdb", db, "postgresql", "13", new MachineSpecification(500, 500))); + insert(new Container(cluster, "mdb", db, "mongodb", "3.2", new MachineSpecification(500, 200))); end |