Environment variables don't get picked up by application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2022 06:31 AM
I'm trying to deploy a Docker image on a Cisco ISR 4321 with version 17.03.04a (latest suggest release on software.cisco.com). There are a few ways to send environment variables to the application, but I can't seem to get all of them working.
When using the "app -> env" section in package.yaml the variables get picked up by the application just fine.
When using the "app -> startup -> runtime_options" section in package.yaml and filling it with "-e [variable]=[value]" statements, the application behaves as if these variables are not present.
When using the cli and setting the "run-opts [d] [word]" in "config-app-hosting-docker" mode and then setting "-e [variable]=[value]" statements these also are not seen by the application.
I would prefer to have both the "app -> env" section in package.yaml and the cli options at the same time. In the package we can then set the variables for the apps which are the same company wide and in the cli we can set the options that differ per device.
Can anyone shed some light on these 3 ways to set variables and how they are supposed to interact?
- Labels:
-
IOx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2022 05:11 PM
Hi @Mvlaar,
Good question!
Please check out this discussion about how to regenerate the package.yaml file with your environmental variables inside ---> Solved: User defined Environment variables for docker style apps. It worked for them; I hope it works for you too!
Best of luck!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2022 03:12 AM
The package.yaml alone works fine, I would like to combine the variables so I can set them company wide in package.yaml and device only in runtime options.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2022 05:24 PM
Hi again @Mvlaar,
Here are some things I found out regarding the ISR4321, IOS XE and IOx:
- I was looking at the IOx Platform Support Matrix and the ISR 4321 is not on it, although the ISR4351/4331 are. Strange.
- Anyway, something else to consider is the Cisco IOS XE devices support Python Version 2.7 in both interactive and non-interactive (script) modes within the Guest Shell. I just mention this to make sure you're not doing anything Python 3 specific.
- While the ISR4321 support the Guest Shell, the Guest Shell requires 8GB of DRAM. KVM and Guest Shell containers cannot co-exist
- The IOx service can take up to 3 minutes to start
- Log into the Guest Shell by running ‘guestshell run bash’. Environment variables can be customized by editing .bashrc or .bash_profile.
- Here are the resolved and open bugs for version IOS-XE 17.3.4a: https://www.cisco.com/c/en/us/td/docs/routers/sdwan/release/notes/xe-17-3/sd-wan-rel-notes-xe-17-3.html#concept_c5t_21b_cqb. I don't see anything regarding IOx or Docker mentioned.
- Finally, we have IOS CE sandboxes at DevNet. Go here --> https://devnetsandbox.cisco.com/RM/Topology and search for 'IOS XE'. See if you can do there what you're trying to do on your ISR.
Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022 05:39 AM
Hi @Mvlaar,
An update and additional info...
We've reached out to an ISR expert team regarding this, so more info on this may be coming in. In the mean time, there is a mailer where you can ask IOx questions; you can ask there as well why we wait on ISR experts feedback:
"iox-support(mailer list)" <iox-support@cisco.com>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 04:43 AM
The 4321 was in the matrix a few months ago, but it disappeared. Here is some extra info that might help with the expert team:
MV-GW-02#sh inv +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ INFO: Please use "show license UDI" to get serial number for licensing. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ NAME: "Chassis", DESCR: "Cisco ISR4321 Chassis" PID: ISR4321/K9 , VID: V05 , SN: XXXXXXXXXXX MV-GW-02#sh iox-service IOx Infrastructure Summary: --------------------------- IOx service (CAF) 1.11.0.5 : Running IOx service (HA) : Not Supported IOx service (IOxman) : Running IOx service (Sec storage) : Not Supported Libvirtd 1.3.4 : Running
I'm not using guestshell on this box. I use the technitium/dns-server from docker and add the iproute2 package. Then I package and install it via ioxclient.
Most of it is running fine with 2 issues. You already know about the fact I can't get environment variables to be picked up from the runtime options. The second problem is that when I try to upgrade the container, you have to deactive it, this deletes the saved data, even though I use a "-v" option in the runtime options.
Anyone can mail to that address, even without a support contract? That sounds great. Thanks for the support so far.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 05:17 AM
Hey @Mvlaar,
Thanks for the added info and helpful votes!
Yes, anyone can mail to the mailer. It has 62 member, including some high-level experts.
