Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

METRON-1452 Rebase Dev Environment on Latest CentOS 6 #933

Closed
wants to merge 2 commits into from

Conversation

nickwallen
Copy link
Contributor

@nickwallen nickwallen commented Feb 9, 2018

Currently the CentOS development environment (metron-deployment/development/centos6) is based on an image metron/centos_base that has not been updated in 11 months.  This image is really just a snapshot of bento/centos6.7 from 11 months ago. The bento/centos6.7 image has not been updated in quite some time also.

On the other hand, the centos/6 image was updated 23 days ago. Presumably these images are receiving critical patches for long term support.

We should base the CentOS development environment metron-deployment/development/centos6 on the centos/6 image so that we can be confident that Metron continues to work on the latest patches for the CentOS 6 series.

This would match what we do for the Ubuntu development environment which is based on  ubuntu/trusty64. This image continues to receive updates regularly despite the age of the Ubuntu 14 release. It was updated just 3 days ago.

Changes

  1. Uses centos/6 as the base image for the CentOS development environment.

  2. Fixes a warning from Vagrant 2.0.2 which has deprecated the use of TRUE.

  3. Fixes a warning from Vagrant 2.0.2 that deprecates the use of ansible.sudo.

  4. Sets a new compatibility setting which should allow the environment to work across both Vagrant 1.8.1 and 2.0.2 better.

Testing

  1. Follow the README to launch the CentOS development environment.

    • Run the Metron Service Check
    • Ensure telemetry is visible within the Alerts UI
  2. Follow the README to launch the Ubuntu development environment.

    • Run the Metron Service Check
    • Ensure telemetry is visible within the Alerts UI

@mmiklavc
Copy link
Contributor

This looks good, but before I +1 this, what are we doing in the current special metron cut of centos 6? I'm not familiar enough with why we forked to understand what we're possibly giving up or exchanging by switching to the main centos Vagrant image.

@nickwallen
Copy link
Contributor Author

what are we doing in the current special metron cut of centos 6? I'm not familiar enough with why we forked to understand what we're possibly giving up or exchanging by switching to the main centos Vagrant image.

Sure, I'll try to explain what I remember and justify the change. Better to do our due diligence here.

Back then, we had some issues where the CentOS image would be updated and our Ansible deployment scripts would no longer work. A couple times we'd wake up in the morning with a broken dev environment when we hadn't changed anything in Metron.

As I remember it, this was back when we were just getting started. All of Metron was deployed via Ansible, different Ansible versions would have different behaviors and break things, and it was generally a very painful experience.

Back then we valued a stable dev environment over more rigorous testing. The Ansible scripts themselves have always just been a means to deploy Metron in a dev environment and not necessarily something that we want to support as part of Metron. We didn't care all that much if the Ansible scripts didn't work in all CentOS environments, they are just for our dev environment.

Fast forward to now and most of the deployment process is part of the MPack. The MPack is something that we expect our users to actually use in their own environments. Today, the MPack is a core part of Metron itself.

If a patch in CentOS occurs that breaks our MPack, then I definitely want to know about that. Given that, today I think we want to prioritize rigorous testing over a stable dev environment. And that is why I think we should use the centos/6 image as it stands.

@dlyle65535
Copy link
Contributor

@mmiklavc - the special cut has a larger swap volume than the standard image. It also is customized to what Metron required at the time to run. That's pretty much it. If that's still desirable, I'd consider rebuilding the Packer image with a more recent vintage Centos. Otherwise not so much.

@mmiklavc
Copy link
Contributor

Thanks for the info guys. @nickwallen With the reduced swap space, did you notice any issues with performance or services dying? I'm +1 by inspection if you believe we're good.

@nickwallen
Copy link
Contributor Author

I did not notice any issues, but I'll spin it up again and compare the difference in swap space just so we know what we're getting into.

Thanks for the info @dlyle65535 !

@cestella
Copy link
Member

piling on, +1 by inspection

@nickwallen
Copy link
Contributor Author

When creating the Ubuntu environment a while back, I created an Ansible role that enables swap space. (In the base Ubuntu image, swap space is not enabled.) It was easy enough to reuse that in the CentOS environment also.

With the latest commit, the CentOS environment has a larger swap space as before, but without the burden of maintaining an image in Vagrant Cloud/Atlas. I think this is the best of both worlds.

Let me know what you guys think. Would like to get reaffirmation on the +1s before merging this. @mmiklavc @cestella

@nickwallen
Copy link
Contributor Author

FYI - After the last commit, I spun-up the CentOS environment again; validated the Alerts UI is receiving data, ran the Metron Service Check successfully. All is well.

@justinleet
Copy link
Contributor

@mmiklavc @cestella Bump

@mmiklavc
Copy link
Contributor

mmiklavc commented Mar 6, 2018

Oh, I guess we need to reaffirm. Yes, +1 still stands.

@asfgit asfgit closed this in 9b4b402 Mar 6, 2018
@nickwallen nickwallen deleted the METRON-1452 branch September 17, 2018 19:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants