Skip to content

Commit

Permalink
Merge pull request #53 from algorandfoundation/refactor/nodekit
Browse files Browse the repository at this point in the history
refactor: rename to nodekit
  • Loading branch information
PhearZero authored Jan 7, 2025
2 parents de26d00 + f9ca676 commit 7602c34
Show file tree
Hide file tree
Showing 121 changed files with 435 additions and 435 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: go vet ./...

- name: Build
run: go build -o bin/algorun *.go
run: go build -o bin/nodekit *.go

- name: Unit Tests
run: make test
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/node_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ jobs:
export GOCOVERDIR=$(pwd)/coverage
mkdir -p $GOCOVERDIR
go build -cover .
./algorun-tui install
./nodekit install
systemctl status algorand.service
export TOKEN=$(cat /var/lib/algorand/algod.admin.token)
curl http://localhost:8080/v2/participation -H "X-Algo-API-Token: $TOKEN" | grep "null"
./algorun-tui stop
./algorun-tui upgrade
./algorun-tui debug
./nodekit stop
./nodekit upgrade
./nodekit debug
sleep 10
./algorun-tui catchup
./algorun-tui catchup debug
./algorun-tui catchup stop
./algorun-tui stop
./algorun-tui uninstall
./nodekit catchup
./nodekit catchup debug
./nodekit catchup stop
./nodekit stop
./nodekit uninstall
go tool covdata textfmt -i=$GOCOVERDIR -o coverage.txt
- name: Upload results to Codecov
Expand All @@ -60,20 +60,20 @@ jobs:
export GOCOVERDIR=$(pwd)/coverage
mkdir -p $GOCOVERDIR
go build -cover .
./algorun-tui install
./nodekit install
sudo launchctl print system/com.algorand.algod
sleep 5
export TOKEN=$(cat ~/.algorand/algod.admin.token)
curl http://localhost:8080/v2/participation -H "X-Algo-API-Token: $TOKEN" | grep "null"
./algorun-tui stop
./algorun-tui upgrade
./algorun-tui debug
./nodekit stop
./nodekit upgrade
./nodekit debug
sleep 10
./algorun-tui catchup
./algorun-tui catchup debug
./algorun-tui catchup stop
./algorun-tui stop
./algorun-tui uninstall
./nodekit catchup
./nodekit catchup debug
./nodekit catchup stop
./nodekit stop
./nodekit uninstall
go tool covdata textfmt -i=$GOCOVERDIR -o coverage.txt
- name: Upload results to Codecov
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
algorun-tui
nodekit
coverage
bin
.data
Expand Down Expand Up @@ -36,4 +36,4 @@ go.work.sum
.env

# user-created file
.algorun.y*ml
.nodekit.y*ml
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ A guide on how to contribute to this project.
Clone the project

```bash
git clone [email protected]:algorandfoundation/algorun-tui.git
git clone [email protected]:algorandfoundation/nodekit.git
```

Change to the directory

```bash
cd algorun-tui
cd nodekit
```

Build the project
Expand All @@ -29,7 +29,7 @@ Optionally, run a sandboxed participation node
docker compose up
```

Create a configuration file for the participation node in the root directory of the project (.algorun.yaml)
Create a configuration file for the participation node in the root directory of the project (.nodekit.yaml)

```yaml
algod-endpoint: http://localhost:8080
Expand All @@ -40,13 +40,13 @@ Launch the TUI
> [!NOTE]
> If you skipped the docker container or config file, try running `./bin/algorun` standalone,
> If you skipped the docker container or config file, try running `./bin/nodekit` standalone,
> which will detect your algorand data directory from the `ALGORAND_DATA` environment variable that works for `goal`.
> Otherwise, provide the `--algod-endpoint` and `--algod-token` arguments so that it can find your node.
> Note that algorun requires the admin algod token.
> Note that nodekit requires the admin algod token.

```bash
./bin/algorun
./bin/nodekit
```

# 📂 Folder Structure
Expand All @@ -67,7 +67,7 @@ All submodules and endpoints **SHOULD** align with the command/ui namespaces.
Example Command:

```bash
algorun status
nodekit status
```

