0.1.0 • Published 8 years ago
orikube v0.1.0
Orikami Kubeless CLI
npm install -g orikubeUsage: orikube <cmd> ...
Currently only python 3.6 is supported.
setup
orikube setupWill install the following cli tools:
minikube: Run a local kubernetes cluster for developmentserverless: Deploy and log kubeless functionskubeless: 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 logsUse 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 destroyRemoves 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 (!)
0.1.0
8 years ago