diff --git a/icgparser/doml/v1/nginx-openstack_v1.domlx b/icgparser/doml/v1/nginx-openstack_v1.domlx index d33ba1d5a7ab5c901296b0fc701edffbcf1eae96..4195ffce0b97b2126dcc3db1f8fa6333e49601e4 100644 --- a/icgparser/doml/v1/nginx-openstack_v1.domlx +++ b/icgparser/doml/v1/nginx-openstack_v1.domlx @@ -12,7 +12,7 @@ </machineDefinition> </nodes> <networks name="net1" protocol="tcp/ip" addressRange="16.0.0.0/24" connectedIfaces="//@infrastructure/@nodes.0/@machineDefinition/@ifaces.0"/> - <credentials xsi:type="infra:KeyPair" name="ssh_key" user="user1"/> + <credentials xsi:type="infra:KeyPair" name="user1" user="user1"/> <groups xsi:type="infra:SecurityGroup" name="sg" groupedNodes="//@infrastructure/@nodes.0/@machineDefinition" ifaces="//@infrastructure/@nodes.0/@machineDefinition/@ifaces.0"> <rules name="icmp" protocol="icmp" fromPort="-1" toPort="-1"> <cidr>0.0.0.0/0</cidr> @@ -32,7 +32,7 @@ <providers name="openstack"> <vms name="concrete_vm" maps="//@infrastructure/@nodes.0/@machineDefinition"> <annotations xsi:type="commons:SProperty" key="vm_name" value="nginx-host"/> - <annotations xsi:type="commons:SProperty" key="vm_flavor" value="ubuntu"/> + <annotations xsi:type="commons:SProperty" key="vm_flavor" value="small"/> </vms> <networks name="concrete_net" maps="//@infrastructure/@networks.0"> <annotations xsi:type="commons:SProperty" key="name" value="ostack2"/> diff --git a/input_file_generated/ir.json b/input_file_generated/ir.json index 4f3fb5afc27da092cbe3821a5bd760f2d84203cb..91bfefb2658d03cef1505f75b217cc0ef1e1c1f5 100644 --- a/input_file_generated/ir.json +++ b/input_file_generated/ir.json @@ -50,7 +50,7 @@ ], "credentials": [ { - "infra_element_name": "ssh_key", + "infra_element_name": "user1", "user": "user1" } ], @@ -71,7 +71,7 @@ "provider": "openstack", "vms": [ { - "credentials": "ssh_key", + "credentials": "user1", "group": "sg", "i1": { "associated": "sg", @@ -82,7 +82,7 @@ "infra_element_name": "vm1", "name": "concrete_vm", "os": "Ubuntu-Focal-20.04-Daily-2022-04-19", - "vm_flavor": "ubuntu", + "vm_flavor": "small", "vm_name": "nginx-host" } ] @@ -94,7 +94,7 @@ "piacere_monitoring": { "name": "piacere_monitoring", "node": { - "credentials": "ssh_key", + "credentials": "user1", "group": "sg", "i1": { "associated": "sg", @@ -105,7 +105,7 @@ "infra_element_name": "vm1", "name": "concrete_vm", "os": "Ubuntu-Focal-20.04-Daily-2022-04-19", - "vm_flavor": "ubuntu", + "vm_flavor": "small", "vm_name": "nginx-host" } } @@ -118,7 +118,7 @@ "nginx": { "name": "nginx", "node": { - "credentials": "ssh_key", + "credentials": "user1", "group": "sg", "i1": { "associated": "sg", @@ -129,7 +129,7 @@ "infra_element_name": "vm1", "name": "concrete_vm", "os": "Ubuntu-Focal-20.04-Daily-2022-04-19", - "vm_flavor": "ubuntu", + "vm_flavor": "small", "vm_name": "nginx-host" }, "source_code": "/usr/share/nginx/html/index.html" diff --git a/output_files_generated/nginx_openstack/nginx/config.yaml b/output_files_generated/nginx_openstack/nginx/config.yaml index dff8ba5cf049d5f986d11fcaad55b49d2bf9e65a..8b7284e426fba96d8fffd9d11e5d153b09edf120 100644 --- a/output_files_generated/nginx_openstack/nginx/config.yaml +++ b/output_files_generated/nginx_openstack/nginx/config.yaml @@ -2,7 +2,7 @@ --- input: - instance_ip_vm1 - - instance_server_private_key_ssh_key + - instance_server_private_key_user1 output: [] engine: ansible ... diff --git a/output_files_generated/nginx_openstack/nginx/ssh_key.j2 b/output_files_generated/nginx_openstack/nginx/ssh_key.j2 index 4d512f8d655d1284d5940d5f8f9c3bee1c36f52d..1431f67c8cbc40dbb900c7a07be086c54ae196fe 100644 --- a/output_files_generated/nginx_openstack/nginx/ssh_key.j2 +++ b/output_files_generated/nginx_openstack/nginx/ssh_key.j2 @@ -1 +1 @@ -{{ instance_server_private_key_ssh_key }} +{{ instance_server_private_key_user1 }} diff --git a/output_files_generated/nginx_openstack/piacere_monitoring/config.yaml b/output_files_generated/nginx_openstack/piacere_monitoring/config.yaml index dff8ba5cf049d5f986d11fcaad55b49d2bf9e65a..8b7284e426fba96d8fffd9d11e5d153b09edf120 100644 --- a/output_files_generated/nginx_openstack/piacere_monitoring/config.yaml +++ b/output_files_generated/nginx_openstack/piacere_monitoring/config.yaml @@ -2,7 +2,7 @@ --- input: - instance_ip_vm1 - - instance_server_private_key_ssh_key + - instance_server_private_key_user1 output: [] engine: ansible ... diff --git a/output_files_generated/nginx_openstack/piacere_monitoring/ssh_key.j2 b/output_files_generated/nginx_openstack/piacere_monitoring/ssh_key.j2 index 4d512f8d655d1284d5940d5f8f9c3bee1c36f52d..1431f67c8cbc40dbb900c7a07be086c54ae196fe 100644 --- a/output_files_generated/nginx_openstack/piacere_monitoring/ssh_key.j2 +++ b/output_files_generated/nginx_openstack/piacere_monitoring/ssh_key.j2 @@ -1 +1 @@ -{{ instance_server_private_key_ssh_key }} +{{ instance_server_private_key_user1 }} diff --git a/output_files_generated/nginx_openstack/terraform/config.yaml b/output_files_generated/nginx_openstack/terraform/config.yaml index 21942c2d2bd4b40c31cf45e4625db768af274e58..783f272d2a640a7e68f65c9d62c1bee0abb9430a 100644 --- a/output_files_generated/nginx_openstack/terraform/config.yaml +++ b/output_files_generated/nginx_openstack/terraform/config.yaml @@ -9,8 +9,8 @@ input: - OS_PROJECT_NAME output: - - instance_server_public_key_ssh_key - - instance_server_private_key_ssh_key + - instance_server_public_key_user1 + - instance_server_private_key_user1 - instance_ip_vm1 ... diff --git a/output_files_generated/nginx_openstack/terraform/main.tf b/output_files_generated/nginx_openstack/terraform/main.tf index 30cac937f1e2b1df0b39e448b366bb84359040e2..40789ea5996a43bd74a5bebf3f2d478b20d6605c 100644 --- a/output_files_generated/nginx_openstack/terraform/main.tf +++ b/output_files_generated/nginx_openstack/terraform/main.tf @@ -25,8 +25,8 @@ data "openstack_networking_network_v2" "external" { resource "openstack_compute_instance_v2" "vm1" { name = "nginx-host" image_name = "Ubuntu-Focal-20.04-Daily-2022-04-19" - flavor_name = "ubuntu" - key_pair = openstack_compute_keypair_v2.ssh_key.name + flavor_name = "small" + key_pair = openstack_compute_keypair_v2.user1.name network { port = openstack_networking_port_v2.net1.id } @@ -141,7 +141,7 @@ resource "openstack_compute_secgroup_v2" "ssh" { # Create ssh keys -resource "openstack_compute_keypair_v2" "ssh_key" { +resource "openstack_compute_keypair_v2" "user1" { name = "user1" # public_key = "user1" } diff --git a/output_files_generated/nginx_openstack/terraform/output.tf b/output_files_generated/nginx_openstack/terraform/output.tf index 5c4fe2796f1f4e5be75509c6bb9f3cb90bd85576..f0cc70b7b297f4e5e45369d934c2537507d9fff7 100644 --- a/output_files_generated/nginx_openstack/terraform/output.tf +++ b/output_files_generated/nginx_openstack/terraform/output.tf @@ -1,11 +1,11 @@ -output "instance_server_public_key_ssh_key" { - value = openstack_compute_keypair_v2.ssh_key.public_key +output "instance_server_public_key_user1" { + value = openstack_compute_keypair_v2.user1.public_key } -output "instance_server_private_key_ssh_key" { - value = openstack_compute_keypair_v2.ssh_key.private_key +output "instance_server_private_key_user1" { + value = openstack_compute_keypair_v2.user1.private_key } output "instance_ip_vm1" { diff --git a/template-location.properties b/template-location.properties index f0617fe793217a7aa04492cdbcf09802d11a72b3..3dcafba416a7a2e0431c5f55ec90deb1939f94fb 100644 --- a/template-location.properties +++ b/template-location.properties @@ -42,7 +42,7 @@ nginx = templates/ansible/ubuntu/nginx.tpl mysql = templates/ansible/ubuntu/mysql.tpl wordpress = templates/ansible/ubuntu/wordpress.tpl postgres = templates/ansible/ubuntu/postgres.tpl -piacere_monitoring = templates/ansible/ubuntu/monitoring/main.tpl +piacere_monitoring = templates/ansible/ubuntu/piacere_main.tpl [ansible.centos] mysql = templates/ansible/centos/mysql.tpl diff --git a/templates/ansible/ubuntu/monitoring/main.tpl b/templates/ansible/ubuntu/monitoring/main.tpl deleted file mode 100644 index 657a7ea8c4c1376b0437e53ec82d7c4ebe6d0ec2..0000000000000000000000000000000000000000 --- a/templates/ansible/ubuntu/monitoring/main.tpl +++ /dev/null @@ -1,22 +0,0 @@ ---- -- hosts: localhost - tasks: - - name: print disclamer - debug: - msg: this can also be done with "ansible-galaxy install -r requirements" - - name: install telegraf from galaxy - community.general.ansible_galaxy_install: - type: role - requirements_file: ansible_requirements.yml - -- hosts: all - pre_tasks: - - name: Ensure gnupg package - package: - name: gnupg - state: present - become: true - vars_files: - - vars/main.yaml - roles: - - dj-wasabi.telegraf \ No newline at end of file diff --git a/output_files_generated/nginx_openstack/piacere_monitoring/main.tpl b/templates/ansible/ubuntu/piacere_main.tpl similarity index 100% rename from output_files_generated/nginx_openstack/piacere_monitoring/main.tpl rename to templates/ansible/ubuntu/piacere_main.tpl