Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a user_data provision template type - http://theforeman.org/issues/1561 #107

Closed
wants to merge 131 commits into from

Conversation

pccowboy
Copy link

This request combines the previous fixes for "Figure out how to make the power buttons work properly. Update the IP a.ddress when the power state changes" and the changes for making cloud-config use the user_data for EC2 instances.

The example user_data in this changeset is being used to create developer instances in our organization, and so far seems to work as I wanted. It prevents the amazon AMI from forcing new updates on a reboot of the instance, and allows us to install other repositories and get packages from them as soon as the instance is requested.

The previous pull request had the following comments:

This commit seems a little scattered to me, but I was not sure how to reconcile the compute_resource_vms idea of the power button with the orchestration/compute idea of power on/power off.

Fog does not allow updating of a compute resource that has an identity, so I took those bits out.

I have the IP address updating on power state changes, and it seems mostly solid, although I think it could be done better.

I cannot figure out how to get the "Name" tag to appear in the 'started' and 'stopped' messages, but I figure it is there, somewhere.

David Swift added 30 commits June 5, 2012 00:04
…om queuing when there is not a finish script. Make sure any instance changes between queue and post_queue get saved.
add backtrace to compute resource failure msg

add user_data provisioning script type.  Add user_data to the creation of a compute instance

wip on user data feature

configTemplate returns nil if a template is not found

Generate and send user-data to an EC2 instance.  Prevent SSH-events from queuing when there is not a finish script.  Make sure any instance changes between queue and post_queue get saved.

taking a hint from app/models/host.rb, make sure that our save after getting an IP doesnt start validation all over again

adjust the validation method, so that we can use a simple check to prevent queuing tasks when a finish script is not present

only force presence of a finish script on non-EC2 provider
… were found. This should be expanded to a better check based upon the provider type, IMO. But, that is work for another day.
David Swift added 24 commits July 24, 2012 19:56
add backtrace to compute resource failure msg

add user_data provisioning script type.  Add user_data to the creation of a compute instance

wip on user data feature

configTemplate returns nil if a template is not found

Generate and send user-data to an EC2 instance.  Prevent SSH-events from queuing when there is not a finish script.  Make sure any instance changes between queue and post_queue get saved.

taking a hint from app/models/host.rb, make sure that our save after getting an IP doesnt start validation all over again

adjust the validation method, so that we can use a simple check to prevent queuing tasks when a finish script is not present

only force presence of a finish script on non-EC2 provider
… were found. This should be expanded to a better check based upon the provider type, IMO. But, that is work for another day.
add backtrace to compute resource failure msg

add user_data provisioning script type.  Add user_data to the creation of a compute instance

wip on user data feature

configTemplate returns nil if a template is not found

Generate and send user-data to an EC2 instance.  Prevent SSH-events from queuing when there is not a finish script.  Make sure any instance changes between queue and post_queue get saved.

taking a hint from app/models/host.rb, make sure that our save after getting an IP doesnt start validation all over again

adjust the validation method, so that we can use a simple check to prevent queuing tasks when a finish script is not present

only force presence of a finish script on non-EC2 provider
… were found. This should be expanded to a better check based upon the provider type, IMO. But, that is work for another day.
…akes precedence over the foreman-generated name
add backtrace to compute resource failure msg

add user_data provisioning script type.  Add user_data to the creation of a compute instance

wip on user data feature

configTemplate returns nil if a template is not found

Generate and send user-data to an EC2 instance.  Prevent SSH-events from queuing when there is not a finish script.  Make sure any instance changes between queue and post_queue get saved.

taking a hint from app/models/host.rb, make sure that our save after getting an IP doesnt start validation all over again

adjust the validation method, so that we can use a simple check to prevent queuing tasks when a finish script is not present

only force presence of a finish script on non-EC2 provider
…, for the user-data example scripts migration
@ohadlevy
Copy link
Member

hi @pccowboy I'm unable to use this PR in its current state hence I'm closing it, if you still want to add this change, please create a new one - thanks!

@ohadlevy ohadlevy closed this Nov 11, 2012
@dLobatog
Copy link
Member

This would be so useful. Is the closed PR working for anyone?

@ohadlevy
Copy link
Member

@elobato I don't mind adding another template type , just saying that the state of this PL is not mergable :)

@dLobatog
Copy link
Member

I know I know, I hope @pccowboy will make it

cfouant pushed a commit to cfouant/foreman that referenced this pull request Dec 18, 2018
trying normal centos 6 rackspace image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants