From f20553406153702aef486642a861654f425ca207 Mon Sep 17 00:00:00 2001 From: "Elijah J. Passmore" Date: Mon, 13 Sep 2021 14:30:29 +1200 Subject: [PATCH 1/2] Fix Single Machine install tags and fake driver - Fix tag naming so that SQLHistorian is tagged platform_historian and ListenerAgent is tagged listener. - Change note under section Install a Fake Driver so that it explicitly states the assumption that the user is currently in the volttron root directory like the previous section. - Change following commands to reflect change in note. - Fix final command in code-block to both point to the correct directory and load the csv file correctly. Signed-off-by: Elijah J. Passmore --- docs/source/deploying-volttron/single-machine.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/source/deploying-volttron/single-machine.rst b/docs/source/deploying-volttron/single-machine.rst index 2c3ceff277..fd39c2ce84 100644 --- a/docs/source/deploying-volttron/single-machine.rst +++ b/docs/source/deploying-volttron/single-machine.rst @@ -180,9 +180,9 @@ For a simple setup example, a Platform Driver, SQLite Historian, and Listener ar .. code-block:: bash - python scripts/install-agent.py -s services/core/SQLHistorian -c configs/config.sqlite --tag listener + python scripts/install-agent.py -s services/core/SQLHistorian -c configs/config.sqlite --tag platform_historian python scripts/install-agent.py -s services/core/PlatformDriverAgent -c configs/platform-driver.agent --tag platform_driver - python scripts/install-agent.py -s examples/ListenerAgent -c configs/listener.config --tag platform_historian + python scripts/install-agent.py -s examples/ListenerAgent -c configs/listener.config --tag listener .. note:: @@ -232,15 +232,15 @@ concrete drivers such as the BACnet or Modbus drivers, view their respective doc .. note:: - This section will assume the user has created a `configs` directory in the volttron root directory, activated - the Python virtual environment, and started the platform as noted above. + This section will assume the user is currently in the volttron root directory and has created a `configs` directory, + activated the Python virtual environment, and started the platform as noted above. .. code-block:: console - cp examples/configurations/drivers/fake.config /configs - cp examples/configurations/drivers/fake.csv /configs + cp examples/configurations/drivers/fake.config configs + cp examples/configurations/drivers/fake.csv configs vctl config store platform.driver devices/campus/building/fake configs/fake.config - vctl config store platform.driver fake.csv devices/fake.csv + vctl config store platform.driver fake.csv configs/fake.csv --csv .. note:: From e9ac2d277e6b56a8446232ad28bc541b7ff42c3c Mon Sep 17 00:00:00 2001 From: "Elijah J. Passmore" Date: Tue, 14 Sep 2021 08:10:16 +1200 Subject: [PATCH 2/2] Pass KeyError during instance_setup installs Fix an unhandled error that arises from an identity that is currently not in the user's environment variables being popped. Signed-off-by: Elijah J. Passmore --- volttron/platform/instance_setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/volttron/platform/instance_setup.py b/volttron/platform/instance_setup.py index 5997039042..937415f173 100644 --- a/volttron/platform/instance_setup.py +++ b/volttron/platform/instance_setup.py @@ -268,7 +268,10 @@ def func(*args, **kwargs): _shutdown_platform() if identity is not None: - os.environ.pop('AGENT_VIP_IDENTITY') + try: + os.environ.pop('AGENT_VIP_IDENTITY') + except KeyError: + pass available_agents[tag] = func return func