limnh / journey

Notes and learnings along the way of becoming an engineer
0 stars 1 forks source link

2019-04-18 #31

Open limnh opened 5 years ago

limnh commented 5 years ago

Where I left off yesterday:

Daily To-Do List:

Issues/Questions:

  1. How should .freeze be used in this ruby script?
    • Is it even necessary/helpful?

Thoughts/Solutions:

  1. .freeze prevents modification of a specified Object and throws an error when any attempt to modify happens
    • I don't think it's necessary for this script since the Diplomat call to Consul only happens once per run. If it required more looping logic, it may have made more sense. I removed the one instance from the script.
  2. I added comments in the ruby script to help shed light on what's being done.
    • Shortened the line length for readability.
    • I moved the two variables at the bottom of the script to the top; however, I ran into an error with nodes because I placed the variable above where the method it calls and its parameters were defined.
  3. requested input from dave and erin
    • erin had some updated filepaths for me to fix in puppet
    • wanted to run some tests within the health_checker profile puppet file
      • Class['consul::agent'] -> Class['datadog'] updated to Class['consul::agent'] -> Class['health_checker'] -> Class['datadog']
    • changed some file permissions to the json file which launches the ruby script