You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by ygy <gi...@git.apache.org> on 2015/12/30 17:19:50 UTC

[GitHub] incubator-brooklyn pull request: RabbitMQ upgrade

GitHub user ygy opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/1123

    RabbitMQ upgrade

    RabbitMQ to v.3.6.0
    Erlang to v.18.2
    
    RabbitMQ recommends Erlang 18. Release notes state:
    Minimum required Erlang version is R16B03 for plain ("just TCP")
    connections for all protocols 
    and 17.5 for TLS ones (18.x is recommended for both).
    
    The recommended provider for up to date Erlang versions is Erlang
    Solutions now.
    Supported platforms by Erlang Solutions are: CentOS, RHEL, Ubuntu and
    Debian.
    
    New Erlang versions for SUSE are provided via the openSUSE repositories

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ygy/incubator-brooklyn upgrade/rabbitmq

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/1123.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1123
    
----
commit c8911e630d071b6fbac78ee458b260a6ac260966
Author: Yavor Yanchev <ya...@yanchev.com>
Date:   2015-12-28T18:29:07Z

    RabbitMQ upgrade
    
    RabbitMQ to v.3.6.0
    Erlang to v.18.2
    
    RabbitMQ recommends Erlang 18. Release notes state:
    Minimum required Erlang version is R16B03 for plain ("just TCP")
    connections for all protocols 
    and 17.5 for TLS ones (18.x is recommended for both).
    
    The recommended provider for up to date Erlang versions is Erlang
    Solutions now.
    Supported platforms by Erlang Solutions are: CentOS, RHEL, Ubuntu and
    Debian.
    
    New Erlang versions for SUSE are provided via the openSUSE repositories

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: RabbitMQ upgrade

