removed invoke run task, since core-python provides a better means to do the same thing, updated install doc page to reflect this, removed old emane install from emane docs page

This commit is contained in:
Blake Harnden 2020-08-07 22:04:34 -07:00
parent b89a19a18e
commit 6dd7ce731e
3 changed files with 4 additions and 60 deletions

View file

@ -50,23 +50,6 @@ can also subscribe to EMANE location events and move the nodes on the canvas
as they are moved in the EMANE emulation. This would occur when an Emulation
Script Generator, for example, is running a mobility script.
## EMANE Installation
EMANE can be installed from deb or RPM packages or from source. See the
[EMANE GitHub](https://github.com/adjacentlink/emane) for full details.
Here are quick instructions for installing all EMANE packages for Ubuntu 18.04:
```shell
# install dependencies
sudo apt-get install libssl-dev libxml-libxml-perl libxml-simple-perl
wget https://adjacentlink.com/downloads/emane/emane-1.2.5-release-1.ubuntu-18_04.amd64.tar.gz
tar xzf emane-1.2.5-release-1.ubuntu-18_04.amd64.tar.gz
# install base emane packages
sudo dpkg -i emane-1.2.5-release-1/deb/ubuntu-18_04/amd64/emane*.deb
# install python3 bindings
sudo dpkg -i emane-1.2.5-release-1/deb/ubuntu-18_04/amd64/python3*.deb
```
## EMANE Configuration
The CORE configuration file **/etc/core/core.conf** has options specific to

View file

@ -132,30 +132,14 @@ After the installation complete it will have installed the following scripts.
If you create your own python scripts to run CORE directly or using the gRPC/TLV
APIs you will need to make sure you are running them within context of the
installed virtual environment.
installed virtual environment. To help support this CORE provides the `core-python`
executable. This executable will allow you to enter CORE's python virtual
environment interpreter or to run a script within it.
> **NOTE:** the following assumes CORE has been installed successfully
There is an invoke task to help with this case.
```shell
cd <CORE_REPO>
inv -h run
Usage: inv[oke] [--core-opts] run [--options] [other tasks here ...]
Docstring:
runs a user script in the core virtual environment
Options:
-f STRING, --file=STRING script file to run in the core virtual environment
-s, --sudo run script as sudo
```
Another way would be to enable the core virtual environment shell. Which
would allow you to run scripts in a more **normal** way.
```shell
cd <CORE_REPO>/daemon
poetry shell
python run /path/to/script.py
core-python <script>
```
## Manually Install EMANE
@ -199,7 +183,6 @@ Available tasks:
install-emane install emane and the python bindings
install-scripts install core script files, modified to leverage virtual environment
install-service install systemd core service
run runs a user script in the core virtual environment
test run core tests
test-emane run core emane tests
test-mock run core tests using mock to avoid running as sudo

View file

@ -469,28 +469,6 @@ def daemon(c):
)
@task(
help={
"sudo": "run script as sudo",
"file": "script file to run in the core virtual environment"
},
)
def run(c, file, sudo=False):
"""
runs a user script in the core virtual environment
"""
if not file:
print("no script was provided")
return
python = get_python(c)
path = Path(file).absolute()
with c.cd(DAEMON_DIR):
cmd = f"{python} {path}"
if sudo:
cmd = f"sudo {cmd}"
c.run(cmd, pty=True)
@task
def test(c):
"""