diff --git a/README.md b/README.md index d51a9ff9..6db1aa4c 100644 --- a/README.md +++ b/README.md @@ -64,22 +64,22 @@ Depending on the distro you are using will determine which `python3` package to ### DUNES installation on Linux -This is the fastest way to get started. From the [latest release](https://github.com/AntelopeIO/DUNE/releases/latest) page, download DUNES `*.deb` file or visit the [release tags](https://github.com/AntelopeIO/DUNE/releases) page to download specific version of DUNES deb package. +This is the fastest way to get started. From the [latest release](https://github.com/AntelopeIO/DUNES/releases/latest) page, download DUNES `*.deb` file or visit the [release tags](https://github.com/AntelopeIO/DUNES/releases) page to download specific version of DUNES deb package. Once you have a `*.deb` file downloaded, you can install it as follows: ```bash sudo apt-get update -sudo apt-get install -y ~/Downloads/antelopeio-dunes*.deb +sudo apt-get install -y ~/Downloads/dunes*.deb ``` Your download path may vary. #### Alternative: DUNES installation using RPM package -From the [latest release](https://github.com/AntelopeIO/DUNE/releases/latest) page, download DUNES `*.rpm` file. +From the [latest release](https://github.com/AntelopeIO/DUNES/releases/latest) page, download DUNES `*.rpm` file. Once you have a `*.rpm` file downloaded, you can install it as follows: ```bash -sudo rpm -i ~/Downloads/antelopeio-dunes*.rpm +sudo rpm -i ~/Downloads/dunes*.rpm ``` Your download path may vary. @@ -107,7 +107,7 @@ $ echo "PATH=:$PATH" >> .bashrc If you want to rebuild the DUNES image pick your preferred terminal application and input the following command: ```console -/DUNES$ ./bootstrap.sh +/DUNES$ ./bootstrap.sh ``` ### Windows 10 & 11 @@ -133,19 +133,19 @@ Visit the download page for [Python 3](https://python.org/downloads). You should Make sure you mark "Add Python to PATH" during installation. After installation open `cmd.exe` and verify `python --version` returns current Python version. -#### DUNE installation on Windows +#### DUNES installation on Windows 1. Install [Chocolatey](https://docs.chocolatey.org/en-us/choco/setup). -2. Download latest `*.nupkg` from [latest release](https://github.com/AntelopeIO/DUNE/releases/latest) page. +2. Download latest `*.nupkg` from [latest release](https://github.com/AntelopeIO/DUNES/releases/latest) page. 3. Run PowerShell as administrator and go to the directory where your *`.nupkg` was downloaded. 4. Run following commands: ``` -choco uninstall antelopeio-dune -y +choco uninstall dunes -y choco install netfx-4.8 python311 docker-desktop -y ``` 5. Now restart PowerShell as administrator again (so that `python` command could be executed) and run: ``` -choco install .\antelopeio-dunes.1.1.0.nupkg -y +choco install .\dunes.1.1.0.nupkg -y ``` 5. Restart your computer (this is because %PATH% has to be reloaded. In cmd.exe it is enough to run command `refreshenv`). 6. Open PowerShell / cmd.exe and try that following command works: `dunes.bat --version`. @@ -284,7 +284,7 @@ This will build a given CMake app project. This command takes a directory to the **--destroy-container** This will destroy and remove the currently running container. WARNING! This will delete all data that is running. -This is useful if you need to update to a new version of DUNE or if you corrupt the container some how. +This is useful if you need to update to a new version of DUNES or if you corrupt the container some how. --- @@ -294,7 +294,7 @@ This will stop the currently running container. --- **--start-container** -This will start the `dune` container. +This will start the `dunes` container. --- @@ -381,7 +381,7 @@ The core concept of this utility is to abstract over Leap programs such as `node As such some of the commands might seem restrictive. Please take note that if you find any of the commands to be too restrictive then you can use the command `--` followed by whatever normal `cleos`, `nodeos`, CDT and OS commands that you need. -When you run any command with DUNE, if a container has not been created yet it will automatically create one for you. +When you run any command with DUNES, if a container has not been created yet it will automatically create one for you. The command of `start-container` shouldn't necessarily be needed during normal operation. A developer wallet is automatically created for you and is always unlocked diff --git a/bootstrap.bat b/bootstrap.bat index b58453cd..82450c03 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -1,4 +1,4 @@ @echo off SET mypath=%~dp0 -docker build --no-cache -f Dockerfile.win -t dune %mypath% +docker build --no-cache -f Dockerfile.win -t dunes %mypath% diff --git a/bootstrap.sh b/bootstrap.sh index 2ad09b28..f5b3c2cd 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -48,4 +48,4 @@ if [[ $(uname) == "Darwin" ]]; then GROUP_ID=200 fi -docker build --no-cache --build-arg USER_ID=0 --build-arg GROUP_ID="$GROUP_ID" $LEAP_ARGUMENT $CDT_ARGUMENT -f Dockerfile.unix -t dune "$SDIR" +docker build --no-cache --build-arg USER_ID=0 --build-arg GROUP_ID="$GROUP_ID" $LEAP_ARGUMENT $CDT_ARGUMENT -f Dockerfile.unix -t dunes "$SDIR" diff --git a/docs/PLUGIN.md b/docs/PLUGIN.md index 89af90d7..1f182fc2 100644 --- a/docs/PLUGIN.md +++ b/docs/PLUGIN.md @@ -7,7 +7,7 @@ DUNES allows users to extend its functionality through the use of plugins. DUNES 2. In the aforementioned subdirectory you need to create script `main.py`. 3. `main.py` needs to define 3 functions: 1. `add_parsing(parser)` - function that receives instance of [argparse.ArgumentParser](https://docs.python.org/3/library/argparse.html). It is used to add new DUNES command parsing arguments. - 2. (optionally) `set_dune(dune)` - function that receives instance of DUNES so the user could interact with DUNES. It might be stored for later usage if needed. + 2. (optionally) `set_dunes(dunes)` - function that receives instance of DUNES so the user could interact with DUNES. It might be stored for later usage if needed. 3. `handle_args(args)` - function that receives populated namespace returned by [ArgumentParser.parse_args](https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_args). It is used to handle new DUNES command arguments. @@ -15,17 +15,17 @@ DUNES allows users to extend its functionality through the use of plugins. DUNES You can find example plugins in [plugin_example directory](../plugin_example/). To test the example plugins, copy or symbolically link the contents of the [../plugin_example/](../plugin_example) directory into the [../src/plugin/](../src/plugin/) directory. This way, DUNES will automatically discover the new plugins. -### dune_hello +### dunes_hello The simplest plugin, which adds `--hello` to DUNES commands. When command `dunes --hello` is executed then an example output is printed. ### account_setup Plugin adds command `--bootstrap-account` to DUNES commands. When it is executed 3 example accounts are created: `alice`, `bob` and `cindy`. Additionally the contract `eosio.token` is deployed to all above accounts. -In this example you can see how `set_dune` function is being used to store `dune` instance and later use it to create and prepare accounts. +In this example you can see how `set_dunes` function is being used to store `dunes` instance and later use it to create and prepare accounts. ## Implementation details DUNES starts with auto-discovering the plugins in the `src/plugin` subdirectories and dynamically loading each `main.py` file. The functions from each plugin are then called in the following order: 1. `add_parsing(parser)` - this function is called first to add parsing arguments. Users can also initialize their plugin at this stage, however, it should be noted that at this point it is not known if the plugin will be used. -2. (optionally) `set_dune(dune)` - if the user wants to interact with DUNES, they should store the DUNES object in this function. +2. (optionally) `set_dunes(dunes)` - if the user wants to interact with DUNES, they should store the DUNES object in this function. 3. `handle_args(args)` - the user should check if their parsing arguments are being used and handle them in this function. This is the main function where the plugin does its job. The DUNES object is usually needed in this function. diff --git a/docs/RELEASE.md b/docs/RELEASE.md index 6b6943c1..7f02284e 100644 --- a/docs/RELEASE.md +++ b/docs/RELEASE.md @@ -1,7 +1,7 @@ # How to prepare new DUNES release? ## How to generate a package on Windows? -1. Edit `packaging\antelopeio-dunes\antelopeio-dunes.nuspec` and edit the current version in XML tag `version` +1. Edit `packaging\antelopeio-dunes\dunes.nuspec` and edit the current version in XML tag `version` 2. If you do not have yet [Chocolatey](https://chocolatey.org/) installed open Windows console as administrator. Otherwise you can open Windows console as a regular user. 3. Go to `packaging` directory and run `generate_chocolatey.bat` (if you run it for the first time then Chocolatey will be installed) @@ -14,8 +14,8 @@ Otherwise you can open Windows console as a regular user. 3. Run `./bootstrap.sh` in your DUNES directory 4. Change below `X.Y.Z` to your version and in DUNES directory run: ``` -docker tag dune ghcr.io/antelopeio/dune:latest -docker push ghcr.io/antelopeio/dune:latest -docker tag dune ghcr.io/antelopeio/dune:X.Y.Z -docker push ghcr.io/antelopeio/dune:X.Y.Z +docker tag dunes ghcr.io/antelopeio/dunes:latest +docker push ghcr.io/antelopeio/dunes:latest +docker tag dunes ghcr.io/antelopeio/dunes:X.Y.Z +docker push ghcr.io/antelopeio/dunes:X.Y.Z ``` diff --git a/docs/man/dune.1 b/docs/man/dunes.1 similarity index 62% rename from docs/man/dune.1 rename to docs/man/dunes.1 index 5b06e5b0..4a1f8702 100644 --- a/docs/man/dune.1 +++ b/docs/man/dunes.1 @@ -1,13 +1,13 @@ -.\" Automatically generated by Pandoc 2.5 +.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "DUNES" "1" "April 04, 2023" "AntelopeIO" "Docker Utilities for Node Execution and Subsystems" .hy .SH NAME .PP -DUNES \- Docker Utilities for Node Execution. +DUNES - Docker Utilities for Node Execution. .SH SYNOPSIS .PP -\f[C]dunes