chaostoolkit-incubator / chaostoolkit-azure

Chaos Toolkit Extension for Azure
https://chaostoolkit.org/
Apache License 2.0
22 stars 28 forks source link

Return output results for activities #113

Closed bugra-derre closed 4 years ago

bugra-derre commented 4 years ago

This commit enables the ctk-azure to output results from activities. For now the activities of concern are the aks/machine actions and the vmss actions.

In the same commit I fixed minor issues such as the MANIFEST that was leading to a wrong path of the compute scripts.

Resolves: #112

Signed-off-by: Bugra bugra.derre@gmail.com

bugra-derre commented 4 years ago

@mkaszub Can you have a look. This is an output sample:

...
"output": {
        "resources": [
          {
            "id": "/subscriptions/054619fa-6951-4832-a161-76d5463c89fb/resourceGroups/MC_vmss-stress_cpu-aks_westeurope/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-21634320-vmss",
            "sku": {
              "name": "Standard_B2s",
              "tier": "Standard",
              "capacity": 1
            },
            "name": "aks-nodepool1-21634320-vmss",
            "type": "microsoft.compute/virtualmachinescalesets",
            "kind": "",
            "plan": null,
            "tags": {
              "resourceNameSuffix": "21634320",
              "creationSource": "aks-aks-nodepool1-21634320-vmss",
              "orchestrator": "Kubernetes:1.15.10",
              "poolName": "nodepool1",
              "aksEngineVersion": "aks-release-v0.47.0-1-aks"
            },
            "location": "westeurope",
            "resourceGroup": "mc_vmss-stress_cpu-aks_westeurope",
            "subscriptionId": "054619fa-6951-4832-a161-76d5463c89fb",
            "managedBy": "",
            "identity": null,
            "zones": null,
            "tenantId": "fead2b37-53d7-4cd9-ad12-d2b6c0751f29",
            "compute": [
              {
                "id": "/subscriptions/054619fa-6951-4832-a161-76d5463c89fb/resourceGroups/mc_vmss-stress_cpu_-aks_westeurope/providers/Microsoft.Compute/virtualMachineScaleSets/aks-nodepool1-21634320-vmss/virtualMachines/0",
                "name": "aks-nodepool1-21634320-vmss_0",
                "type": "Microsoft.Compute/virtualMachineScaleSets/virtualMachines",
                "location": "westeurope",
                "tags": {
                  "aksEngineVersion": "aks-release-v0.47.0-1-aks",
                  "creationSource": "aks-aks-nodepool1-21634320-vmss",
                  "orchestrator": "Kubernetes:1.15.10",
                  "poolName": "nodepool1",
                  "resourceNameSuffix": "21634320"
                },
                "instance_id": "0",
                "sku": {
                  "name": "Standard_B2s",
                  "tier": "Standard"
                },
                "latest_model_applied": true,
                "vm_id": "4176a6ff-9a1f-4157-846f-f5599f779894",
                "provisioning_state": "Succeeded",
                "model_definition_applied": "VirtualMachineScaleSet",
                "scale_set": "aks-nodepool1-21634320-vmss",
                "performed_at": 1589346398
              }
            ],
            "performed_at": 1589346398
          }
        ]
      },
      "status": "succeeded",
      "start": "2020-05-13T05:04:04.790503",
      "end": "2020-05-13T05:06:38.086495",
      "duration": 153.295992
    }
  ],
...