0.1.0 • Published 6 years ago

orikube v0.1.0

Weekly downloads
1
License
UNLICENSED
Repository
-
Last release
6 years ago

Orikami Kubeless CLI

npm install -g orikube

Usage: orikube <cmd> ...

Currently only python 3.6 is supported.

setup

orikube setup

Will install the following cli tools:

  • minikube: Run a local kubernetes cluster for development
  • serverless: Deploy and log kubeless functions
  • kubeless: Manage your kubeless functions (optional)
  • kubectl: Manage your local kubernetes cluster (optional)

Then, it will launch and configure your local kubernetes development cluster:

  • Start minikube
  • Install kubeless on the cluster

init

Initialize a serverless function in your current directory.

Will create:

  • serverless.yml
  • handler.py
  • package.json (for the serverless-kubeless plugin)

Make sure you have a main.py with a run function that accepts a dictionary. (This is the JSON data that is POSTed)

Now, you can deploy and test the function:

sls deploy
sls logs

Use minikube ip to figure out the IP. Function should be available at the path specified in serverless.yml

run

Build and run a Docker image of your current directory. It will run the same webserver that is used Kubeless.

destroy

orikube destroy

Removes your local kubernetes cluster (virtual machine) and removes all CLI tools.

deinit

Will delete all serverless files:

  • serverless.yml
  • handler.py
  • package.json (!)
  • package-lock.json (!)
  • node_modules (!)