fission安装笔记
fission安装
首先是安装,很玄学的。有时候能成功。
给出一个参考
https://0rainge.github.io/2018/04/10/FaaS%E8%B8%A9%E5%9D%91%E4%B9%8Bfission%E5%AE%89%E8%A3%85/
https://fission.io/docs/installation/#without-helm
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.16.0"
export FISSION_NAMESPACE="fission"
kubectl create namespace $FISSION_NAMESPACE
kubectl config set-context --current --namespace=$FISSION_NAMESPACE
kubectl apply -f https://github.com/fission/fission/releases/download/v1.16.0/fission-all-v1.16.0-minikube.yaml
按照官网来。
然后安装CLI
curl -Lo fission https://github.com/fission/fission/releases/download/v1.16.0/fission-v1.16.0-linux-amd64 \
&& chmod +x fission && sudo mv fission /usr/local/bin/
官网安装的之后会这样
但是最起码还能用
然后就是添加函数
# Add the stock Python env to your Fission deployment
$ fission env create --name python --image fission/python-env
# A Python function that prints "hello world"
$ curl -LO https://raw.githubusercontent.com/fission/examples/main/python/hello.py
# Upload your function code to fission
$ fission function create --name hello-py --env python --code hello.py
# Test your function. This takes about 100msec the first time.
$ fission function test --name hello-py
Hello, world!
fission route create --function hello-py --url /hello
然后就可以访问