Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
2021-05-04 12:42:49,789 - InfrastructureManager - DEBUG - TOSCA: tosca_definitions_version: tosca_simple_yaml_1_0
metadata:
template_name: template
template_version: 1.0.0-SNAPSHOT
template_author: orchestrator
description: "Launch a compute node getting the IP and SSH credentials to access via ssh"
imports:
- indigo_custom_types: https://raw.githubusercontent.com/indigo-dc/tosca-types/k8s/custom_types.yaml
topology_template:
inputs:
num_cpus:
type: integer
required: true
default: 1
constraints:
- valid_values: [1, 2, 4]
description: "Number of virtual cpus for the VM"
mem_size:
type: scalar-unit.size
required: true
default: "2 GB"
constraints:
- valid_values: ["2 GB", "4 GB"]
description: "Amount of memory for the VM"
num_instances:
type: integer
required: true
default: 1
description: "Number of VMs to be spawned"
os_distribution:
type: string
required: true
default: ubuntu
node_templates:
simple_node:
type: tosca.nodes.indigo.Compute
properties:
zabbix_server: "orchestrator.cloud.cnaf.infn.it"
zabbix_server_port: 10051
zabbix_server_metadata: "Linux 668c875e-9a39-4dc0-a710-17c41376c1e0"
capabilities:
scalable:
properties:
min_instances: 1
max_instances: 1
count: 1
os:
properties:
type: linux
distribution: ubuntu
image: "ost://cloud-api-pub.cr.cnaf.infn.it/6345e75f-c527-4a34-9561-33e37c0188e5"
endpoint:
properties:
private_ip: true
protocol: tcp
secure: false
network_name: PUBLIC
initiator: source
host:
properties:
num_cpus: 1
mem_size: "2 GB"
instance_type: "iotwins.small"
artifacts:
zabbix_agent_role:
file: indigo-dc.zabbix-agent
type: tosca.artifacts.AnsibleGalaxy.role
outputs:
node_creds:
value: { get_attribute: [ simple_node, endpoint, credential, 0 ] }
node_ip:
value: { get_attribute: [ simple_node, public_address, 0 ] }
2021-05-04 12:42:51,303 - InfrastructureManager - DEBUG - User requested 1 instances of type simple_node and there are 0
2021-05-04 12:42:51,767 - InfrastructureManager - INFO - Creating new Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004
2021-05-04 12:42:51,954 - InfrastructureManager - INFO - Adding resources to Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004
2021-05-04 12:42:51,973 - InfrastructureManager - DEBUG - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004:
network private_net ( outbound = 'no' )
network public_net ( outbound = 'yes' )
system simple_node (
instance_name = 'simple_node' and
disk.0.os.name = 'linux' and
disk.0.os.flavour = 'ubuntu' and
disk.0.image.url = 'ost://cloud-api-pub.cr.cnaf.infn.it/6345e75f-c527-4a34-9561-33e37c0188e5' and
cpu.count >= 1 and
memory.size >= 2000000000B and
instance_type = 'iotwins.small' and
disk.0.applications contains (name = 'ansible.modules.indigo-dc.zabbix-agent') and
net_interface.0.connection = 'private_net' and
net_interface.1.connection = 'public_net'
)
configure simple_node_conf (
@begin
---
- pre_tasks:
- set_fact: hostname_prefix="{{ IM_INFRASTRUCTURE_ID }}."
when: IM_INFRASTRUCTURE_ID is defined
roles:
- role: indigo-dc.zabbix-agent
zabbix_agent_hostname_prefix: '{{hostname_prefix}}'
zabbix_agent_metadata: '{{ zabbix_server_metadata }}'
zabbix_agent_server: '{{ zabbix_server }}'
zabbix_agent_server_port: '{{ zabbix_server_port }}'
vars:
hostname_prefix: zagent.
zabbix_server: orchestrator.cloud.cnaf.infn.it
zabbix_server_metadata: Linux 668c875e-9a39-4dc0-a710-17c41376c1e0
zabbix_server_port: 10051
@end
)
contextualize (
system simple_node configure simple_node_conf step 1
)
deploy simple_node 1
2021-05-04 12:42:54,301 - InfrastructureManager - DEBUG - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Groups of VMs with dependencies
2021-05-04 12:42:54,301 - InfrastructureManager - DEBUG - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004
[[<radl.radl.deploy object at 0x7f55bc2af0f0>]]
2021-05-04 12:42:54,309 - InfrastructureManager - DEBUG - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004. Launching 1 VMs of type simple_node
2021-05-04 12:43:16,502 - CloudConnector - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Creating security group: im-3d5cd0fc-acd6-11eb-9490-0242ac110004
2021-05-04 12:43:18,414 - CloudConnector - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Creating security group: im-3d5cd0fc-acd6-11eb-9490-0242ac110004-private_net
2021-05-04 12:43:19,915 - CloudConnector - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Creating security group: im-3d5cd0fc-acd6-11eb-9490-0242ac110004-public_net
2021-05-04 12:43:21,503 - CloudConnector - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Creating node
2021-05-04 12:43:21,533 - CloudConnector - DEBUG - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: #cloud-config
merge_how: list(append)+dict(recurse_array,no_replace)+str()
users:
- homedir: /opt/cloudadm
lock-passwd: true
name: cloudadm
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAvp3HBVJ8YbpkSyawz2RN/I1Rxlgs+qIbUqWuqzn/pfA84ED83Gx1PMJYLbYt0531FSC6QpU7m7HrQ7Q0kxX33rtt4ZVPr8zyN3qNI3RyX4JY09hh/tvDEUCifrHVtdOkDl4xQwGtQoUXM0AgskHv8NOkao4H3aK46QCYJh88F/d2cgByUky3n5lVgU+QMsRoXlQ94A0Lhb9SA/0one44KpCdaDLmsOVIsPOUghlVz/O74kcKa5xaMUwUu3pUCAF4wxAGn7MoFJVTcpDeXGrCVvv6gaazDllJcIPHrSbAw25t0q9nckoHvtyIviJDr/JIaEjeFdqW/oAWyeyB+jVz
ssh-import-id: cloudadm
sudo: ALL=(ALL) NOPASSWD:ALL
2021-05-04 12:43:24,919 - CloudConnector - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Node successfully created.
2021-05-04 12:43:24,919 - InfrastructureManager - DEBUG - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004. VM successfully launched: 270bb262-acd7-4218-8d69-a0172b34743b
2021-05-04 12:43:24,965 - InfrastructureManager - INFO - VMs [<IM.VirtualMachine.VirtualMachine object at 0x7f55bc15fb00>] successfully added to Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004
2021-05-04 12:43:24,966 - ConfManager - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Starting the ConfManager Thread
2021-05-04 12:43:24,967 - ConfManager - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Killing ctxt processes in VM: 270bb262-acd7-4218-8d69-a0172b34743b
2021-05-04 12:43:24,996 - InfrastructureManager - INFO - Inf ID:3d5cd0fc-acd6-11eb-9490-0242ac110004: Successfully created
2021-05-04 12:43:25,028 - ConfManager - WARNING - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Configuration process of master node in unfinished state.
2021-05-04 12:43:25,077 - ConfManager - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Step -5 finished. Go to step: -4
2021-05-04 12:43:25,078 - ConfManager - WARNING - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Still waiting all the VMs to have a correct IP
2021-05-04 12:43:25,126 - ConfManager - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Configuration process of master node: ['check_vm_ips'] is still running.
2021-05-04 12:43:25,127 - ConfManager - INFO - Inf ID: 3d5cd0fc-acd6-11eb-9490-0242ac110004: Waiting processes of step -4 to finish.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment