From 76853b70b66e6dd64276d7ce61b9f77902f4fa0d Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Tue, 14 Nov 2023 11:04:27 -0800 Subject: [PATCH] docs: adjustments to remove the need for setting up and using sudop as we now help provide symlinks to compensate --- docs/install.md | 31 +++---------------------------- docs/install_centos.md | 26 ++++++-------------------- docs/install_ubuntu.md | 26 ++++++-------------------- docs/tutorials/common/grpc.md | 2 +- docs/tutorials/setup.md | 11 +---------- docs/tutorials/tutorial1.md | 10 +++++----- docs/tutorials/tutorial2.md | 4 ++-- docs/tutorials/tutorial3.md | 4 ++-- docs/tutorials/tutorial5.md | 4 ++-- docs/tutorials/tutorial6.md | 2 +- docs/tutorials/tutorial7.md | 8 ++++---- 11 files changed, 33 insertions(+), 95 deletions(-) diff --git a/docs/install.md b/docs/install.md index ee4109c1..002d51a4 100644 --- a/docs/install.md +++ b/docs/install.md @@ -362,38 +362,13 @@ Place the file contents below in **/etc/docker/docker.json** } ``` -### Resolving Path Issues - -One problem running CORE you may run into, using the virtual environment or locally -can be issues related to your path. - -To add support for your user to run scripts from the virtual environment: - -```shell -# can add to ~/.bashrc -export PATH=$PATH:/opt/core/venv/bin -``` - -This will not solve the path issue when running as sudo, so you can do either -of the following to compensate. - -```shell -# run command passing in the right PATH to pickup from the user running the command -sudo env PATH=$PATH core-daemon - -# add an alias to ~/.bashrc or something similar -alias sudop='sudo env PATH=$PATH' -# now you can run commands like so -sudop core-daemon -``` - ### Running CORE -The following assumes I have resolved PATH issues and setup the `sudop` alias. +In typical usage CORE is made up of two parts, the **core-daemon** (server) and the **core-gui** (client). ```shell -# in one terminal run the server daemon using the alias above -sudop core-daemon +# in one terminal run the server daemon +sudo core-daemon # in another terminal run the gui client core-gui ``` diff --git a/docs/install_centos.md b/docs/install_centos.md index 53de2af6..9cf083dc 100644 --- a/docs/install_centos.md +++ b/docs/install_centos.md @@ -118,27 +118,13 @@ PATH=~/Documents/protoc/bin:$PATH make sudo /opt/core/venv/bin/python -m pip install . ``` -## Setup PATH +## Running CORE -The CORE virtual environment and related scripts will not be found on your PATH, -so some adjustments needs to be made. - -To add support for your user to run scripts from the virtual environment: - -```shell -# can add to ~/.bashrc -export PATH=$PATH:/opt/core/venv/bin -``` - -This will not solve the path issue when running as sudo, so you can do either -of the following to compensate. +This install will place CORE within a virtual environment, symlinks to CORE scripts will be added to **/usr/bin**. ```shell -# run command passing in the right PATH to pickup from the user running the command -sudo env PATH=$PATH core-daemon - -# add an alias to ~/.bashrc or something similar -alias sudop='sudo env PATH=$PATH' -# now you can run commands like so -sudop core-daemon +# in one terminal run the server daemon +sudo core-daemon +# in another terminal run the gui client +core-gui ``` diff --git a/docs/install_ubuntu.md b/docs/install_ubuntu.md index 57274a4f..dc00db0b 100644 --- a/docs/install_ubuntu.md +++ b/docs/install_ubuntu.md @@ -90,27 +90,13 @@ PATH=~/Documents/protoc/bin:$PATH make sudo /opt/core/venv/bin/python -m pip install . ``` -## Setup PATH +## Running CORE -The CORE virtual environment and related scripts will not be found on your PATH, -so some adjustments needs to be made. - -To add support for your user to run scripts from the virtual environment: - -```shell -# can add to ~/.bashrc -export PATH=$PATH:/opt/core/venv/bin -``` - -This will not solve the path issue when running as sudo, so you can do either -of the following to compensate. +This install will place CORE within a virtual environment, symlinks to CORE scripts will be added to **/usr/bin**. ```shell -# run command passing in the right PATH to pickup from the user running the command -sudo env PATH=$PATH core-daemon - -# add an alias to ~/.bashrc or something similar -alias sudop='sudo env PATH=$PATH' -# now you can run commands like so -sudop core-daemon +# in one terminal run the server daemon +sudo core-daemon +# in another terminal run the gui client +core-gui ``` diff --git a/docs/tutorials/common/grpc.md b/docs/tutorials/common/grpc.md index 2a85d7c8..f5738bae 100644 --- a/docs/tutorials/common/grpc.md +++ b/docs/tutorials/common/grpc.md @@ -6,7 +6,7 @@ the remaining steps of a given section. 1. Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` 2. From another terminal run the tutorial python script, which will create a session to join ``` shell diff --git a/docs/tutorials/setup.md b/docs/tutorials/setup.md index ae592453..2b7877c9 100644 --- a/docs/tutorials/setup.md +++ b/docs/tutorials/setup.md @@ -2,16 +2,7 @@ ## Setup for CORE -We assume the prior installation of CORE, using a virtual environment. You can -then adjust your PATH and add an alias to help more conveniently run CORE -commands. - -This can be setup in your **.bashrc** - -```shell -export PATH=$PATH:/opt/core/venv/bin -alias sudop='sudo env PATH=$PATH' -``` +We assume the prior installation of CORE, using a virtual environment. ## Setup for Chat App diff --git a/docs/tutorials/tutorial1.md b/docs/tutorials/tutorial1.md index 7bda7e7f..7e275fea 100644 --- a/docs/tutorials/tutorial1.md +++ b/docs/tutorials/tutorial1.md @@ -38,7 +38,7 @@ between nodes in CORE. * Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ``` shell @@ -76,7 +76,7 @@ traffic being sent/received among many other uses. * Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ``` shell @@ -115,7 +115,7 @@ beneficial for understanding how software will behave in adverse conditions. * Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ``` shell @@ -158,7 +158,7 @@ within the nodes of our scenario. * Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ``` shell @@ -208,7 +208,7 @@ using `tail -f` to observe the output of running software. * Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ``` shell diff --git a/docs/tutorials/tutorial2.md b/docs/tutorials/tutorial2.md index 7b82e04e..d319f383 100644 --- a/docs/tutorials/tutorial2.md +++ b/docs/tutorials/tutorial2.md @@ -20,7 +20,7 @@ XML scenario file, leveraging an NS2 mobility file. * Make sure the **core-daemon** is running a terminal ```shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ```shell @@ -97,7 +97,7 @@ gRPC python script and providing mobility over the gRPC interface. * Make sure the **core-daemon** is running a terminal ```shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ```shell diff --git a/docs/tutorials/tutorial3.md b/docs/tutorials/tutorial3.md index 84ffb244..720ef0ed 100644 --- a/docs/tutorials/tutorial3.md +++ b/docs/tutorials/tutorial3.md @@ -21,7 +21,7 @@ file, leveraging an NS2 file for mobility. * Make sure the **core-daemon** is running a terminal ```shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ```shell @@ -80,7 +80,7 @@ This section covers using a gRPC script to create and provide scenario movement. * Make sure the **core-daemon** is running a terminal ```shell - sudop core-daemon + sudo core-daemon ``` * From another terminal run the **scenario.py** script ```shell diff --git a/docs/tutorials/tutorial5.md b/docs/tutorials/tutorial5.md index 92337717..b6bf8fac 100644 --- a/docs/tutorials/tutorial5.md +++ b/docs/tutorials/tutorial5.md @@ -22,7 +22,7 @@ This section covers using the saved **scenario.xml** file to get and up and runn

* Make sure the **core-daemon** is running in a terminal ```shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ```shell @@ -101,7 +101,7 @@ This section covers leveraging the gRPC script to get up and running.

* Make sure the **core-daemon** is running in a terminal ```shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ```shell diff --git a/docs/tutorials/tutorial6.md b/docs/tutorials/tutorial6.md index e056825e..a10c6d3a 100644 --- a/docs/tutorials/tutorial6.md +++ b/docs/tutorials/tutorial6.md @@ -20,7 +20,7 @@ This section will cover running this sample tutorial that develops a scenario fi * Ensure that **/opt/core/etc/core.conf** has **grpcaddress** set to **0.0.0.0** * Make sure the **core-daemon** is running in a terminal ```shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ```shell diff --git a/docs/tutorials/tutorial7.md b/docs/tutorials/tutorial7.md index 2cc2f812..38d855ea 100644 --- a/docs/tutorials/tutorial7.md +++ b/docs/tutorials/tutorial7.md @@ -44,7 +44,7 @@ between nodes in CORE. * Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ``` shell @@ -82,7 +82,7 @@ traffic being sent/received among many other uses. * Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ``` shell @@ -121,7 +121,7 @@ within the nodes of our scenario. * Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ``` shell @@ -171,7 +171,7 @@ using `tail -f` to observe the output of running software. * Make sure the CORE daemon is running a terminal, if not already ``` shell - sudop core-daemon + sudo core-daemon ``` * In another terminal run the GUI ``` shell