#chef

/

      • gavit
        coderanger: ntp and w32time?
      • coderanger
        ntpd and w32tm
      • Both use NTP, but are unrelated programs
      • Also for clarity, NTP is a protocol, ntpd is a particular daemon implementation
      • pjy joined the channel
      • Tokynet joined the channel
      • GenteelBen joined the channel
      • gavit
        coderanger: agreed, but there isn't a cookbook for 'synced time' which covers both :)
      • coderanger
        Sure, but "I'll try to override the ntp::windows_client to use the w32time" is not a thing
      • The two are not interchangable
      • segv
        gavit: easiest thing you can do...
      • gavit
        coderanger: ntp::windows_client is a file which makes a dir, and a file, and installs ntpd. overriding it to set w32time is possible is it not? I might have to rename the cookbook for 'correctness', but thats it right?
      • segv
        w32tm /config /syncfromflags:manual /manualpeerlist:‚ÄĚserver1,server2,server3"
      • w32tm /sync
      • done.
      • coderanger
        s/override/rewrite from scratch/
      • segv
        Just use the windows cookbook and run a command
      • coderanger
        It's not an "override"
      • You're just writing a new reciupe
      • cheeseplus
        yea, not in the chef sense
      • segv
        Takes you like 2 minutes and you'll move on with life
      • sorry that was w32tm /resync**
      • coderanger
        You can totally write a new recipe, I'm just pointing out the old one is not useful and there is nothing to "override"
      • gavit
        segv: yeah, I found the commands. just need to figure out how to 'rewrite' it.
      • coderanger
        gavit: You mentioned that you are just starting out with Chef, have you gone through the tutorials?
      • gavit
        segv: cheeseplus coderanger would it make more sense to 'write a new cookbook' for windows clients regarding the time, or just overwrite the file
      • coderanger: I've been through some
      • coderanger
        Yes, you have to write something new
      • You can't override someone else's cookbook without forking it
      • And you shouldn't fork cookbooks without a really good reason
      • gavit
        coderanger: so rather than run ntp on all nodes, you run ntp on all linux nodes and mycookbook on all windows nodes?
      • coderanger
        You run `mycompany-ntp` on all nodes
      • gavit
        coderanger: I didn't fork it. I wrappered it
      • coderanger
        which can `include_recipe 'ntp'` for Linux
      • and has its own for Windows
      • gavit
        coderanger: thats what I did
      • segv
      • it's not hard.
      • That would do it in like 1 second haha
      • gavit
        segv: I had a Stop-Service w32time as well
      • segv
        you can do that if you want
      • but
      • I gave you some boilerplate
      • The rest we shall say, is history :)
      • gavit
        segv: thanks for that
      • segv
        np
      • gavit
      • coderanger: I was told hyphens werent allowed in cookbooks
      • segv
        gavit: not recommended, you can do it manually but "chef" itself doesn't openly support it.
      • gavit: use underscores :)
      • gavit
        segv: I did a dot
      • coderanger
        gavit: That's a ... complex subject
      • segv
        There is a bug that you can track about it
      • coderanger
        Chef does openly support it and always will
      • segv
        I forgot the link, but it's out there
      • coderanger
        _Chef-DK_ is weird.
      • jackjackdripper has quit
      • gavit
        haha
      • Lucky_ABA has quit
      • segv
        Right, sorry for the confusion it's DK that doesn't support it openly :p
      • gavit
        well, for now a dot will do just fine
      • segv
        e.g. chef genereate ...
      • generate* bah, I cannot type today
      • my007ms
        what is the good why to do system update "yum update" without use execute i try cookbook yum but it's have not update option for all system i need update per package
      • gavit
        segv: if I dont update the version number in the metadata and do a knife upload cookbook, does it overwrite it? or do I *need* to version++ ?
      • segv
        gavit: I don't believe it overwrites it on the server side.
      • gavit
        too bad
      • brianweaver joined the channel
      • brianweaver has quit
      • pauzed
        it -should- overrite whatever version is there
      • but it can also cause some mixed weirdness so i believe its much better to increment each upload
      • Lucky_ABA joined the channel
      • arnonhongklay joined the channel
      • mohae joined the channel
      • tas50 has quit
      • cajone has quit
      • twalla joined the channel
      • twalla has quit
      • cajone joined the channel
      • mornap joined the channel
      • coderanger
        `knife cookbook upload` allows overwriting by default
      • `berks upload` freezes the upload (as does `knife cookbook upload -f`) which prevents uploading again for the same version
      • and policyfiles use a different storage API to start with
      • Knuit_ joined the channel
      • Knuit_
        How do resources generally handle idempotency for fields it can't recall to check for changes? Like a windows service run_as password?
      • coderanger
        They don't
      • Knuit_
        That's what I figured, so it'll need to reconfigure each time?
      • cheeseplus
        you have not_if and only_if guards
      • GenteelBen has quit
      • coderanger
        I mean if there isn't an long-term storage then it's hard to define idempotence
      • But chances are it's stored somewhere, you just have to find where and check against it
      • you can also use an out-of-band idempotence store, like puts some JSON in a file somewhere
      • but you need to be _very_ careful that doesn't get out of sync
      • Knuit_
        Yeah, we're templatizing our app definitions into json which we feed through our recipes to build things out. The instance I was thinking about is where a service account password changes but nothing else. If we were to just not re-install the service it already exists, we would miss that. Otherwise we're going to be re-installing with every run
      • coderanger
        Indeed, you would have to figure out where Windows stores that
      • Somewhere deep in the registry perhaps?
      • Knuit_
        Yup, I assume there's tools out there to decrypt as well.
      • Our security team might not like that though
      • coderanger
        One hopes it's stored as a hash or something
      • spuder joined the channel
      • spuder has quit
      • brianweaver joined the channel
      • spuder_ has quit
      • brianweaver has quit
      • zeroDi has quit
      • my007ms has quit
      • ssd7 joined the channel
      • mikeydoyle joined the channel
      • ssd7 has quit
      • Tokynet joined the channel
      • MattMaker joined the channel
      • mondo has quit
      • mikeydoyle has quit
      • moos3 has quit
      • mikeydoyle joined the channel
      • moos3 joined the channel
      • mikeydoyle has quit
      • mikeydoyle joined the channel
      • emachnic joined the channel
      • my007ms joined the channel
      • my007ms has quit
      • emachnic has quit
      • Tokynet joined the channel
      • brianweaver joined the channel
      • mikeydoyle has quit
      • phutchins joined the channel
      • brianweaver has quit
      • moos3 has quit
      • Ryjedo_ joined the channel
      • Ryjedo has quit
      • twalla joined the channel
      • finisherr joined the channel
      • twalla has quit
      • iverson08811 has quit
      • adwolfe has quit
      • julian-delphiki joined the channel
      • azizshamim has quit
      • brdude has quit
      • gluytium joined the channel
      • jackjackdripper joined the channel
      • azizshamim joined the channel