[Openstack-operators] cURL call at the end of provisioning and deprovisioning

Ben Morrice ben.morrice at epfl.ch
Mon Aug 15 14:35:57 UTC 2016


You probably want to investigate the nova notification message queue and
writing something custom that listens to that.

Specifically the messages 'compute.instance.create.end' and
'compute.instance.delete.end'.

Here is a basic example to get you started:
http://alesnosek.com/blog/2015/05/25/openstack-nova-notifications-subscriber/

Kind regards,

Ben Morrice

______________________________________________________________________
Ben Morrice | e: ben.morrice at epfl.ch | t: +41-21-693-9670
EPFL ENT CBS BBP
Biotech Campus
Chemin des Mines 9
1202 Geneva
Switzerland

On 15/08/16 16:08, William Josefsson wrote:
> Yes thanks Tomas. I thought of the nova boot --user-data myscript.sh
> option, but I'm not sure how that would manage a deprovisioning. nova
> delete myvm, at this point I also wanna run a delete script than to
> delete the A-record, or is that possible? thx! Will
>
> On Mon, Aug 15, 2016 at 7:59 PM, Tomáš  Vondra <vondra at homeatcloud.cz> wrote:
>> Hi Will!
>> You may want one of two things:
>> a) OpenStack Designate, which is a DNS as a Service system integrated with Nova. It will add a record for every instance in a zone you delegate to it.
>> b) Cloud-init. It runs in nearly every OpenStack Linux OS image and is configured by /etc/cloud/cloud.cfg. There you will see a module that does a curl call at the end of the boot process. You don't have to modify the image, it takes configuration as a user-data script.
>> Tomas
>>
>>
>> -------- Původní zpráva --------
>> Odesílatel: William Josefsson <william.josefson at gmail.com>
>> Odesláno: 14. srpna 2016 17:54:45 SELČ
>> Komu: openstack-operators at lists.openstack.org
>> Předmět: [Openstack-operators] cURL call at the end of provisioning and deprovisioning
>>
>> Hi list,
>>
>> I wanted to make a cURL call once an instance provisioning finished,
>> and also when an instance gets deprovisioned. I will make a http call
>> to PowerDNS for registration and deregistration of A record.
>>
>> Is there any way to run a common for a instance once it is finished
>> provisioning and when it gets deprovisioned?
>>
>> thx, will
>>
>> _______________________________________________
>> OpenStack-operators mailing list
>> OpenStack-operators at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>>
> _______________________________________________
> OpenStack-operators mailing list
> OpenStack-operators at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators




More information about the OpenStack-operators mailing list