<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question cloudera director bootstrap python in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/cloudera-director-bootstrap-python/m-p/69510#M80134</link>
    <description>&lt;P&gt;Hi, is it possible to define a template for cloudera director to call a python script in the bootstrap process?&lt;/P&gt;&lt;P&gt;The documentation states that the&amp;nbsp;bootstrapScriptsPaths defines a list of script file (shell commands) - so I assume only shell commands are supported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 15:29:45 GMT</pubDate>
    <dc:creator>Tomas79</dc:creator>
    <dc:date>2022-09-16T15:29:45Z</dc:date>
    <item>
      <title>cloudera director bootstrap python</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/cloudera-director-bootstrap-python/m-p/69510#M80134</link>
      <description>&lt;P&gt;Hi, is it possible to define a template for cloudera director to call a python script in the bootstrap process?&lt;/P&gt;&lt;P&gt;The documentation states that the&amp;nbsp;bootstrapScriptsPaths defines a list of script file (shell commands) - so I assume only shell commands are supported.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 15:29:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/cloudera-director-bootstrap-python/m-p/69510#M80134</guid>
      <dc:creator>Tomas79</dc:creator>
      <dc:date>2022-09-16T15:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: cloudera director bootstrap python</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/cloudera-director-bootstrap-python/m-p/69511#M80135</link>
      <description>&lt;P&gt;Hi Tomas79,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think a Python script will work if you start it with a shebang (e.g., &lt;FONT face="courier new,courier"&gt;#/usr/bin/env python&lt;/FONT&gt;).&amp;nbsp;Director uses essentially the following shell command to run a script, so I can see a Python script working with it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;sudo chmod 700 'scriptName' &amp;amp;&amp;amp; sudo 'scriptName'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Even so,&amp;nbsp;running a Python script directly is a little hacky because we haven't thought about Director running anything other than shell scripts with this capability, so I can't&amp;nbsp;guarantee&amp;nbsp;that this command won't change in the future to not work with a Python script.&amp;nbsp;However, something like&amp;nbsp;the following shell script will be fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#!/usr/bin/env bash
python &amp;lt;&amp;lt;EOF
print 'Hello world!'
EOF&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#!/usr/bin/env bash
curl -O http://host/path/to/downloadable/script.py
python script.py&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or rather than downloading the script, bake it into your AMI / image. So, there are a few options.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 13:02:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/cloudera-director-bootstrap-python/m-p/69511#M80135</guid>
      <dc:creator>Bill Havanki</dc:creator>
      <dc:date>2018-07-02T13:02:51Z</dc:date>
    </item>
  </channel>
</rss>

