METRON-1349 Full Dev Builds Metron Twice #866
Conversation
yum: name=epel-release update_cache=yes | ||
|
||
|
||
yum: name=epel-release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to force a cache update here. This role gets run repetitively and forcing a cache update just slows us down.
wait_for : | ||
host: "{{ ambari_host }}" | ||
port: "{{ ambari_port }}" | ||
delay: 120 | ||
timeout: 300 | ||
timeout: 600 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to always wait 2 minutes for Ambari to be ready. Most often it is already up and kicking by the time we get here. Rather than have a forced delay, I just added the delay duration to the overall timeout parameter in case there is a delay in getting Ambari going.
become: true | ||
roles: | ||
- { role: ambari_slave } | ||
- { role: metron-builder, tags: ['build'] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the cause of the second build.
The process was a bit more complex when Quick Dev was around because it would launch the Quick Dev image, then rebuild and try to push out new bits to Quick Dev. Since we don't need that any longer, this can be simplified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will --ansible-skip-tags="build" still keep it from building at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
Do you mean I should see two cowsay building metrons before and only one after? |
Sorry, I do not understand what you are asking, @ottobackwards |
How would I have known it was building twice? How do I tell if it builds only once? I usually fire and forget vagrant up |
i'm on irc if you want to chat btw ;) |
@ottobackwards Yes, I think you'd see it twice, looking at my logs
Way down later in the build:
@nickwallen Is this a correct assessment? |
With this PR, you should see "Build Metron" and "Build Metron RPMs" only once each. Here is the log output of what it should look-like. |
Yeah, sorry, I wasn't clear, my log sample is prior to this PR |
Also, keep in mind that each time you run a 'vagrant up' it will append to that ansible.log file. So that file will contain multiple deployments. |
Ok, so validation is through the logs. You mean you don't see cowsay messages for ansible @nickwallen ? lol |
ok: [node1]
______________________________________
< TASK [metron-builder : Build Metron] >
--------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| || |
Ha. Very nice @ottobackwards . I added more detailed testing steps should they be needed by anyone else. Sadly, no cows. |
@ottobackwards Nope, at least I don't. I assume you're not on a Mac, because I don't believe cowsay is installed by default on them. Hilariously, I just installed it via homebrew though. |
I am on a mac, and I don't remember why I did it, but I have cowsay installed |
Ran per instructions Nice work! +1 |
Thanks @ottobackwards . I should also mention that I did run Metron up in AWS too in testing this PR, since that also depends on the changes I made here. That worked nicely also. |
I'm +1 by inspection, given that @ottobackwards ran it up successfully. Good job! |
Much, much better! Thanks @nickwallen +1
|
Removing the "Quick Dev" environment in #852 had an unintended side effect. It caused Metron to be built twice during the Full Dev deployment process. Unless you prefer a double-build for thoroughness, this can be annoying.
Testing
Deploy Full Dev and ensure that Metron is not build twice. Once Metron is deployed, login to Ambari and run the Metron Service Check. If the service check passes, we've done a solid.
More detailed steps might look like this.
Clear out the old logs and launch Full Dev.
Ensure that Metron was built only once. There should be only one record each for "Build Metron" and "Build Metron RPMs".