Helm/Fission: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
helm repo add fission-charts https://fission.github.io/fission-charts
helm repo update && helm repo list
kubectl config get-contexts
==Config==
{|
|valign="top" colspan="2"|
<syntaxhighlight lang="properties">
export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/config"
</syntaxhighlight>
|-
|colspan="2"|
----
|-
|valign='top'|
<syntaxhighlight lang="bash">
mc alias set local http://s3.host.k8s.local admin
# Enter Secret Key: sadaqah!
mc admin info local
mc mb local/fission
mc config host ls
</syntaxhighlight>
|valign='top'|
<syntaxhighlight lang="bash">
echo -n password: ;read -s MINIO_PASSWORD;export MINIO_PASSWORD;echo
# password: sadaqah!
mc admin user add  local fission ${MINIO_PASSWORD}
mc admin policy attach local diagnostics readwrite consoleAdmin --user fission
mc admin user info local fission
</syntaxhighlight>
|-
|colspan="2"|
----
|-
|valign='top' colspan="2"|
<syntaxhighlight lang="bash">
ACCESS_KEY="JK09A3zwTF7bY2v5yey";\
SECRET_KEY="mVZsDmWNLUY5i3PDz17IhksvmBV5TCnE07GYw26";\
alias mc_admin_add_key="mc admin accesskey create local \
fission --name=fission --access-key=${ACCESS_KEY} --secret-key=${SECRET_KEY}"
</syntaxhighlight>
|-
|colspan="2"|
----
|-
|valign='top' colspan="2"|
<syntaxhighlight lang="json">
cat <<JSN | mc_admin_add_key --policy=/dev/stdin
{
  "Version":"2012-10-17",
  "Statement":[
    {"Effect":"Allow","Action":["kms:*"]},
    {"Effect":"Allow","Action":["admin:*"]},
    {"Effect":"Allow","Action":["s3:*"],"Resource":["arn:aws:s3:::fission"]},
    {"Effect":"Allow","Action":[
        "admin:BandwidthMonitor",
        "admin:TopLocksInfo",
        "admin:ServerTrace",
        "admin:ConsoleLog",
        "admin:Prometheus",
        "admin:ServerInfo",
        "admin:Profiling",
        "admin:OBDInfo"
      ],"Resource":["arn:aws:s3:::fission"]
    }
  ]
}
JSN
</syntaxhighlight>
|}
==Install==
{|
|valign="top"|
<syntaxhighlight lang="bash">
kubectl get ns|grep fission
kubectl delete ns  fission
</syntaxhighlight>
|valign="bottom"|
<syntaxhighlight lang="bash">
kubectl get ns|grep fission
kubectl create ns  fission
</syntaxhighlight>
|-
|colspan="2"|
----
|-
|valign='top' colspan="2"|
<syntaxhighlight lang="bash">
export FISSION_NAMESPACE="fission"
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.20.5"
</syntaxhighlight>
|-
|colspan="2"|
----
|-
|valign='top' colspan="2"|
<syntaxhighlight lang="yaml" highlight="5" line>
cat <<YML | helm -n fission install    fission fission-charts/fission-all --version=v1.20.5 -f -
---
serviceType: ClusterIP
routerServiceType: LoadBalancer
persistence:
  enabled: true
  storageType: s3
  s3:
    bucketName: fission
    subDir: serverless
    accessKeyId: lJK09A3zwTF7bY2v5yey
    secretAccessKey: umVZsDmWNLUY5i3PDz17IhksvmBV5TCnE07GYw26
    region: us-east-1
    endPoint: http://s3.host.k8s.local
YML
</syntaxhighlight>
|}
==Uninstall==
<syntaxhighlight lang="bash">
helm uninstall -n fission  fission
kubectl delete namespace fission
</syntaxhighlight>
==Playground==
{|
| colspan="2" |
<syntaxhighlight lang="bash">
helm -n fission install    fission fission-charts/fission-all --version=v1.20.0
helm -n fission upgrade -i fission fission-charts/fission-all --version=v1.20.5
helm show values fission-charts/fission-all --version=v1.20.0|less
</syntaxhighlight>
|-
| colspan="2" |
----
|-
| colspan="2" |
<syntaxhighlight lang="bash">
kubectl -n fission get configmap feature-config -o json|jq -r '.data."config.yaml"'|base64 -d;echo
kubectl -n fission logs -f svc/webhook-service -c webhook
kubectl -n fission logs -f svc/storagesvc -c storagesvc
kubectl -n fission logs -f svc/executor -c executor
kubectl -n fission logs -f svc/router -c router
</syntaxhighlight>
|-
| colspan="2" |
----
|-
| colspan="2" |
<syntaxhighlight lang="bash">
kubectl config --kubeconfig=${HOME}/.kube/aws-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/dev-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/gcp-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/config view --flatten
</syntaxhighlight>
|-
| colspan="2" |
----
|-
| valign="top" |
<syntaxhighlight lang="bash">
kubectl -n fission delete all --all
kubectl -n fission delete ing --all
kubectl -n fission delete sts --all
</syntaxhighlight>
| valign="top" |
<syntaxhighlight lang="bash">
kubectl -n fission delete svc --all
kubectl -n fission delete pvc --all
kubectl -n fission delete pv  --all
</syntaxhighlight>
|-
| colspan="2" |
----
|-
| valign="top" |
<syntaxhighlight lang="bash">
kubectl -n fission rollout history deploy buildermgr
kubectl -n fission rollout status  deploy storagesvc
kubectl -n fission rollout restart deploy executor
</syntaxhighlight>
| valign="top" |
<syntaxhighlight lang="bash">
kubectl -n fission logs -f svc/storagesvc -c storagesvc
kubectl -n fission logs -f svc/executor -c executor
kubectl -n fission logs -f svc/router -c router
</syntaxhighlight>
|}
==References==
==References==
{|
{|
Line 5: Line 212:
* [[Helm/Cert Manager|Helm » Cert Manager]]
* [[Helm/Cert Manager|Helm » Cert Manager]]
* [https://fission.io/docs/installation Helm » Fission]
* [https://fission.io/docs/installation Helm » Fission]
* [[Helm/MinIO|Helm » MinIO]]
* [[Helm]]
* [[Helm]]


Line 32: Line 240:
* [[K8s/Ingress|K8s » Ingress]]
* [[K8s/Ingress|K8s » Ingress]]
* [[K8s/Service|K8s » Service]]
* [[K8s/Service|K8s » Service]]
* [[MinIO]]
* [[CIDR]]
* [[CIDR]]
* [[UFW]]
* [[UFW]]

Revision as of 07:27, 21 November 2024

helm repo add fission-charts https://fission.github.io/fission-charts
helm repo update && helm repo list
kubectl config get-contexts

Config

export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/config"

mc alias set local http://s3.host.k8s.local admin
# Enter Secret Key: sadaqah!

mc admin info local
mc mb local/fission
mc config host ls
echo -n password: ;read -s MINIO_PASSWORD;export MINIO_PASSWORD;echo
# password: sadaqah!

mc admin user add  local fission ${MINIO_PASSWORD}
mc admin policy attach local diagnostics readwrite consoleAdmin --user fission
mc admin user info local fission

ACCESS_KEY="JK09A3zwTF7bY2v5yey";\
SECRET_KEY="mVZsDmWNLUY5i3PDz17IhksvmBV5TCnE07GYw26";\
alias mc_admin_add_key="mc admin accesskey create local \
 fission --name=fission --access-key=${ACCESS_KEY} --secret-key=${SECRET_KEY}"

cat <<JSN | mc_admin_add_key --policy=/dev/stdin
{
  "Version":"2012-10-17",
  "Statement":[
    {"Effect":"Allow","Action":["kms:*"]},
    {"Effect":"Allow","Action":["admin:*"]},
    {"Effect":"Allow","Action":["s3:*"],"Resource":["arn:aws:s3:::fission"]},
    {"Effect":"Allow","Action":[
        "admin:BandwidthMonitor",
        "admin:TopLocksInfo",
        "admin:ServerTrace",
        "admin:ConsoleLog",
        "admin:Prometheus",
        "admin:ServerInfo",
        "admin:Profiling",
        "admin:OBDInfo"
      ],"Resource":["arn:aws:s3:::fission"]
    }
  ]
}
JSN

Install

kubectl get ns|grep fission
kubectl delete ns   fission
kubectl get ns|grep fission
kubectl create ns   fission

export FISSION_NAMESPACE="fission"
kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.20.5"

cat <<YML | helm -n fission install    fission fission-charts/fission-all --version=v1.20.5 -f -
---
serviceType: ClusterIP
routerServiceType: LoadBalancer
persistence:
  enabled: true
  storageType: s3
  s3:
    bucketName: fission
    subDir: serverless
    accessKeyId: lJK09A3zwTF7bY2v5yey
    secretAccessKey: umVZsDmWNLUY5i3PDz17IhksvmBV5TCnE07GYw26
    region: us-east-1
    endPoint: http://s3.host.k8s.local
YML

Uninstall

helm uninstall -n fission  fission
kubectl delete namespace fission

Playground

helm -n fission install    fission fission-charts/fission-all --version=v1.20.0
helm -n fission upgrade -i fission fission-charts/fission-all --version=v1.20.5
helm show values fission-charts/fission-all --version=v1.20.0|less

kubectl -n fission get configmap feature-config -o json|jq -r '.data."config.yaml"'|base64 -d;echo
kubectl -n fission logs -f svc/webhook-service -c webhook
kubectl -n fission logs -f svc/storagesvc -c storagesvc
kubectl -n fission logs -f svc/executor -c executor
kubectl -n fission logs -f svc/router -c router

kubectl config --kubeconfig=${HOME}/.kube/aws-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/dev-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/gcp-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/config view --flatten

kubectl -n fission delete all --all
kubectl -n fission delete ing --all
kubectl -n fission delete sts --all
kubectl -n fission delete svc --all
kubectl -n fission delete pvc --all
kubectl -n fission delete pv  --all

kubectl -n fission rollout history deploy buildermgr
kubectl -n fission rollout status  deploy storagesvc
kubectl -n fission rollout restart deploy executor
kubectl -n fission logs -f svc/storagesvc -c storagesvc
kubectl -n fission logs -f svc/executor -c executor
kubectl -n fission logs -f svc/router -c router

References