gianm commented on code in PR #13365:
URL: https://github.com/apache/druid/pull/13365#discussion_r1042817345


##########
docs/operations/python.md:
##########
@@ -0,0 +1,46 @@
+---
+id: python
+title: "Python Installation"
+---
+
+<!--
+  ~ 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.
+  -->
+
+Apache Druid startup script requires a python interpreter.
+
+## Python interpreter installation instructions
+
+### MacOS
+MacOS comes with a version of Python2, which has been deprecated. Python2 and 
Python3 can coexist on the same machine without problems.
+
+#### Install the official Python release
+* Browse to the [Python Downloads Page](https://www.python.org/downloads/) and 
download the latest version (3.x.x)
+* Verify if Python3 and Pip3 (python package manager) is installed by issuing 
`python3` and `pip3 -V` commands. 
+
+#### Install with Homebrew
+Refer [Installing Python 3 on Mac OS 
X](https://docs.python-guide.org/starting/install3/osx/)
+
+### Linux
+
+#### Debian

Review Comment:
   "Debian or Ubuntu" would be clearer, in case the reader does not know that 
Ubuntu is based on Debian.



##########
docs/operations/python.md:
##########
@@ -0,0 +1,46 @@
+---
+id: python
+title: "Python Installation"
+---
+
+<!--
+  ~ 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.
+  -->
+
+Apache Druid startup script requires a python interpreter.
+
+## Python interpreter installation instructions
+
+### MacOS
+MacOS comes with a version of Python2, which has been deprecated. Python2 and 
Python3 can coexist on the same machine without problems.
+
+#### Install the official Python release
+* Browse to the [Python Downloads Page](https://www.python.org/downloads/) and 
download the latest version (3.x.x)
+* Verify if Python3 and Pip3 (python package manager) is installed by issuing 
`python3` and `pip3 -V` commands. 
+
+#### Install with Homebrew
+Refer [Installing Python 3 on Mac OS 
X](https://docs.python-guide.org/starting/install3/osx/)
+
+### Linux

Review Comment:
   Linux should be first since it's our primary supported OS.



##########
docs/operations/python.md:
##########
@@ -0,0 +1,46 @@
+---
+id: python
+title: "Python Installation"
+---
+
+<!--
+  ~ 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.
+  -->
+
+Apache Druid startup script requires a python interpreter.
+
+## Python interpreter installation instructions
+
+### MacOS
+MacOS comes with a version of Python2, which has been deprecated. Python2 and 
Python3 can coexist on the same machine without problems.

Review Comment:
   I don't think this is accurate anymore; see 
https://www.jamf.com/blog/python2-is-gone-apple-macos/. The python situation on 
macOS is evolving. We should do our best to describe how to get a working 
interpreter on the 3–4 most recent major macOS releases, which will involve 
different instructions for different macOS releases.



##########
docs/operations/python.md:
##########
@@ -0,0 +1,46 @@
+---
+id: python
+title: "Python Installation"
+---
+
+<!--
+  ~ 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.
+  -->
+
+Apache Druid startup script requires a python interpreter.

Review Comment:
   Which version of interpreter is required?



##########
examples/bin/start-druid:
##########
@@ -0,0 +1,32 @@
+#!/bin/bash -eu
+
+# 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.
+
+PWD="$(pwd)"
+WHEREAMI="$(dirname "$0")"
+WHEREAMI="$(cd "$WHEREAMI" && pwd)"
+
+if [ -x "$(command -v python3)" ]
+then
+  exec python3 "$WHEREAMI/start-druid-main.py" "$@"
+elif [ -x "$(command -v python2)" ]
+then
+  exec python2 "$WHEREAMI/start-druid-main.py" "$@"
+else
+  exec "$WHEREAMI/start-druid-main.py" "$@"

Review Comment:
   This line isn't going to do anything good, because `start-druid-main.py` is 
not executable. Better to do `exec python "$WHEREAMI/start-druid-main.py" "$@"` 
in case `python` is the only interpreter available.



##########
docs/operations/single-server.md:
##########
@@ -44,6 +47,21 @@ The example configurations run the Druid Coordinator and 
Overlord together in a
 
 While example configurations are provided for very large single machines, at 
higher scales we recommend running Druid in a [clustered 
deployment](../tutorials/cluster.md), for fault-tolerance and reduced resource 
contention.
 
+## Druid auto start
+
+Setting up a new Druid cluster can sometimes be complicated as there are 
several runtime properties required by each service. Each process must also be 
given the appropriate jvm arguments so that the system can perform optimally.

Review Comment:
   Let's be less apologetic with the wording. I suggest this instead:
   
   > Druid includes a launch script, `bin/start-druid` that automatically sets 
various memory-related parameters based on available processors and memory. It 
accepts optional arguments such as list of services, total memory and a config 
directory to override default jvm arguments and service-specific runtime 
properties.



##########
docs/operations/single-server.md:
##########
@@ -44,6 +47,21 @@ The example configurations run the Druid Coordinator and 
Overlord together in a
 
 While example configurations are provided for very large single machines, at 
higher scales we recommend running Druid in a [clustered 
deployment](../tutorials/cluster.md), for fault-tolerance and reduced resource 
contention.
 
+## Druid auto start
+
+Setting up a new Druid cluster can sometimes be complicated as there are 
several runtime properties required by each service. Each process must also be 
given the appropriate jvm arguments so that the system can perform optimally.
+
+`start-druid` is a generic launch script capable of starting any set of Druid 
services on a server.
+It accepts optional arguments such as list of services, total memory and a 
config directory to override default jvm arguments and service-specific runtime 
properties.
+All other reference configurations (e.g. `micro`, `small`, `xlarge`) can be 
obtained by passing the

Review Comment:
   I would cut this sentence, I think it does not add much other than some 
confusion.



##########
docs/operations/single-server.md:
##########
@@ -44,6 +47,21 @@ The example configurations run the Druid Coordinator and 
Overlord together in a
 
 While example configurations are provided for very large single machines, at 
higher scales we recommend running Druid in a [clustered 
deployment](../tutorials/cluster.md), for fault-tolerance and reduced resource 
contention.
 
+## Druid auto start
+
+Setting up a new Druid cluster can sometimes be complicated as there are 
several runtime properties required by each service. Each process must also be 
given the appropriate jvm arguments so that the system can perform optimally.
+
+`start-druid` is a generic launch script capable of starting any set of Druid 
services on a server.
+It accepts optional arguments such as list of services, total memory and a 
config directory to override default jvm arguments and service-specific runtime 
properties.
+All other reference configurations (e.g. `micro`, `small`, `xlarge`) can be 
obtained by passing the
+correct memory to this script.
+Druid services will use all processors and upto 80% memory on the system.

Review Comment:
   up to (spelling)



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to