<?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>topic Re: User defined Environment variables for docker style apps in Edge Computing Infrastructure</title>
    <link>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3857350#M331</link>
    <description>&lt;PRE&gt;Cisco829#show platform guest-os &lt;BR /&gt;Guest OS status:&lt;BR /&gt;Installation: Cisco-GOS,version-1.6.3.1&lt;BR /&gt;State: RUNNING&lt;/PRE&gt;&lt;P&gt;ah, I use 1.6.3.1 on IR829 router.&amp;nbsp; looks like this is not supported in 1.6.3.1 version, can you please confirm it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the support.&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2019 09:48:40 GMT</pubDate>
    <dc:creator>arun1587</dc:creator>
    <dc:date>2019-05-16T09:48:40Z</dc:date>
    <item>
      <title>User defined Environment variables for docker style apps</title>
      <link>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3853187#M327</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we have a user-defined env variables other than the default CAF_XXX related variables in docker style apps?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the Dockerfile, I could define&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;...&lt;BR /&gt;FROM apline:3.5

ENV TEST_VAR=xyz

...&lt;/PRE&gt;&lt;P&gt;and use it inside the application using&lt;/P&gt;&lt;PRE&gt;os.getenv("TEST_VAR")&lt;/PRE&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 13:20:38 GMT</pubDate>
      <guid>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3853187#M327</guid>
      <dc:creator>arun1587</dc:creator>
      <dc:date>2019-05-09T13:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: User defined Environment variables for docker style apps</title>
      <link>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3855477#M328</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IOx already have this capability to specify ENV variables via Dockerfile. Could you please confirm you can use it in your target process that way ? When you get inside app container, you can look at the env variables that are provisioned to the target process&amp;nbsp;&lt;/P&gt;
&lt;PRE class="code-tab-content "&gt;&lt;CODE class="markdown hljs"&gt;$/data/.env&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face="Menlo, Monaco, Consolas, Courier New, monospace" color="#c7254e"&gt;&lt;SPAN style="font-size: 14.4px; background-color: #f9f2f4;"&gt;Note: Don't hard code /data directory in your target process, always use env variables provisioned to the target process. Refer this link for default set of env variables given to app -&amp;nbsp;&lt;A href="https://developer.cisco.com/docs/iox/#!application-development-concepts" target="_blank"&gt;https://developer.cisco.com/docs/iox/#!application-development-concepts&lt;/A&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class="markdown hljs"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2019 21:24:22 GMT</pubDate>
      <guid>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3855477#M328</guid>
      <dc:creator>suressan</dc:creator>
      <dc:date>2019-05-13T21:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: User defined Environment variables for docker style apps</title>
      <link>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3855886#M329</link>
      <description>&lt;P&gt;hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;yes, I'm able to access the predefined CAF related variables such as&amp;nbsp;&lt;SPAN&gt;CAF_APP_APPDATA_DIR&amp;nbsp;&lt;/SPAN&gt;inside the dockerized application.&amp;nbsp; I would like to know if it is possible to define a new variable, example: TEST_VAR in the dockerfile and later to be used in the application once deployed in the router. I don't see `TEST_VAR` in `/data/.env`&amp;nbsp; file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2019 12:30:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3855886#M329</guid>
      <dc:creator>arun1587</dc:creator>
      <dc:date>2019-05-14T12:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: User defined Environment variables for docker style apps</title>
      <link>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3857137#M330</link>
      <description>&lt;P&gt;Which platform are you trying it in ? What is the IOx version ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In IR829 with latest IOx version (1.8), I do see the custom user env variable present in /data/.env.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;iox-ir829-19-GOS-1:/# cat /data/.env&lt;BR /&gt;...&lt;BR /&gt;export CAF_SS_PORT=9443&lt;BR /&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;export iox=test&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;export CAF_APP_CORE_DIR=/tmp/cores&lt;BR /&gt;export CAF_APP_ID=userenv&lt;BR /&gt;export CAF_SYSTEM_UUID=0c8d931d-c7cc-4fab-8b74-1f738621eb64iox-ir829-19-GOS-1:/#&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;iox-ir829-19-GOS-1:/#&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 22:06:01 GMT</pubDate>
      <guid>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3857137#M330</guid>
      <dc:creator>suressan</dc:creator>
      <dc:date>2019-05-15T22:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: User defined Environment variables for docker style apps</title>
      <link>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3857350#M331</link>
      <description>&lt;PRE&gt;Cisco829#show platform guest-os &lt;BR /&gt;Guest OS status:&lt;BR /&gt;Installation: Cisco-GOS,version-1.6.3.1&lt;BR /&gt;State: RUNNING&lt;/PRE&gt;&lt;P&gt;ah, I use 1.6.3.1 on IR829 router.&amp;nbsp; looks like this is not supported in 1.6.3.1 version, can you please confirm it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks for the support.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 09:48:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3857350#M331</guid>
      <dc:creator>arun1587</dc:creator>
      <dc:date>2019-05-16T09:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: User defined Environment variables for docker style apps</title>
      <link>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3857925#M332</link>
      <description>&lt;P&gt;Which version of ioxclient are you using ? This needs 1.7+ version of ioxclient utility.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the steps to get this feature support by rebuilding iox package&lt;/P&gt;
&lt;P&gt;- get rid of any package.yaml in build directory&lt;/P&gt;
&lt;P&gt;- use ioxclient 1.7+ to recreate iox package from a docker image. (ioxclient docker package &amp;lt;dockerimage&amp;gt; $PWD )&lt;/P&gt;
&lt;P&gt;- Extract package.tar and check contents of package.yaml to confirm if the ENV variables mentioned in Dockerfile are populated correctly.&lt;/P&gt;
&lt;P&gt;- If the above validation is succeeded then the generated IOx package (package.tar) should eventually populate those ENV variables in IOx app container as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2019 22:16:56 GMT</pubDate>
      <guid>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3857925#M332</guid>
      <dc:creator>suressan</dc:creator>
      <dc:date>2019-05-16T22:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: User defined Environment variables for docker style apps</title>
      <link>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3858131#M333</link>
      <description>&lt;P&gt;Nice, it worked!. Thanks much.&lt;/P&gt;&lt;P&gt;I was using quite an old version of iox-client 1.3.X. After I used version 1.8.1.0 I could see the env variable in package.yaml and as well as in the app once deployed in the router.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, in the end, we can conclude that we don't need the latest version of guest-os, right?. I'm currently running 1.6.3. or do you recommend to upgrade to latest ?.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2019 08:36:51 GMT</pubDate>
      <guid>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3858131#M333</guid>
      <dc:creator>arun1587</dc:creator>
      <dc:date>2019-05-17T08:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: User defined Environment variables for docker style apps</title>
      <link>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3858135#M334</link>
      <description>Nice, it worked!. Thanks much.&lt;BR /&gt;&lt;BR /&gt;I was using quite an old version of iox-client 1.3.X. After I used version 1.8.1.0 I could see the env variable in package.yaml and as well as in the app once deployed in the router.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So, in the end, we can conclude that we don't need the latest version of guest-os, right?. I'm currently running 1.6.3. or do you recommend to upgrade to latest ?.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;thanks,</description>
      <pubDate>Fri, 17 May 2019 08:38:14 GMT</pubDate>
      <guid>https://community.cisco.com/t5/edge-computing-infrastructure/user-defined-environment-variables-for-docker-style-apps/m-p/3858135#M334</guid>
      <dc:creator>arun1587</dc:creator>
      <dc:date>2019-05-17T08:38:14Z</dc:date>
    </item>
  </channel>
</rss>

