Combine Ec2 Instance + Python Task

Hi ,

Can you pls help me with below Q
1.I want to run Ec2 Provision Task along with Python and Shell Task in one catalog/Workflow , How is it possible ?
2. I want to run some Shell commands in Ec2 Instance provision , Is it possible?
3. I want to get a value from a file of provisioned ec2 instance and put in the output of that task and same value needs to be passed as an input to next task
4. I want to get a vale from a file of instance and make it environment variable

Hi,
Yes, you can do this using Morpheus tasks and provisioning workflows.

  1. You can add multiple different task types to a provisioning/operational workflow including Bash and Python tasks. Automation — Morpheus Docs documentation
  2. You can do this by adding the commands to a Morpheus Bash task and then adding the task to the provision phase of a provisioning workflow. You then attach the workflow to the layout of your instance type and when you provision the instance the task will run.
  3. Using the result type of a task, you can capture a value from one task and pass it to another within a provisioning workflow - Automation — Morpheus Docs documentation
  4. You would need to use the Morpheus API for this. Again you can run the API call from within a Morpheus task to create an environment variable for you.

We cover all of this is the Morpheus Automation training class which is a 3 day instructor led class which runs every month.

2 Likes