Skip to content

Commit b1a3fcf

Browse files
authored
Updated install docs with guidance about testing minikube (#574)
1 parent 278a15b commit b1a3fcf

File tree

4 files changed

+74
-112
lines changed

4 files changed

+74
-112
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ Monitor and analyze the emergent behaviors of Bitcoin networks.
1616
## Documentation
1717

1818
- [Installation](/docs/install.md)
19-
- [Quick Start](/docs/quickstart.md)
2019
- [CLI Commands](/docs/warnet.md)
2120
- [Scenarios](/docs/scenarios.md)
2221
- [Monitoring](/docs/logging_monitoring.md)
2322
- [Lightning Network](/docs/lightning.md)
2423
- [Scaling](/docs/scaling.md)
2524
- [Connecting to local nodes](https://github.com/bitcoin-dev-project/warnet/blob/main/docs/)
2625
- [Understanding network configuration](/docs/config.md)
26+
- [Contributing](/docs/contributing.md)
2727

2828
![warnet-art](https://raw.githubusercontent.com/bitcoin-dev-project/warnet/main/docs/machines.webp)

docs/contributing.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Contributing / Local Warnet Development
2+
3+
## Download the code repository
4+
5+
```bash
6+
git clone https://github.com/bitcoin-dev-project/warnet
7+
cd warnet
8+
```
9+
10+
## Recommended: use a virtual Python environment such as `venv`
11+
12+
```bash
13+
python3 -m venv .venv # Use alternative venv manager if desired
14+
source .venv/bin/activate
15+
```
16+
17+
```bash
18+
pip install --upgrade pip
19+
pip install -e .
20+
```

docs/install.md

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,92 @@
1-
# Install Warnet
1+
# Installing Warnet
22

3-
Warnet requires Kubernetes in order to run the network. Kubernetes can be run
4-
remotely or locally (with minikube or Docker Desktop). `kubectl` must be run
5-
locally to administer the network.
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.
64

75
## Dependencies
86

9-
### Kubernetes
7+
### Remote (cloud) cluster
108

11-
Install [`kubectl`](https://kubernetes.io/docs/setup/) (or equivalent) and
12-
configure your cluster. This can be done locally with `minikube` (or Docker Desktop)
13-
or using a managed cluster.
9+
The only two dependencies of Warnet are `helm` and `kubectl` configured to talk to your cloud cluster.
1410

15-
#### Docker engine with minikube
11+
### Running Warnet Locally
1612

17-
If using Minikube to run a smaller-sized local cluster, you will require docker engine.
18-
To install docker engine, see: https://docs.docker.com/engine/install/
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.
1914

20-
e.g. For Ubuntu:
15+
#### Docker Desktop
2116

22-
```bash
23-
# First uninstall any old versions
24-
for pkg in docker.io docker-doc podman-docker containerd runc; do sudo apt-get remove $pkg; done
25-
26-
# Add Docker's official GPG key:
27-
sudo apt-get update
28-
sudo apt-get install ca-certificates curl gnupg
29-
sudo install -m 0755 -d /etc/apt/keyrings
30-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
31-
sudo chmod a+r /etc/apt/keyrings/docker.gpg
32-
33-
# Add the repository to Apt sources:
34-
echo \
35-
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
36-
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
37-
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
38-
sudo apt-get update
39-
40-
# Install the docker packages
41-
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
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.
20+
21+
#### Minikube
22+
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/).
24+
25+
After installing Minikube don't forget to start it with:
26+
27+
```shell
28+
minikube start
4229
```
4330

44-
#### Using Docker
31+
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.
4532

46-
If you have never used Docker before you may need to take a few more steps to run the Docker daemon on your system.
47-
The Docker daemon MUST be running before stating Warnet.
33+
### Testing kubectl and helm
34+
35+
The following commands should run on both local and remote clusters. Do not proceed unless kubectl and helm are working.
36+
37+
```shell
38+
helm repo add examples https://helm.github.io/examples
39+
helm install hello examples/hello-world
40+
helm list
41+
kubectl get pods
42+
helm uninstall hello
43+
```
4844

4945
#### Managing Kubernetes cluster
5046

5147
The use of a k8s cluster management tool is highly recommended.
5248
We like to use `k9s`: https://k9scli.io/
5349

54-
##### Linux
50+
## Install Warnet
5551

56-
- [Check Docker user/group permissions](https://stackoverflow.com/a/48957722/1653320)
57-
- or [`chmod` the Docker UNIX socket](https://stackoverflow.com/a/51362528/1653320)
52+
Either install warnet via pip, or clone the source and install:
5853

59-
## Install Warnet
54+
### via pip
6055

61-
### Recommended: use a virtual Python environment such as `venv`
56+
You can install warnet via `pip` into a virtual environment with
6257

6358
```bash
64-
python3 -m venv .venv # Use alternative venv manager if desired
59+
python3 -m venv .venv
6560
source .venv/bin/activate
66-
```
67-
68-
```bash
69-
pip install --upgrade pip
7061
pip install warnet
7162
```
7263

73-
## Contributing / Local Warnet Development
64+
### via cloned source
7465

75-
### Download the code repository
66+
You can install warnet from source into a virtual environment with
7667

7768
```bash
78-
git clone https://github.com/bitcoin-dev-project/warnet
69+
git clone https://github.com/bitcoin-dev-project/warnet.git
7970
cd warnet
71+
python3 -m venv .venv
72+
source .venv/bin/activate
73+
pip install -e .
8074
```
8175

82-
### Recommended: use a virtual Python environment such as `venv`
76+
## Running
77+
78+
To get started first check you have all the necessary requirements:
8379

8480
```bash
85-
python3 -m venv .venv # Use alternative venv manager if desired
86-
source .venv/bin/activate
81+
warnet setup
8782
```
8883

84+
Then create your first network:
85+
8986
```bash
90-
pip install --upgrade pip
91-
pip install -e .
92-
```
87+
# Create a new network in the current directory
88+
warnet init
9389

90+
# Or in a directory of choice
91+
warnet new <directory>
92+
```

docs/quickstart.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)