Skip to content

Commit

Permalink
📝 Add or update documentation: update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
k33g committed Aug 10, 2023
1 parent cd0cdc9 commit bffab37
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 17 deletions.
6 changes: 3 additions & 3 deletions docs/capsule-http-faas-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A Capsule HTTP server can start/spawn other Capsule HTTP server processes.
### Install the last version of Capsule HTTP

```bash
VERSION="v0.4.1" OS="linux" ARCH="arm64"
VERSION="v0.4.2" OS="linux" ARCH="arm64"
wget -O capsule-http https://github.com/bots-garden/capsule/releases/download/${VERSION}/capsule-http-${VERSION}-${OS}-${ARCH}
chmod +x capsule-http
sudo cp capsule-http /usr/local/bin/capsule-http
Expand All @@ -24,7 +24,7 @@ capsule-http --version
**CapsCtl** is a CLI to send commands to the Capsule HTTP server when it is unning in **FaaS** mode.

```bash
VERSION="v0.4.1" OS="linux" ARCH="arm64"
VERSION="v0.4.2" OS="linux" ARCH="arm64"
wget -O capsctl https://github.com/bots-garden/capsule/releases/download/${VERSION}/capsctl-${VERSION}-${OS}-${ARCH}
chmod +x capsctl
sudo cp capsctl /usr/local/bin/capsctl
Expand All @@ -51,7 +51,7 @@ You should get an output like this:
```
2023/05/29 15:12:18 🚀 faas mode activated!
2023/05/29 15:12:18 📦 wasm module loaded: ./functions/index-page/index-page.wasm
2023/05/29 15:12:18 💊 Capsule [HTTP] v0.4.1 🫑 [pepper]
2023/05/29 15:12:18 💊 Capsule [HTTP] v0.4.2 ⛱️ [beach umbrella]
http server is listening on: 8080 🌍
```

Expand Down
4 changes: 2 additions & 2 deletions docs/capsule-http-install-pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ssh k33g@capsulezero.local

## Install Capsule HTTP
VERSION="v0.4.1" OS="linux" ARCH="arm64"
VERSION="v0.4.2" OS="linux" ARCH="arm64"
wget -O capsule-http https://github.com/bots-garden/capsule/releases/download/${VERSION}/capsule-http-${VERSION}-${OS}-${ARCH}
chmod +x capsule-http
./capsule-http --version
Expand All @@ -27,7 +27,7 @@ scp capsule-http-v0.4.1-linux-arm64 k33g@capsulezero.local:./
ssh k33g@capsulezero.local -f "./capsule-http --httpPort=8080 --faas=true"
```

Try: `curl http://capsulezero.local:8080`, you should get `Capsule [HTTP] v0.4.1 🫑 [pepper][faas]`
Try: `curl http://capsulezero.local:8080`, you should get `Capsule [HTTP] v0.4.2 ⛱️ [beach umbrella][faas]`


## Deploy some functions
Expand Down
8 changes: 4 additions & 4 deletions docs/capsule-http-ovh-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ssh -i ./keys/capsule ubuntu@${OVH_IP}
## Install the last version of Capsule HTTP on the OVH Cloud instance

```bash
VERSION="v0.4.1" OS="linux" ARCH="amd64"
VERSION="v0.4.2" OS="linux" ARCH="amd64"
wget -O capsule-http https://github.com/bots-garden/capsule/releases/download/${VERSION}/capsule-http-${VERSION}-${OS}-${ARCH}

chmod +x capsule-http
Expand Down Expand Up @@ -57,15 +57,15 @@ sudo apt-get install iptables-persistent
If you open this URL https://faas.capsule.foundation/ on your browser, you should see the following message:

```bash
Capsule [HTTP] v0.4.1 🫑 [pepper][faas]
Capsule [HTTP] v0.4.2 ⛱️ [beach umbrella]
```

### Install the last version of CapsCtl

**CapsCtl** is a CLI to send commands to the Capsule HTTP server when it is running in **FaaS** mode.

```bash
VERSION="v0.4.1" OS="linux" ARCH="arm64"
VERSION="v0.4.2" OS="linux" ARCH="arm64"
wget -O capsctl https://github.com/bots-garden/capsule/releases/download/${VERSION}/capsctl-${VERSION}-${OS}-${ARCH}
chmod +x capsctl
sudo cp capsctl /usr/local/bin/capsctl
Expand Down Expand Up @@ -99,7 +99,7 @@ Create a file named `index.html` in a directory:
<section class="container">
<div>
<h1 class="title">👋 Hello World 🌍</h1>
<h2 class="subtitle">Served with 💜 by Capsule 💊 [HTTP] v0.4.1 🫑 [pepper] </h2>
<h2 class="subtitle">Served with 💜 by Capsule 💊 [HTTP] v0.4.2 ⛱️ [beach umbrella] </h2>
<h2 class="subtitle">🎉 Hosted on OVH Cloud [🚀 Faas mode]</h2>
<h2 class="subtitle">🥰 With the help of @titimoby</h2>
</div>
Expand Down
10 changes: 5 additions & 5 deletions docs/docker-capsule-http.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 🐳 Capsule HTTP Docker image

