Skip to content

Commit

Permalink
fix: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
utibeabasi6 authored Jan 18, 2024
1 parent b369436 commit 755fe7d
Showing 1 changed file with 41 additions and 8 deletions.
49 changes: 41 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

Windhoek is a small API written in Golang that exposes an invoke route we can call to run a function within a Firecracker VM.

# How to run
## Install dependencies
## How to run

### Install Golang
### Install dependencies

#### Install Golang
```bash
pushd /tmp
wget https://go.dev/dl/go1.21.5.linux-amd64.tar.gz
Expand All @@ -14,7 +15,7 @@ Windhoek is a small API written in Golang that exposes an invoke route we can ca
popd
```

### Install Firecracker
#### Install Firecracker
```bash
pushd /tmp
ARCH="$(uname -m)"
Expand All @@ -28,7 +29,7 @@ mv release-${latest}-$(uname -m)/firecracker-${latest}-${ARCH} /usr/local/bin/fi
popd
```

### Install CNI plugins
#### Install CNI plugins
```bash
apt-get install make
git clone https://github.com/containernetworking/plugins.git /tmp/cni-plugins
Expand All @@ -49,16 +50,48 @@ popd
popd
```

### Create required directories
#### Create required directories

```bash
mkdir /root/fckernels /root/fcsockets /root/fcruntimes
```

### Download Kernel and Runtime root filesystem
#### Download Kernel and Runtime root filesystem

```bash
cd /root/fcruntimes && wget https://terraform-20231223074656017300000001.s3.amazonaws.com/rootfs/nodejs-runtime/nodejs-runtime.ext4
cd /root/fckernels && curl -fsSL -o hello-vmlinux.bin https://s3.amazonaws.com/spec.ccfc.min/img/hello/kernel/hello-vmlinux.bin

```
```

### Deployment

The windhoek service runs as a systemd process within each worker node. To run, follow these steps:

#### Create systemd file

```bash
cat <<EOF > /etc/systemd/system/windhoek.service
[Unit]
Description=Windhoek
After=network.target
[Service]
ExecStart=/root/windhoek
Restart=always
[Install]
WantedBy=default.target
EOF
```

#### Reload the systemd service
```bash
systemctl daemon-reload
```

#### Enable and start the service
```bash
systemctl enable windhoek.service
systemctl start windhoek.service
```

0 comments on commit 755fe7d

Please sign in to comment.