Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thorstenhans/civo-navigate-2024-europe-workshop
https://github.com/thorstenhans/civo-navigate-2024-europe-workshop
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/thorstenhans/civo-navigate-2024-europe-workshop
- Owner: ThorstenHans
- Created: 2024-09-11T11:29:18.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-09-12T10:17:27.000Z (2 months ago)
- Last Synced: 2024-09-12T21:41:47.864Z (2 months ago)
- Language: Shell
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Civo Navigate Europe 2024 - Bring WebAssembly to Civo Kubernetes Workshop
This repository contains all samples shown as part of the **Bring WebAssembly to Civo Kubernetes with SpinKube** workshop.
## Prerequisites
- Create an account at civo.com
- Install `civo` CLI
- Install `spin` CLI and Rust (with target `wasm32-wasi`)
- Authenticate `civo` CLI with your civo.com account
- Install `kubectl` and `helm`
- Install `jq`
- Install `curl`## Flow
1. Deploy a Civo Kubernetes using [`./scripts/01-deploy-k8s.sh`](./scripts/01-deploy-k8s.sh)
2. Deploy [cert-manager](https://cert-manager.io) [`./scripts/02-deploy-cert-manager.sh`](./scripts/02-deploy-cert-manager.sh)
3. Deploy [SpinKube](https://spinkube.dev) [`./scripts/03-deploy-spinkube.sh`](./scripts/03-deploy-spinkube.sh)
4. Build and Run Demo 1 [`./scripts/04-build-and-run-demo1.sh`](./scripts/04-build-and-run-demo1.sh)
5. Deploy the Spin App (Demo 1) [`./scripts/05-deploy-demo1.sh`](./scripts/05-deploy-demo1.sh)
6. Deploy an Ingress Controller [`./scripts/06-deploy-ingress.sh`](./scripts/06-deploy-ingress.sh)
7. Deploy an Ingress Route for the Spin App (Demo 1) [`./scripts/07-deploy-ingress-route.sh`](./scripts/07-deploy-ingress-route.sh)
8. Build and Run Demo 2 [`./scripts/08-build-and-run-demo2.sh`](./scripts/08-build-and-run-demo2.sh)
9. Deploy [valkey](https://valkey.io) [`./scripts/09-deploy-valkey.sh`](./scripts/09-deploy-valkey.sh)
10. Deploy the Spin App (Demo 2) [`./scripts/10-deploy-demo2.sh`](./scripts/10-deploy-demo2.sh)
11. 10. Deploy the Ingress Route (Demo 2) [`./scripts/11-deploy-ingress-route2.sh`](./scripts/11-deploy-ingress-route2.sh)## Calling the Demo 1 Spin App
### When running locally
```bash
curl -iX GET http://localhost:3000
```### When running on your Civo Kubernetes
```bash
# Find public IP of your Ingress Controller
ingress_ip=$(kubectl get svc -n kube-system traefik -o json | jq '.status.loadBalancer.ingress[0].ip' -r)# Invoke the Spin App
curl -iX GET -H 'host: livedemo1.civo' http://$ingress_ipHTTP/1.1 200 OK
Content-Type: text/plain
Date: Wed, 11 Sep 2024 14:30:46 GMT
Transfer-Encoding: chunkedHello, Civo Navigate Europe!%
```## Calling the Demo 2 Spin App
### When running locally
```bash
# set value in key-value store
curl -iX POST -d 'Navigate Europe' http://localhost:3000/civoHTTP/1.1 201 Created
location: /civo
transfer-encoding: chunked
date: Wed, 11 Sep 2024 14:32:42 GMT# get value from key-value store
curl -iX GET http://localhost:3000/civoHTTP/1.1 200 OK
content-type: text/plain
transfer-encoding: chunked
date: Wed, 11 Sep 2024 14:33:02 GMTNavigate Europe%
```### When running on your Civo Kubernetes
```bash
# Find public IP of your Ingress Controller
ingress_ip=$(kubectl get svc -n kube-system traefik -o json | jq '.status.loadBalancer.ingress[0].ip' -r)# Invoke the Spin App
curl -iX POST -H 'host: livedemo2.civo' -d 'Civo Navigate' http://$ingress_ip/civoHTTP/1.1 201 Created
location: /civo
transfer-encoding: chunked
date: Wed, 11 Sep 2024 14:34:39 GMT# get value from key-value store
curl -iX GET -H 'host: livedemo2.civo' http://$ingress_ip/civoHTTP/1.1 200 OK
Content-Type: text/plain
Date: Wed, 11 Sep 2024 14:35:02 GMT
Transfer-Encoding: chunkedHello, Civo Navigate Europe!%
```## Resources
- [Spin](https://github.com/fermyon/spin)
- [SpinKube](https://spinkube.dev)
- [Fermyon Developer Home](https://developer.fermyon.com/)