Netflix / aminator

A tool for creating EBS AMIs. This tool currently works for CentOS/RedHat Linux images and is intended to run on an EC2 instance.
Apache License 2.0
952 stars 170 forks source link

Support for running an arbitrary script for the provisioning step #110

Open analogue opened 11 years ago

analogue commented 11 years ago

I see there are provisioners for apt, yum, and chef. This seems overly constrained. Why not allow for an arbitrary script to be executed as the provisioning step (similar to user-data when launching an EC2 instance)? This would allow flexibility with provisioning and obviate the need (assuming my understanding of the aminator is complete) for specific provisioning plugins.

bmoyles commented 11 years ago

Absolutely no reason this couldn't be implemented as a plugin. I don't think anyone has stated a need for that to-date, so if you'd be willing to contribute it as an enhancement, please do.

On Fri, Jul 5, 2013 at 1:13 PM, Semir Patel notifications@github.comwrote:

I see there are provisioners for apt, yum, and chef. This seems overly constrained. Why not allow for an arbitrary script to be executed as the provisioning step (similar to user-data when launching an EC2 instance)? This would allow flexibility with provisioning and obviate the need (assuming my understanding of the aminator is complete) for specific provisioning plugins.

— Reply to this email directly or view it on GitHubhttps://github.com/Netflix/aminator/issues/110 .

bmoyles commented 11 years ago

Also, to clarify, the reason this doesn't exist so far is likely due to design goals we had at Netflix when implementing Aminator. One goal was to avoid having developers concern themselves with the low-level details, and Netflix happens to have a pretty darn excellent build framework that takes 99% of the pain away. The output of that process is a RPM or DEB. An arbitrary shell script would work, but you'd have to decide where Aminator ends and the shell script begins. Does the script handle chroot? Does it handle RHEL-like and Debian-like concerns? Does it simply "provision?" Who within the organization is responsible for that? (Which in many organizations is obvious, but Netflix's structure makes it a bit blurrier given that development teams are both devops and development with engtools providing services and tools to them to ease the pain).

Aminator was built to be pluggable for this very sort of reason, and it's possible others would agree with you, so if you've got the time, feel free to share :)

On Fri, Jul 5, 2013 at 11:39 PM, Brian Moyles brian@moyles.net wrote:

Absolutely no reason this couldn't be implemented as a plugin. I don't think anyone has stated a need for that to-date, so if you'd be willing to contribute it as an enhancement, please do.

On Fri, Jul 5, 2013 at 1:13 PM, Semir Patel notifications@github.comwrote:

I see there are provisioners for apt, yum, and chef. This seems overly constrained. Why not allow for an arbitrary script to be executed as the provisioning step (similar to user-data when launching an EC2 instance)? This would allow flexibility with provisioning and obviate the need (assuming my understanding of the aminator is complete) for specific provisioning plugins.

— Reply to this email directly or view it on GitHubhttps://github.com/Netflix/aminator/issues/110 .

kvick commented 11 years ago

This should be more easily doable now that #102 is done and chroot setup is now handled by the distro plugin.