A command execution profile describes the actions that need to be performed in a particular cloud environment in order to run the command.
The fields of the execution profile are:
id |
The numeric identifier of the command profile. Command profile ids are numbered sequentially, starting at "1". |
description |
A description of the profile |
cloud |
The URI of the cloud that the execution profile is associated with |
public |
"true" if the profile is visible to other users, or "false" if only visible to the command creator. |
actions |
the list of actions performed by the execution profile |
|
Figure 1. Sample Execution profile
26 "executionProfiles" : { 27 "id" : "1", 28 "description" : "execution profile description", 29 "cloud" : https://n3phele.appspot.com/resources/cloud/586001, 30 "public" : "true", 31 "actions" : [{ 32 "name" : "vm", 33 "description" : "grep virtual machine", 34 "workloadKey" : "grep", 35 "action" : http://www.n3phele.com/createvm, 36 "inputParameters" : [{ 37 "name" : "imageId", 38 "description" : "Virtual machine image identifier", 39 "type" : "String", 40 "value" : "ami-8c1fece5" 41 }, 42 { 43 "name" : "minCount", 44 "description" : "instance count", 45 "type" : "String", 46 "value" : "1" 47 }, 48 { 49 "name" : "instanceType", 50 "description" : "Virtual machine size", 51 "type" : "String", 52 "value" : "m1.small" 53 }, 54 { 55 "name" : "securityGroups", 56 "description" : "Security group specifies the open TCP/IP ports for the VM", 57 "type" : "String", 58 "value" : "n3phele-default" 59 }, 60 { 61 "name" : "userData", 62 "description" : "Specifies initialization commands for the VM.", 63 "type" : "String", 64 "value" : "#!/bin/bash\necho starting injection... \nset -x\nwget -q -O - https://n3phele-agent.s3.amazonaws.com/n3ph-install-tgz-basic | su - -c '/bin/bah -s ec2-user ~/agent ~/sandbox' ec2-user\n" 65 }] 66 }, 67 { 68 "name" : "shell", 69 "description" : "grep shell", 70 "workloadKey" : "shell", 71 "action" : http://www.n3phele.com/executecommand, 72 "inputFiles" : { 73 "name" : "input1", 74 "description" : "Input file1", 75 "filename" : "input.txt", 76 "optional" : "false" 77 }, 78 "inputParameters" : [{ 79 "name" : "command", 80 "description" : "grep command", 81 "type" : "String", 82 "value" : "\" echo hello; cat <input.txt >output.txt \"" 83 }, 84 { 85 "name" : "agentBaseUrl", 86 "type" : "String", 87 "value" : "$<vm.agentBaseUrl>" 88 }, 89 { 90 "name" : "agentUser", 91 "type" : "String", 92 "value" : "$<vm.agentUser>" 93 }, 94 { 95 "name" : "agentPassword", 96 "type" : "String", 97 "value" : "$<vm.agentPassword>" 98 }], 99 "outputFiles" : { 100 "name" : "output1", 101 "description" : "output file1", 102 "filename" : "output.txt", 103 "optional" : "false" 104 } 105 }] 106 }] 107 }
|
|