[ambari] 01/01: Merge pull request #2669 from hiveww/AMBARI-24973-trunk

2018-12-04 Thread alexantonenko
This is an automated email from the ASF dual-hosted git repository.

alexantonenko pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit 1bc9d76c17082c17dd721f50986f77da1ae49834
Merge: b6a3341 e30d582
Author: Alexander Antonenko 
AuthorDate: Tue Dec 4 13:33:34 2018 +0300

Merge pull request #2669 from hiveww/AMBARI-24973-trunk

AMBARI-24973. Cover hosts baser initializer

 ambari-web/app/assets/test/tests.js|   1 +
 .../utils/configs/hosts_based_initializer_test.js  | 220 +
 2 files changed, 221 insertions(+)



[ambari] branch trunk updated (b6a3341 -> 1bc9d76)

2018-12-04 Thread alexantonenko
This is an automated email from the ASF dual-hosted git repository.

alexantonenko pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git.


from b6a3341  [AMBARI-24985] Handle requests from a configured trusted 
proxy to identify a proxied user using Kerberos
 add e30d582  AMBARI-24973. Cover hosts baser initializer
 new 1bc9d76  Merge pull request #2669 from hiveww/AMBARI-24973-trunk

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ambari-web/app/assets/test/tests.js|   1 +
 .../utils/configs/hosts_based_initializer_test.js  | 220 +
 2 files changed, 221 insertions(+)
 create mode 100644 
ambari-web/test/utils/configs/hosts_based_initializer_test.js



[GitHub] asfgit commented on issue #53: AMBARI-23456. Generate markdown docs from internal annotations.

2018-12-04 Thread GitBox
asfgit commented on issue #53: AMBARI-23456. Generate markdown docs from 
internal annotations.
URL: https://github.com/apache/ambari-logsearch/pull/53#issuecomment-444073469
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/Ambari-LogSearch-Github-PR-Builder/102/
   Test PASSed.
   


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


With regards,
Apache Git Services


[GitHub] adoroszlai commented on a change in pull request #53: AMBARI-23456. Generate markdown docs from internal annotations.

2018-12-04 Thread GitBox
adoroszlai commented on a change in pull request #53: AMBARI-23456. Generate 
markdown docs from internal annotations.
URL: https://github.com/apache/ambari-logsearch/pull/53#discussion_r238632213
 
 

 ##
 File path: 
ambari-logsearch-docs/src/main/java/org/apache/ambari/logsearch/doc/ShipperConfigDesritionDataHolder.java
 ##
 @@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logsearch.doc;
