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

First implementation #1

Merged
merged 1 commit into from
Nov 18, 2016
Merged

First implementation #1

merged 1 commit into from
Nov 18, 2016

Conversation

tionebsalocin
Copy link
Contributor

Contains:

  • Cookbook basic skeleton
  • default attribute file with an example
  • default recipe including :
    • The activation of w32time service
    • Configure w32time to use NTP protocol on a specific ntp server

elevated_username: System
elevated_password: null
driver_config:
box: criteo-windows-2012r2-standard
Copy link
Contributor

Choose a reason for hiding this comment

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

this box is not accessible from the internet.

I suggest not to commit this kitchen.yml file since it will be hard to use over kitchen.ec2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as discussed i've kept both

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, discussed offline, let's keep it

@@ -0,0 +1,23 @@
-----BEGIN RSA PRIVATE KEY-----
Copy link
Contributor

Choose a reason for hiding this comment

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

are you sure you want to commit a private key?

name 'w32time'
maintainer 'Nicolas BENOIT'
maintainer_email '[email protected]'
license 'All rights reserved'
Copy link
Contributor

Choose a reason for hiding this comment

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

license must be apache for all our open source cookbook

# Command to configure w32time service
# 0x8 stands for time client
execute 'set ntp config' do
command "w32tm /config /update /manualpeerlist:\"#{node['w32time']['ntpserver']},0x8\" /syncfromflags:manual /reliable:yes"
Copy link
Contributor

Choose a reason for hiding this comment

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

OPT: #{node['w32time']['ntpserver']},0x8 is repeated twice, it might worth it to have a variable for that

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering, is the w32tm /config required if you configure the registry key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the w32tm configuration makes sure all the required registry keys are set properly.
It could be more than the two already checked depending on the previous configuration (for instance from nt5ds some other keys may be altered).
Do you think it would be mandatory to remove it?

# Command to configure w32time service
# 0x8 stands for time client
execute 'set ntp config' do
command "w32tm /config /update /manualpeerlist:\"#{node['w32time']['ntpserver']},0x8\" /syncfromflags:manual /reliable:yes"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering, is the w32tm /config required if you configure the registry key.


# Make sure w32time service is running
service node['w32time']['service'] do
service_name node['w32time']['service']
Copy link
Contributor

Choose a reason for hiding this comment

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

This line is not required because the resource name will be the default value

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -0,0 +1,6 @@
#service name definition
default['w32time']['service'] = 'w32time'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can hardcode this instead of having an attribute for a value that'll "never" change

@@ -0,0 +1,6 @@
#service name definition
default['w32time']['service'] = 'w32time'
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can hardcode this instead of having an attribute for a value that'll "never" change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

# This recipe will Configure w32time service to use ntp

# Make sure w32time service is running
service node['w32time']['service'] do
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can hardcode w32time for now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@kamaradclimber
Copy link
Contributor

lgtm, let's make test pass and merge

@Annih Annih merged commit 43ee604 into master Nov 18, 2016
@Annih Annih deleted the FirstImplementation branch November 18, 2016 15:01
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.

3 participants