Skip to content

Commit

Permalink
Merge pull request #94 from nodeset-org/dev
Browse files Browse the repository at this point in the history
Prep for v0.4.2 Beta
  • Loading branch information
jclapis authored Apr 30, 2024
2 parents e87416e + a616089 commit caaf2ff
Show file tree
Hide file tree
Showing 251 changed files with 975 additions and 10,471 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Hyperdrive Build
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.21.8
- run: cd ${GITHUB_WORKSPACE}/hyperdrive-cli && go build .
14 changes: 14 additions & 0 deletions .github/workflows/commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Taken from https://github.com/marketplace/actions/block-fixup-commit-merge?version=v2.0.0
# Updated to use newer ubuntu and checkout action
name: Git Checks

on: [pull_request]

jobs:
block-fixup:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Block Fixup Commit Merge
uses: 13rac1/[email protected]
47 changes: 47 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Taken from https://github.com/golangci/golangci-lint-action
name: golangci-lint
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: 1.21.8
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest

# Optional: working directory, useful for monorepos
# working-directory: somedir

# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0

# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true

# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true

# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
20 changes: 20 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Hyperdrive Unit Tests
on:
push:
tags:
- v*
branches:
- master
- main
pull_request:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.21.8
- run: go test ./...
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,18 @@ go.work
*.swp

# Binaries
src/hyperdrive-cli/hyperdrive-cli
src/hyperdrive-daemon/hyperdrive-daemon
src/modules/stakewise/stakewise
src/modules/stakewise/stakewise-daemon/stakewise-daemon
hyperdrive-cli/hyperdrive-cli
hyperdrive-daemon/hyperdrive-daemon

# Packaging
build/
*.build
*.dsc
*.dch
*.tar.gz
*debhelper*
install/packages/debian/hyperdrive
install/packages/debian/debian/hyperdrive*
install/packages/debian/_build/
bin
pkg
pkg
88 changes: 79 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,95 @@ Hyperdrive is an all-in-one node management system for NodeSet node operators.

Check [the NodeSet docs pages](https://nodeset-org.gitbook.io/nodeset/node-operators/hyperdrive) for full documentation and setup guides.


## Installation

We provide packaged versions of each release so you can manage your installation via your system package manager. If you've never installed Hyperdrive before, first you should add our package repository to your list.
Installing Hyperdrive can be done in two ways: via the `apt` package manager for Debian-based systems, or manually via the CLI (for any Linux or macOS system).


### Via the Package Manager (for Debian-based systems with `apt`)

If your system uses the `apt` package manager, you can install Hyperdrive by enabling our repository.


#### Install Docker

Start by installing Docker for your system following the [Docker installation instructions](https://docs.docker.com/engine/install/).

Next, add your user to the group of Docker administrators:
```
sudo usermod -aG docker $USER
```

Finally, exit the terminal session and start a new one (log out and back in or close and re-open SSH) for the new permissions to take effect.


#### Install Hyperdrive

1. Update the system packages and install some prerequisites:
```
sudo apt update && sudo apt install curl gnupg apt-transport-https ca-certificates
```
2. Save the Hyperdrive repository signing key:
```
sudo install -m 0755 -d /etc/apt/keyrings && sudo curl -fsSL https://packagecloud.io/nodeset/hyperdrive/gpgkey -o /etc/apt/keyrings/hyperdrive.asc
```
3. Add the Hyperdrive repository to your `apt` list:
```
sudo tee -a /etc/apt/sources.list.d/hyperdrive.list << EOF
deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/hyperdrive.asc] https://packagecloud.io/nodeset/hyperdrive/any/ any main
deb-src [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/hyperdrive.asc] https://packagecloud.io/nodeset/hyperdrive/any/ any main
EOF
```
4. Install Hyperdrive via `apt`:
```
sudo apt update && sudo apt install hyperdrive
```
### Manual Install (for all systems)
If you can't or don't want to use the `apt` process, you can install Hyperdrive manually instead.
1. Download the CLI from [the latest GitHub release](https://github.com/nodeset-org/hyperdrive/releases/latest). Note there are four options: two for Linux and two for Darwin (macOS); both are available for `amd64` and `arm64`. To have parity with the package installer, we recommend saving it to `/usr/bin/hyperdrive`. For example, on an `x64` Linux system, you could do:
```
sudo wget https://github.com/nodeset-org/hyperdrive/releases/latest/download/hyperdrive-cli-linux-amd64 -O /usr/bin/hyperdrive && sudo chmod +x /usr/bin/hyperdrive
```
Make sure you run `chmod +x` on it before trying to use it.
2. Install Hyperdrive via the CLI:
```
hyperdrive service install
```
This will also handle installing all of the dependencies and permissions for you.
## Updating Hyperdrive
### Via the Package Manager (for Debian-based systems with `apt`)
E.g. for Debian:
If you installed Hyperdrive via the package manager, you simply need to run the following to update it when a new release is out (along with any other system packages that are out of date):
```
sudo apt update && sudo apt dist-upgrade && sudo apt auto-remove
```
`sudo add-apt-repository 'deb https://packagecloud.io/nodeset/hyperdrive'`
`sudo apt-get update`
### Manual Update (for all systems)
`sudo apt-get install hyperdrive`
If you installed Hyperdrive manually, start by downloading the new CLI using the same process you followed in step 1 of the [manual installation](#manual-install-for-all-systems) section.
To finalize the installation, define your configuration by running `hyperdrive service install`, then `hyperdrive service config`.
Once it's downloaded, run the following command:
## Updating
```
hyperdrive service install -d
```
Update via your package manger. E.g. for Debian:
Note the `-d` which skips Operating System dependencies, since you already have them.
`sudo apt update && sudo apt dist-upgrade && sudo apt autoremove`
## Attribution
Expand Down
Loading

0 comments on commit caaf2ff

Please sign in to comment.