You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@fluo.apache.org by GitBox <gi...@apache.org> on 2020/03/06 20:27:00 UTC

[GitHub] [fluo-muchos] zachradtka opened a new pull request #328: Added support for Red Hat OS

zachradtka opened a new pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328
 
 
   This PR adds support for RHEL as a base OS instead of CentOS. No configuration changes are needed as the ansible and and `install_ansible.sh` scripts will autodetect the distribution and run the necessary steps.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] keith-turner commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
keith-turner commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r389186257
 
 

 ##########
 File path: ansible/scripts/install_ansible.sh
 ##########
 @@ -22,9 +22,19 @@ base_dir=$( cd "$( dirname "$bin" )" && pwd )
 
 set -e
 
+# get the release id
+if [ -f /etc/os-release ]; then
 
 Review comment:
   Would you happen to know if this file exists in Centos and redhat?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] zachradtka commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
zachradtka commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r389839466
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
 
 Review comment:
   When trying to install docker it was complaining about not having container-selinux. From the following blogpost, docker is not officially supported on RHEL 7:
   
   https://nickjanetakis.com/blog/docker-tip-39-installing-docker-ce-on-redhat-rhel-7x
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] keith-turner commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
keith-turner commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r389944705
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
+      shell: "sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"
 
 Review comment:
   Could the link use `https` instead of `http`?  Also could add a comment like the following.
   
   ```suggestion
         # This makes docker work on RHEL 7
         shell: "sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] zachradtka commented on issue #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
zachradtka commented on issue #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#issuecomment-596717982
 
 
   I completed a full test of deploying to CentOS 7 and RHEL 7 and both worked.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] keith-turner commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
keith-turner commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r389185746
 
 

 ##########
 File path: ansible/scripts/install_ansible.sh
 ##########
 @@ -22,9 +22,19 @@ base_dir=$( cd "$( dirname "$bin" )" && pwd )
 
 set -e
 
+# get the release id
+if [ -f /etc/os-release ]; then
+  . /etc/os-release
+  ID=$ID
+fi
+
 # enable yum epel repo
-is_installed_epel_release="rpm -q --quiet epel-release"
-install_epel_release="sudo yum install -q -y epel-release"
+if [ $ID = "rhel" ]; then
+  is_installed_epel_release="rpm -q --quiet epel-release"
+else
+  install_epel_release="sudo yum install -q -y epel-release"
 
 Review comment:
   Seems like `install_epel_release` will always be overridden immediately after the if/else. If so, why set it here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] zachradtka commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
zachradtka commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r390329142
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
+      shell: "sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"
 
 Review comment:
   I updated the comment. There isn't an HTTPS version of the default repo for CentOS. I could use a mirror that supports HTTPS, but I haven't found an elegant way to find the best mirror like the method in `get-asf-mirror.yml`. CentOS does have a status of mirrors at https://mirror-status.centos.org/ but it only lists one HTTPS mirror. I am open to suggestions if and how I should approach this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] keith-turner commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
keith-turner commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r389186833
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
 
 Review comment:
   Why is this needed?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] zachradtka commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
zachradtka commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r389879005
 
 

 ##########
 File path: ansible/scripts/install_ansible.sh
 ##########
 @@ -22,9 +22,19 @@ base_dir=$( cd "$( dirname "$bin" )" && pwd )
 
 set -e
 
+# get the release id
+if [ -f /etc/os-release ]; then
 
 Review comment:
   I spun up a CentOS image and checked. This file exists in both CentOS and Red Hat

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] zachradtka commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
zachradtka commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r390957534
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
+      shell: "sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"
 
 Review comment:
   The environment that I am working on has restrictions on certain AMIs. For one reason or another, CentOS is not an image that can be used, but RHEL is an image that can be used. I originally tried to adapt Fluo for Amazon Linux, but found it much easier to just adapt for RHEL.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] keith-turner commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
keith-turner commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r389186091
 
 

 ##########
 File path: ansible/scripts/install_ansible.sh
 ##########
 @@ -22,9 +22,19 @@ base_dir=$( cd "$( dirname "$bin" )" && pwd )
 
 set -e
 
+# get the release id
+if [ -f /etc/os-release ]; then
+  . /etc/os-release
+  ID=$ID
+fi
+
 # enable yum epel repo
-is_installed_epel_release="rpm -q --quiet epel-release"
-install_epel_release="sudo yum install -q -y epel-release"
+if [ $ID = "rhel" ]; then
+  is_installed_epel_release="rpm -q --quiet epel-release"
 
 Review comment:
   Seems like `is_installed_epel_release` is only set when ID is rhel.  Is that ok?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] zachradtka commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
zachradtka commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r389837819
 
 

 ##########
 File path: ansible/scripts/install_ansible.sh
 ##########
 @@ -22,9 +22,19 @@ base_dir=$( cd "$( dirname "$bin" )" && pwd )
 
 set -e
 
+# get the release id
+if [ -f /etc/os-release ]; then
+  . /etc/os-release
+  ID=$ID
+fi
+
 # enable yum epel repo
-is_installed_epel_release="rpm -q --quiet epel-release"
-install_epel_release="sudo yum install -q -y epel-release"
+if [ $ID = "rhel" ]; then
+  is_installed_epel_release="rpm -q --quiet epel-release"
+else
+  install_epel_release="sudo yum install -q -y epel-release"
 
 Review comment:
   Thanks; that was a bug. I pushed a new commit that fixes that.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r390481230
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
+      shell: "sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"
 
 Review comment:
   If using RHEL7, it seems better to enable the extras subscription rather than pull this RPM from the CentOS repos at all. From https://fedoraproject.org/wiki/EPEL :
   
   ```
   on RHEL 7 it is recommended to also enable the optional, extras, and HA repositories since EPEL packages may depend on packages from these repositories:
      # subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"  --enable "rhel-ha-for-rhel-*-server-rpms"
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] zachradtka commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
zachradtka commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r390607549
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
+      shell: "sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"
 
 Review comment:
   Enabling these repositories require an active subscription to RedHat. I was hoping that wasn't necessary and a user could just use a RHEL AMI.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] zachradtka commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