+
+import java.util.List;
+
+public class ShipperConfigDesritionDataHolder {
 
 Review comment:
   ```suggestion
   public class ShipperConfigDescriptionDataHolder {
   ```


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


With regards,
Apache Git Services


[GitHub] adoroszlai commented on a change in pull request #53: AMBARI-23456. Generate markdown docs from internal annotations.

2018-12-04 Thread GitBox
adoroszlai commented on a change in pull request #53: AMBARI-23456. Generate 
markdown docs from internal annotations.
URL: https://github.com/apache/ambari-logsearch/pull/53#discussion_r238634299
 
 

 ##
 File path: 
ambari-logsearch-docs/src/main/java/org/apache/ambari/logsearch/doc/ShipperConfigDescritionDataHolder.java
 ##
 @@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logsearch.doc;
+
+import java.util.List;
+
+public class ShipperConfigDescritionDataHolder {
 
 Review comment:
   Sorry, but it's still not right.
   
   ```suggestion
   public class ShipperConfigDescriptionDataHolder {
   ```


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


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #53: AMBARI-23456. Generate markdown docs from internal annotations.

2018-12-04 Thread GitBox
asfgit commented on issue #53: AMBARI-23456. Generate markdown docs from 
internal annotations.
URL: https://github.com/apache/ambari-logsearch/pull/53#issuecomment-444077337
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/Ambari-LogSearch-Github-PR-Builder/103/
   Test PASSed.
   


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


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #53: AMBARI-23456. Generate markdown docs from internal annotations.

2018-12-04 Thread GitBox
asfgit commented on issue #53: AMBARI-23456. Generate markdown docs from 
internal annotations.
URL: https://github.com/apache/ambari-logsearch/pull/53#issuecomment-444077960
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/Ambari-LogSearch-Github-PR-Builder/104/
   Test PASSed.
   


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


With regards,
Apache Git Services


[GitHub] g-boros commented on a change in pull request #51: Add basic helm charts for Log Search (developement)

2018-12-04 Thread GitBox
g-boros commented on a change in pull request #51: Add basic helm charts for 
Log Search (developement)
URL: https://github.com/apache/ambari-logsearch/pull/51#discussion_r238635788
 
 

 ##
 File path: k8s/helm-charts/logsearch-helm.sh
 ##
 @@ -0,0 +1,44 @@
+#!/bin/bash
 
 Review comment:
   why not a Makefile?


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


With regards,
Apache Git Services


[ambari-logsearch] branch master updated: AMBARI-23456. Generate markdown docs from internal annotations. (#53)

2018-12-04 Thread oleewere
This is an automated email from the ASF dual-hosted git repository.

oleewere pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ambari-logsearch.git


The following commit(s) were added to refs/heads/master by this push:
 new a1f1c67  AMBARI-23456. Generate markdown docs from internal 
annotations. (#53)
a1f1c67 is described below

commit a1f1c6755d862d32806bcb003008db516e60d1df
Author: Olivér Szabó 
AuthorDate: Tue Dec 4 13:11:40 2018 +0100

AMBARI-23456. Generate markdown docs from internal annotations. (#53)

* AMBARI-23456. Generate markdown docs from internal annotations.

* fix typo

* fix another typo

* Fix typos that depend on last changes

* prop-doc: depends on install, also without install

* Review changes

* fix typo

* add missing list item tag

* fix another typo
---
 Makefile   |   6 +
 ambari-logsearch-docs/pom.xml  |  87 +
 .../logsearch/doc/AbstractDescriptionData.java |  58 +++---
 .../logsearch/doc/LogSearchMarkdownGenerator.java  | 214 +
 .../logsearch/doc}/PropertyDescriptionData.java|  28 +--
 .../doc}/ShipperConfigDescriptionData.java |  27 +--
 .../doc/ShipperConfigDescriptionDataHolder.java|  54 ++
 .../src/main/resources/log4j2.xml  |  23 +++
 .../templates/logfeeder_properties.md.ftl  |  25 +++
 .../templates/logsearch_properties.md.ftl  |  25 +++
 .../templates/shipper_configurations.md.ftl|  65 +++
 .../ambari/logfeeder/conf/LogFeederProps.java  |   6 +-
 .../logfeeder/conf/output/S3OutputConfig.java  |   3 +-
 .../common/PropertyDescriptionStorage.java | 101 --
 .../common/ShipperConfigDescriptionStorage.java|  67 ---
 .../apache/ambari/logsearch/doc/DocConstants.java  |   3 -
 .../ambari/logsearch/manager/InfoManager.java  |  23 ---
 .../apache/ambari/logsearch/rest/InfoResource.java |  31 ---
 docs/.keep |  14 ++
 pom.xml|   2 +
 20 files changed, 559 insertions(+), 303 deletions(-)

diff --git a/Makefile b/Makefile
index 5f9c8b0..cfeaada 100644
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,12 @@ rpm:
 deb:
$(MAVEN_BINARY) clean package -Dbuild-deb -DskipTests 
-Djdk.version=$(LOGSEARCH_JAVA_VERSION)
 
+prop-docs: install
+   $(MAVEN_BINARY) -pl ambari-logsearch-docs exec:java -DskipTests 
-Djdk.version=$(LOGSEARCH_JAVA_VERSION)
+
+prop-docs-only:
+   $(MAVEN_BINARY) -pl ambari-logsearch-docs clean package exec:java 
-DskipTests -Djdk.version=$(LOGSEARCH_JAVA_VERSION)
+
 update-version:
$(MAVEN_BINARY) versions:set-property -Dproperty=revision 
-DnewVersion=$(new-version) -DgenerateBackupPoms=false
 
diff --git a/ambari-logsearch-docs/pom.xml b/ambari-logsearch-docs/pom.xml
new file mode 100644
index 000..f43117c
--- /dev/null
+++ b/ambari-logsearch-docs/pom.xml
@@ -0,0 +1,87 @@
+
+
+http://maven.apache.org/POM/4.0.0";
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  
+ambari-logsearch
+org.apache.ambari
+${revision}
+  
+  4.0.0
+  jar
+  http://maven.apache.org
+  Ambari Logsearch Docs
+  ambari-logsearch-docs
+  
+
+  
+src/main/resources
+true
+  
+
+
+  
+org.apache.maven.plugins
+maven-compiler-plugin
+
+  ${jdk.version}
+  ${jdk.version}
+
+  
+  
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+  
+
+  java
+
+  
+
+
+  
org.apache.ambari.logsearch.doc.LogSearchMarkdownGenerator
+  
+--output-dir
+${project.basedir}/../docs
+  
+
+  
+
+  
+
+  
+
+  org.apache.logging.log4j
+  log4j-api
+
+
+  org.apache.ambari
+  ambari-logsearch-logfeeder
+  ${project.version}
+
+
+  org.apache.ambari
+  ambari-logsearch-server
+  ${project.version}
+
+  
+
+
+
\ No newline at end of file
diff --git 
a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/PropertyDescriptionData.java
 
b/ambari-logsearch-docs/src/main/java/org/apache/ambari/logsearch/doc/AbstractDescriptionData.java
similarity index 50%
copy from 
ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/PropertyDescriptionData.java
copy to 
ambari-logsearch-docs/src/main/java/org/apache/ambari/logsearch/doc/AbstractDescriptionData.java
index 6da8403..e95d2ea 100644
--- 
a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/PropertyDescriptionData.java
+++ 
b/ambari-logsearch-do

[GitHub] oleewere closed pull request #53: AMBARI-23456. Generate markdown docs from internal annotations.

2018-12-04 Thread GitBox
oleewere closed pull request #53: AMBARI-23456. Generate markdown docs from 
internal annotations.
URL: https://github.com/apache/ambari-logsearch/pull/53
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/Makefile b/Makefile
index 5f9c8b0f0a..cfeaada1d6 100644
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,12 @@ rpm:
 deb:
$(MAVEN_BINARY) clean package -Dbuild-deb -DskipTests 
-Djdk.version=$(LOGSEARCH_JAVA_VERSION)
 
+prop-docs: install
+   $(MAVEN_BINARY) -pl ambari-logsearch-docs exec:java -DskipTests 
-Djdk.version=$(LOGSEARCH_JAVA_VERSION)
+
+prop-docs-only:
+   $(MAVEN_BINARY) -pl ambari-logsearch-docs clean package exec:java 
-DskipTests -Djdk.version=$(LOGSEARCH_JAVA_VERSION)
+
 update-version:
$(MAVEN_BINARY) versions:set-property -Dproperty=revision 
-DnewVersion=$(new-version) -DgenerateBackupPoms=false
 
diff --git a/ambari-logsearch-docs/pom.xml b/ambari-logsearch-docs/pom.xml
new file mode 100644
index 00..f43117c40a
--- /dev/null
+++ b/ambari-logsearch-docs/pom.xml
@@ -0,0 +1,87 @@
+
+
+http://maven.apache.org/POM/4.0.0";
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  
+ambari-logsearch
+org.apache.ambari
+${revision}
+  
+  4.0.0
+  jar
+  http://maven.apache.org
+  Ambari Logsearch Docs
+  ambari-logsearch-docs
+  
+
+  
+src/main/resources
+true
+  
+
+
+  
+org.apache.maven.plugins
+maven-compiler-plugin
+
+  ${jdk.version}
+  ${jdk.version}
+
+  
+  
+org.codehaus.mojo
+exec-maven-plugin
+1.2.1
+
+  
+
+  java
+
+  
+
+
+  
org.apache.ambari.logsearch.doc.LogSearchMarkdownGenerator
+  
+--output-dir
+${project.basedir}/../docs
+  
+
+  
+
+  
+
+  
+
+  org.apache.logging.log4j
+  log4j-api
+
+
+  org.apache.ambari
+  ambari-logsearch-logfeeder
+  ${project.version}
+
+
+  org.apache.ambari
+  ambari-logsearch-server
+  ${project.version}
+
+  
+
+
+
\ No newline at end of file
diff --git 
a/ambari-logsearch-docs/src/main/java/org/apache/ambari/logsearch/doc/AbstractDescriptionData.java
 
b/ambari-logsearch-docs/src/main/java/org/apache/ambari/logsearch/doc/AbstractDescriptionData.java
new file mode 100644
index 00..e95d2eaa5c
--- /dev/null
+++ 
b/ambari-logsearch-docs/src/main/java/org/apache/ambari/logsearch/doc/AbstractDescriptionData.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logsearch.doc;
+
+public abstract class AbstractDescriptionData {
+
+  private final String description;
+  private final String defaultValue;
+  private final String examples;
+
+  public AbstractDescriptionData(String description, String defaultStr, 
String[] examplesArr) {
+this.description = description;
+examples = generateExamplesString(examplesArr);
+defaultValue = generateDefaultValue(defaultStr);
+  }
+
+  protected String generateDefaultValue(String defaultValue) {
+if (defaultValue == null || defaultValue.length() == 0) {
+  return "`EMPTY`";
+} else {
+  return defaultValue;
+}
+  }
+
+  protected String generateExamplesString(String[] examples) {
+if (examples == null) {
+  return "";
+} else {
+  final StringBuilder stringBuilder = new StringBuilder();
+  if(examples.length > 0){
+stringBuilder.append("");
+for( String example : examples){
+  
stringBuilder.append("").append("`").append(example).append("`").append("");
+}
+stringBuilder.append("");
+  }
+  return stringBuilder.toString();
+}
+  }
+
+  public String getDescription() {
+return description;

[GitHub] oleewere commented on a change in pull request #51: Add basic helm charts for Log Search (developement)

2018-12-04 Thread GitBox
oleewere commented on a change in pull request #51: Add basic helm charts for 
Log Search (developement)
URL: https://github.com/apache/ambari-logsearch/pull/51#discussion_r238638174
 
 

 ##
 File path: k8s/helm-charts/logsearch-helm.sh
 ##
 @@ -0,0 +1,44 @@
+#!/bin/bash
 
 Review comment:
   in the end i think we will use that, it is a temporal solution right now. 
probably using helm from docker would be good idea here as well


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


With regards,
Apache Git Services


[ambari-logsearch] branch master updated: Add basic helm charts for Log Search (developement) (#51)

2018-12-04 Thread oleewere
This is an automated email from the ASF dual-hosted git repository.

oleewere pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ambari-logsearch.git


The following commit(s) were added to refs/heads/master by this push:
 new da2e901  Add basic helm charts for Log Search (developement) (#51)
da2e901 is described below

commit da2e90180692c9efbf1f336d437d7a56c930c1b7
Author: Olivér Szabó 
AuthorDate: Tue Dec 4 13:16:29 2018 +0100

Add basic helm charts for Log Search (developement) (#51)
---
 k8s/helm-charts/infra-solr/Chart.yaml  |   9 ++
 .../infra-solr/templates/infra-solr.yaml   |  97 ++
 k8s/helm-charts/infra-solr/values.yaml |  18 +++
 k8s/helm-charts/logsearch-helm.sh  |  44 +++
 k8s/helm-charts/logsearch/Chart.yaml   |   9 ++
 .../logsearch/templates/logsearch-configmap.yaml   | 100 +++
 k8s/helm-charts/logsearch/templates/logsearch.yaml |  65 ++
 k8s/helm-charts/logsearch/values.yaml  |  18 +++
 k8s/helm-charts/zookeeper/Chart.yaml   |   9 ++
 k8s/helm-charts/zookeeper/templates/zookeeper.yaml | 142 +
 k8s/helm-charts/zookeeper/values.yaml  |   9 ++
 k8s/localstack/localstack.yaml |  62 +
 pom.xml|   1 +
 13 files changed, 583 insertions(+)

diff --git a/k8s/helm-charts/infra-solr/Chart.yaml 
b/k8s/helm-charts/infra-solr/Chart.yaml
new file mode 100644
index 000..abd08e7
--- /dev/null
+++ b/k8s/helm-charts/infra-solr/Chart.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+name: infra-solr
+version: 1.0.0
+description: Infra solr service for Log Search components
+keywords:
+  - infra-solr
+maintainers:
+  - name: Apache
+deprecated: false
\ No newline at end of file
diff --git a/k8s/helm-charts/infra-solr/templates/infra-solr.yaml 
b/k8s/helm-charts/infra-solr/templates/infra-solr.yaml
new file mode 100644
index 000..5693d7d
--- /dev/null
+++ b/k8s/helm-charts/infra-solr/templates/infra-solr.yaml
@@ -0,0 +1,97 @@
+{{- if .Values.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Release.Name }}-infra-solr
+  namespace: {{.Values.global.namespace.logging}}
+  labels:
+app: infra-solr
+spec:
+  ports:
+  - port: 8886
+name: infra-solr
+  externalIPs:
+[]
+  clusterIP: None
+  selector:
+app: infra-solr
+release: {{ .Release.Name }}
+---
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  name: {{ .Release.Name }}-infra-solr
+  namespace: {{.Values.global.namespace.logging}}
+  labels:
+chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+release: {{ .Release.Name }}
+spec:
+  selector:
+matchLabels:
+  app: infra-solr
+  serviceName: {{ .Release.Name }}-infra-solr
+  replicas: {{.Values.global.solr.replicas}}
+  updateStrategy:
+type: RollingUpdate
+  podManagementPolicy: Parallel
+  template:
+metadata:
+  labels:
+app: infra-solr
+release: {{ .Release.Name }}
+spec:
+{{- if .Values.affinity }}
+  affinity:
+podAntiAffinity:
+  requiredDuringSchedulingIgnoredDuringExecution:
+- labelSelector:
+matchExpressions:
+  - key: "app"
+operator: In
+values:
+- infra-solr
+  topologyKey: "kubernetes.io/hostname"
+{{end}}
+  containers:
+  - name: infra-solr
+image: "{{.Values.infraSolrImage}}"
+env:
+- name: ZK_CONNECT_STRING
+  value: 
"{{.Values.zkRelease}}-zookeeper-cs.{{.Values.global.namespace.logging}}.svc.{{.Values.global.clusterDomain}}:2181"
+- name: SOLR_PORT
+  value: "8886"
+- name: CLOUD_MODE
+  value: "true"
+readinessProbe:
+  httpGet:
+path: /
+port: 8886
+  initialDelaySeconds: 30
+  timeoutSeconds: 15
+livenessProbe:
+  httpGet:
+path: /
+port: 8886
+  initialDelaySeconds: 30
+  timeoutSeconds: 15
+volumeMounts:
+- name: data
+  mountPath: /var/lib/ambari-infra-solr/data
+  securityContext:
+runAsUser: 8983
+{{- if .Values.persistence.enabled }}
+  volumeClaimTemplates:
+- metadata:
+name: solr-home
+  spec:
+accessModes:
+  - ReadWriteOnce
+resources:
+  requests:
+storage: {{ .Values.persistence.size }}
+{{- else }}
+  volumes:
+- name: data
+  emptyDir: {}
+{{- end }}
+{{end}}
\ No newline at end of file
diff --git a/k8s/helm-charts/infra-solr/values.yaml 
b/k8s/helm-charts/infra-solr/values.yaml
new file mode 100644
index 000..f23b6d3
--- /dev/null
+++ b/k8s/helm-charts/infra-solr/values.yaml
@@ -0,0 +1,18 @@
+enabled: true
+infraSolrImage: "apache/ambari-infra-solr:latest"
+heapSize: "512m"
+global

[GitHub] oleewere closed pull request #51: Add basic helm charts for Log Search (developement)

2018-12-04 Thread GitBox
oleewere closed pull request #51: Add basic helm charts for Log Search 
(developement)
URL: https://github.com/apache/ambari-logsearch/pull/51
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/k8s/helm-charts/infra-solr/Chart.yaml 
b/k8s/helm-charts/infra-solr/Chart.yaml
new file mode 100644
index 00..abd08e77f8
--- /dev/null
+++ b/k8s/helm-charts/infra-solr/Chart.yaml
@@ -0,0 +1,9 @@
+apiVersion: v1
+name: infra-solr
+version: 1.0.0
+description: Infra solr service for Log Search components
+keywords:
+  - infra-solr
+maintainers:
+  - name: Apache
+deprecated: false
\ No newline at end of file
diff --git a/k8s/helm-charts/infra-solr/templates/infra-solr.yaml 
b/k8s/helm-charts/infra-solr/templates/infra-solr.yaml
new file mode 100644
index 00..5693d7d795
--- /dev/null
+++ b/k8s/helm-charts/infra-solr/templates/infra-solr.yaml
@@ -0,0 +1,97 @@
+{{- if .Values.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ .Release.Name }}-infra-solr
+  namespace: {{.Values.global.namespace.logging}}
+  labels:
+app: infra-solr
+spec:
+  ports:
+  - port: 8886
+name: infra-solr
+  externalIPs:
+[]
+  clusterIP: None
+  selector:
+app: infra-solr
+release: {{ .Release.Name }}
+---
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+  name: {{ .Release.Name }}-infra-solr
+  namespace: {{.Values.global.namespace.logging}}
+  labels:
+chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+release: {{ .Release.Name }}
+spec:
+  selector:
+matchLabels:
+  app: infra-solr
+  serviceName: {{ .Release.Name }}-infra-solr
+  replicas: {{.Values.global.solr.replicas}}
+  updateStrategy:
+type: RollingUpdate
+  podManagementPolicy: Parallel
+  template:
+metadata:
+  labels:
+app: infra-solr
+release: {{ .Release.Name }}
+spec:
+{{- if .Values.affinity }}
+  affinity:
+podAntiAffinity:
+  requiredDuringSchedulingIgnoredDuringExecution:
+- labelSelector:
+matchExpressions:
+  - key: "app"
+operator: In
+values:
+- infra-solr
+  topologyKey: "kubernetes.io/hostname"
+{{end}}
+  containers:
+  - name: infra-solr
+image: "{{.Values.infraSolrImage}}"
+env:
+- name: ZK_CONNECT_STRING
+  value: 
"{{.Values.zkRelease}}-zookeeper-cs.{{.Values.global.namespace.logging}}.svc.{{.Values.global.clusterDomain}}:2181"
+- name: SOLR_PORT
+  value: "8886"
+- name: CLOUD_MODE
+  value: "true"
+readinessProbe:
+  httpGet:
+path: /
+port: 8886
+  initialDelaySeconds: 30
+  timeoutSeconds: 15
+livenessProbe:
+  httpGet:
+path: /
+port: 8886
+  initialDelaySeconds: 30
+  timeoutSeconds: 15
+volumeMounts:
+- name: data
+  mountPath: /var/lib/ambari-infra-solr/data
+  securityContext:
+runAsUser: 8983
+{{- if .Values.persistence.enabled }}
+  volumeClaimTemplates:
+- metadata:
+name: solr-home
+  spec:
+accessModes:
+  - ReadWriteOnce
+resources:
+  requests:
+storage: {{ .Values.persistence.size }}
+{{- else }}
+  volumes:
+- name: data
+  emptyDir: {}
+{{- end }}
+{{end}}
\ No newline at end of file
diff --git a/k8s/helm-charts/infra-solr/values.yaml 
b/k8s/helm-charts/infra-solr/values.yaml
new file mode 100644
index 00..f23b6d3355
--- /dev/null
+++ b/k8s/helm-charts/infra-solr/values.yaml
@@ -0,0 +1,18 @@
+enabled: true
+infraSolrImage: "apache/ambari-infra-solr:latest"
+heapSize: "512m"
+global:
+  clusterDomain: "cluster.local"
+  namespace:
+logging: "default"
+  solr:
+replicas: 3
+
+loglevel: INFO
+affinity: true
+
+persistence:
+  enabled: false
+  size: 100G
+
+zkRelease: test-zk
\ No newline at end of file
diff --git a/k8s/helm-charts/logsearch-helm.sh 
b/k8s/helm-charts/logsearch-helm.sh
new file mode 100755
index 00..f6b949d46a
--- /dev/null
+++ b/k8s/helm-charts/logsearch-helm.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# dis

[GitHub] asfgit commented on issue #53: AMBARI-23456. Generate markdown docs from internal annotations.

2018-12-04 Thread GitBox
asfgit commented on issue #53: AMBARI-23456. Generate markdown docs from 
internal annotations.
URL: https://github.com/apache/ambari-logsearch/pull/53#issuecomment-444078714
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/Ambari-LogSearch-Github-PR-Builder/105/
   Test PASSed.
   


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


With regards,
Apache Git Services


[ambari] branch trunk updated: AMBARI-24991. Commands timeout if stdout has non-unicode symbols. (aonishuk)

2018-12-04 Thread aonishuk
This is an automated email from the ASF dual-hosted git repository.

aonishuk pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 17f9098  AMBARI-24991. Commands timeout if stdout has non-unicode 
symbols. (aonishuk)
17f9098 is described below

commit 17f90987b1aa2b0fbb0bf787200d9148f0d6e785
Author: Andrew Onishuk 
AuthorDate: Tue Dec 4 14:24:37 2018 +0200

AMBARI-24991. Commands timeout if stdout has non-unicode symbols. (aonishuk)
---
 ambari-agent/src/main/python/ambari_agent/ActionQueue.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py 
b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index 072083a..3c979a6 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -336,8 +336,8 @@ class ActionQueue(threading.Thread):
 
 role_result = self.commandStatuses.generate_report_template(command)
 role_result.update({
-  'stdout': command_result['stdout'],
-  'stderr': command_result['stderr'],
+  'stdout': unicode(command_result['stdout'], errors='replace'),
+  'stderr': unicode(command_result['stderr'], errors='replace'),
   'exitCode': command_result['exitcode'],
   'status': status,
 })



[ambari] branch trunk updated (17f9098 -> 958db3f)

2018-12-04 Thread atkach
This is an automated email from the ASF dual-hosted git repository.

atkach pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git.


from 17f9098  AMBARI-24991. Commands timeout if stdout has non-unicode 
symbols. (aonishuk)
 add 26e3c49  AMBARI-24989 Knox: Reorder of query parameters breaks Ambari 
logic for retrieving configs
 new 958db3f  Merge pull request #2685 from atkach/AMBARI-24989-trunk

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ambari-web/app/mixins/common/configs/configs_loader.js   | 2 +-
 ambari-web/app/utils/ajax/ajax.js| 2 +-
 ambari-web/test/mixins/common/configs/configs_loader_test.js | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)



[ambari] 01/01: Merge pull request #2685 from atkach/AMBARI-24989-trunk

2018-12-04 Thread atkach
This is an automated email from the ASF dual-hosted git repository.

atkach pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit 958db3ff83b5d7622a5fc632e8ae888c3324f479
Merge: 17f9098 26e3c49
Author: Andrii Tkach <1963907+atk...@users.noreply.github.com>
AuthorDate: Tue Dec 4 15:36:44 2018 +0200

Merge pull request #2685 from atkach/AMBARI-24989-trunk

AMBARI-24989 Knox: Reorder of query parameters breaks Ambari logic for 
retrieving configs

 ambari-web/app/mixins/common/configs/configs_loader.js   | 2 +-
 ambari-web/app/utils/ajax/ajax.js| 2 +-
 ambari-web/test/mixins/common/configs/configs_loader_test.js | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)



[GitHub] kasakrisz opened a new pull request #23: AMBARI-24987 - Infra Manager: parse logs by Logsearch

2018-12-04 Thread GitBox
kasakrisz opened a new pull request #23: AMBARI-24987 - Infra Manager: parse 
logs by Logsearch
URL: https://github.com/apache/ambari-infra/pull/23
 
 
   ## What changes were proposed in this pull request?
   
   * Change the rolling file appenders log entry pattern: log date-time to 
ISO8601 format, log java file and line number
   * Eliminate `log4j 1` dependencies and use `log4j-1.2-api` for 3rd party 
components which are depends on `log4j 1`
   * Add 'log4j-web' to eliminate warning
   ```
   2018-12-04 15:52:10,943 main INFO Log4j appears to be running in a Servlet 
environment, but there's no log4j-web module available. If you want better web 
container support, please add the log4j-web JAR to your web archive or server 
lib directory.
   ```
   Since this log entry is in a different format it caused Logfeeder to stop 
parsing infra manager logs.
   
   ## How was this patch tested?
   
   UTs and ITs passed
   
   Manually:
   1. Deploy Ambari and a cluster: Zookeeper, Infra Solr, Logsearch, Infra 
Manager
   2. Start all components
   3. Login to Logsearch Portal and search for Infra Manager logs
   
   


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


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #23: AMBARI-24987 - Infra Manager: parse logs by Logsearch

2018-12-04 Thread GitBox
asfgit commented on issue #23: AMBARI-24987 - Infra Manager: parse logs by 
Logsearch
URL: https://github.com/apache/ambari-infra/pull/23#issuecomment-444128924
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/Ambari-Infra-Github-PR-Builder/33/
   Test PASSed.
   


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


With regards,
Apache Git Services


[GitHub] oleewere commented on a change in pull request #23: AMBARI-24987 - Infra Manager: parse logs by Logsearch

2018-12-04 Thread GitBox
oleewere commented on a change in pull request #23: AMBARI-24987 - Infra 
Manager: parse logs by Logsearch
URL: https://github.com/apache/ambari-infra/pull/23#discussion_r238698877
 
 

 ##
 File path: ambari-infra-manager/src/main/resources/log4j2.xml
 ##
 @@ -24,7 +24,7 @@
   
 
 
-  
+  
 
 Review comment:
   is %d good enough as default? %d could be depdends on system settings


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


With regards,
Apache Git Services


[GitHub] oleewere commented on a change in pull request #23: AMBARI-24987 - Infra Manager: parse logs by Logsearch

2018-12-04 Thread GitBox
oleewere commented on a change in pull request #23: AMBARI-24987 - Infra 
Manager: parse logs by Logsearch
URL: https://github.com/apache/ambari-infra/pull/23#discussion_r238698877
 
 

 ##
 File path: ambari-infra-manager/src/main/resources/log4j2.xml
 ##
 @@ -24,7 +24,7 @@
   
 
 
-  
+  
 
 Review comment:
   is %d good enough as default? %d could be depdends on system settings. maybe 
it would be better to use %d{ISO8601}


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


With regards,
Apache Git Services


[ambari] 01/01: Merge pull request #2684 from hiveww/AMBARI-24990-trunk

2018-12-04 Thread alexantonenko
This is an automated email from the ASF dual-hosted git repository.

alexantonenko pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git

commit f6202221457b0f560872c76b2e4b54e92bd352e3
Merge: 958db3f 237e0c8
Author: Alexander Antonenko 
AuthorDate: Tue Dec 4 20:03:44 2018 +0300

Merge pull request #2684 from hiveww/AMBARI-24990-trunk

AMBARI-24990. Cover move_hm_config_inititializer

 ambari-web/app/assets/test/tests.js|   1 +
 .../configs/move_hm_config_initializer_test.js | 129 +
 2 files changed, 130 insertions(+)



[ambari] branch trunk updated (958db3f -> f620222)

2018-12-04 Thread alexantonenko
This is an automated email from the ASF dual-hosted git repository.

alexantonenko pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git.


from 958db3f  Merge pull request #2685 from atkach/AMBARI-24989-trunk
 add 237e0c8  AMBARI-24990. Cover move_hm_config_inititializer
 new f620222  Merge pull request #2684 from hiveww/AMBARI-24990-trunk

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 ambari-web/app/assets/test/tests.js|   1 +
 .../configs/move_hm_config_initializer_test.js | 129 +
 2 files changed, 130 insertions(+)
 create mode 100644 
ambari-web/test/utils/configs/move_hm_config_initializer_test.js



[ambari] branch trunk updated: [AMBARI-24994] Updates to the SPI for Upgrade Action Operations (#2687)

2018-12-04 Thread jonathanhurley
This is an automated email from the ASF dual-hosted git repository.

jonathanhurley pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 4c70e1a  [AMBARI-24994] Updates to the SPI for Upgrade Action 
Operations (#2687)
4c70e1a is described below

commit 4c70e1a7ec5609992fa06fca9618f5b112f941a5
Author: Jonathan Hurley 
AuthorDate: Tue Dec 4 16:11:58 2018 -0500

[AMBARI-24994] Updates to the SPI for Upgrade Action Operations (#2687)
---
 .../org/apache/ambari/spi/ClusterInformation.java  |  25 +--
 .../apache/ambari/spi/upgrade/UpgradeAction.java   |   7 +-
 .../spi/upgrade/UpgradeActionOperations.java   | 168 +++--
 .../ambari/spi/upgrade/UpgradeInformation.java | 131 
 .../orm/entities/RepositoryVersionEntity.java  |  17 ++-
 .../upgrades/AbstractUpgradeServerAction.java  |  18 +++
 .../upgrades/PluginUpgradeServerAction.java|  63 +++-
 .../stack/upgrade/orchestrate/UpgradeContext.java  |  42 ++
 .../ambari/server/state/cluster/ClusterImpl.java   |   7 +-
 .../upgrades/PluginUpgradeServerActionTest.java| 105 ++---
 10 files changed, 519 insertions(+), 64 deletions(-)

diff --git 
a/ambari-server-spi/src/main/java/org/apache/ambari/spi/ClusterInformation.java 
b/ambari-server-spi/src/main/java/org/apache/ambari/spi/ClusterInformation.java
index eb9974e..774fe65 100644
--- 
a/ambari-server-spi/src/main/java/org/apache/ambari/spi/ClusterInformation.java
+++ 
b/ambari-server-spi/src/main/java/org/apache/ambari/spi/ClusterInformation.java
@@ -21,8 +21,6 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
-import com.google.common.collect.Maps;
-
 /**
  * The {@link ClusterInformation} class is used to pass the state of the 
cluster
  * as simple primitive values and collections. It contains the following types 
of information:
@@ -124,13 +122,17 @@ public class ClusterInformation {
 return hosts;
   }
 
+  /**
+   * Gets the configuration properties for the specified type. If the type does
+   * not exist, this will return {@code null}.
+   *
+   * @param configurationType
+   *  the configuration type to retrieve.
+   * @return the property name and value pairs for the configuration type, or
+   * {@code null} if no configuration type exists.
+   */
   public Map getConfigurationProperties(String 
configurationType) {
-Map properties = m_configurations.get(configurationType);
-if (null == properties) {
-  return Maps.newHashMap();
-}
-
-return properties;
+return m_configurations.get(configurationType);
   }
 
   /**
@@ -143,7 +145,12 @@ public class ClusterInformation {
* @return the property value, or {@code null} if it does not exist.
*/
   public String getConfigurationProperty(String configurationType, String 
propertyName) {
-return getConfigurationProperties(configurationType).get(propertyName);
+Map configType = 
getConfigurationProperties(configurationType);
+if (null == configType) {
+  return null;
+}
+
+return configType.get(propertyName);
   }
 
   /**
diff --git 
a/ambari-server-spi/src/main/java/org/apache/ambari/spi/upgrade/UpgradeAction.java
 
b/ambari-server-spi/src/main/java/org/apache/ambari/spi/upgrade/UpgradeAction.java
index 1e25c34..a34cee6 100644
--- 
a/ambari-server-spi/src/main/java/org/apache/ambari/spi/upgrade/UpgradeAction.java
+++ 
b/ambari-server-spi/src/main/java/org/apache/ambari/spi/upgrade/UpgradeAction.java
@@ -35,13 +35,14 @@ public interface UpgradeAction {
*
* @param clusterInformation
*  the cluster information, such as topology, configurations, etc.
-   *
+   * @param upgradeInformation
+   *  the upgrade type, direction, services, repository versions, etc.
* @return the changes to perform during the upgrade, such as updating
* configurations.
* @throws UpgradeActionException
*   if the class is unable to create the operations for the Ambari
*   Server to execute.
*/
-  UpgradeActionOperations getOperations(ClusterInformation clusterInformation)
-  throws UpgradeActionException;
+  UpgradeActionOperations getOperations(ClusterInformation clusterInformation,
+  UpgradeInformation upgradeInformation) throws UpgradeActionException;
 }
diff --git 
a/ambari-server-spi/src/main/java/org/apache/ambari/spi/upgrade/UpgradeActionOperations.java
 
b/ambari-server-spi/src/main/java/org/apache/ambari/spi/upgrade/UpgradeActionOperations.java
index ddba98c..8a17538 100644
--- 
a/ambari-server-spi/src/main/java/org/apache/ambari/spi/upgrade/UpgradeActionOperations.java
+++ 
b/ambari-server-spi/src/main/java/org/apache/ambari/spi/upgrade/UpgradeActionOperations.java
@@ -18,12 +18,16 @@
 package org.apache.ambari.spi.upgrade;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List

[ambari] branch trunk updated: AMBARI-24982. APT/DPKG existence check broken for packages with long names. (#2680)

2018-12-04 Thread adoroszlai
This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new c1dca27  AMBARI-24982. APT/DPKG existence check broken for packages 
with long names. (#2680)
c1dca27 is described below

commit c1dca2715258d385b8946f5fc537392c668b30ae
Author: Doroszlai, Attila <6454655+adorosz...@users.noreply.github.com>
AuthorDate: Tue Dec 4 23:21:37 2018 +0100

AMBARI-24982. APT/DPKG existence check broken for packages with long names. 
(#2680)
---
 .../src/main/python/ambari_commons/repo_manager/apt_manager.py  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py 
b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
index 5882253..c986e3b 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
@@ -49,7 +49,7 @@ class AptManagerProperties(GenericManagerProperties):
   repo_update_cmd = [repo_manager_bin, 'update', '-qq']
 
   available_packages_cmd = [repo_cache_bin, "dump"]
-  installed_packages_cmd = [pkg_manager_bin, "-l"]
+  installed_packages_cmd = ['COLUMNS=999', pkg_manager_bin, "-l"]
 
   repo_definition_location = "/etc/apt/sources.list.d"
 



[GitHub] kasakrisz commented on a change in pull request #23: AMBARI-24987 - Infra Manager: parse logs by Logsearch

2018-12-04 Thread GitBox
kasakrisz commented on a change in pull request #23: AMBARI-24987 - Infra 
Manager: parse logs by Logsearch
URL: https://github.com/apache/ambari-infra/pull/23#discussion_r238927407
 
 

 ##
 File path: ambari-infra-manager/src/main/resources/log4j2.xml
 ##
 @@ -24,7 +24,7 @@
   
 
 
-  
+  
 
 Review comment:
   Changed to `%d{ISO8601}`


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


With regards,
Apache Git Services


[GitHub] asfgit commented on issue #23: AMBARI-24987 - Infra Manager: parse logs by Logsearch

2018-12-04 Thread GitBox
asfgit commented on issue #23: AMBARI-24987 - Infra Manager: parse logs by 
Logsearch
URL: https://github.com/apache/ambari-infra/pull/23#issuecomment-444353788
 
 
   
   Refer to this link for build results (access rights to CI server needed): 
   https://builds.apache.org/job/Ambari-Infra-Github-PR-Builder/34/
   Test PASSed.
   


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


With regards,
Apache Git Services


[ambari] branch trunk updated: AMBARI-24986. Using Ambari server's CLI to enable/disable Trusted Proxy support (#2683)

2018-12-04 Thread smolnar
This is an automated email from the ASF dual-hosted git repository.

smolnar pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 02e7b56  AMBARI-24986. Using Ambari server's CLI to enable/disable 
Trusted Proxy support (#2683)
02e7b56 is described below

commit 02e7b56aff1acee1f1acb5647be48f7566bd89d0
Author: Sandor Molnar 
AuthorDate: Wed Dec 5 07:49:29 2018 +0100

AMBARI-24986. Using Ambari server's CLI to enable/disable Trusted Proxy 
support (#2683)
---
 ambari-server/sbin/ambari-server   |   6 +-
 ambari-server/src/main/python/ambari-server.py |  25 +-
 .../src/main/python/ambari_server/setupActions.py  |   1 +
 .../main/python/ambari_server/setupTrustedProxy.py | 172 +++
 .../src/test/python/TestSetupTrustedProxy.py   | 323 +
 5 files changed, 523 insertions(+), 4 deletions(-)

diff --git a/ambari-server/sbin/ambari-server b/ambari-server/sbin/ambari-server
index 4d0c334..761a15d 100755
--- a/ambari-server/sbin/ambari-server
+++ b/ambari-server/sbin/ambari-server
@@ -188,6 +188,10 @@ case "${1:-}" in
 echo -e "Setting up SSO authentication properties..."
 $PYTHON "$AMBARI_PYTHON_EXECUTABLE" "$@"
 ;;
+  setup-trusted-proxy)
+ echo -e "Setting up Trusted Proxy support..."
+$PYTHON "$AMBARI_PYTHON_EXECUTABLE" "$@"
+;;
   db-purge-history)
 echo -e "Purge database history..."
 $PYTHON "$AMBARI_PYTHON_EXECUTABLE" "$@"
@@ -210,7 +214,7 @@ case "${1:-}" in
 ;;
   *)
 echo "Usage: $AMBARI_EXECUTABLE
-
{start|stop|reset|restart|upgrade|status|upgradestack|setup|setup-jce|setup-ldap|sync-ldap|set-current|setup-security|refresh-stack-hash|backup|restore|update-host-names|check-database|enable-stack|setup-sso|db-purge-history|install-mpack|uninstall-mpack|upgrade-mpack|setup-kerberos|setup-pam|migrate-ldap-pam}
 [options]
+
{start|stop|reset|restart|upgrade|status|upgradestack|setup|setup-jce|setup-ldap|sync-ldap|set-current|setup-security|refresh-stack-hash|backup|restore|update-host-names|check-database|enable-stack|setup-sso|setup-trusted-proxy|db-purge-history|install-mpack|uninstall-mpack|upgrade-mpack|setup-kerberos|setup-pam|migrate-ldap-pam}
 [options]
 Use $AMBARI_PYTHON_EXECUTABLE  --help to get details on 
options available.
 Or, simply invoke ambari-server.py --help to print the options."
 exit 1
diff --git a/ambari-server/src/main/python/ambari-server.py 
b/ambari-server/src/main/python/ambari-server.py
index fccd758..65a8aaa 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -18,6 +18,7 @@ See the License for the specific language governing 
permissions and
 limitations under the License.
 '''
 
+import textwrap
 import logging
 import logging.config
 import logging.handlers
@@ -49,13 +50,14 @@ from ambari_server.setupActions import BACKUP_ACTION, 
LDAP_SETUP_ACTION, LDAP_SY
   SETUP_ACTION, SETUP_SECURITY_ACTION, RESTART_ACTION, START_ACTION, 
STATUS_ACTION, STOP_ACTION, UPGRADE_ACTION, \
   SETUP_JCE_ACTION, SETUP_JDBC_ACTION, SET_CURRENT_ACTION, 
ENABLE_STACK_ACTION, SETUP_SSO_ACTION, \
   DB_PURGE_ACTION, INSTALL_MPACK_ACTION, UNINSTALL_MPACK_ACTION, 
UPGRADE_MPACK_ACTION, PAM_SETUP_ACTION, \
-  MIGRATE_LDAP_PAM_ACTION, KERBEROS_SETUP_ACTION
+  MIGRATE_LDAP_PAM_ACTION, KERBEROS_SETUP_ACTION, SETUP_TPROXY_ACTION
 from ambari_server.setupHttps import setup_https, setup_truststore
 from ambari_server.setupMpacks import install_mpack, uninstall_mpack, 
upgrade_mpack, STACK_DEFINITIONS_RESOURCE_NAME, \
   SERVICE_DEFINITIONS_RESOURCE_NAME, MPACKS_RESOURCE_NAME
 from ambari_server.setupSecurity import setup_ldap, sync_ldap, 
setup_master_key, setup_ambari_krb5_jaas, setup_pam, \
   migrate_ldap_pam, LDAP_TYPES
 from ambari_server.setupSso import setup_sso
+from ambari_server.setupTrustedProxy import setup_trusted_proxy
 from ambari_server.userInput import get_validated_string_input
 from ambari_server_main import server_process_main
 
@@ -600,11 +602,25 @@ def init_setup_sso_options(parser):
   parser.add_option('--ambari-admin-username', default=None, help="Ambari 
administrator username for accessing Ambari's REST API", 
dest="ambari_admin_username")
   parser.add_option('--ambari-admin-password', default=None, help="Ambari 
administrator password for accessing Ambari's REST API", 
dest="ambari_admin_password")
 
+
 @OsFamilyFuncImpl(OsFamilyImpl.DEFAULT)
 def init_pam_setup_parser_options(parser):
   parser.add_option('--pam-config-file', default=None, help="Path to the PAM 
configuration file", dest="pam_config_file")
   parser.add_option('--pam-auto-create-groups', default=None, 
help="Automatically create groups for authenticated users [true/false]", 
dest="pam_auto_create_groups")
 
+
+@OsFamilyFuncImpl(OsFamilyImpl.DEFAULT)
+def init_tpr