Example Structure
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build:
CGO_ENABLED=0 go build -o bin/algorun .
CGO_ENABLED=0 go build -o bin/nodekit .
test:
go test -coverprofile=coverage.out -coverpkg=./... -covermode=atomic ./...
generate:
oapi-codegen -config generate.yaml https://raw.githubusercontent.com/algorand/go-algorand/v3.26.0-stable/daemon/algod/api/algod.oas3.yml
oapi-codegen -config generate.yaml https://raw.githubusercontent.com/algorand/go-algorand/v3.26.0-stable/daemon/algod/api/algod.oas3.yml
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## algorun
## nodekit

Manage Algorand nodes from the command line

Expand All @@ -11,40 +11,40 @@ Manage Algorand nodes from the command line
Manage Algorand nodes from the command line

Overview:
Welcome to Algorun, a terminal user interface for managing Algorand nodes.
This is your one stop shop for managing Algorand nodes, including node creation, configuration, and management.
Welcome to NodeKit, a TUI for managing Algorand nodes.
A one stop shop for managing Algorand nodes, including node creation, configuration, and management.

Note: This is still a work in progress. Expect bugs and rough edges.

```
algorun [flags]
nodekit [flags]
```

### Options

```
-d, --datadir string Data directory for the node
-h, --help help for algorun
-h, --help help for nodekit
```

### SEE ALSO

* [algorun bootstrap](/man/algorun_bootstrap.md) - Initialize a fresh node
* [algorun catchup](/man/algorun_catchup.md) - Manage Fast-Catchup for your node
* [algorun configure](/man/algorun_configure.md) - Change settings on the system (WIP)
* [algorun debug](/man/algorun_debug.md) - Display debugging information
* [algorun install](/man/algorun_install.md) - Install the node daemon
* [algorun start](/man/algorun_start.md) - Start the node daemon
* [algorun stop](/man/algorun_stop.md) - Stop the node daemon
* [algorun uninstall](/man/algorun_uninstall.md) - Uninstall the node daemon
* [algorun upgrade](/man/algorun_upgrade.md) - Upgrade the node daemon
* [nodekit bootstrap](/man/nodekit_bootstrap.md) - Initialize a fresh node
* [nodekit catchup](/man/nodekit_catchup.md) - Manage Fast-Catchup for your node
* [nodekit configure](/man/nodekit_configure.md) - Change settings on the system (WIP)
* [nodekit debug](/man/nodekit_debug.md) - Display debugging information
* [nodekit install](/man/nodekit_install.md) - Install the node daemon
* [nodekit start](/man/nodekit_start.md) - Start the node daemon
* [nodekit stop](/man/nodekit_stop.md) - Stop the node daemon
* [nodekit uninstall](/man/nodekit_uninstall.md) - Uninstall the node daemon
* [nodekit upgrade](/man/nodekit_upgrade.md) - Upgrade the node daemon

###### Auto generated by spf13/cobra on 6-Jan-2025
###### Auto generated by spf13/cobra on 7-Jan-2025

### Installing

Connect to your server and run the installation script which will bootstrap your node.

```bash
curl -fsSL https://raw.githubusercontent.com/algorandfoundation/algorun-tui/refs/heads/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/algorandfoundation/nodekit/refs/heads/main/install.sh | bash
```
2 changes: 1 addition & 1 deletion VISION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ is largely inspired by it.

# Motivation

**Staking Rewards™️** require additional configuration and monitoring which this **Hacktui** seeks to simplify.
**Staking Rewards™️** require additional configuration and monitoring which this **NodeKit** seeks to simplify.

## Primary Goals

Expand Down
2 changes: 1 addition & 1 deletion assets/footer.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
Connect to your server and run the installation script which will bootstrap your node.