zachradtka commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r391193581
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
+      shell: "sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"
 
 Review comment:
   Yeah, not the best env to get things done.
   
   It is probably best for me to just keep this as a branch on a fork. Thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r391090853
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
+      shell: "sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"
 
 Review comment:
   Eek, that environment doesn't seem very developer-friendly. Still, I wonder if that's a general use case we want to add complexity to support for Fluo/Accumulo developers at large, or if it's a "this is just for me" kind of use case that makes sense in only your fork. (I have a similar "just for me" fork of fluo-uno for my use cases.)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [fluo-muchos] ctubbsii commented on a change in pull request #328: Added support for Red Hat OS

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on a change in pull request #328: Added support for Red Hat OS
URL: https://github.com/apache/fluo-muchos/pull/328#discussion_r390644549
 
 

 ##########
 File path: ansible/roles/common/tasks/main.yml
 ##########
 @@ -39,6 +52,16 @@
   retries: 10
   delay: 15
   until: yumresult is not failed
+- name: "enable SELinux (Red Hat)"
+  block:
+    - name: "check if container-selinux is installed"
+      shell: "rpm -q --quiet container-selinux"
+      register: container_selinux_installed
+      failed_when: container_selinux_installed.rc == 2
+    - name: "install container-selinux"
+      shell: "sudo yum -y install http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.107-1.el7_6.noarch.rpm"
 
 Review comment:
   I'm not sure it makes sense to cater to a RHEL AMI without a subscription. Why wouldn't such a user just use a CentOS AMI? It doesn't seem worth the added complexity, and I'm having difficulty imagining that this satisfies a need within the Fluo/Accumulo developer community.
   
   As Muchos is not a released product of the Fluo PMC, and is instead an internal tool for testing Fluo/Accumulo themselves, I'm finding it difficult to justify supporting this hybrid RHEL/CentOS approach.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services