Skip to content

Instantly share code, notes, and snippets.

View shivaylamba's full-sized avatar
:atom:
Developing

Shivay Lamba shivaylamba

:atom:
Developing
View GitHub Profile

KCD Bengaluru Docker + WASM workloads running side by side

You’ll complete the following steps:  

  1. Build a K3d cluster
  2. Verify the runtime configuration
  3. Configure node labels
  4. Create a RuntimeClass
  5. Deploy an app
# --image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1: This flag specifies the Docker image to use as the base image for the cluster nodes. In this case, the image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1 is being used. This image contains the necessary components for running WebAssembly workloads using containerd and k3d.
# --agents 2: This flag specifies the number of worker nodes or agents to create in the cluster. In this case, it creates two agents to distribute the workload across multiple nodes.
```
k3d cluster create wasm-cluster1 \
--image ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:v0.5.1 \
-p "8081:80@loadbalancer" --agents 2
```
Gender Age Salary Purchase Iphone
Male 19 19000 0
Male 35 20000 0
Female 26 43000 0
Female 27 57000 0
Male 19 76000 0
Male 27 58000 0
Female 27 84000 0
Female 32 150000 1
Male 25 33000 0
@shivaylamba
shivaylamba / README.md
Created December 20, 2022 12:10
cloud native meetup
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata:
  name: wasmedge
handler: wasmedge
---
apiVersion: batch/v1
kind: Job
metadata:
@shivaylamba
shivaylamba / elasticsearchmigration.md
Last active December 17, 2022 10:12
Elasticsearch Migration

Elasticsearch migration guide

Contents:

  1. Introduction
  2. Differences
  3. API Mapping
  4. Migration script
  5. Front-end components
  6. Conclusion
@shivaylamba
shivaylamba / README.md
Created November 27, 2022 00:10
Install and Build WASMEdge with Ubuntu

Get the Source Code

git clone https://github.com/WasmEdge/WasmEdge.git cd WasmEdge

Install Dependencies on Ubuntu 20.04 Manually

For the developers who don't want to use docker, they can setup the environment on Ubuntu Manually.

const {babel} = require('@rollup/plugin-babel');
const nodeResolve = require('@rollup/plugin-node-resolve');
const commonjs = require('@rollup/plugin-commonjs');
const replace = require('@rollup/plugin-replace');
const globals = require('rollup-plugin-node-globals');
const builtins = require('rollup-plugin-node-builtins');
const plugin_async = require('rollup-plugin-async');
const css = require("rollup-plugin-import-css");
const svg = require('rollup-plugin-svg');
import * as React from 'react';
import ReactDOMServer from 'react-dom/server';
import * as std from 'std';
import * as http from 'wasi_http';
import * as net from 'wasi_net';
import App from '../src/App.js';
async function handle_client(cs) {
print('open:', cs.peer());
let buffer = new http.Buffer();
while (true) {