{"id":16149761,"url":"https://github.com/robotastic/bartholomew-containerd-shim","last_synced_at":"2025-04-06T22:17:34.391Z","repository":{"id":66958062,"uuid":"569060263","full_name":"robotastic/bartholomew-containerd-shim","owner":"robotastic","description":"Run Bartholomew in Kubernetes using a containerd WASM shim","archived":false,"fork":false,"pushed_at":"2022-11-24T18:30:32.000Z","size":1852,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T02:43:27.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Handlebars","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robotastic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-22T01:46:48.000Z","updated_at":"2022-11-22T01:46:58.000Z","dependencies_parsed_at":"2023-02-28T02:46:18.354Z","dependency_job_id":null,"html_url":"https://github.com/robotastic/bartholomew-containerd-shim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"fermyon/bartholomew-site-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotastic%2Fbartholomew-containerd-shim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotastic%2Fbartholomew-containerd-shim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotastic%2Fbartholomew-containerd-shim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robotastic%2Fbartholomew-containerd-shim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robotastic","download_url":"https://codeload.github.com/robotastic/bartholomew-containerd-shim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557748,"owners_count":20958047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T00:44:58.604Z","updated_at":"2025-04-06T22:17:34.364Z","avatar_url":"https://github.com/robotastic.png","language":"Handlebars","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bartholomew Site Template\n\nThis repository is a template for creating new [Bartholomew](https://github.com/fermyon/bartholomew) websites.\n\n## Directory Structure:\n\n- `config/site.toml`: The main configuration file for your site. You should edit this.\n- `content/`: Your markdown files go in here.\n- `scripts/` (advanced): If you want to write your owh Rhai scripts, they go here.\n- `spin.toml`: The configuration file for the Spin application.\n- `static/`: Static assets like images, CSS, and downloads go in here.\n- `templates/`: Your handlebars templates go here. \n\n## Installation of Spin\n\nTo use Bartholomew, you will need to install [Spin](https://spin.fermyon.dev).\nOnce you have Wagi installed, you can continue setting up Bartholomew.\n\nTo start your website, run the following command from this directory:\n\n```console\n$ spin up --follow-all\nspin up --follow-all\nServing HTTP on address http://127.0.0.1:3000\nAvailable Routes:\n  bartholomew: http://127.0.0.1:3000 (wildcard)\n  fileserver: http://127.0.0.1:3000/static (wildcard)\n```\n\nNow you can point your web browser to `http://localhost:3000/` and see your new Bartholomew site.\n\n\n## Running using WASM Containerd Shim and K3D\n\nThis approach lets you run you Bartholomew site in Kubernetes. The [Containerd WASM Shims](https://github.com/deislabs/containerd-wasm-shims/tree/main) from Deis Labs\nmakes this possible. \n\nI have lightly adapted their [Quickstart](https://github.com/deislabs/containerd-wasm-shims/blob/main/containerd-shim-spin-v1/quickstart.md), if you get lost\ncheck back there.\n\n### Pre-requisites\nBefore you begin, you need to have the following installed:\n\n- [Docker](https://docs.docker.com/install/) version 4.13.1 (90346) or later with [containerd enabled](https://docs.docker.com/desktop/containerd/)\n- [k3d](https://k3d.io/v5.4.6/#installation)\n- [kubectl](https://kubernetes.io/docs/tasks/tools/#kubectl)\n\n### Start and configure a k3d cluster\n\nStart a k3d cluster with the wasm shims already installed:\n\n```bash\nk3d cluster create wasm-cluster --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.3.3 -p \"8080:80@loadbalancer\" --agents 1 --registry-create mycluster-registry:12345\n```\n\nThis also starts up a local container registry for the cluster to use. Docker can get to it at: `localhost:12345` and inside deployment YAML it is at: `mycluster-registry:12345`.\n\nApply RuntimeClass for spin applications to use the spin wasm shim:\n\n```bash\nkubectl apply -f https://raw.githubusercontent.com/deislabs/containerd-wasm-shims/main/deployments/workloads/runtime.yaml\n```\n\n### Create a container image for the Site\n\nUse `docker` to build the container image and push it to the k3d registry:\n\n```bash\ndocker buildx build --platform=wasi/wasm -t localhost:12345/bart-shim .\ndocker push localhost:12345/bart-shim:latest\n```\n\n*If you restart the cluster you will need to re-push the docker image back into the cluster. The registry that K3D sets up looks like it is temporary.*\n\n\n### Deploy the application\n\nDeploy the application and confirm it is running:\n\n```bash\nkubectl apply -f workloads/workload.yaml\n```\n\n### Clean up\n\nRemove the sample application:\n\n```bash\nkubectl delete -f workloads/workload.yaml\n```\n\nDelete the cluster:\n\n```bash\nk3d cluster delete wasm-cluster\n```\n\n## Helpful debugging commands:\n\n### Get all log events\n\n`kubectl get events  --all-namespaces`\n\n### Get all the Pods / Containers\n\n`kubectl get pods --all-namespaces`\n\n## About the License\n\nThis repository uses CC0. To the greatest extent possible, you are free to use this content however you want.\nYou may relicense the code in this repository to your own satisfaction, including proprietary licenses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotastic%2Fbartholomew-containerd-shim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobotastic%2Fbartholomew-containerd-shim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobotastic%2Fbartholomew-containerd-shim/lists"}