-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7968f74
commit f1492dd
Showing
3 changed files
with
84 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Develop k8s-dqlite against an active MicroK8s instance | ||
|
||
1. Install development tools: | ||
|
||
```bash | ||
sudo snap install go --classic | ||
sudo apt update | ||
sudo apt install build-essential -y | ||
``` | ||
|
||
2. Clone k8s-dqlite repository: | ||
|
||
```bash | ||
git clone https://github.com/canonical/k8s-dqlite | ||
``` | ||
|
||
3. Install MicroK8s on the machine: | ||
|
||
```bash | ||
sudo snap install microk8s --classic | ||
``` | ||
|
||
4. Wait for MicroK8s to come up: | ||
|
||
```bash | ||
sudo microk8s status --wait-ready | ||
``` | ||
|
||
5. Stop k8s-dqlite included in the snap: | ||
|
||
```bash | ||
sudo snap stop microk8s.daemon-k8s-dqlite --disable | ||
``` | ||
|
||
6. Run k8s-dqlite from this repository: | ||
|
||
```bash | ||
cd k8s-dqlite | ||
make static | ||
sudo ./bin/static/k8s-dqlite \ | ||
--storage-dir /var/snap/microk8s/current/var/kubernetes/backend \ | ||
--listen unix:///var/snap/microk8s/current/var/kubernetes/backend/kine.sock:12379 | ||
``` | ||
|
||
7. While developing and making changes to `k8s-dqlite`, just restart k8s-dqlite | ||
|
||
Note: When developing k8s-dqlite against Canonical Kubernetes use the following flags: | ||
|
||
- `--storage-dir /var/snap/k8s/common/var/lib/k8s-dqlite` | ||
- `--listen unix:///var/snap/k8s/common/var/lib/k8s-dqlite/k8s-dqlite.sock` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters