Skip to content

Commit

Permalink
docs: adjustments to remove the need for setting up and using sudop a…
Browse files Browse the repository at this point in the history
…s we now help provide symlinks to compensate
  • Loading branch information
bharnden committed Nov 14, 2023
1 parent 8b79cdf commit 76853b7
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 95 deletions.
31 changes: 3 additions & 28 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
26 changes: 6 additions & 20 deletions docs/install_centos.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
26 changes: 6 additions & 20 deletions docs/install_ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion docs/tutorials/common/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 1 addition & 10 deletions docs/tutorials/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions docs/tutorials/tutorial1.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/tutorial2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/tutorial3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/tutorial5.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This section covers using the saved **scenario.xml** file to get and up and runn
</p>
* Make sure the **core-daemon** is running in a terminal
```shell
sudop core-daemon
sudo core-daemon
```
* In another terminal run the GUI
```shell
Expand Down Expand Up @@ -101,7 +101,7 @@ This section covers leveraging the gRPC script to get up and running.
</p>
* Make sure the **core-daemon** is running in a terminal
```shell
sudop core-daemon
sudo core-daemon
```
* In another terminal run the GUI
```shell
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/tutorial6.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/tutorial7.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 76853b7

Please sign in to comment.