riptano / ComboAMI

The AMI takes a set of input parameters via the EC2 user-data to install, RAID, ring, and launch a DataStax Enterprise/Community cluster.
69 stars 59 forks source link

Add custom script to execute at installation end #91

Closed ltagliamonte closed 9 years ago

ltagliamonte commented 9 years ago

As suggested I'm opening this discussion before submitting a PR. I'd like to add a new boot flag like --postscript_url able to download a script and run it at the end of the installation process. I think it is very useful for people like me that have to install additional software or perform customisation after the Cassandra installation and have those script saved somewhere else. Is anything wrong with my idea?

arodrime commented 9 years ago

FWIW, we apply a dynamical configuration through a capistrano script. You might want have a look to capistrano or equivalent or even better to Ancible, Chef or Salt.

C*heers,

Alain

ltagliamonte commented 9 years ago

Thanks Alain, i'd like to complete the customisation at the boot without using additional software. I submitted the following PR: https://github.com/riptano/ComboAMI/pull/92

mlococo commented 9 years ago

Before I decide whether to merge this, have you looked at the --repository flag? ComboAMI 2.6.x already self-updates using git on boot, and already allows you to perform that update against an arbitrary https repository.

Is there a reason you don't want to use that mechanism to deliver your customizations?

ltagliamonte commented 9 years ago

thanks @mlococo i didn't see it, btw i'm not using a public git repo so it would be easy for me customise the AMI using a http + basic_auth endpoint. Looking forward to your feedback.

mlococo commented 9 years ago

Made some comments in the PR, will merge once:

ltagliamonte commented 9 years ago

@mlococo i did all the changes and tested it, i'm attaching the logs. https://s3-eu-west-1.amazonaws.com/my-private-cloud-bucket/ami.log_url.gz https://s3-eu-west-1.amazonaws.com/my-private-cloud-bucket/ami.log_no_url.gz

mlococo commented 9 years ago

@ltagliamonte Merged, thanks for your contribution.