Skip to content

Commit 9829d18

Browse files
authored
Merge pull request #668 from willcl-ark/update-install-docs
update install docs
2 parents 6290072 + df74a2f commit 9829d18

File tree

1 file changed

+58
-38
lines changed

1 file changed

+58
-38
lines changed

docs/install.md

Lines changed: 58 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,68 @@
11
# Installing Warnet
22

3-
Warnet requires Kubernetes (k8s) and helm in order to run the network. Kubernetes can be run remotely or locally (with minikube or Docker Desktop). `kubectl` and `helm` must be run locally to administer the network.
3+
Warnet runs on Kubernetes (k8s) and requires the Helm Kubernetes package manager in order to run the network.
4+
The Kubernetes cluster can be run locally via minikube, Docker Desktop, k3d or similar, or remotely via Googles GKE, Digital Ocean, etc..
5+
The utilities `kubectl` and `helm` must be installed and found on $PATH to administer the network.
6+
7+
## Install Warnet
8+
9+
Either install warnet via pip, or clone the source and install:
10+
11+
### via pip
12+
13+
You can install warnet via `pip` into a virtual environment with
14+
15+
```bash
16+
python3 -m venv .venv
17+
source .venv/bin/activate
18+
pip install warnet
19+
```
20+
21+
### via cloned source
22+
23+
You can install warnet from source into a virtual environment with
24+
25+
```bash
26+
git clone https://github.com/bitcoin-dev-project/warnet.git
27+
cd warnet
28+
python3 -m venv .venv
29+
source .venv/bin/activate
30+
pip install -e .
31+
```
432

533
## Dependencies
634

7-
### Remote (cloud) cluster
35+
The [`helm`](https://helm.sh/) and [`kubectl`](https://kubernetes.io/docs/reference/kubectl/) utilities are required for all configurations to talk to and administrate your cluster.
36+
These can be installed using your operating system's package manager, a third party package manager like [homebrew](https://brew.sh/), or as binaries directly into a python virtual environment created for warnet, by following the steps in [Use warnet to install dependencies](#use-warnet-to-install-dependencies).
37+
38+
If you are using a cloud-based cluster, these are the only tools needed.
39+
40+
### Use warnet to install dependencies
841

9-
The only two dependencies of Warnet are `helm` and `kubectl` configured to talk to your cloud cluster.
42+
```bash
43+
# Ensure the virtual environment is active
44+
source .venv/bin/activate
45+
46+
# Run `warnet setup` to be guided through downloading binaries into the
47+
# python virtual environment
48+
warnet setup
49+
```
1050

1151
### Running Warnet Locally
1252

13-
If the number of nodes you are running can run on one machine (think a dozen or so) then Warnet can happily run on a local Kubernetes. Two supported k8s implementations are Minikube and K8s as part of Docker Desktop.
53+
If the number of nodes you are running can run on one machine (think a dozen or so) then Warnet can happily run on a local Kubernetes.
54+
Two supported local Kubernetes implementations are Minikube and Docker Desktop.
1455

1556
#### Docker Desktop
1657

17-
[Docker desktop](https://www.docker.com/products/docker-desktop/) includes the docker engine itself and has an option to enable Kubernetes. Simply installing it and enabling Kubernetes should be enough.
18-
19-
[Helm](https://helm.sh/docs/intro/install/) is also required to be installed.
58+
[Docker desktop](https://www.docker.com/products/docker-desktop/) includes the docker engine itself and has an option to enable Kubernetes.
59+
Install it and enable Kubernetes in the option menu to start a cluster.
2060

2161
#### Minikube
2262

23-
Minikube requires a backend to run on with the supported backend being Docker. So if installing Minikube, you may need to install docker first. Please see [Installing Docker](https://docs.docker.com/engine/install/) and [Installing Minkube](https://minikube.sigs.k8s.io/docs/start/).
63+
Minikube requires a backend to run on with the supported backend being Docker.
64+
65+
[Install Docker](https://docs.docker.com/engine/install/) first, and then proceed to [Install Minkube](https://minikube.sigs.k8s.io/docs/start/).
2466

2567
After installing Minikube don't forget to start it with:
2668

@@ -30,9 +72,10 @@ minikube start
3072

3173
Minikube has a [guide](https://kubernetes.io/docs/tutorials/hello-minikube/) on getting started which could be useful to validate that your minikube is running correctly.
3274

33-
### Testing kubectl and helm
75+
## Testing kubectl and helm
3476

35-
The following commands should run on both local and remote clusters. Do not proceed unless kubectl and helm are working.
77+
After installing `kubectl` and `helm` the following commands should run successfully on either a local or remote cluster.
78+
Do not proceed unless `kubectl` and `helm` are working.
3679

3780
```shell
3881
helm repo add examples https://helm.github.io/examples
@@ -42,41 +85,18 @@ kubectl get pods
4285
helm uninstall hello
4386
```
4487

45-
#### Managing Kubernetes cluster
88+
#### Managing a Kubernetes cluster
4689

4790
The use of a k8s cluster management tool is highly recommended.
4891
We like to use `k9s`: https://k9scli.io/
4992

50-
## Install Warnet
51-
52-
Either install warnet via pip, or clone the source and install:
53-
54-
### via pip
55-
56-
You can install warnet via `pip` into a virtual environment with
57-
58-
```bash
59-
python3 -m venv .venv
60-
source .venv/bin/activate
61-
pip install warnet
62-
```
63-
64-
### via cloned source
65-
66-
You can install warnet from source into a virtual environment with
67-
68-
```bash
69-
git clone https://github.com/bitcoin-dev-project/warnet.git
70-
cd warnet
71-
python3 -m venv .venv
72-
source .venv/bin/activate
73-
pip install -e .
74-
```
75-
7693
## Running
7794

7895
To get started first check you have all the necessary requirements:
7996

97+
> [!TIP]
98+
> Don't forget to activate your python virtual environment when using new terminals!
99+
80100
```bash
81101
warnet setup
82102
```
@@ -89,4 +109,4 @@ warnet init
89109

90110
# Or in a directory of choice
91111
warnet new <directory>
92-
```
112+
```

0 commit comments

Comments
 (0)