!!! info "Capsule HTTP Docker images v0.4.1 🫑 [pepper]"
- `botsgarden/capsule-http-linux-arm64:0.4.1`
- `botsgarden/capsule-http-linux-amd64:0.4.1`
!!! info "Capsule HTTP Docker images v0.4.2 ⛱️ [beach umbrella]"
- `botsgarden/capsule-http-linux-arm64:0.4.2`
- `botsgarden/capsule-http-linux-amd64:0.4.2`

> https://hub.docker.com/repositories/botsgarden
Expand All @@ -13,7 +13,7 @@
```bash
GOOS="linux"
GOARCH="arm64"
IMAGE_TAG="0.4.1"
IMAGE_TAG="0.4.2"
IMAGE_NAME="botsgarden/capsule-http-${GOOS}-${GOARCH}"

docker run \
Expand All @@ -29,7 +29,7 @@ docker run \
Create a new `Dockerfile`:

```dockerfile
FROM botsgarden/capsule-http-linux-arm64:0.4.1
FROM botsgarden/capsule-http-linux-arm64:0.4.2
COPY hello-world.wasm .
EXPOSE 8080
CMD ["/capsule-http", "--wasm=./hello-world.wasm", "--httpPort=8080"]
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
First, download the last version of the Capsule CLI for the appropriate OS & ARCH (and release version):

```bash
VERSION="v0.4.1" OS="linux" ARCH="arm64"
VERSION="v0.4.2" OS="linux" ARCH="arm64"
wget -O capsule https://github.com/bots-garden/capsule/releases/download/${VERSION}/capsule-${VERSION}-${OS}-${ARCH}
chmod +x capsule
```
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started-http-ngrok.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ NGROK_AUTHTOKEN="${YOUR_NGROK_AUTHTOKEN}" \
The ouput will be like this:

```bash
2023/05/18 11:25:36 💊 Capsule v0.4.1 🫑 [pepper] http server is listening on: 6666 🌍
2023/05/18 11:25:36 💊 Capsule v0.4.2 ⛱️ [beach umbrella] http server is listening on: 6666 🌍
2023/05/18 11:25:37 👋 Ngrok tunnel created: https://d298-88-173-112-231.ngrok-free.app
2023/05/18 11:25:37 🤚 Ngrok URL: /home/ubuntu/workspaces/capsule/capsule-http/ngrok.url
```
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started-http.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
First, download the last version of the Capsule HTTP server for the appropriate OS & ARCH (and release version):

```bash
VERSION="v0.4.1" OS="linux" ARCH="arm64"
VERSION="v0.4.2" OS="linux" ARCH="arm64"
wget -O capsule-http https://github.com/bots-garden/capsule/releases/download/${VERSION}/capsule-http-${VERSION}-${OS}-${ARCH}
chmod +x capsule-http
```
Expand Down
9 changes: 9 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Capsule Project: the nano wasm runners

!!! info "What's new?"
`v0.4.2 ⛱️ [beach umbrella]`:

- Update with the last version of [Wazero v1.4.0](https://github.com/tetratelabs/wazero/releases/tag/v1.4.0).
- Capsule HTTP is faster thanks to the Wazero optimisations.
- Capsule HDK: `v0.0.7` (🐞 fix with Redis + Wazero v1.4.0)
- Capsule MDK: `v0.0.6` (🐞 fix with Redis)

`v0.4.1 🫑 [pepper]`:

- Update with the last version of [Wazero v1.3.0](https://github.com/tetratelabs/wazero/releases/tag/v1.3.0).
Expand Down Expand Up @@ -119,6 +126,8 @@ Capsule applications bring superpowers to the WASM modules with **host functions
## History

!!! info "Releases"

- `v0.4.2 ⛱️ [beach umbrella]`: update with the last version of [Wazero v1.4.0](https://github.com/tetratelabs/wazero/releases/tag/v1.4.0) + 🐞 fix with Redis.
- `v0.4.1 🫑 [pepper]`: update with the last version of [Wazero v1.3.0](https://github.com/tetratelabs/wazero/releases/tag/v1.3.0) + [GitLab webhook sample](https://github.com/bots-garden/capsule/tree/main/capsule-http/functions/gitlab-webhook)
- `v0.4.0 🌶️ [chili pepper]`: update of [HDK 0.0.4 then 0.0.5](https://github.com/bots-garden/capsule-host-sdk/releases/tag/v0.0.5), (🎉 performances: more than x 2 🚀). **capsule-http**: add of 2 endpoints (`/metrics`and `/health`) triggering the `OnMetrics` and `OnHealthCheck` functions of the WASM module.
- `v0.3.9 🥒 [cucumber]`: update of [HDK 0.0.3](https://github.com/bots-garden/capsule-host-sdk) with [Wazero 1.2.0](https://github.com/tetratelabs/wazero/releases/tag/v1.2.0) and [MDK 0.0.3](https://github.com/bots-garden/capsule-module-sdk) (encoding of the HTML string into JSON string, then it's easier to serve HTML)
Expand Down

0 comments on commit bffab37

Please sign in to comment.