```bash
curl -fsSL https://raw.githubusercontent.com/algorandfoundation/algorun-tui/refs/heads/main/install.sh | bash
curl -fsSL https://raw.githubusercontent.com/algorandfoundation/nodekit/refs/heads/main/install.sh | bash
```
20 changes: 10 additions & 10 deletions cmd/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ package cmd
import (
"context"
"fmt"
"github.com/algorandfoundation/algorun-tui/api"
cmdutils "github.com/algorandfoundation/algorun-tui/cmd/utils"
"github.com/algorandfoundation/algorun-tui/cmd/utils/explanations"
"github.com/algorandfoundation/algorun-tui/internal/algod"
"github.com/algorandfoundation/algorun-tui/internal/algod/utils"
"github.com/algorandfoundation/algorun-tui/internal/system"
"github.com/algorandfoundation/algorun-tui/ui"
"github.com/algorandfoundation/algorun-tui/ui/app"
"github.com/algorandfoundation/algorun-tui/ui/bootstrap"
"github.com/algorandfoundation/algorun-tui/ui/style"
"github.com/algorandfoundation/nodekit/api"
cmdutils "github.com/algorandfoundation/nodekit/cmd/utils"
"github.com/algorandfoundation/nodekit/cmd/utils/explanations"
"github.com/algorandfoundation/nodekit/internal/algod"
"github.com/algorandfoundation/nodekit/internal/algod/utils"
"github.com/algorandfoundation/nodekit/internal/system"
"github.com/algorandfoundation/nodekit/ui"
"github.com/algorandfoundation/nodekit/ui/app"
"github.com/algorandfoundation/nodekit/ui/bootstrap"
"github.com/algorandfoundation/nodekit/ui/style"
tea "github.com/charmbracelet/bubbletea"
"github.com/charmbracelet/glamour"
"github.com/charmbracelet/lipgloss"
Expand Down
8 changes: 4 additions & 4 deletions cmd/catchup/catchup.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package catchup

import (
"context"
"github.com/algorandfoundation/algorun-tui/api"
"github.com/algorandfoundation/algorun-tui/cmd/utils"
"github.com/algorandfoundation/algorun-tui/internal/algod"
"github.com/algorandfoundation/algorun-tui/ui/style"
"github.com/algorandfoundation/nodekit/api"
"github.com/algorandfoundation/nodekit/cmd/utils"
"github.com/algorandfoundation/nodekit/internal/algod"
"github.com/algorandfoundation/nodekit/ui/style"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/log"
"github.com/spf13/cobra"
Expand Down
8 changes: 4 additions & 4 deletions cmd/catchup/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/algorandfoundation/algorun-tui/api"
"github.com/algorandfoundation/algorun-tui/cmd/utils"
"github.com/algorandfoundation/algorun-tui/internal/algod"
"github.com/algorandfoundation/algorun-tui/ui/style"
"github.com/algorandfoundation/nodekit/api"
"github.com/algorandfoundation/nodekit/cmd/utils"
"github.com/algorandfoundation/nodekit/internal/algod"
"github.com/algorandfoundation/nodekit/ui/style"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/log"
"github.com/spf13/cobra"
Expand Down
8 changes: 4 additions & 4 deletions cmd/catchup/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package catchup

import (
"context"
"github.com/algorandfoundation/algorun-tui/api"
"github.com/algorandfoundation/algorun-tui/cmd/utils"
"github.com/algorandfoundation/algorun-tui/internal/algod"
"github.com/algorandfoundation/algorun-tui/ui/style"
"github.com/algorandfoundation/nodekit/api"
"github.com/algorandfoundation/nodekit/cmd/utils"
"github.com/algorandfoundation/nodekit/internal/algod"
"github.com/algorandfoundation/nodekit/ui/style"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/log"
"github.com/spf13/cobra"
Expand Down
8 changes: 4 additions & 4 deletions cmd/catchup/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package catchup

import (
"context"
"github.com/algorandfoundation/algorun-tui/api"
"github.com/algorandfoundation/algorun-tui/cmd/utils"
"github.com/algorandfoundation/algorun-tui/internal/algod"
"github.com/algorandfoundation/algorun-tui/ui/style"
"github.com/algorandfoundation/nodekit/api"
"github.com/algorandfoundation/nodekit/cmd/utils"
"github.com/algorandfoundation/nodekit/internal/algod"
"github.com/algorandfoundation/nodekit/ui/style"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/log"
"github.com/spf13/cobra"
Expand Down
12 changes: 6 additions & 6 deletions cmd/configure/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package configure
import (
"bytes"
"fmt"
"github.com/algorandfoundation/algorun-tui/cmd/utils/explanations"
"github.com/algorandfoundation/algorun-tui/internal/algod"
"github.com/algorandfoundation/algorun-tui/internal/algod/utils"
"github.com/algorandfoundation/algorun-tui/ui/style"
"github.com/algorandfoundation/nodekit/cmd/utils/explanations"
"github.com/algorandfoundation/nodekit/internal/algod"
"github.com/algorandfoundation/nodekit/internal/algod/utils"
"github.com/algorandfoundation/nodekit/ui/style"
"github.com/charmbracelet/lipgloss"
"os"
"os/exec"
Expand Down Expand Up @@ -70,7 +70,7 @@ func configureNode() error {
//

if !systemServiceConfigure {
fmt.Println("Configuring Data directory for algod started through Algorun...")
fmt.Println("Configuring Data directory for algod started through NodeKit...")
}

algorandData := os.Getenv("ALGORAND_DATA")
Expand Down Expand Up @@ -158,7 +158,7 @@ func configureNode() error {
}

// Deep search
if promptWrapperNo("Do you want Algorun to do a deep search for pre-existing Algorand Data directories? (y/n)") {
if promptWrapperNo("Do you want NodeKit to do a deep search for pre-existing Algorand Data directories? (y/n)") {
fmt.Println("User chose not to search for more pre-existing Algorand Data directories. Exiting...")
os.Exit(0)
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/configure/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package configure

import (
"errors"
"github.com/algorandfoundation/algorun-tui/cmd/utils/explanations"
"github.com/algorandfoundation/algorun-tui/internal/algod"
"github.com/algorandfoundation/algorun-tui/internal/system"
"github.com/algorandfoundation/algorun-tui/ui/style"
"github.com/algorandfoundation/nodekit/cmd/utils/explanations"
"github.com/algorandfoundation/nodekit/internal/algod"
"github.com/algorandfoundation/nodekit/internal/system"
"github.com/algorandfoundation/nodekit/ui/style"
"github.com/charmbracelet/lipgloss"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/configure/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package configure

import (
"fmt"
"github.com/algorandfoundation/algorun-tui/internal/system"
"github.com/algorandfoundation/nodekit/internal/system"
"github.com/manifoldco/promptui"
"github.com/spf13/cobra"
"os"
Expand Down
12 changes: 6 additions & 6 deletions cmd/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package cmd
import (
"encoding/json"
"fmt"
cmdutils "github.com/algorandfoundation/algorun-tui/cmd/utils"
"github.com/algorandfoundation/algorun-tui/cmd/utils/explanations"
"github.com/algorandfoundation/algorun-tui/internal/algod"
"github.com/algorandfoundation/algorun-tui/internal/algod/utils"
"github.com/algorandfoundation/algorun-tui/internal/system"
"github.com/algorandfoundation/algorun-tui/ui/style"
cmdutils "github.com/algorandfoundation/nodekit/cmd/utils"
"github.com/algorandfoundation/nodekit/cmd/utils/explanations"
"github.com/algorandfoundation/nodekit/internal/algod"
"github.com/algorandfoundation/nodekit/internal/algod/utils"
"github.com/algorandfoundation/nodekit/internal/system"
"github.com/algorandfoundation/nodekit/ui/style"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/log"
"github.com/spf13/cobra"
Expand Down
6 changes: 3 additions & 3 deletions cmd/install.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package cmd

import (
"github.com/algorandfoundation/algorun-tui/cmd/utils/explanations"
"github.com/algorandfoundation/algorun-tui/internal/algod"
"github.com/algorandfoundation/algorun-tui/ui/style"
"github.com/algorandfoundation/nodekit/cmd/utils/explanations"
"github.com/algorandfoundation/nodekit/internal/algod"
"github.com/algorandfoundation/nodekit/ui/style"
"github.com/charmbracelet/lipgloss"
"github.com/charmbracelet/log"
"github.com/spf13/cobra"
Expand Down
Loading

0 comments on commit 7602c34

Please sign in to comment.