Posted by ahgittin <gi...@git.apache.org>.
Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1123#discussion_r50126875
  
    --- Diff: brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitSshDriver.java ---
    @@ -205,4 +195,69 @@ public void kill() {
         private String getConfigPath() {
             return getRunDir() + "/rabbitmq";
         }
    +
    +    private String getYumRepository() {
    +        String yumRepoFileName = "erlang_solutions.repo";
    +        
    +        // Version and architecture are only required for download of epel package on RHEL/Centos systems so pick sensible
    +        // defaults if unavailable
    +        //
    +        // EPEL is still required as it is a prerequisite for the packages provided by Erlang Solutions
    +        
    +        String osMajorVersion = getMachine().getOsDetails().getVersion();
    +        if (Strings.isBlank(osMajorVersion)) {
    +            osMajorVersion = "7";
    +        } else {
    +            osMajorVersion = osMajorVersion.indexOf(".") > 0 ? osMajorVersion.substring(0, osMajorVersion.indexOf('.')) : osMajorVersion;
    +            if (!CENTOS_VERSION_TO_EPEL_VERSION.keySet().contains(osMajorVersion)) {
    +                osMajorVersion = "7";
    +            }
    +        }
    +        String epelVersion = CENTOS_VERSION_TO_EPEL_VERSION.get(osMajorVersion);
    +        String osArchitecture = getMachine().getOsDetails().getArch();
    +        if (Strings.isBlank(osArchitecture)) {
    +            osArchitecture = "x86_64";
    +        }
    +
    +        // Erlang Solutions provide separate packages for RHEL and CentOS, but they are hosted in a single repo.
    +        // E.g. - http://packages.erlang-solutions.com/rpm/centos/6/x86_64/
    +        // 
    +        // Erlang Solutions created a repo configuration RPM which can NOT be used on RedHat, because it has explicit checks for CentOS.
    +        // 
    +        // Bellow we are creating a repo file that works for CentOS and RedHat
    +        return chainGroup(
    +                sudo("yum -y update ca-certificates"),
    +                sudo("rpm -Uvh --replacepkgs " + format("http://download.fedoraproject.org/pub/epel/%s/%s/epel-release-%s.noarch.rpm", osMajorVersion, osArchitecture, epelVersion)),
    +                "( cat << 'EOF_BROOKLYN'\n"
    +                   + "[erlang-solutions]\n"
    +                   + "name=Centos / RHEL " + osMajorVersion + " - $basearch - Erlang Solutions\n"
    +                   + "baseurl=http://packages.erlang-solutions.com/rpm/centos/" + osMajorVersion + "/$basearch\n"
    +                   + "gpgcheck=0\n"
    +                   + "gpgkey=http://packages.erlang-solutions.com/debian/erlang_solutions.asc\n"
    +                   + "enabled=1\n"
    +                   + "EOF_BROOKLYN\n"
    +                   + ") > " + yumRepoFileName,
    +                  sudo(format("mv %s /etc/yum.repos.d/", yumRepoFileName)),
    +                  sudo(format("chown root:root /etc/yum.repos.d/%s", yumRepoFileName))
    +            );
    +    }
    +
    +    private String getAptRepository() {
    +        String debFileName = "erlang-repo.deb";
    +
    +        return chainGroup(
    +                INSTALL_WGET,
    +                format("wget --quiet -O %s %s", debFileName, entity.getConfig(RabbitBroker.ERLANG_DEB_REPO_URL)),
    +                sudo(format("dpkg -i %s", debFileName))
    +            );
    +    }
    +
    +    private String getZypperRepository() {
    +        return chainGroup(
    +                ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/devel:/languages:/erlang/SLE_11_SP3 erlang_sles_11")),
    --- End diff --
    
    @bostko You're probably right, but for another PR...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: RabbitMQ upgrade

Posted by bostko <gi...@git.apache.org>.
Github user bostko commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1123#discussion_r48613950
  
    --- Diff: brooklyn-library/software/messaging/src/main/java/org/apache/brooklyn/entity/messaging/rabbit/RabbitSshDriver.java ---
    @@ -205,4 +195,69 @@ public void kill() {
         private String getConfigPath() {
             return getRunDir() + "/rabbitmq";
         }
    +
    +    private String getYumRepository() {
    +        String yumRepoFileName = "erlang_solutions.repo";
    +        
    +        // Version and architecture are only required for download of epel package on RHEL/Centos systems so pick sensible
    +        // defaults if unavailable
    +        //
    +        // EPEL is still required as it is a prerequisite for the packages provided by Erlang Solutions
    +        
    +        String osMajorVersion = getMachine().getOsDetails().getVersion();
    +        if (Strings.isBlank(osMajorVersion)) {
    +            osMajorVersion = "7";
    +        } else {
    +            osMajorVersion = osMajorVersion.indexOf(".") > 0 ? osMajorVersion.substring(0, osMajorVersion.indexOf('.')) : osMajorVersion;
    +            if (!CENTOS_VERSION_TO_EPEL_VERSION.keySet().contains(osMajorVersion)) {
    +                osMajorVersion = "7";
    +            }
    +        }
    +        String epelVersion = CENTOS_VERSION_TO_EPEL_VERSION.get(osMajorVersion);
    +        String osArchitecture = getMachine().getOsDetails().getArch();
    +        if (Strings.isBlank(osArchitecture)) {
    +            osArchitecture = "x86_64";
    +        }
    +
    +        // Erlang Solutions provide separate packages for RHEL and CentOS, but they are hosted in a single repo.
    +        // E.g. - http://packages.erlang-solutions.com/rpm/centos/6/x86_64/
    +        // 
    +        // Erlang Solutions created a repo configuration RPM which can NOT be used on RedHat, because it has explicit checks for CentOS.
    +        // 
    +        // Bellow we are creating a repo file that works for CentOS and RedHat
    +        return chainGroup(
    +                sudo("yum -y update ca-certificates"),
    +                sudo("rpm -Uvh --replacepkgs " + format("http://download.fedoraproject.org/pub/epel/%s/%s/epel-release-%s.noarch.rpm", osMajorVersion, osArchitecture, epelVersion)),
    +                "( cat << 'EOF_BROOKLYN'\n"
    +                   + "[erlang-solutions]\n"
    +                   + "name=Centos / RHEL " + osMajorVersion + " - $basearch - Erlang Solutions\n"
    +                   + "baseurl=http://packages.erlang-solutions.com/rpm/centos/" + osMajorVersion + "/$basearch\n"
    +                   + "gpgcheck=0\n"
    +                   + "gpgkey=http://packages.erlang-solutions.com/debian/erlang_solutions.asc\n"
    +                   + "enabled=1\n"
    +                   + "EOF_BROOKLYN\n"
    +                   + ") > " + yumRepoFileName,
    +                  sudo(format("mv %s /etc/yum.repos.d/", yumRepoFileName)),
    +                  sudo(format("chown root:root /etc/yum.repos.d/%s", yumRepoFileName))
    +            );
    +    }
    +
    +    private String getAptRepository() {
    +        String debFileName = "erlang-repo.deb";
    +
    +        return chainGroup(
    +                INSTALL_WGET,
    +                format("wget --quiet -O %s %s", debFileName, entity.getConfig(RabbitBroker.ERLANG_DEB_REPO_URL)),
    +                sudo(format("dpkg -i %s", debFileName))
    +            );
    +    }
    +
    +    private String getZypperRepository() {
    +        return chainGroup(
    +                ok(sudo("zypper --non-interactive addrepo http://download.opensuse.org/repositories/devel:/languages:/erlang/SLE_11_SP3 erlang_sles_11")),
    --- End diff --
    
    I see this is a moved code from previously. However do we need `ok` here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: RabbitMQ upgrade

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/1123


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---