You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by drigodwin <gi...@git.apache.org> on 2017/04/14 12:22:02 UTC
[GitHub] brooklyn-server pull request #636: Enable older Java versions
GitHub user drigodwin opened a pull request:
https://github.com/apache/brooklyn-server/pull/636
Enable older Java versions
Versions of Java prior to 1.8 are not available by standard on Ubuntu 16.x+, this adds the older versions required by some software.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/drigodwin/brooklyn-server enable-ubuntu-java-versions
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/636.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 #636
----
commit b6c8566bbbc4766dd5e332a9c0db7f992f5f9ed4
Author: Duncan Godwin <du...@cloudsoftcorp.com>
Date: 2017-04-14T12:20:03Z
Enable older Java versions
----
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by duncangrant <gi...@git.apache.org>.
Github user duncangrant commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111569328
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -621,6 +621,7 @@ private static Object getFlag(Map<?,?> flags, String flagName, Object defaultVal
public static String installJava(int version) {
Preconditions.checkArgument(version == 6 || version == 7 || version == 8, "Supported Java versions are 6, 7, or 8");
List<String> commands = new LinkedList<String>();
+ commands.add(ok(addOpenJDKPPK()));
--- End diff --
sorry possibly I mean the other way round so you can ignore me
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111724623
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -621,6 +621,7 @@ private static Object getFlag(Map<?,?> flags, String flagName, Object defaultVal
public static String installJava(int version) {
Preconditions.checkArgument(version == 6 || version == 7 || version == 8, "Supported Java versions are 6, 7, or 8");
List<String> commands = new LinkedList<String>();
+ commands.add(ok(addOpenJDKPPK()));
--- End diff --
Fair enough
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111724680
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -671,6 +672,15 @@ public static String installJavaLatestOrWarn() {
}
/**
+ * Adds the PPA for OpenJDK for older JDK versions (7 and lower) required by some software (e.g. JBoss)
+ */
+ public static String addOpenJDKPPK(){
--- End diff --
Fair enough too, let's go for that now but I would like to see a better pattern implemented in the future (if possible)
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111567928
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -671,6 +672,15 @@ public static String installJavaLatestOrWarn() {
}
/**
+ * Adds the PPA for OpenJDK for older JDK versions (7 and lower) required by some software (e.g. JBoss)
+ */
+ public static String addOpenJDKPPK(){
--- End diff --
Not sure that is the right was of doing this. I'm wondering if it would be better to handle this case by case, i.e. in the blueprints themselves
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by tbouron <gi...@git.apache.org>.
Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111567802
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -621,6 +621,7 @@ private static Object getFlag(Map<?,?> flags, String flagName, Object defaultVal
public static String installJava(int version) {
Preconditions.checkArgument(version == 6 || version == 7 || version == 8, "Supported Java versions are 6, 7, or 8");
List<String> commands = new LinkedList<String>();
+ commands.add(ok(addOpenJDKPPK()));
--- End diff --
Shouldn't you wrap this in a `ifExecutableElse1` instead of `ok`?
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by Graeme-Miller <gi...@git.apache.org>.
Github user Graeme-Miller commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111724361
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -621,6 +621,7 @@ private static Object getFlag(Map<?,?> flags, String flagName, Object defaultVal
public static String installJava(int version) {
Preconditions.checkArgument(version == 6 || version == 7 || version == 8, "Supported Java versions are 6, 7, or 8");
List<String> commands = new LinkedList<String>();
+ commands.add(ok(addOpenJDKPPK()));
--- End diff --
I can't see any harm in it
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by drigodwin <gi...@git.apache.org>.
Github user drigodwin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111577101
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -671,6 +672,15 @@ public static String installJavaLatestOrWarn() {
}
/**
+ * Adds the PPA for OpenJDK for older JDK versions (7 and lower) required by some software (e.g. JBoss)
+ */
+ public static String addOpenJDKPPK(){
--- End diff --
I would agree as will be the case in future YAML based blueprints, but this is the pattern used elsewhere, see JMX or NSS
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/brooklyn-server/pull/636
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by drigodwin <gi...@git.apache.org>.
Github user drigodwin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111576928
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -621,6 +621,7 @@ private static Object getFlag(Map<?,?> flags, String flagName, Object defaultVal
public static String installJava(int version) {
Preconditions.checkArgument(version == 6 || version == 7 || version == 8, "Supported Java versions are 6, 7, or 8");
List<String> commands = new LinkedList<String>();
+ commands.add(ok(addOpenJDKPPK()));
--- End diff --
Does it matter if the repo is enabled for the other versions too?
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by duncangrant <gi...@git.apache.org>.
Github user duncangrant commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111567843
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -621,6 +621,7 @@ private static Object getFlag(Map<?,?> flags, String flagName, Object defaultVal
public static String installJava(int version) {
Preconditions.checkArgument(version == 6 || version == 7 || version == 8, "Supported Java versions are 6, 7, or 8");
List<String> commands = new LinkedList<String>();
+ commands.add(ok(addOpenJDKPPK()));
--- End diff --
Should this only happen if the version is 6 or 7?
---
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] brooklyn-server pull request #636: Enable older Java versions
Posted by drigodwin <gi...@git.apache.org>.
Github user drigodwin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/636#discussion_r111724353
--- Diff: utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java ---
@@ -621,6 +621,7 @@ private static Object getFlag(Map<?,?> flags, String flagName, Object defaultVal
public static String installJava(int version) {
Preconditions.checkArgument(version == 6 || version == 7 || version == 8, "Supported Java versions are 6, 7, or 8");
List<String> commands = new LinkedList<String>();
+ commands.add(ok(addOpenJDKPPK()));
--- End diff --
OK ignores if the command fails (so if the OS isn't Ubuntu for instance) so this should be fine. It's the pattern used elsewhere for similar things - see the [lines below](https://github.com/drigodwin/brooklyn-server/blob/b6c8566bbbc4766dd5e332a9c0db7f992f5f9ed4/utils/common/src/main/java/org/apache/brooklyn/util/ssh/BashCommands.java#L633).
---
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.
---