diff --git a/docs/docs/variability4tosca/rules/index.md b/docs/docs/variability4tosca/rules/index.md
index cdd40f9746..45c22bbfa4 100644
--- a/docs/docs/variability4tosca/rules/index.md
+++ b/docs/docs/variability4tosca/rules/index.md
@@ -63,89 +63,6 @@ We use the following derivation rules to assess deployment qualities.
-## Component "bucket"
-
-The following scenarios deploy a node template of node type [bucket](/normative#bucket){target=_blank} with various hosting stacks, artifacts, deployment technologies, and qualities.
-
-
-### Scenario #1
-
-In this scenario, the node template "component" of node type [bucket](/normative#bucket){target=_blank} is deployed.
-The node template is hosted on the node template "host 1" of node type [gcp.cloudstorage](/normative#gcpcloudstorage){target=_blank}.
-
-
-
-
-!!! success "Ansible (Quality: 1)"
- Primary use case due to the specialization of Ansible.
-
-!!! success "Terraform (Quality: 1)"
- Terraform provides a declarative module.
-
-
-
-### Scenario #2
-
-In this scenario, the node template "component" of node type [bucket](/normative#bucket){target=_blank} is deployed.
-This node template is implemented by its deployment artifact "artifact" of artifact type [cache.image](/normative#cacheimage){target=_blank}.
-The node template is hosted on the node template "host 1" of node type [gcp.memorystore](/normative#gcpmemorystore){target=_blank}.
-
-
-
-
-!!! success "Ansible (Quality: 1)"
- Primary use case due to the specialization of Ansible.
-
-
-
-### Scenario #3
-
-In this scenario, the node template "component" of node type [bucket](/normative#bucket){target=_blank} is deployed.
-The node template is hosted on the node template "host 1" of node type [minio.server](/normative#minioserver){target=_blank}, which is hosted on an arbitrary hosting stack of arbitrary length, which is hosted on the node template "host 3" of node type [local.machine](/normative#localmachine){target=_blank}.
-
-
-
-
-!!! success "Ansible (Quality: 1)"
- Primary use case due to the specialization of Ansible.
-
-!!! success "Terraform (Quality: 1)"
- Terraform provides a declarative module.
-
-
-
-### Scenario #4
-
-In this scenario, the node template "component" of node type [bucket](/normative#bucket){target=_blank} is deployed.
-The node template is hosted on the node template "host 1" of node type [minio.server](/normative#minioserver){target=_blank}, which is hosted on an arbitrary hosting stack of arbitrary length, which is hosted on the node template "host 3" of node type [remote.machine](/normative#remotemachine){target=_blank}.
-
-
-
-
-!!! success "Ansible (Quality: 1)"
- Primary use case due to the specialization of Ansible.
-
-!!! success "Terraform (Quality: 1)"
- Terraform provides a declarative module.
-
-
-
-### Scenario #5
-
-In this scenario, the node template "component" of node type [bucket](/normative#bucket){target=_blank} is deployed.
-The node template is hosted on the node template "host 1" of node type [minio.server](/normative#minioserver){target=_blank}, which is hosted on the node template "host 2" of node type [kubernetes.cluster](/normative#kubernetescluster){target=_blank}.
-
-
-
-
-!!! success "Ansible (Quality: 1)"
- Primary use case due to the specialization of Ansible.
-
-!!! success "Terraform (Quality: 1)"
- Terraform provides a declarative module.
-
-
-
## Component "docker.engine"
The following scenarios deploy a node template of node type [docker.engine](/normative#dockerengine){target=_blank} with various hosting stacks, artifacts, deployment technologies, and qualities.
@@ -217,13 +134,13 @@ The node template is hosted on the node template "host 1" of node type [kubernet
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Kubernetes is more specialized.
!!! success "Kubernetes (Quality: 1)"
Kubernetes is the underlying technology.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Kubernetes is more specialized.
@@ -298,7 +215,7 @@ The node template is hosted on the node template "host 1" of node type [mysql.db
!!! failure "Docker Compose (Quality: 0)"
One-time use docker container ("fake Kubernetes job") with imperative parts, while other technologies provide declarative modules.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Terraform provides a declarative module. However, Terraform requires an SSH workaround. Ansible is more specialized.
@@ -311,7 +228,7 @@ The node template is hosted on the node template "host 1" of node type [mysql.db
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Primary use case due to the specialization of Ansible. However, need to install and handle GCP CloudSQL Proxy, while the corresponding Terraform module already provides this.
!!! success "Terraform (Quality: 1)"
@@ -365,7 +282,7 @@ The node template is hosted on the node template "host 1" of node type [mysql.db
!!! success "Ansible (Quality: 1)"
Primary use case due to the specialization of Ansible.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Terraform provides a declarative module. However, Terraform requires an SSH workaround. Ansible is more specialized.
@@ -384,13 +301,13 @@ The node template is hosted on the node template "host 1" of node type [docker.e
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Docker Compose is more specialized
!!! success "Docker Compose (Quality: 1)"
Docker is the underlying technology.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Docker Compose is more specialized.
@@ -404,13 +321,13 @@ The node template is hosted on the node template "host 1" of node type [docker.e
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Docker Compose is more specialized
!!! success "Docker Compose (Quality: 1)"
Docker is the underlying technology.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Docker Compose is more specialized.
@@ -441,13 +358,13 @@ The node template is hosted on the node template "host 1" of node type [kubernet
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Kubernetes is more specialized.
!!! success "Kubernetes (Quality: 1)"
Kubernetes is the underlying technology.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Kubernetes is more specialized.
@@ -486,6 +403,84 @@ The node template is hosted on the node template "host 1" of node type [remote.m
+## Component "object.storage"
+
+The following scenarios deploy a node template of node type [object.storage](/normative#objectstorage){target=_blank} with various hosting stacks, artifacts, deployment technologies, and qualities.
+
+
+### Scenario #1
+
+In this scenario, the node template "component" of node type [object.storage](/normative#objectstorage){target=_blank} is deployed.
+The node template is hosted on the node template "host 1" of node type [gcp.cloudstorage](/normative#gcpcloudstorage){target=_blank}.
+
+
+
+
+!!! success "Ansible (Quality: 1)"
+ Primary use case due to the specialization of Ansible.
+
+!!! success "Terraform (Quality: 1)"
+ Terraform provides a declarative module.
+
+
+
+### Scenario #2
+
+In this scenario, the node template "component" of node type [object.storage](/normative#objectstorage){target=_blank} is deployed.
+The node template is hosted on the node template "host 1" of node type [minio.server](/normative#minioserver){target=_blank}, which is hosted on the node template "host 2" of node type [docker.engine](/normative#dockerengine){target=_blank}, which is hosted on the node template "host 3" of node type [local.machine](/normative#localmachine){target=_blank}.
+
+
+
+
+!!! success "Ansible (Quality: 1)"
+ Primary use case due to the specialization of Ansible.
+
+!!! failure "Docker Compose (Quality: 0)"
+ One-time use docker container ("fake Kubernetes job") with imperative parts, while other technologies provide declarative modules.
+
+!!! success "Terraform (Quality: 1)"
+ Terraform provides a declarative module.
+
+
+
+### Scenario #3
+
+In this scenario, the node template "component" of node type [object.storage](/normative#objectstorage){target=_blank} is deployed.
+The node template is hosted on the node template "host 1" of node type [minio.server](/normative#minioserver){target=_blank}, which is hosted on the node template "host 2" of node type [docker.engine](/normative#dockerengine){target=_blank}, which is hosted on the node template "host 3" of node type [remote.machine](/normative#remotemachine){target=_blank}.
+
+
+
+
+!!! success "Ansible (Quality: 1)"
+ Primary use case due to the specialization of Ansible.
+
+!!! failure "Docker Compose (Quality: 0)"
+ One-time use docker container ("fake Kubernetes job") with imperative parts, while other technologies provide declarative modules.
+
+!!! warning "Terraform (Quality: 0.5)"
+ Terraform provides a declarative module. However, Terraform requires an SSH workaround. Ansible is more specialized.
+
+
+
+### Scenario #4
+
+In this scenario, the node template "component" of node type [object.storage](/normative#objectstorage){target=_blank} is deployed.
+The node template is hosted on the node template "host 1" of node type [minio.server](/normative#minioserver){target=_blank}, which is hosted on the node template "host 2" of node type [kubernetes.cluster](/normative#kubernetescluster){target=_blank}.
+
+
+
+
+!!! success "Ansible (Quality: 1)"
+ Primary use case due to the specialization of Ansible.
+
+!!! failure "Kubernetes (Quality: 0)"
+ Kubernetes Job with imperative parts, while declarative other technologies provide declarative modules.
+
+!!! failure "Terraform (Quality: 0)"
+ Ansible is more specialized.
+
+
+
## Component "redis.server"
The following scenarios deploy a node template of node type [redis.server](/normative#redisserver){target=_blank} with various hosting stacks, artifacts, deployment technologies, and qualities.
@@ -500,13 +495,13 @@ The node template is hosted on the node template "host 1" of node type [docker.e
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Docker Compose is more specialized.
!!! success "Docker Compose (Quality: 1)"
Docker is the underlying technology.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Docker Compose is more specialized.
@@ -520,13 +515,13 @@ The node template is hosted on the node template "host 1" of node type [docker.e
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Docker Compose is more specialized.
!!! success "Docker Compose (Quality: 1)"
Docker is the underlying technology.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Docker Compose is more specialized.
@@ -540,6 +535,9 @@ The node template is hosted on the node template "host 1" of node type [gcp.memo
+!!! success "Ansible (Quality: 1)"
+ Primary use case due to the specialization of Ansible.
+
!!! success "Terraform (Quality: 1)"
Terraform provides a declarative module.
@@ -554,10 +552,13 @@ The node template is hosted on the node template "host 1" of node type [kubernet
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Kubernetes is more specialized.
-!!! info "Terraform (Quality: 0.5)"
+!!! success "Kubernetes (Quality: 1)"
+ Kubernetes is the underlying technology.
+
+!!! warning "Terraform (Quality: 0.5)"
Kubernetes is more specialized.
@@ -576,13 +577,13 @@ The node template is hosted on the node template "host 1" of node type [docker.e
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Docker Compose is more specialized.
!!! success "Docker Compose (Quality: 1)"
Docker is the underlying technology.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Docker Compose is more specialized.
@@ -596,13 +597,13 @@ The node template is hosted on the node template "host 1" of node type [docker.e
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Docker Compose is more specialized.
!!! success "Docker Compose (Quality: 1)"
Docker is the underlying technology.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Docker Compose is more specialized.
@@ -633,13 +634,13 @@ The node template is hosted on the node template "host 1" of node type [kubernet
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Kubernetes is more specialized.
!!! success "Kubernetes (Quality: 1)"
Kubernetes is the underlying technology.
-!!! info "Terraform (Quality: 0.5)"
+!!! warning "Terraform (Quality: 0.5)"
Kubernetes is more specialized.
@@ -736,20 +737,6 @@ The following scenarios deploy a node template of node type [software.applicatio
### Scenario #1
-In this scenario, the node template "component" of node type [software.application](/normative#softwareapplication){target=_blank} is deployed.
-This node template is implemented by its deployment artifact "artifact" of artifact type [apt.archive](/normative#aptarchive){target=_blank}.
-The node template is hosted on an arbitrary hosting stack of arbitrary length, which is hosted on the node template "host 2" of node type [remote.machine](/normative#remotemachine){target=_blank}.
-
-
-
-
-!!! failure "Terraform (Quality: 0)"
- Ansible is more specialized. Also using provisioners is a "last resort".
-
-
-
-### Scenario #2
-
In this scenario, the node template "component" of node type [software.application](/normative#softwareapplication){target=_blank} is deployed.
This node template is implemented by its deployment artifact "artifact" of artifact type [apt.package](/normative#aptpackage){target=_blank}.
The node template is hosted on an arbitrary hosting stack of arbitrary length, which is hosted on the node template "host 2" of node type [local.machine](/normative#localmachine){target=_blank}.
@@ -765,7 +752,7 @@ The node template is hosted on an arbitrary hosting stack of arbitrary length, w
-### Scenario #3
+### Scenario #2
In this scenario, the node template "component" of node type [software.application](/normative#softwareapplication){target=_blank} is deployed.
This node template is implemented by its deployment artifact "artifact" of artifact type [apt.package](/normative#aptpackage){target=_blank}.
@@ -777,9 +764,12 @@ The node template is hosted on an arbitrary hosting stack of arbitrary length, w
!!! success "Ansible (Quality: 1)"
Primary use case due to the specialization of Ansible.
+!!! failure "Terraform (Quality: 0)"
+ Ansible is more specialized. Also using provisioners is a "last resort".
+
-### Scenario #4
+### Scenario #3
In this scenario, the node template "component" of node type [software.application](/normative#softwareapplication){target=_blank} is deployed.
This node template is implemented by its deployment artifact "artifact" of artifact type [tar.archive](/normative#tararchive){target=_blank}.
@@ -788,7 +778,7 @@ The node template is hosted on an arbitrary hosting stack of arbitrary length, w
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
While this is a primary use case due to the specialization of Ansible, we must rely on scripts. More specialized types should be used, e.g., service.application.
!!! failure "Terraform (Quality: 0)"
@@ -796,7 +786,7 @@ The node template is hosted on an arbitrary hosting stack of arbitrary length, w
-### Scenario #5
+### Scenario #4
In this scenario, the node template "component" of node type [software.application](/normative#softwareapplication){target=_blank} is deployed.
This node template is implemented by its deployment artifact "artifact" of artifact type [tar.archive](/normative#tararchive){target=_blank}.
@@ -805,7 +795,7 @@ The node template is hosted on an arbitrary hosting stack of arbitrary length, w
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
While this is a primary use case due to the specialization of Ansible, we must rely on scripts. More specialized types should be used, e.g., "service.application".
!!! failure "Terraform (Quality: 0)"
@@ -813,7 +803,7 @@ The node template is hosted on an arbitrary hosting stack of arbitrary length, w
-### Scenario #6
+### Scenario #5
In this scenario, the node template "component" of node type [software.application](/normative#softwareapplication){target=_blank} is deployed.
This node template is implemented by its deployment artifact "artifact" of artifact type [zip.archive](/normative#ziparchive){target=_blank}.
@@ -822,7 +812,7 @@ The node template is hosted on an arbitrary hosting stack of arbitrary length, w
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
While this is a primary use case due to the specialization of Ansible, we must rely on scripts. More specialized types should be used, e.g., service.application.
!!! failure "Terraform (Quality: 0)"
@@ -830,7 +820,7 @@ The node template is hosted on an arbitrary hosting stack of arbitrary length, w
-### Scenario #7
+### Scenario #6
In this scenario, the node template "component" of node type [software.application](/normative#softwareapplication){target=_blank} is deployed.
This node template is implemented by its deployment artifact "artifact" of artifact type [zip.archive](/normative#ziparchive){target=_blank}.
@@ -839,7 +829,7 @@ The node template is hosted on an arbitrary hosting stack of arbitrary length, w
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
While this is a primary use case due to the specialization of Ansible, we must rely on scripts. More specialized types should be used, e.g., service.application.
!!! failure "Terraform (Quality: 0)"
@@ -861,7 +851,7 @@ The node template is hosted on the node template "host 1" of node type [openstac
-!!! info "Ansible (Quality: 0.5)"
+!!! warning "Ansible (Quality: 0.5)"
Terraform is more specialized.
!!! success "Terraform (Quality: 1)"
@@ -877,115 +867,6 @@ This appendix contains the deployment technology rules.
### Rule #1
| Attribute | Value |
| --- | --- |
-| Identifier | bucket::ansible@gcp.cloudstorage |
-| Component | [bucket](/normative#bucket){target=_blank} |
-| Technology | ansible |
-| Hosting | [gcp.cloudstorage](/normative#gcpcloudstorage){target=_blank} |
-| Quality | 1 |
-| Reason | Primary use case due to the specialization of Ansible. |
-| Details | |
-| Graph ||
-
-### Rule #2
-| Attribute | Value |
-| --- | --- |
-| Identifier | bucket::terraform@gcp.cloudstorage |
-| Component | [bucket](/normative#bucket){target=_blank} |
-| Technology | terraform |
-| Hosting | [gcp.cloudstorage](/normative#gcpcloudstorage){target=_blank} |
-| Quality | 1 |
-| Reason | Terraform provides a declarative module. |
-| Details | |
-| Graph ||
-
-### Rule #3
-| Attribute | Value |
-| --- | --- |
-| Identifier | bucket#cache.image::ansible@gcp.memorystore |
-| Component | [bucket](/normative#bucket){target=_blank} |
-| Artifact | [cache.image](/normative#cacheimage){target=_blank} |
-| Technology | ansible |
-| Hosting | [gcp.memorystore](/normative#gcpmemorystore){target=_blank} |
-| Quality | 1 |
-| Reason | Primary use case due to the specialization of Ansible. |
-| Details | |
-| Graph ||
-
-### Rule #4
-| Attribute | Value |
-| --- | --- |
-| Identifier | bucket::ansible@minio.server->*->local.machine |
-| Component | [bucket](/normative#bucket){target=_blank} |
-| Technology | ansible |
-| Hosting | [minio.server](/normative#minioserver){target=_blank} -> * -> [local.machine](/normative#localmachine){target=_blank} |
-| Quality | 1 |
-| Reason | Primary use case due to the specialization of Ansible. |
-| Details | |
-| Graph ||
-
-### Rule #5
-| Attribute | Value |
-| --- | --- |
-| Identifier | bucket::terraform@minio.server->*->local.machine |
-| Component | [bucket](/normative#bucket){target=_blank} |
-| Technology | terraform |
-| Hosting | [minio.server](/normative#minioserver){target=_blank} -> * -> [local.machine](/normative#localmachine){target=_blank} |
-| Quality | 1 |
-| Reason | Terraform provides a declarative module. |
-| Details | |
-| Graph ||
-
-### Rule #6
-| Attribute | Value |
-| --- | --- |
-| Identifier | bucket::ansible@minio.server->*->remote.machine |
-| Component | [bucket](/normative#bucket){target=_blank} |
-| Technology | ansible |
-| Hosting | [minio.server](/normative#minioserver){target=_blank} -> * -> [remote.machine](/normative#remotemachine){target=_blank} |
-| Quality | 1 |
-| Reason | Primary use case due to the specialization of Ansible. |
-| Details | |
-| Graph ||
-
-### Rule #7
-| Attribute | Value |
-| --- | --- |
-| Identifier | bucket::terraform@minio.server->*->remote.machine |
-| Component | [bucket](/normative#bucket){target=_blank} |
-| Technology | terraform |
-| Hosting | [minio.server](/normative#minioserver){target=_blank} -> * -> [remote.machine](/normative#remotemachine){target=_blank} |
-| Quality | 1 |
-| Reason | Terraform provides a declarative module. |
-| Details | |
-| Graph ||
-
-### Rule #8
-| Attribute | Value |
-| --- | --- |
-| Identifier | bucket::ansible@minio.server->kubernetes.cluster |
-| Component | [bucket](/normative#bucket){target=_blank} |
-| Technology | ansible |
-| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [kubernetes.cluster](/normative#kubernetescluster){target=_blank} |
-| Quality | 1 |
-| Reason | Primary use case due to the specialization of Ansible. |
-| Details | |
-| Graph ||
-
-### Rule #9
-| Attribute | Value |
-| --- | --- |
-| Identifier | bucket::terraform@minio.server->kubernetes.cluster |
-| Component | [bucket](/normative#bucket){target=_blank} |
-| Technology | terraform |
-| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [kubernetes.cluster](/normative#kubernetescluster){target=_blank} |
-| Quality | 1 |
-| Reason | Terraform provides a declarative module. |
-| Details | |
-| Graph ||
-
-### Rule #10
-| Attribute | Value |
-| --- | --- |
| Identifier | docker.engine::ansible@local.machine |
| Component | [docker.engine](/normative#dockerengine){target=_blank} |
| Technology | ansible |
@@ -995,7 +876,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.shell", "ansible.builtin.group", and "ansible.builtin.user" tasks |
| Graph ||
-### Rule #11
+### Rule #2
| Attribute | Value |
| --- | --- |
| Identifier | docker.engine::terraform@local.machine |
@@ -1007,7 +888,7 @@ This appendix contains the deployment technology rules.
| Details | "local-exec" provider |
| Graph ||
-### Rule #12
+### Rule #3
| Attribute | Value |
| --- | --- |
| Identifier | docker.engine::ansible@remote.machine |
@@ -1019,7 +900,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.shell", "ansible.builtin.group", and "ansible.builtin.user" tasks |
| Graph ||
-### Rule #13
+### Rule #4
| Attribute | Value |
| --- | --- |
| Identifier | docker.engine::terraform@remote.machine |
@@ -1031,7 +912,7 @@ This appendix contains the deployment technology rules.
| Details | "remote-exec" provider |
| Graph ||
-### Rule #14
+### Rule #5
| Attribute | Value |
| --- | --- |
| Identifier | gcp.service::ansible |
@@ -1042,7 +923,7 @@ This appendix contains the deployment technology rules.
| Details | "google.cloud.gcp_serviceusage_service" task |
| Graph ||
-### Rule #15
+### Rule #6
| Attribute | Value |
| --- | --- |
| Identifier | gcp.service::terraform |
@@ -1053,7 +934,7 @@ This appendix contains the deployment technology rules.
| Details | "google_project_service" resource |
| Graph ||
-### Rule #16
+### Rule #7
| Attribute | Value |
| --- | --- |
| Identifier | ingress::ansible@kubernetes.cluster |
@@ -1065,7 +946,7 @@ This appendix contains the deployment technology rules.
| Details | "kubernetes.core.k8s" task |
| Graph ||
-### Rule #17
+### Rule #8
| Attribute | Value |
| --- | --- |
| Identifier | ingress::kubernetes@kubernetes.cluster |
@@ -1077,7 +958,7 @@ This appendix contains the deployment technology rules.
| Details | Kubernetes manifest generated and applied |
| Graph ||
-### Rule #18
+### Rule #9
| Attribute | Value |
| --- | --- |
| Identifier | ingress::terraform@kubernetes.cluster |
@@ -1089,7 +970,7 @@ This appendix contains the deployment technology rules.
| Details | "kubernetes_service_v1" resource |
| Graph ||
-### Rule #19
+### Rule #10
| Attribute | Value |
| --- | --- |
| Identifier | ingress::ansible@local.machine |
@@ -1101,7 +982,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.apt_key", "ansible.builtin.apt_repository", "ansible.builtin.apt", "ansible.builtin.copy", and "ansible.builtin.systemd" tasks |
| Graph ||
-### Rule #20
+### Rule #11
| Attribute | Value |
| --- | --- |
| Identifier | ingress::terraform@local.machine |
@@ -1113,7 +994,7 @@ This appendix contains the deployment technology rules.
| Details | "local_file" resource to create the installation script and "terraform_data" to execute the script using the "local-exec" provisioner |
| Graph ||
-### Rule #21
+### Rule #12
| Attribute | Value |
| --- | --- |
| Identifier | ingress::ansible@remote.machine |
@@ -1125,7 +1006,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.apt_key", "ansible.builtin.apt_repository", "ansible.builtin.apt", "ansible.builtin.copy", and "ansible.builtin.systemd" tasks |
| Graph ||
-### Rule #22
+### Rule #13
| Attribute | Value |
| --- | --- |
| Identifier | ingress::terraform@remote.machine |
@@ -1137,7 +1018,7 @@ This appendix contains the deployment technology rules.
| Details | "terraform_data" resource with an "ssh" connection to the virtual machine to copy the install script using the "file" provisioner on the virtual machine and to execute the script using the "remote-exec" provisioner |
| Graph ||
-### Rule #23
+### Rule #14
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::ansible@mysql.dbms->docker.engine->local.machine |
@@ -1149,7 +1030,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #24
+### Rule #15
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::compose@mysql.dbms->docker.engine->local.machine |
@@ -1161,7 +1042,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #25
+### Rule #16
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::terraform@mysql.dbms->docker.engine->local.machine |
@@ -1173,7 +1054,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #26
+### Rule #17
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::ansible@mysql.dbms->docker.engine->remote.machine |
@@ -1185,7 +1066,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #27
+### Rule #18
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::compose@mysql.dbms->docker.engine->remote.machine |
@@ -1197,7 +1078,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #28
+### Rule #19
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::terraform@mysql.dbms->docker.engine->remote.machine |
@@ -1209,7 +1090,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #29
+### Rule #20
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::ansible@mysql.dbms->gcp.cloudsql |
@@ -1221,7 +1102,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #30
+### Rule #21
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::terraform@mysql.dbms->gcp.cloudsql |
@@ -1233,7 +1114,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #31
+### Rule #22
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::ansible@mysql.dbms->kubernetes.cluster |
@@ -1245,7 +1126,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #32
+### Rule #23
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::kubernetes@mysql.dbms->kubernetes.cluster |
@@ -1257,7 +1138,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #33
+### Rule #24
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::terraform@mysql.dbms->kubernetes.cluster |
@@ -1269,7 +1150,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #34
+### Rule #25
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::ansible@mysql.dbms->local.machine |
@@ -1281,7 +1162,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #35
+### Rule #26
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::terraform@mysql.dbms->local.machine |
@@ -1293,7 +1174,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #36
+### Rule #27
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::ansible@mysql.dbms->remote.machine |
@@ -1305,7 +1186,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #37
+### Rule #28
| Attribute | Value |
| --- | --- |
| Identifier | mysql.database::terraform@mysql.dbms->remote.machine |
@@ -1317,7 +1198,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #38
+### Rule #29
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::ansible@docker.engine->local.machine |
@@ -1330,7 +1211,7 @@ This appendix contains the deployment technology rules.
| Details | "community.docker.docker_container" task |
| Graph ||
-### Rule #39
+### Rule #30
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::compose@docker.engine->local.machine |
@@ -1343,7 +1224,7 @@ This appendix contains the deployment technology rules.
| Details | docker-compose manifest generated and applied |
| Graph ||
-### Rule #40
+### Rule #31
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::terraform@docker.engine->local.machine |
@@ -1356,7 +1237,7 @@ This appendix contains the deployment technology rules.
| Details | "docker_container" and "docker_image" resources |
| Graph ||
-### Rule #41
+### Rule #32
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::ansible@docker.engine->remote.machine |
@@ -1369,7 +1250,7 @@ This appendix contains the deployment technology rules.
| Details | "community.docker.docker_container" task |
| Graph ||
-### Rule #42
+### Rule #33
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::compose@docker.engine->remote.machine |
@@ -1382,7 +1263,7 @@ This appendix contains the deployment technology rules.
| Details | docker-compose manifest generated and applied |
| Graph ||
-### Rule #43
+### Rule #34
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::terraform@docker.engine->remote.machine |
@@ -1395,7 +1276,7 @@ This appendix contains the deployment technology rules.
| Details | "docker_container" and "docker_image" resources |
| Graph ||
-### Rule #44
+### Rule #35
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::ansible@gcp.cloudsql |
@@ -1408,7 +1289,7 @@ This appendix contains the deployment technology rules.
| Details | "google.cloud.gcp_sql_instance" and "google.cloud.gcp_sql_user" tasks |
| Graph ||
-### Rule #45
+### Rule #36
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::terraform@gcp.cloudsql |
@@ -1421,7 +1302,7 @@ This appendix contains the deployment technology rules.
| Details | "google_sql_database_instance" and "google_sql_user" resources |
| Graph ||
-### Rule #46
+### Rule #37
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::ansible@kubernetes.cluster |
@@ -1434,7 +1315,7 @@ This appendix contains the deployment technology rules.
| Details | "kubernetes.core.k8s" tasks |
| Graph ||
-### Rule #47
+### Rule #38
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::kubernetes@kubernetes.cluster |
@@ -1447,7 +1328,7 @@ This appendix contains the deployment technology rules.
| Details | Kubernetes manifest generated and applied |
| Graph ||
-### Rule #48
+### Rule #39
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::terraform@kubernetes.cluster |
@@ -1460,7 +1341,7 @@ This appendix contains the deployment technology rules.
| Details | "kubernetes_deployment_v1" and "kubernetes_service_v1" resources |
| Graph ||
-### Rule #49
+### Rule #40
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::ansible@local.machine |
@@ -1473,7 +1354,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.apt", "ansible.builtin.systemd", "ansible.builtin.copy", "ansible.builtin.lineinfile", and "community.mysql.mysql_user" tasks |
| Graph ||
-### Rule #50
+### Rule #41
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::terraform@local.machine |
@@ -1486,7 +1367,7 @@ This appendix contains the deployment technology rules.
| Details | "local_file" resource to create the installation script and "terraform_data" to execute the script using the "local-exec" provisioner |
| Graph ||
-### Rule #51
+### Rule #42
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::ansible@remote.machine |
@@ -1499,7 +1380,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.apt", "ansible.builtin.systemd", "ansible.builtin.copy", "ansible.builtin.lineinfile", and "community.mysql.mysql_user" tasks |
| Graph ||
-### Rule #52
+### Rule #43
| Attribute | Value |
| --- | --- |
| Identifier | mysql.dbms#dbms.image::terraform@remote.machine |
@@ -1512,9 +1393,141 @@ This appendix contains the deployment technology rules.
| Details | "terraform_data" resource with an "ssh" connection to the virtual machine to copy the install script using the "file" provisioner on the virtual machine and to execute the script using the "remote-exec" provisioner |
| Graph ||
+### Rule #44
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::ansible@gcp.cloudstorage |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | ansible |
+| Hosting | [gcp.cloudstorage](/normative#gcpcloudstorage){target=_blank} |
+| Quality | 1 |
+| Reason | Primary use case due to the specialization of Ansible. |
+| Details | |
+| Graph ||
+
+### Rule #45
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::terraform@gcp.cloudstorage |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | terraform |
+| Hosting | [gcp.cloudstorage](/normative#gcpcloudstorage){target=_blank} |
+| Quality | 1 |
+| Reason | Terraform provides a declarative module. |
+| Details | |
+| Graph ||
+
+### Rule #46
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::ansible@minio.server->docker.engine->local.machine |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | ansible |
+| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [docker.engine](/normative#dockerengine){target=_blank} -> [local.machine](/normative#localmachine){target=_blank} |
+| Quality | 1 |
+| Reason | Primary use case due to the specialization of Ansible. |
+| Details | |
+| Graph ||
+
+### Rule #47
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::compose@minio.server->docker.engine->local.machine |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | compose |
+| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [docker.engine](/normative#dockerengine){target=_blank} -> [local.machine](/normative#localmachine){target=_blank} |
+| Quality | 0 |
+| Reason | One-time use docker container ("fake Kubernetes job") with imperative parts, while other technologies provide declarative modules. |
+| Details | |
+| Graph ||
+
+### Rule #48
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::terraform@minio.server->docker.engine->local.machine |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | terraform |
+| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [docker.engine](/normative#dockerengine){target=_blank} -> [local.machine](/normative#localmachine){target=_blank} |
+| Quality | 1 |
+| Reason | Terraform provides a declarative module. |
+| Details | |
+| Graph ||
+
+### Rule #49
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::ansible@minio.server->docker.engine->remote.machine |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | ansible |
+| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [docker.engine](/normative#dockerengine){target=_blank} -> [remote.machine](/normative#remotemachine){target=_blank} |
+| Quality | 1 |
+| Reason | Primary use case due to the specialization of Ansible. |
+| Details | |
+| Graph ||
+
+### Rule #50
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::compose@minio.server->docker.engine->remote.machine |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | compose |
+| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [docker.engine](/normative#dockerengine){target=_blank} -> [remote.machine](/normative#remotemachine){target=_blank} |
+| Quality | 0 |
+| Reason | One-time use docker container ("fake Kubernetes job") with imperative parts, while other technologies provide declarative modules. |
+| Details | |
+| Graph ||
+
+### Rule #51
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::terraform@minio.server->docker.engine->remote.machine |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | terraform |
+| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [docker.engine](/normative#dockerengine){target=_blank} -> [remote.machine](/normative#remotemachine){target=_blank} |
+| Quality | 0.5 |
+| Reason | Terraform provides a declarative module. However, Terraform requires an SSH workaround. Ansible is more specialized. |
+| Details | |
+| Graph ||
+
+### Rule #52
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::ansible@minio.server->kubernetes.cluster |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | ansible |
+| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [kubernetes.cluster](/normative#kubernetescluster){target=_blank} |
+| Quality | 1 |
+| Reason | Primary use case due to the specialization of Ansible. |
+| Details | |
+| Graph ||
+
### Rule #53
| Attribute | Value |
| --- | --- |
+| Identifier | object.storage::kubernetes@minio.server->kubernetes.cluster |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | kubernetes |
+| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [kubernetes.cluster](/normative#kubernetescluster){target=_blank} |
+| Quality | 0 |
+| Reason | Kubernetes Job with imperative parts, while declarative other technologies provide declarative modules. |
+| Details | |
+| Graph ||
+
+### Rule #54
+| Attribute | Value |
+| --- | --- |
+| Identifier | object.storage::terraform@minio.server->kubernetes.cluster |
+| Component | [object.storage](/normative#objectstorage){target=_blank} |
+| Technology | terraform |
+| Hosting | [minio.server](/normative#minioserver){target=_blank} -> [kubernetes.cluster](/normative#kubernetescluster){target=_blank} |
+| Quality | 0 |
+| Reason | Ansible is more specialized. |
+| Details | |
+| Graph ||
+
+### Rule #55
+| Attribute | Value |
+| --- | --- |
| Identifier | redis.server#cache.image::ansible@docker.engine->local.machine |
| Component | [redis.server](/normative#redisserver){target=_blank} |
| Artifact | [cache.image](/normative#cacheimage){target=_blank} |
@@ -1525,7 +1538,7 @@ This appendix contains the deployment technology rules.
| Details | "community.docker.docker_container" task |
| Graph ||
-### Rule #54
+### Rule #56
| Attribute | Value |
| --- | --- |
| Identifier | redis.server#cache.image::compose@docker.engine->local.machine |
@@ -1538,7 +1551,7 @@ This appendix contains the deployment technology rules.
| Details | docker compose manifest generated and applied |
| Graph ||
-### Rule #55
+### Rule #57
| Attribute | Value |
| --- | --- |
| Identifier | redis.server#cache.image::terraform@docker.engine->local.machine |
@@ -1551,7 +1564,7 @@ This appendix contains the deployment technology rules.
| Details | "docker_container" and "docker_image" resources |
| Graph ||
-### Rule #56
+### Rule #58
| Attribute | Value |
| --- | --- |
| Identifier | redis.server#cache.image::ansible@docker.engine->remote.machine |
@@ -1564,7 +1577,7 @@ This appendix contains the deployment technology rules.
| Details | "community.docker.docker_container" task |
| Graph ||
-### Rule #57
+### Rule #59
| Attribute | Value |
| --- | --- |
| Identifier | redis.server#cache.image::compose@docker.engine->remote.machine |
@@ -1577,7 +1590,7 @@ This appendix contains the deployment technology rules.
| Details | docker compose manifest generated and applied |
| Graph ||
-### Rule #58
+### Rule #60
| Attribute | Value |
| --- | --- |
| Identifier | redis.server#cache.image::terraform@docker.engine->remote.machine |
@@ -1590,7 +1603,20 @@ This appendix contains the deployment technology rules.
| Details | "docker_container" and "docker_image" resources |
| Graph ||
-### Rule #59
+### Rule #61
+| Attribute | Value |
+| --- | --- |
+| Identifier | redis.server#cache.image::ansible@gcp.memorystore |
+| Component | [redis.server](/normative#redisserver){target=_blank} |
+| Artifact | [cache.image](/normative#cacheimage){target=_blank} |
+| Technology | ansible |
+| Hosting | [gcp.memorystore](/normative#gcpmemorystore){target=_blank} |
+| Quality | 1 |
+| Reason | Primary use case due to the specialization of Ansible. |
+| Details | |
+| Graph ||
+
+### Rule #62
| Attribute | Value |
| --- | --- |
| Identifier | redis.server#cache.image::terraform@gcp.memorystore |
@@ -1603,7 +1629,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #60
+### Rule #63
| Attribute | Value |
| --- | --- |
| Identifier | redis.server#cache.image::ansible@kubernetes.cluster |
@@ -1616,7 +1642,20 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #61
+### Rule #64
+| Attribute | Value |
+| --- | --- |
+| Identifier | redis.server#cache.image::kubernetes@kubernetes.cluster |
+| Component | [redis.server](/normative#redisserver){target=_blank} |
+| Artifact | [cache.image](/normative#cacheimage){target=_blank} |
+| Technology | kubernetes |
+| Hosting | [kubernetes.cluster](/normative#kubernetescluster){target=_blank} |
+| Quality | 1 |
+| Reason | Kubernetes is the underlying technology. |
+| Details | Kubernetes manifest generated and applied |
+| Graph ||
+
+### Rule #65
| Attribute | Value |
| --- | --- |
| Identifier | redis.server#cache.image::terraform@kubernetes.cluster |
@@ -1629,7 +1668,7 @@ This appendix contains the deployment technology rules.
| Details | |
| Graph ||
-### Rule #62
+### Rule #66
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::ansible@docker.engine->local.machine |
@@ -1642,7 +1681,7 @@ This appendix contains the deployment technology rules.
| Details | "community.docker.docker_container" task |
| Graph ||
-### Rule #63
+### Rule #67
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::compose@docker.engine->local.machine |
@@ -1655,7 +1694,7 @@ This appendix contains the deployment technology rules.
| Details | docker compose manifest generated and applied |
| Graph ||
-### Rule #64
+### Rule #68
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::terraform@docker.engine->local.machine |
@@ -1668,7 +1707,7 @@ This appendix contains the deployment technology rules.
| Details | "docker_container" and "docker_image" resources |
| Graph ||
-### Rule #65
+### Rule #69
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::ansible@docker.engine->remote.machine |
@@ -1681,7 +1720,7 @@ This appendix contains the deployment technology rules.
| Details | "community.docker.docker_container" task |
| Graph ||
-### Rule #66
+### Rule #70
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::compose@docker.engine->remote.machine |
@@ -1694,7 +1733,7 @@ This appendix contains the deployment technology rules.
| Details | docker compose manifest generated and applied |
| Graph ||
-### Rule #67
+### Rule #71
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::terraform@docker.engine->remote.machine |
@@ -1707,7 +1746,7 @@ This appendix contains the deployment technology rules.
| Details | "docker_container" and "docker_image" resources |
| Graph ||
-### Rule #68
+### Rule #72
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::ansible@gcp.cloudrun |
@@ -1720,7 +1759,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.shell", "ansible.builtin.tempfile", and "ansible.builtin.copy" tasks |
| Graph ||
-### Rule #69
+### Rule #73
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::terraform@gcp.cloudrun |
@@ -1733,7 +1772,7 @@ This appendix contains the deployment technology rules.
| Details | "google_cloud_run_v2_service" and "google_cloud_run_service_iam_binding" resources |
| Graph ||
-### Rule #70
+### Rule #74
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::ansible@kubernetes.cluster |
@@ -1746,7 +1785,7 @@ This appendix contains the deployment technology rules.
| Details | "kubernetes.core.k8s" tasks |
| Graph ||
-### Rule #71
+### Rule #75
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::kubernetes@kubernetes.cluster |
@@ -1759,7 +1798,7 @@ This appendix contains the deployment technology rules.
| Details | Kubernetes manifest generated and applied |
| Graph ||
-### Rule #72
+### Rule #76
| Attribute | Value |
| --- | --- |
| Identifier | service.application#docker.image::terraform@kubernetes.cluster |
@@ -1772,7 +1811,7 @@ This appendix contains the deployment technology rules.
| Details | "kubernetes_deployment_v1" and "kubernetes_service_v1" resources |
| Graph ||
-### Rule #73
+### Rule #77
| Attribute | Value |
| --- | --- |
| Identifier | service.application#tar.archive::ansible@*->local.machine |
@@ -1785,7 +1824,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.file", "ansible.builtin.unarchive", "ansible.builtin.copy", "ansible.builtin.fail", "ansible.builtin.shell", and "ansible.builtin.systemd" tasks with "when" statements |
| Graph ||
-### Rule #74
+### Rule #78
| Attribute | Value |
| --- | --- |
| Identifier | service.application#tar.archive::terraform@*->local.machine |
@@ -1798,7 +1837,7 @@ This appendix contains the deployment technology rules.
| Details | "local_file" module to create scripts and artifacts and "local-exec" provisioner to execute scripts. |
| Graph ||
-### Rule #75
+### Rule #79
| Attribute | Value |
| --- | --- |
| Identifier | service.application#tar.archive::ansible@*->remote.machine |
@@ -1811,7 +1850,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.file", "ansible.builtin.unarchive", "ansible.builtin.copy", "ansible.builtin.fail", "ansible.builtin.shell", and "ansible.builtin.systemd" tasks with "when" statements |
| Graph ||
-### Rule #76
+### Rule #80
| Attribute | Value |
| --- | --- |
| Identifier | service.application#tar.archive::terraform@*->remote.machine |
@@ -1824,7 +1863,7 @@ This appendix contains the deployment technology rules.
| Details | "file" provisioner to upload artifacts and scripts and "remote-exec" to execute scripts |
| Graph ||
-### Rule #77
+### Rule #81
| Attribute | Value |
| --- | --- |
| Identifier | service.application#zip.archive::ansible@*->local.machine |
@@ -1837,7 +1876,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.file", "ansible.builtin.unarchive", "ansible.builtin.copy", "ansible.builtin.fail", "ansible.builtin.shell", and "ansible.builtin.systemd" tasks with "when" statements |
| Graph ||
-### Rule #78
+### Rule #82
| Attribute | Value |
| --- | --- |
| Identifier | service.application#zip.archive::terraform@*->local.machine |
@@ -1850,7 +1889,7 @@ This appendix contains the deployment technology rules.
| Details | "local_file" module to create scripts and artifacts and "local-exec" provisioner to execute scripts. |
| Graph ||
-### Rule #79
+### Rule #83
| Attribute | Value |
| --- | --- |
| Identifier | service.application#zip.archive::ansible@*->remote.machine |
@@ -1863,7 +1902,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.file", "ansible.builtin.unarchive", "ansible.builtin.copy", "ansible.builtin.fail", "ansible.builtin.shell", and "ansible.builtin.systemd" tasks with "when" statements |
| Graph ||
-### Rule #80
+### Rule #84
| Attribute | Value |
| --- | --- |
| Identifier | service.application#zip.archive::terraform@*->remote.machine |
@@ -1876,7 +1915,7 @@ This appendix contains the deployment technology rules.
| Details | "file" provisioner to upload artifacts and scripts and "remote-exec" to execute scripts |
| Graph ||
-### Rule #81
+### Rule #85
| Attribute | Value |
| --- | --- |
| Identifier | service.application#zip.archive::ansible@gcp.appengine |
@@ -1889,7 +1928,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.shell", "ansible.builtin.tempfile", "ansible.builtin.unarchive", and "ansible.builtin.copy" tasks |
| Graph ||
-### Rule #82
+### Rule #86
| Attribute | Value |
| --- | --- |
| Identifier | service.application#zip.archive::terraform@gcp.appengine |
@@ -1902,20 +1941,7 @@ This appendix contains the deployment technology rules.
| Details | "google_app_engine_standard_app_version", "google_project_iam_member", "google_service_account", "google_storage_bucket", and "google_storage_bucket_object" resources |
| Graph ||
-### Rule #83
-| Attribute | Value |
-| --- | --- |
-| Identifier | software.application#apt.archive::terraform@*->remote.machine |
-| Component | [software.application](/normative#softwareapplication){target=_blank} |
-| Artifact | [apt.archive](/normative#aptarchive){target=_blank} |
-| Technology | terraform |
-| Hosting | * -> [remote.machine](/normative#remotemachine){target=_blank} |
-| Quality | 0 |
-| Reason | Ansible is more specialized. Also using provisioners is a "last resort". |
-| Details | "file" provisioner to upload scripts and "remote-exec" to execute scripts |
-| Graph ||
-
-### Rule #84
+### Rule #87
| Attribute | Value |
| --- | --- |
| Identifier | software.application#apt.package::ansible@*->local.machine |
@@ -1928,7 +1954,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.shell", "ansible.builtin.apt_key", "ansible.builtin.apt_repository", "ansible.builtin.apt", and "ansible.builtin.copy", tasks with "when" statements |
| Graph ||
-### Rule #85
+### Rule #88
| Attribute | Value |
| --- | --- |
| Identifier | software.application#apt.package::terraform@*->local.machine |
@@ -1941,7 +1967,7 @@ This appendix contains the deployment technology rules.
| Details | "local_file" module to create scripts and artifacts and "local-exec" provisioner to execute scripts |
| Graph ||
-### Rule #86
+### Rule #89
| Attribute | Value |
| --- | --- |
| Identifier | software.application#apt.package::ansible@*->remote.machine |
@@ -1954,7 +1980,20 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.shell", "ansible.builtin.apt_key", "ansible.builtin.apt_repository", "ansible.builtin.apt", and "ansible.builtin.copy", tasks with "when" statements |
| Graph ||
-### Rule #87
+### Rule #90
+| Attribute | Value |
+| --- | --- |
+| Identifier | software.application#apt.package::terraform@*->remote.machine |
+| Component | [software.application](/normative#softwareapplication){target=_blank} |
+| Artifact | [apt.package](/normative#aptpackage){target=_blank} |
+| Technology | terraform |
+| Hosting | * -> [remote.machine](/normative#remotemachine){target=_blank} |
+| Quality | 0 |
+| Reason | Ansible is more specialized. Also using provisioners is a "last resort". |
+| Details | "file" provisioner to upload scripts and "remote-exec" to execute scripts |
+| Graph ||
+
+### Rule #91
| Attribute | Value |
| --- | --- |
| Identifier | software.application#tar.archive::ansible@*->local.machine |
@@ -1967,7 +2006,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.apt", "ansible.builtin.file", "ansible.builtin.unarchive", "ansible.builtin.copy", "ansible.builtin.fail", and "ansible.builtin.shell" tasks with "when" statements |
| Graph ||
-### Rule #88
+### Rule #92
| Attribute | Value |
| --- | --- |
| Identifier | software.application#tar.archive::terraform@*->local.machine |
@@ -1980,7 +2019,7 @@ This appendix contains the deployment technology rules.
| Details | "local_file" module to create scripts and artifacts and "local-exec" provisioner to execute scripts |
| Graph ||
-### Rule #89
+### Rule #93
| Attribute | Value |
| --- | --- |
| Identifier | software.application#tar.archive::ansible@*->remote.machine |
@@ -1993,7 +2032,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.file", "ansible.builtin.unarchive", "ansible.builtin.copy", "ansible.builtin.fail", and "ansible.builtin.shell" tasks with "when" statements |
| Graph ||
-### Rule #90
+### Rule #94
| Attribute | Value |
| --- | --- |
| Identifier | software.application#tar.archive::terraform@*->remote.machine |
@@ -2006,7 +2045,7 @@ This appendix contains the deployment technology rules.
| Details | "file" provisioner to upload artifacts and scripts and "remote-exec" to execute scripts |
| Graph ||
-### Rule #91
+### Rule #95
| Attribute | Value |
| --- | --- |
| Identifier | software.application#zip.archive::ansible@*->local.machine |
@@ -2019,7 +2058,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.apt", "ansible.builtin.file", "ansible.builtin.unarchive", "ansible.builtin.copy", "ansible.builtin.fail", and "ansible.builtin.shell" tasks with "when" statements |
| Graph ||
-### Rule #92
+### Rule #96
| Attribute | Value |
| --- | --- |
| Identifier | software.application#zip.archive::terraform@*->local.machine |
@@ -2032,7 +2071,7 @@ This appendix contains the deployment technology rules.
| Details | "local_file" module to create scripts and artifacts and "local-exec" provisioner to execute scripts. |
| Graph ||
-### Rule #93
+### Rule #97
| Attribute | Value |
| --- | --- |
| Identifier | software.application#zip.archive::ansible@*->remote.machine |
@@ -2045,7 +2084,7 @@ This appendix contains the deployment technology rules.
| Details | "ansible.builtin.apt", "ansible.builtin.file", "ansible.builtin.unarchive", "ansible.builtin.copy", "ansible.builtin.fail", and "ansible.builtin.shell" tasks with "when" statements |
| Graph ||
-### Rule #94
+### Rule #98
| Attribute | Value |
| --- | --- |
| Identifier | software.application#zip.archive::terraform@*->remote.machine |
@@ -2058,7 +2097,7 @@ This appendix contains the deployment technology rules.
| Details | "file" provisioner to upload artifacts and scripts and "remote-exec" to execute scripts |
| Graph ||
-### Rule #95
+### Rule #99
| Attribute | Value |
| --- | --- |
| Identifier | virtual.machine#machine.image::ansible@openstack.provider |
@@ -2071,7 +2110,7 @@ This appendix contains the deployment technology rules.
| Details | "openstack.cloud.security_group", "openstack.cloud.security_group_rule" and "openstack.cloud.server" tasks |
| Graph ||
-### Rule #96
+### Rule #100
| Attribute | Value |
| --- | --- |
| Identifier | virtual.machine#machine.image::terraform@openstack.provider |
diff --git a/docs/docs/variability4tosca/rules/technology-rules.yaml b/docs/docs/variability4tosca/rules/technology-rules.yaml
index f1d65b452e..119c433eda 100644
--- a/docs/docs/variability4tosca/rules/technology-rules.yaml
+++ b/docs/docs/variability4tosca/rules/technology-rules.yaml
@@ -1,68 +1,3 @@
-- technology: ansible
- component: bucket
- hosting:
- - gcp.cloudstorage
- weight: 1
- reason: Primary use case due to the specialization of Ansible.
-- technology: terraform
- component: bucket
- hosting:
- - gcp.cloudstorage
- weight: 1
- reason: Terraform provides a declarative module.
-- technology: ansible
- component: bucket
- artifact: cache.image
- hosting:
- - gcp.memorystore
- weight: 1
- reason: Primary use case due to the specialization of Ansible.
-- technology: ansible
- component: bucket
- hosting:
- - minio.server
- - '*'
- - local.machine
- weight: 1
- reason: Primary use case due to the specialization of Ansible.
-- technology: terraform
- component: bucket
- hosting:
- - minio.server
- - '*'
- - local.machine
- weight: 1
- reason: Terraform provides a declarative module.
-- technology: ansible
- component: bucket
- hosting:
- - minio.server
- - '*'
- - remote.machine
- weight: 1
- reason: Primary use case due to the specialization of Ansible.
-- technology: terraform
- component: bucket
- hosting:
- - minio.server
- - '*'
- - remote.machine
- weight: 1
- reason: Terraform provides a declarative module.
-- technology: ansible
- component: bucket
- hosting:
- - minio.server
- - kubernetes.cluster
- weight: 1
- reason: Primary use case due to the specialization of Ansible.
-- technology: terraform
- component: bucket
- hosting:
- - minio.server
- - kubernetes.cluster
- weight: 1
- reason: Terraform provides a declarative module.
- technology: ansible
component: docker.engine
hosting:
@@ -389,6 +324,87 @@
weight: 0
reason: Ansible is more specialized. Also using provisioners is a "last resort".
details: '"terraform_data" resource with an "ssh" connection to the virtual machine to copy the install script using the "file" provisioner on the virtual machine and to execute the script using the "remote-exec" provisioner'
+- technology: ansible
+ component: object.storage
+ hosting:
+ - gcp.cloudstorage
+ weight: 1
+ reason: Primary use case due to the specialization of Ansible.
+- technology: terraform
+ component: object.storage
+ hosting:
+ - gcp.cloudstorage
+ weight: 1
+ reason: Terraform provides a declarative module.
+- technology: ansible
+ component: object.storage
+ hosting:
+ - minio.server
+ - docker.engine
+ - local.machine
+ weight: 1
+ reason: Primary use case due to the specialization of Ansible.
+- technology: compose
+ component: object.storage
+ hosting:
+ - minio.server
+ - docker.engine
+ - local.machine
+ weight: 0
+ reason: One-time use docker container ("fake Kubernetes job") with imperative parts, while other technologies provide declarative modules.
+- technology: terraform
+ component: object.storage
+ hosting:
+ - minio.server
+ - docker.engine
+ - local.machine
+ weight: 1
+ reason: Terraform provides a declarative module.
+- technology: ansible
+ component: object.storage
+ hosting:
+ - minio.server
+ - docker.engine
+ - remote.machine
+ weight: 1
+ reason: Primary use case due to the specialization of Ansible.
+- technology: compose
+ component: object.storage
+ hosting:
+ - minio.server
+ - docker.engine
+ - remote.machine
+ weight: 0
+ reason: One-time use docker container ("fake Kubernetes job") with imperative parts, while other technologies provide declarative modules.
+- technology: terraform
+ component: object.storage
+ hosting:
+ - minio.server
+ - docker.engine
+ - remote.machine
+ weight: 0.5
+ reason: Terraform provides a declarative module. However, Terraform requires an SSH workaround. Ansible is more specialized.
+- technology: ansible
+ component: object.storage
+ hosting:
+ - minio.server
+ - kubernetes.cluster
+ weight: 1
+ reason: Primary use case due to the specialization of Ansible.
+- technology: kubernetes
+ component: object.storage
+ hosting:
+ - minio.server
+ - kubernetes.cluster
+ weight: 0
+ reason: Kubernetes Job with imperative parts, while declarative other technologies provide declarative modules.
+- technology: terraform
+ component: object.storage
+ hosting:
+ - minio.server
+ - kubernetes.cluster
+ weight: 0
+ reason: Ansible is more specialized.
- technology: ansible
component: redis.server
artifact: cache.image
@@ -443,6 +459,13 @@
weight: 0.5
reason: Docker Compose is more specialized.
details: '"docker_container" and "docker_image" resources'
+- technology: ansible
+ component: redis.server
+ artifact: cache.image
+ hosting:
+ - gcp.memorystore
+ weight: 1
+ reason: Primary use case due to the specialization of Ansible.
- technology: terraform
component: redis.server
artifact: cache.image
@@ -457,6 +480,14 @@
- kubernetes.cluster
weight: 0.5
reason: Kubernetes is more specialized.
+- technology: kubernetes
+ component: redis.server
+ artifact: cache.image
+ hosting:
+ - kubernetes.cluster
+ weight: 1
+ reason: Kubernetes is the underlying technology.
+ details: Kubernetes manifest generated and applied
- technology: terraform
component: redis.server
artifact: cache.image
@@ -646,15 +677,6 @@
weight: 1
reason: Terraform provides a declarative module.
details: '"google_app_engine_standard_app_version", "google_project_iam_member", "google_service_account", "google_storage_bucket", and "google_storage_bucket_object" resources'
-- technology: terraform
- component: software.application
- artifact: apt.archive
- hosting:
- - '*'
- - remote.machine
- weight: 0
- reason: Ansible is more specialized. Also using provisioners is a "last resort".
- details: '"file" provisioner to upload scripts and "remote-exec" to execute scripts'
- technology: ansible
component: software.application
artifact: apt.package
@@ -682,6 +704,15 @@
weight: 1
reason: Primary use case due to the specialization of Ansible.
details: '"ansible.builtin.shell", "ansible.builtin.apt_key", "ansible.builtin.apt_repository", "ansible.builtin.apt", and "ansible.builtin.copy", tasks with "when" statements'
+- technology: terraform
+ component: software.application
+ artifact: apt.package
+ hosting:
+ - '*'
+ - remote.machine
+ weight: 0
+ reason: Ansible is more specialized. Also using provisioners is a "last resort".
+ details: '"file" provisioner to upload scripts and "remote-exec" to execute scripts'
- technology: ansible
component: software.application
artifact: tar.archive
diff --git a/src/assets/scripts/install-unfurl.sh b/src/assets/scripts/install-unfurl.sh
index 232b0dbce6..4a6c32672d 100755
--- a/src/assets/scripts/install-unfurl.sh
+++ b/src/assets/scripts/install-unfurl.sh
@@ -43,4 +43,4 @@ fi
# See also https://github.com/onecommons/unfurl/blob/main/full-requirements.txt
# requests==2.31.0 is required, see https://github.com/ansible-collections/community.docker/issues/868
pip install unfurl==1.0.0 openstacksdk==0.61 python-openstackclient==6.0.0 pymysql==1.1.0 kubernetes==24.2.0 openshift==0.13.2 docker[tls] requests==2.31.0 ansible==8.7.0 ansible-core==2.15.9
-ansible-galaxy collection install community.docker:3.9.0 kubernetes.core:3.2.0 google.cloud:1.2.0 --force
+ansible-galaxy collection install community.docker:3.9.0 kubernetes.core:3.2.0 google.cloud:1.2.0 dubzland.minio:1.2.0 --force
diff --git a/src/assets/scripts/install-xopera.sh b/src/assets/scripts/install-xopera.sh
index d4714b3d86..22d7fe268f 100755
--- a/src/assets/scripts/install-xopera.sh
+++ b/src/assets/scripts/install-xopera.sh
@@ -37,4 +37,4 @@ fi
# pyyaml==5.3.1 is required, see https://github.com/yaml/pyyaml/issues/724#issuecomment-1638587228
# requests==2.31.0 is required, see https://github.com/ansible-collections/community.docker/issues/868
pip install opera==0.6.9 openstacksdk==0.61 python-openstackclient==6.0.0 pyyaml==5.3.1 pymysql==1.1.0 ansible==8.7.0 ansible-core==2.15.9
-ansible-galaxy collection install community.docker:3.9.0 kubernetes.core:3.2.0 google.cloud:1.2.0 --force
+ansible-galaxy collection install community.docker:3.9.0 kubernetes.core:3.2.0 google.cloud:1.2.0 dubzland.minio:1.2.0 --force
diff --git a/src/normative/dialects/unfurl/core/nodes.ts b/src/normative/dialects/unfurl/core/nodes.ts
index e4673e7986..1fa52d55e3 100644
--- a/src/normative/dialects/unfurl/core/nodes.ts
+++ b/src/normative/dialects/unfurl/core/nodes.ts
@@ -120,6 +120,27 @@ const nodes: RecursivePartial = {
},
},
},
+ cache: {
+ attributes: {
+ application_endpoint: {
+ default: {
+ concat: [
+ {
+ eval: '.::application_protocol',
+ },
+ '://',
+ {
+ eval: '.::application_address',
+ },
+ ':',
+ {
+ eval: '.::application_port',
+ },
+ ],
+ },
+ },
+ },
+ },
}
export default nodes
diff --git a/src/normative/types/core/nodes.ts b/src/normative/types/core/nodes.ts
index d61a86da0d..f9aa6c4cc3 100644
--- a/src/normative/types/core/nodes.ts
+++ b/src/normative/types/core/nodes.ts
@@ -228,37 +228,59 @@ const nodes: NodeTypeMap = {
},
cache: {
derived_from: 'software.application',
+ properties: {
+ cache_name: {
+ type: 'string',
+ },
+ cache_port: {
+ type: 'string',
+ },
+ },
+ attributes: {
+ application_endpoint: {
+ type: 'string',
+ },
+ application_address: {
+ type: 'string',
+ },
+ },
},
storage: {
derived_from: 'node',
+ metadata: {
+ ...MetadataNormative(),
+ },
},
'block.storage': {
derived_from: 'storage',
+ metadata: {
+ ...MetadataNormative(),
+ },
},
'object.storage': {
derived_from: 'storage',
- },
- 'file.storage': {
- derived_from: 'storage',
- },
- bucket: {
- derived_from: 'object.storage',
metadata: {
...MetadataNormative(),
},
properties: {
- bucket_name: {
+ storage_name: {
+ type: 'string',
+ },
+ storage_dialect: {
type: 'string',
},
- bucket_dialect: {
+ storage_user: {
+ type: 'string',
+ },
+ storage_token: {
type: 'string',
},
},
attributes: {
- bucket_endpoint: {
+ storage_endpoint: {
type: 'string',
},
- bucket_token: {
+ storage_token: {
type: 'string',
},
},
@@ -271,6 +293,12 @@ const nodes: NodeTypeMap = {
},
],
},
+ 'file.storage': {
+ derived_from: 'storage',
+ metadata: {
+ ...MetadataNormative(),
+ },
+ },
ingress: {
derived_from: 'node',
metadata: {
diff --git a/src/normative/types/extended/nodes.ts b/src/normative/types/extended/nodes.ts
index 7110eb2368..aea178b36e 100644
--- a/src/normative/types/extended/nodes.ts
+++ b/src/normative/types/extended/nodes.ts
@@ -1,4 +1,5 @@
import {NodeTypeMap} from '#spec/node-type'
+import {METADATA} from '#technologies/plugins/rules/types'
import {MetadataAbstract, MetadataNormative} from '../utils'
const nodes: NodeTypeMap = {
@@ -585,6 +586,20 @@ const nodes: NodeTypeMap = {
metadata: {
...MetadataNormative(),
},
+ properties: {
+ access_key: {
+ type: 'string',
+ metadata: {
+ [METADATA.VINTNER_NAME]: 'MINIO_ROOT_USER',
+ },
+ },
+ secret_key: {
+ type: 'string',
+ metadata: {
+ [METADATA.VINTNER_NAME]: 'MINIO_ROOT_PASSWORD',
+ },
+ },
+ },
},
'redis.server': {
derived_from: 'cache',
@@ -592,12 +607,6 @@ const nodes: NodeTypeMap = {
...MetadataNormative(),
},
properties: {
- cache_name: {
- type: 'string',
- },
- cache_port: {
- type: 'string',
- },
application_protocol: {
type: 'string',
default: 'redis',
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/local-machine/ansible/index.ts b/src/technologies/plugins/rules/generators/bucket/minio/asterisk/local-machine/ansible/index.ts
deleted file mode 100644
index 1255b9b820..0000000000
--- a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/local-machine/ansible/index.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import {ImplementationGenerator} from '#technologies/plugins/rules/types'
-import {AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
-import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this
-
-const generator: ImplementationGenerator = {
- component: 'bucket',
- technology: 'ansible',
- hosting: ['minio.server', '*', 'local.machine'],
- weight: 1,
- reason: 'Primary use case due to the specialization of Ansible.',
-
- generate: (name, type) => {
- return {
- derived_from: name,
- metadata: {
- ...MetadataGenerated(),
- ...MetadataUnfurl(),
- },
- properties: {
- ...GCPProviderCredentials(),
- },
- interfaces: {
- Standard: {
- operations: {
- create: {
- implementation: {
- ...AnsibleOrchestratorOperation(),
- },
- inputs: {
- playbook: {
- q: [],
- },
- },
- },
- delete: {
- implementation: {
- ...AnsibleOrchestratorOperation(),
- },
- inputs: {
- playbook: {
- q: [],
- },
- },
- },
- },
- },
- },
- }
- },
-}
-
-export default generator
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/local-machine/index.ts b/src/technologies/plugins/rules/generators/bucket/minio/asterisk/local-machine/index.ts
deleted file mode 100644
index c76a810960..0000000000
--- a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/local-machine/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import ansible from './ansible'
-import terraform from './terraform'
-
-export default [ansible, terraform]
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/local-machine/terraform/index.ts b/src/technologies/plugins/rules/generators/bucket/minio/asterisk/local-machine/terraform/index.ts
deleted file mode 100644
index e221a48156..0000000000
--- a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/local-machine/terraform/index.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import {ImplementationGenerator} from '#technologies/plugins/rules/types'
-import {TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
-import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this, see https://registry.terraform.io/providers/aminueza/minio/latest
-
-const generator: ImplementationGenerator = {
- component: 'bucket',
- technology: 'terraform',
- hosting: ['minio.server', '*', 'local.machine'],
- weight: 1,
- reason: 'Terraform provides a declarative module.',
-
- generate: (name, type) => {
- return {
- derived_from: name,
- metadata: {
- ...MetadataGenerated(),
- ...MetadataUnfurl(),
- },
- properties: {
- ...GCPProviderCredentials(),
- },
-
- interfaces: {
- ...TerraformStandardOperations(),
- defaults: {
- inputs: {
- main: {
- terraform: [],
- provider: {},
- resource: {},
- },
- },
- },
- },
- }
- },
-}
-
-export default generator
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/remote-machine/index.ts b/src/technologies/plugins/rules/generators/bucket/minio/asterisk/remote-machine/index.ts
deleted file mode 100644
index c76a810960..0000000000
--- a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/remote-machine/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import ansible from './ansible'
-import terraform from './terraform'
-
-export default [ansible, terraform]
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/remote-machine/terraform/index.ts b/src/technologies/plugins/rules/generators/bucket/minio/asterisk/remote-machine/terraform/index.ts
deleted file mode 100644
index 712a461241..0000000000
--- a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/remote-machine/terraform/index.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import {ImplementationGenerator} from '#technologies/plugins/rules/types'
-import {TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
-import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this, see https://registry.terraform.io/providers/aminueza/minio/latest
-
-const generator: ImplementationGenerator = {
- component: 'bucket',
- technology: 'terraform',
- hosting: ['minio.server', '*', 'remote.machine'],
- weight: 1,
- reason: 'Terraform provides a declarative module.',
-
- generate: (name, type) => {
- return {
- derived_from: name,
- metadata: {
- ...MetadataGenerated(),
- ...MetadataUnfurl(),
- },
- properties: {
- ...GCPProviderCredentials(),
- },
-
- interfaces: {
- ...TerraformStandardOperations({
- GOOGLE_APPLICATION_CREDENTIALS: {
- eval: '.::gcp_service_account_file',
- },
- }),
- defaults: {
- inputs: {
- main: {
- terraform: [],
- provider: {},
- resource: {},
- },
- },
- },
- },
- }
- },
-}
-
-export default generator
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/index.ts b/src/technologies/plugins/rules/generators/bucket/minio/index.ts
deleted file mode 100644
index 6c3cd92eb1..0000000000
--- a/src/technologies/plugins/rules/generators/bucket/minio/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import asterisk from './asterisk'
-import kubernetesCluster from './kubernetes-cluster'
-
-export default [asterisk, kubernetesCluster]
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/kubernetes-cluster/ansible/index.ts b/src/technologies/plugins/rules/generators/bucket/minio/kubernetes-cluster/ansible/index.ts
deleted file mode 100644
index 1003f6d0b1..0000000000
--- a/src/technologies/plugins/rules/generators/bucket/minio/kubernetes-cluster/ansible/index.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import {ImplementationGenerator} from '#technologies/plugins/rules/types'
-import {AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
-import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this
-
-const generator: ImplementationGenerator = {
- component: 'bucket',
- technology: 'ansible',
- hosting: ['minio.server', 'kubernetes.cluster'],
- weight: 1,
- reason: 'Primary use case due to the specialization of Ansible.',
-
- generate: (name, type) => {
- return {
- derived_from: name,
- metadata: {
- ...MetadataGenerated(),
- ...MetadataUnfurl(),
- },
- properties: {
- ...GCPProviderCredentials(),
- },
- interfaces: {
- Standard: {
- operations: {
- create: {
- implementation: {
- ...AnsibleOrchestratorOperation(),
- },
- inputs: {
- playbook: {
- q: [],
- },
- },
- },
- delete: {
- implementation: {
- ...AnsibleOrchestratorOperation(),
- },
- inputs: {
- playbook: {
- q: [],
- },
- },
- },
- },
- },
- },
- }
- },
-}
-
-export default generator
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/kubernetes-cluster/index.ts b/src/technologies/plugins/rules/generators/bucket/minio/kubernetes-cluster/index.ts
deleted file mode 100644
index c76a810960..0000000000
--- a/src/technologies/plugins/rules/generators/bucket/minio/kubernetes-cluster/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import ansible from './ansible'
-import terraform from './terraform'
-
-export default [ansible, terraform]
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/kubernetes-cluster/terraform/index.ts b/src/technologies/plugins/rules/generators/bucket/minio/kubernetes-cluster/terraform/index.ts
deleted file mode 100644
index 36d7224210..0000000000
--- a/src/technologies/plugins/rules/generators/bucket/minio/kubernetes-cluster/terraform/index.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import {ImplementationGenerator} from '#technologies/plugins/rules/types'
-import {TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
-import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this, see https://registry.terraform.io/providers/aminueza/minio/latest
-
-const generator: ImplementationGenerator = {
- component: 'bucket',
- technology: 'terraform',
- hosting: ['minio.server', 'kubernetes.cluster'],
- weight: 1,
- reason: 'Terraform provides a declarative module.',
-
- generate: (name, type) => {
- return {
- derived_from: name,
- metadata: {
- ...MetadataGenerated(),
- ...MetadataUnfurl(),
- },
- properties: {
- ...GCPProviderCredentials(),
- },
-
- interfaces: {
- ...TerraformStandardOperations({
- GOOGLE_APPLICATION_CREDENTIALS: {
- eval: '.::gcp_service_account_file',
- },
- }),
- defaults: {
- inputs: {
- main: {
- terraform: [],
- provider: {},
- resource: {},
- },
- },
- },
- },
- }
- },
-}
-
-export default generator
diff --git a/src/technologies/plugins/rules/generators/index.ts b/src/technologies/plugins/rules/generators/index.ts
index d2eb48eb8b..babcd11e98 100644
--- a/src/technologies/plugins/rules/generators/index.ts
+++ b/src/technologies/plugins/rules/generators/index.ts
@@ -1,16 +1,16 @@
-import bucket from './bucket'
import dockerEngine from './docker-engine'
import gcpService from './gcp-service'
import ingress from './ingress'
import mysqlDatabase from './mysql-database'
import mysqlDBMS from './mysql-dbms'
+import objectStorage from './object-storage'
import redisServer from './redis-server'
import serviceApplication from './service-application'
import softwareApplication from './software-application'
import virtualMachine from './virtual-machine'
export default [
- bucket,
+ objectStorage,
dockerEngine,
gcpService,
ingress,
diff --git a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/local-machine/compose/index.ts b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/local-machine/compose/index.ts
index 7df671b19e..33eca7c713 100644
--- a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/local-machine/compose/index.ts
+++ b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/local-machine/compose/index.ts
@@ -8,8 +8,6 @@ import {
} from '#technologies/plugins/rules/utils/ansible'
import {MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-// TODO: we assume that dbms is exposed
-
const generator: ImplementationGenerator = {
component: 'mysql.database',
technology: 'compose',
@@ -39,7 +37,7 @@ const generator: ImplementationGenerator = {
job: {
container_name:
'{{ SELF.database_name }}-{{ HOST.dbms_name }}-database-job',
- image: 'mysql:{{ HOST.dbms_version }}',
+ image: 'mysql:{{ ".artifacts::dbms_image::file" | eval }}',
network_mode: 'host',
command: [
'mysql',
@@ -59,7 +57,7 @@ const generator: ImplementationGenerator = {
...AnsibleApplyComposeTask(),
},
{
- name: 'give job some time',
+ name: 'let it cook',
'ansible.builtin.pause': {
seconds: 10,
},
diff --git a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/local-machine/terraform/index.ts b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/local-machine/terraform/index.ts
index 23cb4084fd..404c9d7db6 100644
--- a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/local-machine/terraform/index.ts
+++ b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/local-machine/terraform/index.ts
@@ -2,8 +2,6 @@ import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
import {MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-// TODO: we assume that dbms is exposed
-
const generator: ImplementationGenerator = {
component: 'mysql.database',
technology: 'terraform',
diff --git a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/remote-machine/compose/index.ts b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/remote-machine/compose/index.ts
index bcfeb3a948..7691cfd35e 100644
--- a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/remote-machine/compose/index.ts
+++ b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/remote-machine/compose/index.ts
@@ -7,8 +7,6 @@ import {
} from '#technologies/plugins/rules/utils/ansible'
import {MetadataGenerated, MetadataUnfurl, OpenstackMachineHost} from '#technologies/plugins/rules/utils/utils'
-// TODO: we assume that dbms is exposed
-
const generator: ImplementationGenerator = {
component: 'mysql.database',
technology: 'compose',
@@ -38,7 +36,7 @@ const generator: ImplementationGenerator = {
services: {
job: {
container_name: '{{ SELF.database_name }}-{{ HOST.dbms_name }}-database-job',
- image: 'mysql:{{ HOST.dbms_version }}',
+ image: 'mysql:{{ ".artifacts::dbms_image::file" | eval }}',
network_mode: 'host',
command: [
'mysql',
@@ -64,7 +62,7 @@ const generator: ImplementationGenerator = {
},
},
{
- name: 'give job some time',
+ name: 'let it cook',
'ansible.builtin.pause': {
seconds: 10,
},
diff --git a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/remote-machine/terraform/index.ts b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/remote-machine/terraform/index.ts
index 618a6b8922..dc1f81fb91 100644
--- a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/remote-machine/terraform/index.ts
+++ b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/docker-engine/remote-machine/terraform/index.ts
@@ -7,8 +7,6 @@ import {
OpenstackMachineHost,
} from '#technologies/plugins/rules/utils/utils'
-// TODO: we assume that dbms is exposed
-
const generator: ImplementationGenerator = {
component: 'mysql.database',
technology: 'terraform',
diff --git a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/kubernetes-cluster/ansible/index.ts b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/kubernetes-cluster/ansible/index.ts
index d6eb93b9aa..75096bcadd 100644
--- a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/kubernetes-cluster/ansible/index.ts
+++ b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/kubernetes-cluster/ansible/index.ts
@@ -7,6 +7,8 @@ import {
MetadataUnfurl,
} from '#technologies/plugins/rules/utils/utils'
+// TODO: delete operation
+
const generator: ImplementationGenerator = {
component: 'mysql.database',
technology: 'ansible',
diff --git a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/kubernetes-cluster/kubernetes/index.ts b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/kubernetes-cluster/kubernetes/index.ts
index d9c40c48f3..5c259de6a2 100644
--- a/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/kubernetes-cluster/kubernetes/index.ts
+++ b/src/technologies/plugins/rules/generators/mysql-database/mysql-dbms/kubernetes-cluster/kubernetes/index.ts
@@ -44,7 +44,7 @@ const generator: ImplementationGenerator = {
containers: [
{
name: '{{ SELF.database_name }}-{{ HOST.dbms_name }}',
- image: 'mysql:{{ HOST.dbms_version }}',
+ image: 'mysql:{{ ".artifacts::dbms_image::file" | eval }}',
command: [
'mysql',
'--host={{ HOST.management_address }}',
diff --git a/src/technologies/plugins/rules/generators/bucket/gcp-cloudstorage/ansible/index.ts b/src/technologies/plugins/rules/generators/object-storage/gcp-cloudstorage/ansible/index.ts
similarity index 54%
rename from src/technologies/plugins/rules/generators/bucket/gcp-cloudstorage/ansible/index.ts
rename to src/technologies/plugins/rules/generators/object-storage/gcp-cloudstorage/ansible/index.ts
index 2bb6a8c808..860cf90010 100644
--- a/src/technologies/plugins/rules/generators/bucket/gcp-cloudstorage/ansible/index.ts
+++ b/src/technologies/plugins/rules/generators/object-storage/gcp-cloudstorage/ansible/index.ts
@@ -2,10 +2,8 @@ import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-// TODO: next: implement this, see https://docs.ansible.com/ansible/latest/collections/google/cloud/gcp_storage_object_module.html
-
const generator: ImplementationGenerator = {
- component: 'bucket',
+ component: 'object.storage',
technology: 'ansible',
hosting: ['gcp.cloudstorage'],
weight: 1,
@@ -21,6 +19,22 @@ const generator: ImplementationGenerator = {
properties: {
...GCPProviderCredentials(),
},
+ attributes: {
+ // TODO: connectivity
+ storage_endpoint: {
+ type: 'string',
+ default: '{{ SELF.storage_name }}',
+ },
+ // TODO: auth
+ storage_token: {
+ type: 'string',
+ default: '',
+ },
+ storage_dialect: {
+ type: 'string',
+ default: 'gcp',
+ },
+ },
interfaces: {
Standard: {
operations: {
@@ -36,7 +50,17 @@ const generator: ImplementationGenerator = {
},
inputs: {
playbook: {
- q: [],
+ q: [
+ // https://docs.ansible.com/ansible/latest/collections/google/cloud/gcp_storage_bucket_module.html#ansible-collections-google-cloud-gcp-storage-bucket-module
+ {
+ name: 'create bucket',
+ 'google.cloud.gcp_storage_bucket': {
+ name: '{{ SELF.storage_name }}',
+ location: 'EU',
+ project: '{{ SELF.gcp_project }}',
+ },
+ },
+ ],
},
},
},
@@ -52,7 +76,16 @@ const generator: ImplementationGenerator = {
},
inputs: {
playbook: {
- q: [],
+ q: [
+ {
+ name: 'delete bucket',
+ 'google.cloud.gcp_storage_bucket': {
+ name: '{{ SELF.storage_name }}',
+ project: '{{ SELF.gcp_project }}',
+ state: 'absent',
+ },
+ },
+ ],
},
},
},
diff --git a/src/technologies/plugins/rules/generators/bucket/gcp-cloudstorage/index.ts b/src/technologies/plugins/rules/generators/object-storage/gcp-cloudstorage/index.ts
similarity index 100%
rename from src/technologies/plugins/rules/generators/bucket/gcp-cloudstorage/index.ts
rename to src/technologies/plugins/rules/generators/object-storage/gcp-cloudstorage/index.ts
diff --git a/src/technologies/plugins/rules/generators/bucket/gcp-cloudstorage/terraform/index.ts b/src/technologies/plugins/rules/generators/object-storage/gcp-cloudstorage/terraform/index.ts
similarity index 66%
rename from src/technologies/plugins/rules/generators/bucket/gcp-cloudstorage/terraform/index.ts
rename to src/technologies/plugins/rules/generators/object-storage/gcp-cloudstorage/terraform/index.ts
index 1810a7829f..e1687ae4bf 100644
--- a/src/technologies/plugins/rules/generators/bucket/gcp-cloudstorage/terraform/index.ts
+++ b/src/technologies/plugins/rules/generators/object-storage/gcp-cloudstorage/terraform/index.ts
@@ -2,10 +2,8 @@ import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-// TODO: next: implement this, see https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket
-
const generator: ImplementationGenerator = {
- component: 'bucket',
+ component: 'object.storage',
technology: 'terraform',
hosting: ['gcp.cloudstorage'],
weight: 1,
@@ -21,7 +19,22 @@ const generator: ImplementationGenerator = {
properties: {
...GCPProviderCredentials(),
},
-
+ attributes: {
+ // TODO: connectivity
+ storage_endpoint: {
+ type: 'string',
+ default: '{{ SELF.storage_name }}',
+ },
+ // TODO: auth
+ storage_token: {
+ type: 'string',
+ default: '',
+ },
+ storage_dialect: {
+ type: 'string',
+ default: 'gcp',
+ },
+ },
interfaces: {
...TerraformStandardOperations({
GOOGLE_APPLICATION_CREDENTIALS: {
@@ -39,10 +52,6 @@ const generator: ImplementationGenerator = {
source: 'hashicorp/google',
version: '5.39.1',
},
- mysql: {
- source: 'petoju/mysql',
- version: '3.0.48',
- },
},
],
},
@@ -56,7 +65,18 @@ const generator: ImplementationGenerator = {
},
],
},
- resource: {},
+ resource: {
+ // https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/storage_bucket
+ google_storage_bucket: {
+ bucket: [
+ {
+ name: '{{ SELF.storage_name }}',
+ location: 'EU',
+ force_destroy: true,
+ },
+ ],
+ },
+ },
},
},
},
diff --git a/src/technologies/plugins/rules/generators/bucket/index.ts b/src/technologies/plugins/rules/generators/object-storage/index.ts
similarity index 100%
rename from src/technologies/plugins/rules/generators/bucket/index.ts
rename to src/technologies/plugins/rules/generators/object-storage/index.ts
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/index.ts
similarity index 100%
rename from src/technologies/plugins/rules/generators/bucket/minio/asterisk/index.ts
rename to src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/index.ts
diff --git a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/remote-machine/ansible/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/ansible/index.ts
similarity index 75%
rename from src/technologies/plugins/rules/generators/bucket/minio/asterisk/remote-machine/ansible/index.ts
rename to src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/ansible/index.ts
index 75fe24f13d..3cee2a6d6e 100644
--- a/src/technologies/plugins/rules/generators/bucket/minio/asterisk/remote-machine/ansible/index.ts
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/ansible/index.ts
@@ -1,13 +1,15 @@
+import {
+ AnsibleCreateBucketTasks,
+ AnsibleDeleteBucketTasks,
+} from '#technologies/plugins/rules/generators/object-storage/minio/utils'
import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
-import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this
+import {MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
const generator: ImplementationGenerator = {
- component: 'bucket',
+ component: 'object.storage',
technology: 'ansible',
- hosting: ['minio.server', '*', 'remote.machine'],
+ hosting: ['minio.server', 'docker.engine', 'local.machine'],
weight: 1,
reason: 'Primary use case due to the specialization of Ansible.',
@@ -18,9 +20,6 @@ const generator: ImplementationGenerator = {
...MetadataGenerated(),
...MetadataUnfurl(),
},
- properties: {
- ...GCPProviderCredentials(),
- },
interfaces: {
Standard: {
operations: {
@@ -30,7 +29,7 @@ const generator: ImplementationGenerator = {
},
inputs: {
playbook: {
- q: [],
+ q: AnsibleCreateBucketTasks(),
},
},
},
@@ -40,7 +39,7 @@ const generator: ImplementationGenerator = {
},
inputs: {
playbook: {
- q: [],
+ q: AnsibleDeleteBucketTasks(),
},
},
},
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/compose/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/compose/index.ts
new file mode 100644
index 0000000000..a9de6ebfe8
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/compose/index.ts
@@ -0,0 +1,87 @@
+import {BashCreateBucket, BashDeleteBucket} from '#technologies/plugins/rules/generators/object-storage/minio/utils'
+import {ImplementationGenerator} from '#technologies/plugins/rules/types'
+import {
+ AnsibleApplyComposeTask,
+ AnsibleCreateComposeTask,
+ AnsibleOrchestratorOperation,
+ AnsibleTouchComposeTask,
+ AnsibleUnapplyComposeTask,
+} from '#technologies/plugins/rules/utils/ansible'
+import {MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
+
+const generator: ImplementationGenerator = {
+ component: 'object.storage',
+ technology: 'compose',
+ hosting: ['minio.server', 'docker.engine', 'local.machine'],
+ weight: 0,
+ reason: 'One-time use docker container ("fake Kubernetes job") with imperative parts, while other technologies provide declarative modules.',
+
+ generate: (name, type) => {
+ const Operation = (command: string) => {
+ const job = '{{ SELF.storage_name }}-{{ HOST.cache_name }}'
+
+ return {
+ implementation: {
+ ...AnsibleOrchestratorOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ {
+ ...AnsibleTouchComposeTask({
+ suffix: `${job}.database.compose.yaml`,
+ }),
+ },
+ {
+ ...AnsibleCreateComposeTask({
+ manifest: {
+ name: job,
+ services: {
+ job: {
+ container_name: job,
+ // TODO: the image tags do not match
+ image: 'minio/mc:{{ ".artifacts::cache_image::file" | eval }}',
+ network_mode: 'host',
+ command: ['/bin/bash', '-c', command],
+ },
+ },
+ },
+ }),
+ },
+ {
+ ...AnsibleApplyComposeTask(),
+ },
+ {
+ name: 'let it cook',
+ 'ansible.builtin.pause': {
+ seconds: 10,
+ },
+ },
+ {
+ ...AnsibleUnapplyComposeTask(),
+ },
+ ],
+ },
+ },
+ }
+ }
+
+ return {
+ derived_from: name,
+ metadata: {
+ ...MetadataGenerated(),
+ ...MetadataUnfurl(),
+ },
+ interfaces: {
+ Standard: {
+ operations: {
+ create: Operation(BashCreateBucket()),
+ delete: Operation(BashDeleteBucket()),
+ },
+ },
+ },
+ }
+ },
+}
+
+export default generator
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/index.ts
new file mode 100644
index 0000000000..644370664b
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/index.ts
@@ -0,0 +1,5 @@
+import ansible from './ansible'
+import compose from './compose'
+import terraform from './terraform'
+
+export default [ansible, compose, terraform]
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/terraform/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/terraform/index.ts
new file mode 100644
index 0000000000..198e1d4038
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/local-machine/terraform/index.ts
@@ -0,0 +1,51 @@
+import {
+ TerraformMinioProviderConfiguration,
+ TerraformMinioProviderImport,
+ TerraformMinoBucketResources,
+} from '#technologies/plugins/rules/generators/object-storage/minio/utils'
+import {ImplementationGenerator} from '#technologies/plugins/rules/types'
+import {TerraformRequiredVersion, TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
+import {MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
+
+const generator: ImplementationGenerator = {
+ component: 'object.storage',
+ technology: 'terraform',
+ hosting: ['minio.server', 'docker.engine', 'local.machine'],
+ weight: 1,
+ reason: 'Terraform provides a declarative module.',
+
+ generate: (name, type) => {
+ return {
+ derived_from: name,
+ metadata: {
+ ...MetadataGenerated(),
+ ...MetadataUnfurl(),
+ },
+ interfaces: {
+ ...TerraformStandardOperations(),
+ defaults: {
+ inputs: {
+ main: {
+ terraform: [
+ {
+ required_providers: [
+ {
+ minio: TerraformMinioProviderImport(),
+ },
+ ],
+ ...TerraformRequiredVersion(),
+ },
+ ],
+ provider: {
+ minio: [TerraformMinioProviderConfiguration()],
+ },
+ resource: TerraformMinoBucketResources(),
+ },
+ },
+ },
+ },
+ }
+ },
+}
+
+export default generator
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/ansible/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/ansible/index.ts
new file mode 100644
index 0000000000..2e21ca5f21
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/ansible/index.ts
@@ -0,0 +1,72 @@
+import {
+ AnsibleCreateBucketTasks,
+ AnsibleDeleteBucketTasks,
+} from '#technologies/plugins/rules/generators/object-storage/minio/utils'
+import {ImplementationGenerator} from '#technologies/plugins/rules/types'
+import {
+ AnsibleHostOperation,
+ AnsibleHostOperationPlaybookArgs,
+ AnsibleWaitForSSHTask,
+} from '#technologies/plugins/rules/utils/ansible'
+import {MetadataGenerated, MetadataUnfurl, OpenstackMachineHost} from '#technologies/plugins/rules/utils/utils'
+
+const generator: ImplementationGenerator = {
+ component: 'object.storage',
+ technology: 'ansible',
+ hosting: ['minio.server', 'docker.engine', 'remote.machine'],
+ weight: 1,
+ reason: 'Primary use case due to the specialization of Ansible.',
+
+ generate: (name, type) => {
+ return {
+ derived_from: name,
+ metadata: {
+ ...MetadataGenerated(),
+ ...MetadataUnfurl(),
+ },
+ properties: {
+ ...OpenstackMachineHost(),
+ },
+ interfaces: {
+ Standard: {
+ operations: {
+ create: {
+ implementation: {
+ ...AnsibleHostOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ {
+ ...AnsibleWaitForSSHTask(),
+ },
+ ...AnsibleCreateBucketTasks(),
+ ],
+ },
+ playbookArgs: [...AnsibleHostOperationPlaybookArgs()],
+ },
+ },
+ delete: {
+ implementation: {
+ ...AnsibleHostOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ {
+ ...AnsibleWaitForSSHTask(),
+ },
+ ...AnsibleDeleteBucketTasks(),
+ ],
+ },
+ playbookArgs: [...AnsibleHostOperationPlaybookArgs()],
+ },
+ },
+ },
+ },
+ },
+ }
+ },
+}
+
+export default generator
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/compose/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/compose/index.ts
new file mode 100644
index 0000000000..38b8e2ca8f
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/compose/index.ts
@@ -0,0 +1,121 @@
+import {BashCreateBucket, BashDeleteBucket} from '#technologies/plugins/rules/generators/object-storage/minio/utils'
+import {ImplementationGenerator} from '#technologies/plugins/rules/types'
+import {
+ AnsibleApplyComposeTask,
+ AnsibleDockerHostEnvironment,
+ AnsibleOrchestratorOperation,
+ AnsibleUnapplyComposeTask,
+} from '#technologies/plugins/rules/utils/ansible'
+import {MetadataGenerated, MetadataUnfurl, OpenstackMachineHost} from '#technologies/plugins/rules/utils/utils'
+
+const generator: ImplementationGenerator = {
+ component: 'object.storage',
+ technology: 'compose',
+ hosting: ['minio.server', 'docker.engine', 'remote.machine'],
+ weight: 0,
+ reason: 'One-time use docker container ("fake Kubernetes job") with imperative parts, while other technologies provide declarative modules.',
+
+ generate: (name, type) => {
+ const job = '{{ SELF.storage_name }}-{{ HOST.cache_name }}'
+
+ const AnsibleTouchJobTask = {
+ name: 'touch compose',
+ register: 'compose',
+ 'ansible.builtin.tempfile': {
+ suffix: `${job}.database.compose.yaml`,
+ },
+ }
+
+ const AnsibleCreateJobTask = (command: string) => {
+ return {
+ name: 'create compose',
+ 'ansible.builtin.copy': {
+ dest: '{{ compose.path }}',
+ content: '{{ manifest | to_yaml }}',
+ },
+ vars: {
+ manifest: {
+ name: job,
+ services: {
+ job: {
+ container_name: job,
+ // TODO: the image tags do not match
+ image: 'minio/mc:{{ ".artifacts::cache_image::file" | eval }}',
+ network_mode: 'host',
+ command: ['/bin/bash', '-c', command],
+ },
+ },
+ },
+ },
+ }
+ }
+
+ const AnsibleApplyJobTasks = [
+ {
+ ...AnsibleApplyComposeTask(),
+ environment: {
+ ...AnsibleDockerHostEnvironment(),
+ },
+ },
+ {
+ name: 'let it cook',
+ 'ansible.builtin.pause': {
+ seconds: 10,
+ },
+ },
+ {
+ ...AnsibleUnapplyComposeTask(),
+ environment: {
+ ...AnsibleDockerHostEnvironment(),
+ },
+ },
+ ]
+
+ return {
+ derived_from: name,
+ metadata: {
+ ...MetadataGenerated(),
+ ...MetadataUnfurl(),
+ },
+ properties: {
+ ...OpenstackMachineHost(),
+ },
+ interfaces: {
+ Standard: {
+ operations: {
+ create: {
+ implementation: {
+ ...AnsibleOrchestratorOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ AnsibleTouchJobTask,
+ AnsibleCreateJobTask(BashCreateBucket()),
+ ...AnsibleApplyJobTasks,
+ ],
+ },
+ },
+ },
+ delete: {
+ implementation: {
+ ...AnsibleOrchestratorOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ AnsibleTouchJobTask,
+ AnsibleCreateJobTask(BashDeleteBucket()),
+ ...AnsibleApplyJobTasks,
+ ],
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ },
+}
+
+export default generator
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/index.ts
new file mode 100644
index 0000000000..644370664b
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/index.ts
@@ -0,0 +1,5 @@
+import ansible from './ansible'
+import compose from './compose'
+import terraform from './terraform'
+
+export default [ansible, compose, terraform]
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/terraform/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/terraform/index.ts
new file mode 100644
index 0000000000..b29cc3cd06
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/docker-engine/remote-machine/terraform/index.ts
@@ -0,0 +1,90 @@
+import {
+ TerraformMinioProviderConfiguration,
+ TerraformMinioProviderImport,
+ TerraformMinoBucketResources,
+} from '#technologies/plugins/rules/generators/object-storage/minio/utils'
+import {ImplementationGenerator} from '#technologies/plugins/rules/types'
+import {TerraformRequiredVersion, TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
+import {
+ MetadataGenerated,
+ MetadataUnfurl,
+ OpenstackMachineCredentials,
+ OpenstackMachineHost,
+} from '#technologies/plugins/rules/utils/utils'
+
+const generator: ImplementationGenerator = {
+ component: 'object.storage',
+ technology: 'terraform',
+ hosting: ['minio.server', 'docker.engine', 'remote.machine'],
+ weight: 0.5,
+ reason: 'Terraform provides a declarative module. However, Terraform requires an SSH workaround. Ansible is more specialized.',
+
+ generate: (name, type) => {
+ return {
+ derived_from: name,
+ metadata: {
+ ...MetadataGenerated(),
+ ...MetadataUnfurl(),
+ },
+ properties: {
+ ...OpenstackMachineCredentials(),
+ ...OpenstackMachineHost(),
+ },
+ interfaces: {
+ ...TerraformStandardOperations(),
+ defaults: {
+ inputs: {
+ main: {
+ terraform: [
+ {
+ required_providers: [
+ {
+ minio: TerraformMinioProviderImport(),
+ ssh: {
+ source: 'AndrewChubatiuk/ssh',
+ version: '0.2.3',
+ },
+ },
+ ],
+ ...TerraformRequiredVersion(),
+ },
+ ],
+ data: {
+ ssh_tunnel: {
+ mysql: [
+ {
+ remote: {
+ host: '{{ HOST.application_address }}',
+ port: '{{ HOST.application_port }}',
+ },
+ },
+ ],
+ },
+ },
+ provider: {
+ minio: [TerraformMinioProviderConfiguration()],
+ ssh: [
+ {
+ auth: {
+ private_key: {
+ content: '${file(pathexpand("{{ SELF.os_ssh_key_file }}"))}',
+ },
+ },
+ server: {
+ host: '{{ HOST.management_address }}',
+ port: 22,
+ },
+ user: '{{ SELF.os_ssh_user }}',
+ },
+ ],
+ },
+ resource: TerraformMinoBucketResources(),
+ },
+ },
+ },
+ },
+ }
+ },
+}
+
+export default generator
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/index.ts
new file mode 100644
index 0000000000..dce543f85a
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/index.ts
@@ -0,0 +1,4 @@
+import dockerEngine from './docker-engine'
+import kubernetesCluster from './kubernetes-cluster'
+
+export default [dockerEngine, kubernetesCluster]
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/ansible/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/ansible/index.ts
new file mode 100644
index 0000000000..99728aa64f
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/ansible/index.ts
@@ -0,0 +1,113 @@
+import {
+ AnsibleCreateBucketTasks,
+ AnsibleDeleteBucketTasks,
+} from '#technologies/plugins/rules/generators/object-storage/minio/utils'
+import {ImplementationGenerator} from '#technologies/plugins/rules/types'
+import {AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
+import {
+ BASH_KUBECTL,
+ KubernetesCredentials,
+ MetadataGenerated,
+ MetadataUnfurl,
+} from '#technologies/plugins/rules/utils/utils'
+
+const generator: ImplementationGenerator = {
+ component: 'object.storage',
+ technology: 'ansible',
+ hosting: ['minio.server', 'kubernetes.cluster'],
+ weight: 1,
+ reason: 'Primary use case due to the specialization of Ansible.',
+
+ generate: (name, type) => {
+ return {
+ derived_from: name,
+ metadata: {
+ ...MetadataGenerated(),
+ ...MetadataUnfurl(),
+ },
+ properties: {
+ ...KubernetesCredentials(),
+ },
+ interfaces: {
+ Standard: {
+ operations: {
+ create: {
+ implementation: {
+ ...AnsibleOrchestratorOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ {
+ name: 'create bucket',
+ block: [
+ {
+ name: 'forward port',
+ 'ansible.builtin.shell': `${BASH_KUBECTL} port-forward service/{{ HOST.cache_name }} {{ HOST.cache_port }}:{{ HOST.cache_port }}`,
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ async: 30,
+ poll: 0,
+ },
+ ...AnsibleCreateBucketTasks(),
+ ],
+ always: [
+ {
+ name: 'unforward port',
+ 'ansible.builtin.shell':
+ 'pkill -f "port-forward service/{{ HOST.cache_name }}"',
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ },
+ ],
+ },
+ ],
+ },
+ },
+ },
+ delete: {
+ implementation: {
+ ...AnsibleOrchestratorOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ {
+ name: 'delete bucket',
+ block: [
+ {
+ name: 'forward port',
+ 'ansible.builtin.shell': `${BASH_KUBECTL} port-forward service/{{ HOST.cache_name }} {{ HOST.cache_port }}:{{ HOST.cache_port }}`,
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ async: 30,
+ poll: 0,
+ },
+ ...AnsibleDeleteBucketTasks(),
+ ],
+ always: [
+ {
+ name: 'unforward port',
+ 'ansible.builtin.shell':
+ 'pkill -f "port-forward service/{{ HOST.cache_name }}"',
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ },
+ ],
+ },
+ ],
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ },
+}
+
+export default generator
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/index.ts
new file mode 100644
index 0000000000..35c3ebcc2f
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/index.ts
@@ -0,0 +1,5 @@
+import ansible from './ansible'
+import kubernetes from './kubernetes'
+import terraform from './terraform'
+
+export default [ansible, kubernetes, terraform]
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/kubernetes/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/kubernetes/index.ts
new file mode 100644
index 0000000000..df4644ecd8
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/kubernetes/index.ts
@@ -0,0 +1,135 @@
+import {BashCreateBucket, BashDeleteBucket} from '#technologies/plugins/rules/generators/object-storage/minio/utils'
+import {ImplementationGenerator} from '#technologies/plugins/rules/types'
+import {AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
+import {
+ BASH_KUBECTL,
+ KubernetesCredentials,
+ MetadataGenerated,
+ MetadataUnfurl,
+} from '#technologies/plugins/rules/utils/utils'
+
+const generator: ImplementationGenerator = {
+ component: 'object.storage',
+ technology: 'kubernetes',
+ hosting: ['minio.server', 'kubernetes.cluster'],
+ weight: 0,
+ reason: 'Kubernetes Job with imperative parts, while declarative other technologies provide declarative modules.',
+
+ generate: (name, type) => {
+ const job = '{{ SELF.storage_name }}-{{ HOST.cache_name }}'
+
+ const AnsibleTouchJobTask = {
+ name: 'touch manifest',
+ register: 'manifest',
+ 'ansible.builtin.tempfile': {
+ suffix: `${job}.object-storage.manifest.yaml`,
+ },
+ }
+
+ const AnsibleCreateJobTask = (command: string) => {
+ return {
+ name: 'create manifest',
+ 'ansible.builtin.copy': {
+ dest: '{{ manifest.path }}',
+ content: '{{ job | to_yaml }}',
+ },
+ vars: {
+ job: {
+ apiVersion: 'batch/v1',
+ kind: 'Job',
+ metadata: {
+ name: job,
+ },
+ spec: {
+ template: {
+ spec: {
+ restartPolicy: 'Never',
+ containers: [
+ {
+ name: job,
+ // TODO: the image tags do not match
+ image: 'minio/mc:{{ ".artifacts::cache_image::file" | eval }}',
+ command: ['/bin/bash', '-c', command],
+ },
+ ],
+ },
+ },
+ },
+ },
+ },
+ }
+ }
+
+ const AnsibleApplyJobTasks = [
+ {
+ name: 'apply manifest',
+ 'ansible.builtin.shell': `${BASH_KUBECTL} apply -f {{ manifest.path }}`,
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ },
+ {
+ name: 'wait for deployment',
+ 'ansible.builtin.shell': `${BASH_KUBECTL} wait --for=condition=complete --timeout=30s job/${job}`,
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ },
+
+ {
+ name: 'cleanup',
+ 'ansible.builtin.shell': `${BASH_KUBECTL} delete -f {{ manifest.path }}`,
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ },
+ ]
+
+ return {
+ derived_from: name,
+ metadata: {
+ ...MetadataGenerated(),
+ ...MetadataUnfurl(),
+ },
+ properties: {
+ ...KubernetesCredentials(),
+ },
+ interfaces: {
+ Standard: {
+ operations: {
+ create: {
+ implementation: {
+ ...AnsibleOrchestratorOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ AnsibleTouchJobTask,
+ AnsibleCreateJobTask(BashCreateBucket()),
+ ...AnsibleApplyJobTasks,
+ ],
+ },
+ },
+ },
+ delete: {
+ implementation: {
+ ...AnsibleOrchestratorOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ AnsibleTouchJobTask,
+ AnsibleCreateJobTask(BashDeleteBucket()),
+ ...AnsibleApplyJobTasks,
+ ],
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ },
+}
+
+export default generator
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/terraform/index.ts b/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/terraform/index.ts
new file mode 100644
index 0000000000..3c0cd6d698
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/kubernetes-cluster/terraform/index.ts
@@ -0,0 +1,73 @@
+import {TerraformMinoBucketResources} from '#technologies/plugins/rules/generators/object-storage/minio/utils'
+import {ImplementationGenerator} from '#technologies/plugins/rules/types'
+import {TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
+import {
+ BASH_KUBECTL,
+ KubernetesCredentials,
+ MetadataGenerated,
+ MetadataUnfurl,
+} from '#technologies/plugins/rules/utils/utils'
+
+const generator: ImplementationGenerator = {
+ component: 'object.storage',
+ technology: 'terraform',
+ hosting: ['minio.server', 'kubernetes.cluster'],
+ weight: 0,
+ reason: 'Ansible is more specialized.',
+
+ generate: (name, type) => {
+ return {
+ derived_from: name,
+ metadata: {
+ ...MetadataGenerated(),
+ ...MetadataUnfurl(),
+ },
+ properties: {
+ ...KubernetesCredentials(),
+ },
+ interfaces: {
+ ...TerraformStandardOperations(),
+ defaults: {
+ inputs: {
+ main: {
+ terraform: [],
+ provider: {},
+ resource: {
+ terraform_data: {
+ forward_port: [
+ {
+ input: '127.0.0.1:{{ HOST.cache_port }}',
+ provisioner: {
+ 'local-exec': {
+ command: [
+ `(nohup ${BASH_KUBECTL} port-forward service/{{ HOST.cache_name }} {{ HOST.cache_port }}:{{ HOST.cache_port }} > /dev/null 2>&1 &)`,
+ 'sleep 5s',
+ ].join('\n'),
+ interpreter: ['/bin/bash', '-c'],
+ },
+ },
+ },
+ ],
+ unforward_port: [
+ {
+ depends_on: ['minio_iam_policy.policy'],
+ provisioner: {
+ 'local-exec': {
+ command: `pkill -f "port-forward service/{{ HOST.cache_name }}"`,
+ interpreter: ['/bin/bash', '-c'],
+ },
+ },
+ },
+ ],
+ },
+ ...TerraformMinoBucketResources(),
+ },
+ },
+ },
+ },
+ },
+ }
+ },
+}
+
+export default generator
diff --git a/src/technologies/plugins/rules/generators/object-storage/minio/utils.ts b/src/technologies/plugins/rules/generators/object-storage/minio/utils.ts
new file mode 100644
index 0000000000..e1c5a3b460
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/object-storage/minio/utils.ts
@@ -0,0 +1,148 @@
+export function BashCreateBucket() {
+ return [
+ 'mc alias set minio {{ HOST.application_endpoint }} {{ HOST.access_key }} {{ HOST.secret_key }}',
+ 'mc mb minio/{{ SELF.storage_name }}',
+ 'mc admin user add minio {{ SELF.storage_user }} {{ SELF.storage_token }}',
+ 'mc admin policy attach minio readwrite user={{ SELF.storage_user }}',
+ ].join(' && ')
+}
+
+export function BashDeleteBucket() {
+ return [
+ 'mc alias set minio {{ HOST.application_endpoint }} {{ HOST.access_key }} {{ HOST.secret_key }}',
+ 'mc admin policy detach minio readwrite user={{ SELF.storage_user }}',
+ 'mc admin user rm minio {{ SELF.storage_user }}',
+ 'mc rm --recursive minio/{{ SELF.storage_name }}',
+ ].join(` && `)
+}
+
+export function AnsibleCreateBucketTasks() {
+ const auth = {
+ access_key: '{{ HOST.access_key }}',
+ secret_key: '{{ HOST.secret_key }}',
+ url: '{{ HOST.application_endpoint }}',
+ }
+
+ return [
+ // https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_bucket/?version=1.2.0
+ {
+ name: 'create bucket',
+ 'dubzland.minio.minio_bucket': {
+ name: '{{ SELF.storage_name }}',
+ auth,
+ },
+ },
+ // https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_user/?version=1.2.0
+ {
+ name: 'create user',
+ 'dubzland.minio.minio_user': {
+ access_key: '{{ SELF.storage_user }}',
+ secret_key: '{{ SELF.storage_token }}',
+ auth,
+ },
+ },
+ // https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_policy/?version=1.2.0
+ {
+ name: 'create policy',
+ 'dubzland.minio.minio_policy': {
+ name: '{{ SELF.user_name }}',
+ statements: [
+ {
+ effect: 'Allow',
+ action: 's3:*',
+ resource: 'arn:aws:s3:::*',
+ },
+ ],
+ auth,
+ },
+ },
+ ]
+}
+
+export function AnsibleDeleteBucketTasks() {
+ const auth = {
+ access_key: '{{ HOST.access_key }}',
+ secret_key: '{{ HOST.secret_key }}',
+ url: '{{ HOST.application_endpoint }}',
+ }
+
+ return [
+ {
+ name: 'delete policy',
+ 'dubzland.minio.minio_policy': {
+ name: '{{ SELF.user_name }}',
+ statements: [
+ {
+ effect: 'Allow',
+ action: 's3:*',
+ resource: 'arn:aws:s3:::*',
+ },
+ ],
+ auth,
+ state: 'absent',
+ },
+ },
+ {
+ name: 'delete user',
+ 'dubzland.minio.minio_user': {
+ access_key: '{{ SELF.storage_user }}',
+ secret_key: '{{ SELF.storage_token }}',
+ auth,
+ state: 'absent',
+ },
+ },
+ {
+ name: 'delete bucket',
+ 'dubzland.minio.minio_bucket': {
+ name: '{{ SELF.storage_name }}',
+ auth,
+ state: 'absent',
+ },
+ },
+ ]
+}
+
+export function TerraformMinioProviderImport() {
+ return {
+ source: 'aminueza/minio',
+ version: '2.5.0',
+ }
+}
+
+export function TerraformMinioProviderConfiguration() {
+ return {
+ minio_server: '{{ HOST.application_endpoint }}',
+ minio_user: '{{ HOST.access_key }}',
+ minio_password: '{{ HOST.secret_key }}',
+ }
+}
+
+// https://registry.terraform.io/providers/aminueza/minio/latest
+export function TerraformMinoBucketResources() {
+ return {
+ minio_s3_bucket: {
+ bucket: [
+ {
+ bucket: '{{ SELF.storage_name }}',
+ },
+ ],
+ },
+ minio_iam_user: {
+ user: [
+ {
+ name: '{{ SELF.storage_user }}',
+ secret: '{{ SELF.storage_token }}',
+ },
+ ],
+ },
+ minio_iam_policy: {
+ depends_on: ['minio_s3_bucket.bucket', 'minio_iam_user.user'],
+ policy: [
+ {
+ name: '{{ SELF.storage_user }}',
+ policy: `{ "Version":"2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["s3:*"], "Principal": "{{ SELF.storage_user }}", "Resource": "arn:aws:s3:::*" } ] }`,
+ },
+ ],
+ },
+ }
+}
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/ansible/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/ansible/index.ts
index d209c9af45..6c36049b3a 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/ansible/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/ansible/index.ts
@@ -1,8 +1,11 @@
import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {AnsibleDockerContainerTask, AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
-import {ApplicationProperties, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this
+import {
+ ApplicationProperties,
+ LOCALHOST,
+ MetadataGenerated,
+ MetadataUnfurl,
+} from '#technologies/plugins/rules/utils/utils'
const generator: ImplementationGenerator = {
component: 'redis.server',
@@ -23,7 +26,7 @@ const generator: ImplementationGenerator = {
attributes: {
application_address: {
type: 'string',
- default: '127.0.0.1',
+ default: LOCALHOST,
},
},
interfaces: {
@@ -36,13 +39,15 @@ const generator: ImplementationGenerator = {
inputs: {
playbook: {
q: [
+ // https://hub.docker.com/_/redis
{
...AnsibleDockerContainerTask({
name: 'start container',
container: {
- name: '{{ SELF.application_name }}',
- image: '{{ ".artifacts::docker_image::file" | eval }}',
+ name: '{{ SELF.cache_name }}',
+ image: 'redis:{{ ".artifacts::cache_image::file" | eval }}',
network_mode: 'host',
+ command: 'redis --port {{ SELF.application_port }}',
env: ApplicationProperties(type).toMap(),
},
}),
@@ -62,7 +67,7 @@ const generator: ImplementationGenerator = {
...AnsibleDockerContainerTask({
name: 'stop container',
container: {
- name: '{{ SELF.application_name }}',
+ name: '{{ SELF.cache_name }}',
state: 'absent',
},
}),
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/compose/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/compose/index.ts
index 32a3608311..fb6152f386 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/compose/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/compose/index.ts
@@ -7,9 +7,12 @@ import {
AnsibleUnapplyComposeTask,
} from '#technologies/plugins/rules/utils/ansible'
import {DockerCompose} from '#technologies/plugins/rules/utils/compose'
-import {ApplicationProperties, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this
+import {
+ ApplicationProperties,
+ LOCALHOST,
+ MetadataGenerated,
+ MetadataUnfurl,
+} from '#technologies/plugins/rules/utils/utils'
const generator: ImplementationGenerator = {
component: 'redis.server',
@@ -21,15 +24,16 @@ const generator: ImplementationGenerator = {
details: 'docker compose manifest generated and applied',
generate: (name, type) => {
- const suffix = '{{ SELF.application_name }}'
+ const suffix = '{{ SELF.cache_name }}'
const manifest: DockerCompose = {
- name: '{{ SELF.application_name }}',
+ name: '{{ SELF.cache_name }}',
services: {
application: {
- container_name: '{{ SELF.application_name }}',
- image: '{{ ".artifacts::docker_image::file" | eval }}',
+ container_name: '{{ SELF.cache_name }}',
+ image: 'redis:{{ ".artifacts::cache_image::file" | eval }}',
network_mode: 'host',
+ command: ['redis', '--port', '{{ SELF.application_port }}'],
environment: ApplicationProperties(type).toMap(),
},
},
@@ -44,7 +48,7 @@ const generator: ImplementationGenerator = {
attributes: {
application_address: {
type: 'string',
- default: '127.0.0.1',
+ default: LOCALHOST,
},
},
interfaces: {
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/terraform/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/terraform/index.ts
index 1f10db6dd8..7a5c3e600a 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/terraform/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/local-machine/terraform/index.ts
@@ -1,8 +1,11 @@
import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
-import {ApplicationProperties, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this
+import {
+ ApplicationProperties,
+ LOCALHOST,
+ MetadataGenerated,
+ MetadataUnfurl,
+} from '#technologies/plugins/rules/utils/utils'
const generator: ImplementationGenerator = {
component: 'redis.server',
@@ -23,7 +26,7 @@ const generator: ImplementationGenerator = {
attributes: {
application_address: {
type: 'string',
- default: '127.0.0.1',
+ default: LOCALHOST,
},
},
interfaces: {
@@ -56,7 +59,8 @@ const generator: ImplementationGenerator = {
{
env: ApplicationProperties(type, {quote: false}).toEnv(),
image: '${docker_image.image.image_id}',
- name: '{{ SELF.application_name }}',
+ name: '{{ SELF.cache_name }}',
+ command: ['redis', '--port', '{{ SELF.application_port }}'],
network_mode: 'host',
},
],
@@ -64,7 +68,7 @@ const generator: ImplementationGenerator = {
docker_image: {
image: [
{
- name: '{{ ".artifacts::docker_image::file" | eval }}',
+ name: 'redis:{{ ".artifacts::cache_image::file" | eval }}',
},
],
},
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/ansible/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/ansible/index.ts
index adf223dc2d..5ef1349277 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/ansible/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/ansible/index.ts
@@ -7,13 +7,12 @@ import {
} from '#technologies/plugins/rules/utils/ansible'
import {
ApplicationProperties,
+ LOCALHOST,
MetadataGenerated,
MetadataUnfurl,
OpenstackMachineCredentials,
} from '#technologies/plugins/rules/utils/utils'
-// TODO: next: implement this
-
const generator: ImplementationGenerator = {
component: 'redis.server',
technology: 'ansible',
@@ -34,7 +33,7 @@ const generator: ImplementationGenerator = {
attributes: {
application_address: {
type: 'string',
- default: '127.0.0.1',
+ default: LOCALHOST,
},
},
interfaces: {
@@ -50,13 +49,15 @@ const generator: ImplementationGenerator = {
{
...AnsibleWaitForSSHTask(),
},
+ // https://hub.docker.com/_/redis
{
...AnsibleDockerContainerTask({
name: 'start container',
container: {
- name: '{{ SELF.application_name }}',
- image: '{{ ".artifacts::docker_image::file" | eval }}',
+ name: '{{ SELF.cache_name }}',
+ image: 'redis:{{ ".artifacts::cache_image::file" | eval }}',
network_mode: 'host',
+ command: 'redis --port {{ SELF.application_port }}',
env: ApplicationProperties(type).toMap(),
},
}),
@@ -80,7 +81,7 @@ const generator: ImplementationGenerator = {
...AnsibleDockerContainerTask({
name: 'stop container',
container: {
- name: '{{ SELF.application_name }}',
+ name: '{{ SELF.cache_name }}',
state: 'absent',
},
}),
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/compose/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/compose/index.ts
index 150a489fb0..5de90def63 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/compose/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/compose/index.ts
@@ -1,19 +1,21 @@
import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {
AnsibleApplyComposeTask,
+ AnsibleCreateComposeTask,
AnsibleDockerHostEnvironment,
AnsibleOrchestratorOperation,
+ AnsibleTouchComposeTask,
AnsibleUnapplyComposeTask,
} from '#technologies/plugins/rules/utils/ansible'
+import {DockerCompose} from '#technologies/plugins/rules/utils/compose'
import {
ApplicationProperties,
+ LOCALHOST,
MetadataGenerated,
MetadataUnfurl,
OpenstackMachineHost,
} from '#technologies/plugins/rules/utils/utils'
-// TODO: next: implement this
-
const generator: ImplementationGenerator = {
component: 'redis.server',
technology: 'compose',
@@ -24,31 +26,17 @@ const generator: ImplementationGenerator = {
details: 'docker compose manifest generated and applied',
generate: (name, type) => {
- const AnsibleTouchComposeTask = {
- name: 'touch compose',
- register: 'compose',
- 'ansible.builtin.tempfile': {
- suffix: '{{ SELF.application_name }}.compose.yaml',
- },
- }
+ const suffix = '{{ SELF.cache_name }}'
- const AnsibleCreateComposeTask = {
- name: 'create compose',
- 'ansible.builtin.copy': {
- dest: '{{ compose.path }}',
- content: '{{ manifest | to_yaml }}',
- },
- vars: {
- manifest: {
- name: '{{ SELF.application_name }}',
- services: {
- application: {
- container_name: '{{ SELF.application_name }}',
- image: '{{ ".artifacts::docker_image::file" | eval }}',
- network_mode: 'host',
- environment: ApplicationProperties(type).toMap(),
- },
- },
+ const manifest: DockerCompose = {
+ name: '{{ SELF.cache_name }}',
+ services: {
+ application: {
+ container_name: '{{ SELF.cache_name }}',
+ image: 'redis:{{ ".artifacts::cache_image::file" | eval }}',
+ network_mode: 'host',
+ command: ['redis', '--port', '{{ SELF.application_port }}'],
+ environment: ApplicationProperties(type).toMap(),
},
},
}
@@ -65,7 +53,7 @@ const generator: ImplementationGenerator = {
attributes: {
application_address: {
type: 'string',
- default: '127.0.0.1',
+ default: LOCALHOST,
},
},
interfaces: {
@@ -78,8 +66,12 @@ const generator: ImplementationGenerator = {
inputs: {
playbook: {
q: [
- AnsibleTouchComposeTask,
- AnsibleCreateComposeTask,
+ {
+ ...AnsibleTouchComposeTask({suffix}),
+ },
+ {
+ ...AnsibleCreateComposeTask({manifest}),
+ },
{
...AnsibleApplyComposeTask(),
environment: {
@@ -97,8 +89,12 @@ const generator: ImplementationGenerator = {
inputs: {
playbook: {
q: [
- AnsibleTouchComposeTask,
- AnsibleCreateComposeTask,
+ {
+ ...AnsibleTouchComposeTask({suffix}),
+ },
+ {
+ ...AnsibleCreateComposeTask({manifest}),
+ },
{
...AnsibleUnapplyComposeTask(),
environment: {
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/terraform/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/terraform/index.ts
index 649eee3294..7b2ae86a08 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/terraform/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/docker-engine/remote-machine/terraform/index.ts
@@ -8,8 +8,6 @@ import {
OpenstackMachineHost,
} from '#technologies/plugins/rules/utils/utils'
-// TODO: next: implement this
-
const generator: ImplementationGenerator = {
component: 'redis.server',
technology: 'terraform',
@@ -78,7 +76,8 @@ const generator: ImplementationGenerator = {
{
env: ApplicationProperties(type, {quote: false}).toEnv(),
image: '${docker_image.image.image_id}',
- name: '{{ SELF.application_name }}',
+ name: '{{ SELF.cache_name }}',
+ command: ['redis', '--port', '{{ SELF.application_port }}'],
network_mode: 'host',
},
],
@@ -86,7 +85,7 @@ const generator: ImplementationGenerator = {
docker_image: {
image: [
{
- name: '{{ ".artifacts::docker_image::file" | eval }}',
+ name: 'redis:{{ ".artifacts::cache_image::file" | eval }}',
},
],
},
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/gcp-memorystore/ansible/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/gcp-memorystore/ansible/index.ts
index 9d2e345857..2e7ccdd6ec 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/gcp-memorystore/ansible/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/gcp-memorystore/ansible/index.ts
@@ -2,10 +2,10 @@ import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-// TODO: next: implement this, see https://docs.ansible.com/ansible/latest/collections/google/cloud/gcp_redis_instance_module.html
+// TODO: connectivity
const generator: ImplementationGenerator = {
- component: 'bucket',
+ component: 'redis.server',
technology: 'ansible',
artifact: 'cache.image',
hosting: ['gcp.memorystore'],
@@ -37,7 +37,27 @@ const generator: ImplementationGenerator = {
},
inputs: {
playbook: {
- q: [],
+ q: [
+ // https://docs.ansible.com/ansible/latest/collections/google/cloud/gcp_redis_instance_module.html
+ {
+ name: 'create redis',
+ 'google.cloud.gcp_redis_instance': {
+ name: '{{ SELF.cache_name }}',
+ memory_size_gb: 1,
+ region: '{{ SELF.gcp_region }}',
+ project: '{{ SELF.gcp_project }}',
+ },
+ register: 'redis_info',
+ },
+ {
+ name: 'set attributes',
+ set_fact: {
+ application_endpoint: '{{ redis_info.host }}:{{ redis_info.port }}',
+ application_address: '{{ redis_info.host }}',
+ application_port: '{{ redis_info.port }}',
+ },
+ },
+ ],
},
},
},
@@ -53,7 +73,16 @@ const generator: ImplementationGenerator = {
},
inputs: {
playbook: {
- q: [],
+ q: [
+ {
+ name: 'delete redis',
+ 'google.cloud.gcp_redis_instance': {
+ name: '{{ SELF.cache_name }}',
+ project: '{{ SELF.gcp_project }}',
+ state: 'absent',
+ },
+ },
+ ],
},
},
},
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/gcp-memorystore/terraform/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/gcp-memorystore/terraform/index.ts
index 70b72cf220..be6bd08049 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/gcp-memorystore/terraform/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/gcp-memorystore/terraform/index.ts
@@ -2,7 +2,7 @@ import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-// TODO: next: implement this, see https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/redis_instance
+// TODO: connectivity
const generator: ImplementationGenerator = {
component: 'redis.server',
@@ -40,10 +40,6 @@ const generator: ImplementationGenerator = {
source: 'hashicorp/google',
version: '5.39.1',
},
- mysql: {
- source: 'petoju/mysql',
- version: '3.0.48',
- },
},
],
},
@@ -57,9 +53,44 @@ const generator: ImplementationGenerator = {
},
],
},
- resource: {},
+ resource: {
+ // https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/redis_instance
+ google_redis_instance: {
+ cache: [
+ {
+ name: '{{ SELF.cache_name }}',
+ memory_size_gb: 1,
+ lifecycle: {
+ prevent_destroy: true,
+ },
+ },
+ ],
+ },
+ },
+ output: {
+ application_endpoint: [
+ {
+ value: '${google_redis_instance.cache.host}:${google_redis_instance.cache.port}',
+ },
+ ],
+ application_address: [
+ {
+ value: '${google_redis_instance.cache.host}',
+ },
+ ],
+ application_port: [
+ {
+ value: '${google_redis_instance.cache.port}',
+ },
+ ],
+ },
},
},
+ outputs: {
+ application_endpoint: 'application_endpoint',
+ application_address: 'application_address',
+ application_port: 'application_port',
+ },
},
},
}
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/ansible/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/ansible/index.ts
index 199f8a1e15..b8cc7d2432 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/ansible/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/ansible/index.ts
@@ -1,8 +1,14 @@
import {ImplementationGenerator} from '#technologies/plugins/rules/types'
-import {AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
-import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this
+import {
+ AnsibleKubernetesCredentialsEnvironment,
+ AnsibleOrchestratorOperation,
+} from '#technologies/plugins/rules/utils/ansible'
+import {
+ ApplicationProperties,
+ KubernetesCredentials,
+ MetadataGenerated,
+ MetadataUnfurl,
+} from '#technologies/plugins/rules/utils/utils'
const generator: ImplementationGenerator = {
component: 'redis.server',
@@ -19,8 +25,14 @@ const generator: ImplementationGenerator = {
...MetadataGenerated(),
...MetadataUnfurl(),
},
- properties: {
- ...GCPProviderCredentials(),
+ properties: {...KubernetesCredentials()},
+ attributes: {
+ application_address: {
+ type: 'string',
+ default: {
+ eval: '.::cache_name',
+ },
+ },
},
interfaces: {
Standard: {
@@ -28,20 +40,119 @@ const generator: ImplementationGenerator = {
create: {
implementation: {
...AnsibleOrchestratorOperation(),
+ environment: {
+ ...AnsibleKubernetesCredentialsEnvironment(),
+ },
},
inputs: {
playbook: {
- q: [],
+ q: [
+ {
+ name: 'create deployment',
+ 'kubernetes.core.k8s': {
+ wait: true,
+ definition: {
+ apiVersion: 'apps/v1',
+ kind: 'Deployment',
+ metadata: {
+ name: '{{ SELF.application_name }}',
+ namespace: 'default',
+ },
+ spec: {
+ selector: {
+ matchLabels: {
+ app: '{{ SELF.application_name }}',
+ },
+ },
+ template: {
+ metadata: {
+ labels: {
+ app: '{{ SELF.application_name }}',
+ },
+ },
+ spec: {
+ containers: [
+ {
+ image: 'redis:{{ ".artifacts::cache_image::file" | eval }}',
+ name: '{{ SELF.application_name }}',
+ env: ApplicationProperties(type).toList(),
+ command:
+ 'redis --port {{ SELF.application_port }}',
+ ports: [
+ {
+ containerPort:
+ '{{ SELF.application_port }}',
+ },
+ ],
+ },
+ ],
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ name: 'create service',
+ 'kubernetes.core.k8s': {
+ definition: {
+ apiVersion: 'v1',
+ kind: 'Service',
+ metadata: {
+ name: '{{ SELF.application_name }}',
+ namespace: 'default',
+ },
+ spec: {
+ ports: [
+ {
+ name: '{{ SELF.application_protocol }}',
+ port: '{{ SELF.application_port }}',
+ targetPort: '{{ SELF.application_port }}',
+ },
+ ],
+ selector: {
+ app: '{{ SELF.application_name }}',
+ },
+ type: 'ClusterIP',
+ },
+ },
+ },
+ },
+ ],
},
},
},
delete: {
implementation: {
...AnsibleOrchestratorOperation(),
+ environment: {
+ ...AnsibleKubernetesCredentialsEnvironment(),
+ },
},
inputs: {
playbook: {
- q: [],
+ q: [
+ {
+ name: 'delete service',
+ 'kubernetes.core.k8s': {
+ state: 'absent',
+ api_version: 'v1',
+ kind: 'Service',
+ namespace: 'default',
+ name: '{{ SELF.application_name }}',
+ },
+ },
+ {
+ name: 'delete deployment',
+ 'kubernetes.core.k8s': {
+ state: 'absent',
+ api_version: 'app/v1',
+ kind: 'Deployment',
+ namespace: 'default',
+ name: '{{ SELF.application_name }}',
+ },
+ },
+ ],
},
},
},
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/index.ts
index 62d1a644b4..35c3ebcc2f 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/index.ts
@@ -1,6 +1,5 @@
import ansible from './ansible'
+import kubernetes from './kubernetes'
import terraform from './terraform'
-// TODO: kubernetes
-
-export default [ansible, terraform]
+export default [ansible, kubernetes, terraform]
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/kubernetes/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/kubernetes/index.ts
new file mode 100644
index 0000000000..9f9f7038f2
--- /dev/null
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/kubernetes/index.ts
@@ -0,0 +1,167 @@
+import {ImplementationGenerator} from '#technologies/plugins/rules/types'
+import {AnsibleOrchestratorOperation} from '#technologies/plugins/rules/utils/ansible'
+import {
+ ApplicationProperties,
+ BASH_KUBECTL,
+ MetadataGenerated,
+ MetadataUnfurl,
+} from '#technologies/plugins/rules/utils/utils'
+
+const generator: ImplementationGenerator = {
+ component: 'redis.server',
+ technology: 'kubernetes',
+ artifact: 'cache.image',
+ hosting: ['kubernetes.cluster'],
+ weight: 1,
+ reason: 'Kubernetes is the underlying technology.',
+ details: 'Kubernetes manifest generated and applied',
+
+ generate: (name, type) => {
+ const AnsibleTouchManifestTask = {
+ name: 'touch manifest',
+ register: 'manifest',
+ 'ansible.builtin.tempfile': {
+ suffix: '{{ SELF.application_name }}.application.manifest.yaml',
+ },
+ }
+
+ const AnsibleCreateManifestTak = {
+ name: 'create manifest',
+ 'ansible.builtin.copy': {
+ dest: '{{ manifest.path }}',
+ content: '{{ deployment | to_yaml }}\n---\n{{ service | to_yaml }}\n',
+ },
+ vars: {
+ deployment: {
+ apiVersion: 'apps/v1',
+ kind: 'Deployment',
+ metadata: {
+ name: '{{ SELF.cache_name }}',
+ namespace: 'default',
+ },
+ spec: {
+ selector: {
+ matchLabels: {
+ app: '{{ SELF.cache_name }}',
+ },
+ },
+ template: {
+ metadata: {
+ labels: {
+ app: '{{ SELF.cache_name }}',
+ },
+ },
+ spec: {
+ containers: [
+ {
+ image: 'redis:{{ ".artifacts::cache_image::file" | eval }}',
+ name: '{{ SELF.cache_name }}',
+ env: ApplicationProperties(type).toList(),
+ command: 'redis --port {{ SELF.application_port }}',
+ ports: [
+ {
+ containerPort: '{{ SELF.cache_port }}',
+ },
+ ],
+ },
+ ],
+ },
+ },
+ },
+ },
+ service: {
+ apiVersion: 'v1',
+ kind: 'Service',
+ metadata: {
+ name: '{{ SELF.cache_name }}',
+ namespace: 'default',
+ },
+ spec: {
+ ports: [
+ {
+ name: 'redis',
+ port: '{{ SELF.cache_port }}',
+ targetPort: '{{ SELF.cache_port }}',
+ },
+ ],
+ selector: {
+ app: '{{ SELF.cache_name }}',
+ },
+ type: 'ClusterIP',
+ },
+ },
+ },
+ }
+
+ return {
+ derived_from: name,
+ metadata: {
+ ...MetadataGenerated(),
+ ...MetadataUnfurl(),
+ },
+ attributes: {
+ application_address: {
+ type: 'string',
+ default: {
+ eval: '.::cache_name',
+ },
+ },
+ },
+ interfaces: {
+ Standard: {
+ operations: {
+ create: {
+ implementation: {
+ ...AnsibleOrchestratorOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ AnsibleTouchManifestTask,
+ AnsibleCreateManifestTak,
+ {
+ name: 'apply manifest',
+ 'ansible.builtin.shell': `${BASH_KUBECTL} apply -f {{ manifest.path }}`,
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ },
+ {
+ name: 'wait for deployment',
+ 'ansible.builtin.shell': `${BASH_KUBECTL} rollout status deployment/{{ SELF.application_name }} --timeout 60s`,
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ },
+ ],
+ },
+ },
+ },
+ delete: {
+ implementation: {
+ ...AnsibleOrchestratorOperation(),
+ },
+ inputs: {
+ playbook: {
+ q: [
+ AnsibleTouchManifestTask,
+ AnsibleCreateManifestTak,
+ {
+ name: 'unapply manifest',
+ 'ansible.builtin.shell': `${BASH_KUBECTL} delete -f {{ manifest.path }}`,
+ args: {
+ executable: '/usr/bin/bash',
+ },
+ },
+ ],
+ },
+ },
+ },
+ },
+ },
+ },
+ }
+ },
+}
+
+export default generator
diff --git a/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/terraform/index.ts b/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/terraform/index.ts
index d913721369..92ed9705c0 100644
--- a/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/terraform/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/cache-image/kubernetes-cluster/terraform/index.ts
@@ -1,8 +1,11 @@
import {ImplementationGenerator} from '#technologies/plugins/rules/types'
import {TerraformStandardOperations} from '#technologies/plugins/rules/utils/terraform'
-import {GCPProviderCredentials, MetadataGenerated, MetadataUnfurl} from '#technologies/plugins/rules/utils/utils'
-
-// TODO: next: implement this, see https://registry.terraform.io/providers/aminueza/minio/latest
+import {
+ ApplicationProperties,
+ KubernetesCredentials,
+ MetadataGenerated,
+ MetadataUnfurl,
+} from '#technologies/plugins/rules/utils/utils'
const generator: ImplementationGenerator = {
component: 'redis.server',
@@ -19,18 +22,123 @@ const generator: ImplementationGenerator = {
...MetadataGenerated(),
...MetadataUnfurl(),
},
- properties: {
- ...GCPProviderCredentials(),
+ properties: {...KubernetesCredentials()},
+ attributes: {
+ application_address: {
+ type: 'string',
+ default: {
+ eval: '.::application_name',
+ },
+ },
},
-
interfaces: {
...TerraformStandardOperations(),
defaults: {
inputs: {
main: {
- terraform: [],
- provider: {},
- resource: {},
+ terraform: [
+ {
+ required_providers: [
+ {
+ kubernetes: {
+ source: 'hashicorp/kubernetes',
+ version: '2.31.0',
+ },
+ },
+ ],
+ required_version: '>= 0.14.0',
+ },
+ ],
+ provider: {
+ kubernetes: [
+ {
+ client_certificate: '${file("{{ SELF.k8s_client_cert_file }}")}',
+ client_key: '${file("{{ SELF.k8s_client_key_file }}")}',
+ cluster_ca_certificate: '${file("{{ SELF.k8s_ca_cert_file }}")}',
+ host: '{{ SELF.k8s_host }}',
+ },
+ ],
+ },
+ resource: {
+ kubernetes_deployment_v1: {
+ application: [
+ {
+ metadata: [
+ {
+ name: '{{ SELF.application_name }}',
+ },
+ ],
+ spec: [
+ {
+ selector: [
+ {
+ match_labels: {
+ app: '{{ SELF.application_name }}',
+ },
+ },
+ ],
+ template: [
+ {
+ metadata: [
+ {
+ labels: {
+ app: '{{ SELF.application_name }}',
+ },
+ },
+ ],
+ spec: [
+ {
+ container: [
+ {
+ env: ApplicationProperties(type).toList(),
+ image: 'redis:{{ ".artifacts::cache_image::file" | eval }}',
+ name: '{{ SELF.application_name }}',
+ command:
+ 'redis --port {{ SELF.application_port }}',
+ port: [
+ {
+ container_port:
+ '{{ SELF.application_port }}',
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ kubernetes_service_v1: {
+ application: [
+ {
+ metadata: [
+ {
+ name: '{{ SELF.application_name }}',
+ },
+ ],
+ spec: [
+ {
+ port: [
+ {
+ name: '{{ SELF.application_protocol }}',
+ port: '{{ SELF.application_port }}',
+ target_port: '{{ SELF.application_port }}',
+ },
+ ],
+ selector: {
+ app: '{{ SELF.application_name }}',
+ },
+ type: 'ClusterIP',
+ },
+ ],
+ },
+ ],
+ },
+ },
},
},
},
diff --git a/src/technologies/plugins/rules/generators/redis-server/index.ts b/src/technologies/plugins/rules/generators/redis-server/index.ts
index e6f1aba533..8062d15e8b 100644
--- a/src/technologies/plugins/rules/generators/redis-server/index.ts
+++ b/src/technologies/plugins/rules/generators/redis-server/index.ts
@@ -1,6 +1,3 @@
import cacheImage from './cache-image'
-// TODO: remote-machine
-// TODO: local-machine
-
export default [cacheImage]
diff --git a/src/technologies/plugins/rules/generators/service-application/docker-image/docker-engine/remote-machine/compose/index.ts b/src/technologies/plugins/rules/generators/service-application/docker-image/docker-engine/remote-machine/compose/index.ts
index daf6cb1b08..6e2f35fda2 100644
--- a/src/technologies/plugins/rules/generators/service-application/docker-image/docker-engine/remote-machine/compose/index.ts
+++ b/src/technologies/plugins/rules/generators/service-application/docker-image/docker-engine/remote-machine/compose/index.ts
@@ -10,6 +10,7 @@ import {
import {DockerCompose} from '#technologies/plugins/rules/utils/compose'
import {
ApplicationProperties,
+ LOCALHOST,
MetadataGenerated,
MetadataUnfurl,
OpenstackMachineHost,
@@ -51,7 +52,7 @@ const generator: ImplementationGenerator = {
attributes: {
application_address: {
type: 'string',
- default: '127.0.0.1',
+ default: LOCALHOST,
},
},
interfaces: {
diff --git a/src/technologies/plugins/rules/generators/service-application/index.ts b/src/technologies/plugins/rules/generators/service-application/index.ts
index 3be390701e..448a272f30 100644
--- a/src/technologies/plugins/rules/generators/service-application/index.ts
+++ b/src/technologies/plugins/rules/generators/service-application/index.ts
@@ -2,6 +2,4 @@ import dockerImage from './docker-image'
import tarArchive from './tar-archive'
import zipArchive from './zip-archive'
-// TODO: apt.package
-
export default [dockerImage, tarArchive, zipArchive]
diff --git a/src/technologies/plugins/rules/generators/software-application/apt-package/asterisk/machine/remote-machine/terraform/index.ts b/src/technologies/plugins/rules/generators/software-application/apt-package/asterisk/machine/remote-machine/terraform/index.ts
index dd69b51a55..a447a93421 100644
--- a/src/technologies/plugins/rules/generators/software-application/apt-package/asterisk/machine/remote-machine/terraform/index.ts
+++ b/src/technologies/plugins/rules/generators/software-application/apt-package/asterisk/machine/remote-machine/terraform/index.ts
@@ -20,7 +20,7 @@ import * as utils from '#utils'
class Generator extends GeneratorAbstract {
component = 'software.application'
technology = 'terraform'
- artifact = 'apt.archive'
+ artifact = 'apt.package'
hosting = ['*', 'remote.machine']
weight = 0
reason = 'Ansible is more specialized. Also using provisioners is a "last resort".'
diff --git a/src/technologies/plugins/rules/generators/software-application/utils.ts b/src/technologies/plugins/rules/generators/software-application/utils.ts
index 77f93b5a47..d9e456da2b 100644
--- a/src/technologies/plugins/rules/generators/software-application/utils.ts
+++ b/src/technologies/plugins/rules/generators/software-application/utils.ts
@@ -143,38 +143,52 @@ ${BashCallManagementOperation(MANAGEMENT_OPERATIONS.CONFIGURE)}
`)
}
-// TODO: assert
export function BashSoftwareApplicationStart(options: {assert?: boolean} = {}) {
options.assert = options.assert ?? true
- return utils.trim(`
-${BASH_HEADER}
+ const parts = [BASH_HEADER]
+ if (options.assert)
+ parts.push(`
# Assert operation
${BashAssertManagementOperation(MANAGEMENT_OPERATIONS.START)}
+`)
+ parts.push(`
# Copy operation
${BashCopyManagementOperation(MANAGEMENT_OPERATIONS.START)}
+`)
+ parts.push(`
# Execute operation
${BashCallManagementOperation(MANAGEMENT_OPERATIONS.START)}
`)
+
+ return utils.concat(parts.map(utils.trim))
}
-// TODO: assert
export function BashSoftwareApplicationStop(options: {assert?: boolean} = {}) {
- return utils.trim(`
-${BASH_HEADER}
+ options.assert = options.assert ?? true
+
+ const parts = [BASH_HEADER]
+ if (options.assert)
+ parts.push(`
# Assert operation
${BashAssertManagementOperation(MANAGEMENT_OPERATIONS.STOP)}
+`)
+ parts.push(`
# Copy operation
${BashCopyManagementOperation(MANAGEMENT_OPERATIONS.STOP)}
+`)
+ parts.push(`
# Execute operation
${BashCallManagementOperation(MANAGEMENT_OPERATIONS.STOP)}
`)
+
+ return utils.concat(parts.map(utils.trim))
}
export function BashSoftwareApplicationDelete() {
diff --git a/tasks/docs/generate/rules/quality.ejs b/tasks/docs/generate/rules/quality.ejs
deleted file mode 100644
index d72747f472..0000000000
--- a/tasks/docs/generate/rules/quality.ejs
+++ /dev/null
@@ -1 +0,0 @@
-<% if (quality > 0.75) { -%> success <% } else if (quality > 2.5) { -%> info <% } else { -%> failure<% } -%>
\ No newline at end of file
diff --git a/tasks/docs/generate/rules/template.ejs b/tasks/docs/generate/rules/template.ejs
index bbd7cd89d2..ce14f173da 100644
--- a/tasks/docs/generate/rules/template.ejs
+++ b/tasks/docs/generate/rules/template.ejs
@@ -72,7 +72,7 @@ The scenario does not require a specific hosting.
<% scenario.technologies.forEach(technology => { %>
-!!! <% if (technology.quality > 0.7) { -%>success<% } else if (technology.quality > 0.25) { -%>info<% } else { -%>failure<% } -%> "<%= technology.name %> (Quality: <%= technology.quality %>)"
+!!! <% if (technology.quality > 0.7) { -%>success<% } else if (technology.quality > 0.25) { -%>warning<% } else { -%>failure<% } -%> "<%= technology.name %> (Quality: <%= technology.quality %>)"
<%= technology.reason %>
<% }) %>