Created
January 31, 2021 01:19
-
-
Save alexcos78/72e76c44653507cd6efbd77a5ae3d4b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2021-01-31 01:16:45,361 - InfrastructureManager - DEBUG - TOSCA: tosca_definitions_version: tosca_simple_yaml_1_0 | |
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/master/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 | |
constraints: | |
- valid_values: [ubuntu, centos] | |
description: "Operating System distro - valid values ubuntu, centos" | |
os_version: | |
type: version | |
required: true | |
default: 16.04 | |
constraints: | |
- valid_values: [16.04, 7] | |
description: "Operating System distribution version" | |
node_templates: | |
simple_node: | |
type: tosca.nodes.indigo.Compute | |
properties: | |
os_users: [] | |
capabilities: | |
scalable: | |
properties: | |
min_instances: 1 | |
max_instances: 1 | |
count: 1 | |
os: | |
properties: | |
distribution: ubuntu | |
version: 16.04 | |
image: "ost://cloud-api-pub.cr.cnaf.infn.it/94a76d1e-cacb-48ce-ad69-c0b26fd9bb53" | |
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: | |
os_users_role: | |
file: indigo-dc.os_users | |
type: tosca.artifacts.AnsibleGalaxy.role | |
policies: | |
- deploy_on_specific_site: | |
type: tosca.policies.indigo.SlaPlacement | |
properties: | |
sla_id: 6013f27e0cd218be4664cb43 | |
outputs: | |
node_creds: | |
value: { get_attribute: [ simple_node, endpoint, credential, 0 ] } | |
node_ip: | |
value: { get_attribute: [ simple_node, public_address, 0 ] } | |
2021-01-31 01:16:47,354 - InfrastructureManager - WARNING - Policy tosca.policies.indigo.SlaPlacement not supported. Ignoring it. | |
2021-01-31 01:16:47,355 - InfrastructureManager - DEBUG - User requested 1 instances of type simple_node and there are 0 | |
2021-01-31 01:16:47,355 - InfrastructureManager - WARNING - Policy tosca.policies.indigo.SlaPlacement not supported. Ignoring it. | |
2021-01-31 01:16:47,820 - InfrastructureManager - INFO - Creating new Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004 | |
2021-01-31 01:16:47,974 - InfrastructureManager - INFO - Adding resources to Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004 | |
2021-01-31 01:16:47,993 - InfrastructureManager - DEBUG - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004: | |
network private_net ( outbound = 'no' ) | |
network public_net ( outbound = 'yes' ) | |
system simple_node ( | |
instance_name = 'simple_node' and | |
disk.0.os.flavour = 'ubuntu' and | |
disk.0.os.version = '16.04' and | |
disk.0.image.url = 'ost://cloud-api-pub.cr.cnaf.infn.it/94a76d1e-cacb-48ce-ad69-c0b26fd9bb53' and | |
cpu.count >= 1 and | |
memory.size >= 2000000000B and | |
instance_type = 'iotwins.small' and | |
disk.0.applications contains (name = 'ansible.modules.indigo-dc.os_users') and | |
net_interface.0.connection = 'private_net' and | |
net_interface.1.connection = 'public_net' | |
) | |
configure simple_node_conf ( | |
@begin | |
--- | |
- roles: | |
- role: indigo-dc.os_users | |
vars: | |
os_users: [] | |
@end | |
) | |
contextualize ( | |
system simple_node configure simple_node_conf step 1 | |
) | |
deploy simple_node 1 | |
2021-01-31 01:16:50,164 - InfrastructureManager - DEBUG - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004: Groups of VMs with dependencies | |
2021-01-31 01:16:50,164 - InfrastructureManager - DEBUG - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004 | |
[[<radl.radl.deploy object at 0x7f6918473860>]] | |
2021-01-31 01:16:50,173 - InfrastructureManager - DEBUG - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004. Launching 1 VMs of type simple_node | |
2021-01-31 01:16:57,565 - CloudConnector - INFO - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004: Creating security group: im-fd5310c4-6361-11eb-8fe7-0242ac110004 | |
2021-01-31 01:16:59,150 - CloudConnector - INFO - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004: Creating security group: im-fd5310c4-6361-11eb-8fe7-0242ac110004-private_net | |
2021-01-31 01:17:00,753 - CloudConnector - INFO - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004: Creating security group: im-fd5310c4-6361-11eb-8fe7-0242ac110004-public_net | |
2021-01-31 01:17:02,125 - CloudConnector - INFO - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004: Creating node | |
2021-01-31 01:17:02,159 - CloudConnector - DEBUG - Inf ID: fd5310c4-6361-11eb-8fe7-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 AAAAB3NzaC1yc2EAAAADAQABAAABAQDN/VmXxUsTUsX2H50S3TIQPNuZEFCIa8ltNp98/nuguClwCwqnXLQXHe0RbyGQdLyhBM5QI1MAAR9iV9nBQQdMbpZzlzXJhoMSqSWi+a4yvuG/g03EB73vUoNGwU/RJJkSoC+ciQ+lHfxNoSwoRGMi1+fOquQzHNHJtDwypqaVF3J1jm48dz+Wn0JO/KMZQdSbEw+SCu4YG0yzshq+ty9RB7ckyXLKsfqFgkmyvX7n5Kx7ZI1aTRed66IlHpexvPsOkxIc5lovH1aXlCJg1B5Fx6oetaCRd3mJSudSf+BQ4RIVEL9LRCYph6NjgSoKhr2R8w8XsJvmQAD4bSwqaMPl | |
ssh-import-id: cloudadm | |
sudo: ALL=(ALL) NOPASSWD:ALL | |
2021-01-31 01:17:06,067 - CloudConnector - INFO - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004: Node successfully created. | |
2021-01-31 01:17:06,067 - InfrastructureManager - DEBUG - Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004. VM successfully launched: 11730676-f78c-436a-9266-b771782318f2 | |
2021-01-31 01:17:06,112 - InfrastructureManager - INFO - VMs [<IM.VirtualMachine.VirtualMachine object at 0x7f69257f9240>] successfully added to Inf ID: fd5310c4-6361-11eb-8fe7-0242ac110004 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment