I envision to run these pre/post scripts on CS management server. These scripts can be in any of languages such as shell/ruby/python/java.
Here is our use case: We¹d like to automatically register new instances in RedHat IPA server (something like windows nodes auto joining an AD domain when it is provisioned), and unregister an instance when it is destroyed. So it seems the best way to achieve this is by using pre/post scripts at appropriate steps during an instance¹s life cycle. Here are roughly the steps of registering new instance to IPA: 1. User create a new instance in CS web UI 2. CS server (thru a pre-create script) tell IPA a new host is coming and generate an one time password for that host (this one time password could be save d as user data and passed to instance) 3. CS server creates new instance 4. New Instance registers itself with IPS, using one time password generated in step 2) Here are roughly steps of unregister an instance from IPA: 1. User destroys an instance from CS web UI. 2. CS server destroys instance. 3. CS server (thru a post-destroy script) tells IPA to unregister the destroyed instance. Is this doable ? Yiping On 10/28/14, 9:31 PM, "Jayapal Reddy Uradi" <[email protected]> wrote: >Hi Yiping, > >Can you please elaborate more about your requirement. >Where you want to run the script ? ... Inside the VM ? > >Thanks, >Jayapal >On 29-Oct-2014, at 12:31 AM, Yiping Zhang <[email protected]> wrote: > >> Hi, all: >> >> Does anyone know if CloudStack provide any mechanism to run a pre/post >>scripts after an instance is created or destroyed ? >> >> Thanks, >> >> Yiping >
