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 ssl config user data for ssl transport, if required append to user_data script specified by user. #363

Merged

Conversation

Aliasgar16
Copy link

In-progress

@Aliasgar16
Copy link
Author

Completed implementation and testing.

exit 1
when ps_start_tag_index && ps_end_tag_index
script_lines[ps_end_tag_index] = ssl_config_user_data + ps_end_tag
modify_user_data_file(script_lines.join)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we are tampering with user's file? Sometime user might use same user data script with plaintext transport

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siddheshwar-more I will modify code to not to modify user's user_data file and will push the latest changes after validating/testing all scenarios.

@Aliasgar16
Copy link
Author

@siddheshwar-more made changes as per your comments and successfully tested it for all the scenarios.

<<-EOH

$vm_name = invoke-restmethod -uri http://169.254.169.254/latest/meta-data/public-ipv4
winrm quickconfig -q
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should do this only if winrm is not enabled (probably by checking the status of the winrm service). Also, this creates a plaintext listener -- if we see that there's a new listener in existence after winrm quickconfig -q, we should delete that listener since we don't actually want the plaintext listener.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey,

Our mutual friends just told such a great news, they have a surprise for you! Just take a look http://gychycyrdy.palmcitymillwork.biz/oizzgkz

Later, [email protected]

@adamedx
Copy link

adamedx commented Oct 9, 2015

I think separately we should have a "--no-create-ssl-listener" option where we do nothing here -- that handles the case for custom images that might already have an ssl listener configured.

@Aliasgar16
Copy link
Author

I have implemented and tested the changes as per the above comments.

@adamedx
Copy link

adamedx commented Oct 19, 2015

Looks good, I tested it out and it worked perfectly for me. Please rebase and merge.

aliasgar16 added 6 commits October 20, 2015 13:07
…ed through ec2-metadata and also added RSpecs.
…config code, also updated RSpecs and successfully tested the changes with all the scenarios.
…HTTP plaintext listener if it exist, added create-no-ssl-listener option which does not adds ssl config when specified, updated RSpecs and successfully tested the changes for all the scenarios.
NimishaS pushed a commit that referenced this pull request Oct 20, 2015
…ser_data

Add ssl config user data for ssl transport, if required append to user_data script specified by user.
@NimishaS NimishaS merged commit 672f715 into chef:master Oct 20, 2015
@NimishaS NimishaS deleted the ali/add_ssl_config_user_data branch October 20, 2015 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants