### Deploy and Test Python Function on Fission Source: https://fission.io/docs/installation Provides a complete guide to deploy a Python 'hello world' function to Fission. This includes creating a Python environment, downloading the example code, creating the function, and finally testing its execution. ```shell # Add the stock Python env to your Fission deployment $ fission env create --name python --image ghcr.io/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 CLI: Check Installation Command Source: https://fission.io/docs/architecture/kubewatcher Checks the Fission installation and its components for proper setup and connectivity. ```APIDOC fission check ``` -------------------------------- ### Deploying Go Producer Function with Fission CLI Source: https://fission.io/docs/usage/triggers/message-queue-trigger-kind-keda/redis These shell commands guide the user through setting up a Go module, packaging the Go producer function, creating a Fission Go environment, and deploying the function. It includes steps for local project setup, dependency management, zipping the source, and Fission CLI commands for environment, package, and function creation. ```Shell $ mkdir redis_test && cd redis_test $ go mod init # create a producer.go file with above code replacing the placeholder values with actual ones $ go mod tidy $ zip -qr redis.zip * $ fission env create --name goenv --image ghcr.io/fission/go-env-1.23 --builder ghcr.io/fission/go-builder-1.23 $ fission package create --env goenv --src redis.zip $ fission fn create --name producerfunc --env goenv --pkg redis-zip-zlre --entrypoint Handler $ fission package info --name redis-zip-zlre Name: redis-pkg Environment: goenv Status: succeeded Build Logs: Building in directory /usr/src/redis-zip-zlre-2gucll ``` -------------------------------- ### Fission CLI: fission spec init Source: https://fission.io/docs/reference/fission-cli/fission_timetrigger_update Initializes a new Fission specification directory with example YAML files. This provides a starting point for declarative Fission deployments. ```APIDOC fission spec init ``` -------------------------------- ### Fission Bundle Component Execution Examples Source: https://fission.io/docs/contributing These examples demonstrate how the 'fission-bundle' binary is used to run different Fission components. By passing specific arguments, the single binary can act as a controller or a kubewatcher, illustrating its versatile role in the Fission ecosystem. ```bash /fission-bundle --controllerPort "8888" # Runs Controller /fission-bundle --kubewatcher --routerUrl http://router.fission # Runs Kubewatcher ``` -------------------------------- ### Install Fission CLI on Various Operating Systems Source: https://fission.io/docs/installation Commands to download and install the Fission CLI tool, which is essential for interacting with Fission. Instructions are provided for MacOS, Linux, and NixOS. Windows users are directed to WSL or a direct executable download. ```bash curl -Lo fission https://github.com/fission/fission/releases/download/v1.21.0/fission-v1.21.0-darwin-amd64 \ && chmod +x fission && sudo mv fission /usr/local/bin/ ``` ```bash curl -Lo fission https://github.com/fission/fission/releases/download/v1.21.0/fission-v1.21.0-linux-amd64 \ && chmod +x fission && sudo mv fission /usr/local/bin/ ``` ```nix nix-env -iA nixos.fission ``` -------------------------------- ### Install Prometheus and Grafana with Helm Source: https://fission.io/docs/usage/observability/prometheus This sequence of commands adds the Prometheus community Helm repository, updates it, and then installs the 'kube-prometheus-stack' chart into the 'monitoring' namespace, setting up Prometheus and Grafana. ```bash helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update helm install prometheus prometheus-community/kube-prometheus-stack -n monitoring ``` -------------------------------- ### Install Fission with OpenTelemetry Enabled Source: https://fission.io/docs/usage/observability/opentelemetry This command installs Fission using Helm, explicitly enabling OpenTelemetry by setting the OTLP collector endpoint, insecure flag, trace sampler, and sampling rate. The FISSION_NAMESPACE variable is used for the installation. ```bash export FISSION_NAMESPACE=fission\ helm install --namespace $FISSION_NAMESPACE \ fission fission-charts/fission-all \ --set openTelemetry.otlpCollectorEndpoint="otel-collector.opentelemetry-operator-system.svc:4317" \ --set openTelemetry.otlpInsecure=true \ --set openTelemetry.tracesSampler="parentbased_traceidratio" \ --set openTelemetry.tracesSamplingRate="1" ``` -------------------------------- ### Verify Kubectl Installation and Cluster Access Source: https://fission.io/docs/installation This command verifies that Kubectl is correctly installed and configured to access a Kubernetes cluster by displaying the client and server versions. It's a crucial step to ensure your environment is ready for Fission installation. ```Bash kubectl version ``` -------------------------------- ### Deploy and Test Go Function on Fission Source: https://fission.io/docs/installation Outlines the process for deploying a Go 'hello world' function to Fission. Steps include setting up the Go environment and builder, fetching the source code, creating the function from source, monitoring package build status, and testing the deployed function. ```shell # Add the stock Go env to your Fission deployment $ fission env create --name go --image ghcr.io/fission/go-env --builder ghcr.io/fission/go-builder # A Go function that prints "hello world" $ curl -LO https://raw.githubusercontent.com/fission/examples/main/go/hello-world/hello.go # Upload your function code to fission $ fission function create --name hello-go --env go --src hello.go --entrypoint Handler # Wait for your source code to be built, package status should be succeeded. This may take a few minutes. $ fission pkg list | grep hello-go hello-go-8bb933b5-b12b-499b-a951-ee2245c8f1b5 succeeded go 23 Nov 21 10:55 IST # Test your function. This takes about 100msec the first time. $ fission function test --name hello-go Hello, world! ``` -------------------------------- ### Install Fission with Istio Enabled via Helm Source: https://fission.io/docs/usage/function/enabling-istio-on-fission Installs Fission into the specified namespace using Helm, explicitly enabling Istio integration through the `enableIstio` flag during the installation process to ensure Fission components are compatible with the Istio service mesh. ```Bash $ helm install --namespace $FISSION_NAMESPACE --set enableIstio=true --name istio-demo ``` -------------------------------- ### Deploying a Java Hello World Function with Fission Source: https://fission.io/docs/index This snippet provides instructions for deploying a 'Hello, world!' Java function with Fission. It covers environment creation, setting up the project structure, downloading source and `pom.xml`, packaging the code, creating a Fission package, and testing the deployed function. ```Shell # Add the stock Java env to your Fission deployment $ fission environment create --name java --image ghcr.io/fission/jvm-env --builder ghcr.io/fission/jvm-builder --keeparchive --version 3 # A Java function that prints "hello world" $ mkdir -p src/main/java/io/fission/ $ curl -L https://raw.githubusercontent.com/fission/examples/main/java/hello-world/src/main/java/io/fission/HelloWorld.java \ -o src/main/java/io/fission/HelloWorld.java # pom.xml contains dependencies for the function. $ curl -LO https://raw.githubusercontent.com/fission/environments/master/jvm/examples/java/pom.xml # Upload your function code to fission via zip $ zip java-src-pkg.zip -r src/ pom.xml $ fission package create --name hello-pkg --env java --src java-src-pkg.zip Package 'hello-pkg' created # Wait for your source code to be built, package status should be succeeded. This may take a few minutes. $ fission pkg list | grep hello-pkg hello-pkg succeeded java 23 Nov 21 11:19 IST # Test your function. This takes about 100msec the first time. $ fission function create --name hello-java --env java --pkg hello-pkg --entrypoint io.fission.HelloWorld $ fission function test --name hello-java Hello World! ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/reference/fission-cli/fission_function_getmeta Checks the status of the Fission installation. This command verifies the health and readiness of your Fission setup. ```CLI fission check ``` -------------------------------- ### Deploy and Run a Node.js Fission Function Example Source: https://fission.io/docs/installation Steps to deploy a simple 'hello world' Node.js function on Fission. This involves creating a Node.js environment, downloading the function code, and uploading it to Fission. ```bash # Add the stock NodeJS env to your Fission deployment $ fission env create --name nodejs --image ghcr.io/fission/node-env # A javascript function that prints "hello world" $ curl -LO https://raw.githubusercontent.com/fission/examples/main/nodejs/hello.js # Upload your function code to fission $ fission function create --name hello-js --env nodejs --code hello.js ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/architecture/logger Checks the status and health of the Fission installation. This command helps in diagnosing common setup or operational issues. ```CLI fission check ``` -------------------------------- ### Install Fission Helm Chart Source: https://fission.io/docs/installation/on-premise-install Command to install Fission using a local Helm chart archive. This method is used after downloading the chart and potentially modifying values.yaml to point to internal Docker registries for images, which is common in offline or on-premise setups. ```bash $ helm install ./fission-all-v1.21.0.tgz ``` -------------------------------- ### Deploying a Go Hello World Function with Fission Source: https://fission.io/docs/index This snippet outlines the deployment of a 'Hello, world!' Go function using Fission. It details creating a Go environment, obtaining the function source, uploading it, waiting for the package to build, and testing the function. ```Shell # Add the stock Go env to your Fission deployment $ fission env create --name go --image ghcr.io/fission/go-env-1.23 --builder ghcr.io/fission/go-builder-1.23 # A Go function that prints "hello world" $ curl -LO https://raw.githubusercontent.com/fission/examples/main/go/hello-world/hello.go # Upload your function code to fission $ fission function create --name hello-go --env go --src hello.go --entrypoint Handler # Wait for your source code to be built, package status should be succeeded. This may take a few minutes. $ fission pkg list | grep hello-go hello-go-8bb933b5-b12b-499b-a951-ee2245c8f1b5 succeeded go 23 Nov 21 10:55 IST # Test your function. This takes about 100msec the first time. $ fission function test --name hello-go Hello, world! ``` -------------------------------- ### Python Dependencies for Source Package Source: https://fission.io/docs/usage/function/package This `requirements.txt` file specifies the Python dependencies required for the source package. In this example, it lists `pyyaml`, which will be installed by the build script. ```text pyyaml ``` -------------------------------- ### Deploying a Python Hello World Function with Fission Source: https://fission.io/docs/index This snippet illustrates the process of deploying a basic 'Hello, world!' Python function using Fission. It includes steps for setting up a Python environment, fetching the function code, deploying it to Fission, and verifying its output. ```Shell # Add the stock Python env to your Fission deployment $ fission env create --name python --image ghcr.io/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! ``` -------------------------------- ### Create and Navigate to Project Directory Source: https://fission.io/docs/usage/spec Initializes a new directory for the Fission specification tutorial and navigates into it, preparing the environment for declarative application development. ```bash $ mkdir spec-tutorial $ cd spec-tutorial ``` -------------------------------- ### fission environment get command usage Source: https://fission.io/docs/reference/fission-cli/fission_environment_get Shows the basic syntax for using the `fission environment get` command. ```CLI fission environment get [flags] ``` -------------------------------- ### Verify Fission CLI Version Source: https://fission.io/docs/usage/languages/python This command verifies that the Fission CLI is correctly installed and can communicate with your Fission setup by displaying its version. It's a crucial first step for troubleshooting and ensuring your environment is ready. ```Shell fission version ``` -------------------------------- ### Install Grafana using Helm Source: https://fission.io/docs/usage/observability/loki These Helm commands add the Grafana Helm repository, update it, and then install Grafana into a new `grafana` namespace. This sets up the Grafana instance for visualizing logs and metrics. ```shell helm repo add grafana https://grafana.github.io/helm-charts/ helm repo update helm upgrade --install grafana grafana/grafana --create-namespace -n grafana ``` -------------------------------- ### Check Horizontal Pod Autoscaler Status Source: https://fission.io/docs/installation/docker-desktop Shows the initial status of a Horizontal Pod Autoscaler (HPA) before the metric server is installed. The TARGETS column often shows `` indicating that HPA cannot get pod consumption metrics. ```bash kubectl get hpa NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE newdeploy-helloscale-default-ql0uqiwp Deployment/newdeploy-helloscale-default-ql0uqiwp /50% 1 6 1 20h ``` -------------------------------- ### Deploy and Test Java Function on Fission Source: https://fission.io/docs/installation Details the steps to deploy a Java 'hello world' function to Fission. This involves creating a Java environment, setting up the project structure, downloading source code and dependencies, packaging the code into a zip, creating a Fission package, monitoring its build, and finally creating and testing the function. ```shell # Add the stock Java env to your Fission deployment $ fission environment create --name java --image ghcr.io/fission/jvm-env --builder ghcr.io/fission/jvm-builder --keeparchive --version 3 # A Java function that prints "hello world" $ mkdir -p src/main/java/io/fission/ $ curl -L https://raw.githubusercontent.com/fission/examples/main/java/hello-world/src/main/java/io/fission/HelloWorld.java \ -o src/main/java/io/fission/HelloWorld.java # pom.xml contains dependencies for the function. $ curl -LO https://raw.githubusercontent.com/fission/environments/master/jvm/examples/java/pom.xml # Upload your function code to fission via zip $ zip java-src-pkg.zip -r src/ pom.xml $ fission package create --name hello-pkg --env java --src java-src-pkg.zip Package 'hello-pkg' created # Wait for your source code to be built, package status should be succeeded. This may take a few minutes. $ fission pkg list | grep hello-pkg hello-pkg succeeded java 23 Nov 21 11:19 IST # Test your function. This takes about 100msec the first time. $ fission function create --name hello-java --env java --pkg hello-pkg --entrypoint io.fission.HelloWorld $ fission function test --name hello-java Hello World! ``` -------------------------------- ### Deploy and Test a Fission NodeJS Function Source: https://fission.io/docs/usage/observability/opentelemetry These commands create a NodeJS environment, download a sample 'hello world' function, register it with Fission, and then test its execution to verify the Fission setup and tracing integration. ```bash # create an environment fission env create --name nodejs --image ghcr.io/fission/node-env # get hello world function curl https://raw.githubusercontent.com/fission/examples/main/nodejs/hello.js > hello.js # register the function with Fission fission function create --name hello --env nodejs --code hello.js # run the function fission function test --name hello ``` -------------------------------- ### Fission CLI Commands for Go Producer Function Deployment Source: https://fission.io/docs/usage/triggers/message-queue-trigger-kind-keda/kafka These shell commands guide through the process of preparing a Go project for Fission, including initializing a Go module, zipping the source code, creating a Fission Go environment, packaging the code, and finally creating the Fission function with a specified entrypoint. It also shows how to verify package build status. ```Shell $ mkdir kafka_test && cd kafka_test $ go mod init # create a producer.go file with above code replacing the placeholder values with actual ones $ go mod tidy $ zip -qr kafka.zip * $ fission env create --name go --image ghcr.io/fission/go-env-1.23 --builder ghcr.io/fission/go-builder-1.23 $ fission package create --env go --src kafka.zip $ fission fn create --name producer --env go --pkg kafka-zip-s2pj --entrypoint Handler $ fission package info --name kafka-zip-s2pj Name: kafka-pkg Environment: go Status: succeeded Build Logs: Building in directory /usr/src/kafka-zip-s2pj-wbk3yr ``` -------------------------------- ### KubeConfig Port-Forwarding Error Example Source: https://fission.io/docs/trouble-shooting/setup/kubernetes This snippet shows a common error message encountered when `~/.kube/config` is incorrectly configured or missing, leading to issues with port-forwarding to the Fission controller pod. It highlights the symptom of a `Fatal error: Error getting controller pod for port-forwarding`. ```text Fatal error: Error getting controller pod for port-forwarding ``` -------------------------------- ### Verify Fission CLI Installation Source: https://fission.io/docs/usage/languages/go This command verifies that Fission is correctly set up and displays the installed Fission CLI version. It's a crucial step before proceeding with function development. ```Shell fission version ``` -------------------------------- ### Deploying a Node.js Hello World Function with Fission Source: https://fission.io/docs/index This snippet demonstrates how to deploy a simple 'Hello, world!' Node.js function using Fission. It covers creating a Node.js environment, downloading the function code, uploading it to Fission, and testing its execution. ```Shell # Add the stock NodeJS env to your Fission deployment $ fission env create --name nodejs --image ghcr.io/fission/node-env # A javascript function that prints "hello world" $ curl -LO https://raw.githubusercontent.com/fission/examples/main/nodejs/hello.js # Upload your function code to fission $ fission function create --name hello-js --env nodejs --code hello.js # Test your function. This takes about 100msec the first time. $ fission function test --name hello-js Hello, world! ``` -------------------------------- ### Install Fission Core Components with kubectl apply Source: https://fission.io/docs/installation This section provides commands to install Fission core components using `kubectl apply` for different Kubernetes environments. It includes steps to create CRDs, set the Fission namespace, and apply the appropriate YAML manifest. Users can choose the command set that matches their environment (Basic with LoadBalancer, Minikube/Docker Desktop/Kind, or OpenShift). ```bash kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.21.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.21.0/fission-all-v1.21.0.yaml kubectl config set-context --current --namespace=default #to change context to default namespace after installation ``` ```bash kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.21.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.21.0/fission-all-v1.21.0-minikube.yaml kubectl config set-context --current --namespace=default #to change context to default namespace after installation ``` ```bash kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.21.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.21.0/fission-core-v1.21.0-openshift.yaml kubectl config set-context --current --namespace=default #to change context to default namespace after installation ``` -------------------------------- ### Fission CLI: Check Installation Source: https://fission.io/docs/releases/v1.16 Performs a diagnostic check of the Fission installation to ensure all components are running correctly. ```bash fission check [flags] ``` -------------------------------- ### Check Fission Installation Source: https://fission.io/docs/releases/v1.17 Checks the status and health of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### Create and List Fission Packages Source: https://fission.io/docs/trouble-shooting/setup/fission Demonstrates how to create a Fission package from source code and then list existing packages to check their build status. This is the initial step for deploying user functions. ```bash $ fission pkg create --env go --src go.zip Package 'go-zip-5obh' created $ fission pkg list NAME BUILD_STATUS ENV go-zip-5obh running go ``` -------------------------------- ### Fission CLI: Check Installation Source: https://fission.io/docs/usage/function Checks the health and status of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: Check Installation Source: https://fission.io/docs/usage/languages/python Performs a diagnostic check of the Fission installation to ensure all components are running correctly and accessible. ```APIDOC fission check [flags] ``` -------------------------------- ### Initialize Go Module Project Source: https://fission.io/docs/usage/languages/go Commands to initialize a new Go project with Go Modules, including an example of how to set the module path. ```Shell $ go mod init "" # Example $ go mod init "github.com/fission/fission/examples/go/go-module-example" ``` -------------------------------- ### Create Python Hello World and Archive for Deployment Package Source: https://fission.io/docs/usage/function/package This snippet shows a simple Python 'Hello, world!' function and the command to create a zip archive (`demo-deploy-pkg.zip`) from its containing directory. This archive will be directly deployed as a Fission package without a build step. ```bash $ cat testDir/hello.py def main(): return "Hello, world!" $ zip -jr demo-deploy-pkg.zip testDir/ ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/usage/spec/podspec/containers Checks the status and health of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### Package Go Module for Fission Deployment Source: https://fission.io/docs/usage/languages/go Steps to archive a Go module project into a zip file and then create a Fission package using the `fission pkg create` command for deployment. ```Shell $ zip -r go.zip . adding: go.mod (deflated 26%) adding: go.sum (deflated 1%) adding: README.md (deflated 37%) adding: main.go (deflated 30%) $ fission pkg create --env go --src go.zip ``` -------------------------------- ### Check Fission Installation Status Source: https://fission.io/docs/usage/languages/java Command to check the status and health of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### fission environment get command options Source: https://fission.io/docs/reference/fission-cli/fission_environment_get Lists the specific options available for the `fission environment get` command, including `--name` to specify the environment name and `--help` for command usage. ```APIDOC --name string: Environment name -h, --help: help for get ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/reference/fission-cli/fission_httptrigger_delete Checks the status of the Fission installation and its components. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: fission spec init Source: https://fission.io/docs/reference/fission-cli/fission_watch_create Initializes a Fission specification directory with example YAML files. ```CLI fission spec init ``` -------------------------------- ### Install Fission with Helm on Cloud Kubernetes (GKE, AKS, EKS) Source: https://fission.io/docs/installation This snippet provides the standard Helm installation steps for Fission on cloud-managed Kubernetes clusters like GKE, AKS, and EKS. It includes setting up the Fission namespace, applying custom resource definitions (CRDs), adding the Fission Helm repository, and installing the `fission-all` chart. ```shell export FISSION_NAMESPACE="fission" kubectl create namespace $FISSION_NAMESPACE kubectl create -k "github.com/fission/fission/crds/v1?ref=v1.21.0" helm repo add fission-charts https://fission.github.io/fission-charts/ helm repo update helm install --version v1.21.0 --namespace $FISSION_NAMESPACE fission fission-charts/fission-all ``` -------------------------------- ### Check Fission Installation Status Source: https://fission.io/docs/usage/function/accessing-url-params Command to check the status and health of the Fission installation and its components. ```CLI fission check ``` -------------------------------- ### Prepare Source and Create Fission Package Source: https://fission.io/docs/usage/languages/java These commands prepare the Java source code by zipping it and then create a Fission package using the previously defined JVM environment. This action initiates the build process for the function. ```Bash $ tree -L 1 . ├── README.md ├── build.sh ├── pom.xml └── src 2 directories, 3 files $ chmod +x build.sh $ zip java-src-pkg.zip -r * $ fission package create --env java --src java-src-pkg.zip Package 'java-src-pkg-zip-dqo5' created ``` -------------------------------- ### Verify Fission CLI Installation Source: https://fission.io/docs/usage/languages/java This command verifies that Fission is correctly installed and accessible from the command line, displaying its version information. ```Shell fission version ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/trouble-shooting/setup/fission A command to check the status and health of the Fission installation. ```APIDOC fission check: Checks the status and health of the Fission installation. ``` -------------------------------- ### Fission CLI: List Packages Source: https://fission.io/docs/reference/fission-cli/fission_archive_download Lists all available Fission packages. ```CLI fission package list ``` -------------------------------- ### Check Fission Installation Source: https://fission.io/docs/releases/v1.20 Performs a diagnostic check of the Fission installation to verify its health and configuration. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: Installation Check Command Source: https://fission.io/docs/reference/glossary Command to check the health and configuration of the Fission installation. ```APIDOC fission check: Checks the Fission installation and environment. ``` -------------------------------- ### Create Fission Go Environment with v3 Interface Source: https://fission.io/docs/usage/languages Provides a complete example of creating a Fission environment for Go functions, explicitly setting the environment name, image, builder image, and utilizing the v3 environment interface. ```bash fission environment create --name go --image ghcr.io/fission/go-env-1.23 --builder ghcr.io/fission/go-builder-1.23 --version 3 ``` -------------------------------- ### Check Fission Installation Status with CLI Source: https://fission.io/docs/reference/fission-cli/fission_support_dump A command to verify the status and health of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### Node.js Hello World Function Example Source: https://fission.io/docs/usage/function/enabling-istio-on-fission This JavaScript code defines a simple asynchronous function that returns a 'Hello, World!' response with a 200 status. It also logs the incoming request headers to the console. ```javascript module.exports = async function(context) { console.log(context.request.headers); return { status: 200, body: "Hello, World!\n" }; } ``` -------------------------------- ### Create Fission Environment and Function with CLI Source: https://fission.io/docs/usage/rbac-permissions Demonstrates creating a Node.js environment and a simple 'hello' function using the Fission CLI, verifying the user's permissions and the functionality of the configured role. ```bash $ fission env create --name node --image ghcr.io/fission/node-env -n default poolsize setting default to 3 environment 'node' created $ fission fn create --name hello --code hello.js --env node Package 'hello-a2318569-0d2d-4b63-826d-6d4d2665be50' created function 'hello' created ``` -------------------------------- ### Check Fission Installation Status CLI Command Source: https://fission.io/docs/reference/fission-cli/fission_spec_destroy Checks the status and health of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: Check Installation Command Source: https://fission.io/docs/reference/fission-cli/fission_mqtrigger_create Command to check the status and health of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### Deploy a Fission Function Source: https://fission.io/docs/usage/observability/linkerd This command deploys the 'hello' function using the previously created 'node' environment and the 'hello.js' code file. This makes the function available for execution. ```Shell fission fn create --name hello --code hello.js --env node ``` -------------------------------- ### Fission CLI: Check Fission Installation Source: https://fission.io/docs/reference/fission-cli/fission_httptrigger Command to check the status and health of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: List Environments Source: https://fission.io/docs/reference/fission-cli/fission_archive_download Lists all available Fission environments. ```CLI fission environment list ``` -------------------------------- ### Fission CLI: Initialize Specifications Source: https://fission.io/docs/reference/fission-cli/fission_token_create Initializes a directory for Fission specifications. This sets up the necessary directory structure and example files for declarative Fission resource management. ```APIDOC fission spec init ``` -------------------------------- ### Check Fission Installation Source: https://fission.io/docs/reference/fission-cli/fission_environment_pods Performs a health check on the Fission installation to verify its status and components. ```CLI fission check ``` -------------------------------- ### Build and Deploy Fission to Kind Kubernetes Cluster Source: https://fission.io/docs/contributing This sequence of commands guides you through setting up a Kind Kubernetes cluster, creating the Fission namespace, pre-building necessary Go binaries, creating Custom Resource Definitions (CRDs), and finally deploying Fission using Skaffold with the Kind profile. ```Shell kind create cluster kubectl create ns fission make skaffold-prebuild # This builds all Go binaries required for Fission make create-crds skaffold run -p kind ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/usage/languages/nodejs Command to check the status and health of the Fission installation and its components. ```CLI fission check ``` -------------------------------- ### Fission CLI: Installation Health Check Source: https://fission.io/docs/usage/function/container-functions Command to check the health and status of the Fission installation and its components. ```APIDOC fission check: Check Fission installation status. ``` -------------------------------- ### Create Fission Node.js Environment and Hello World Function Source: https://fission.io/docs/usage/ingress This sequence of commands creates a Node.js environment in Fission, defines a simple 'hello.js' function that returns 'Hello, Fission!', and then deploys and tests this function to ensure it's operational within the Fission environment. ```bash $ fission env create --name nodejs --image ghcr.io/fission/node-env environment 'nodejs' created ``` ```javascript module.exports = async function(context) { return { status: 200, body: "Hello, Fission!\n" }; } ``` ```bash $ fission fn create --name hello --env nodejs --code hello.js function 'hello' created $ fission fn test --name hello Hello, Fission! ``` -------------------------------- ### Install Fission with Helm CLI Source: https://fission.io/docs/releases/v1.15 Demonstrates how to install Fission using the Helm command-line interface, specifying the version and namespace. This command is relevant for Fission versions 1.15 and later, which use a 'v' prefix for chart tags. ```bash helm install --version v1.15.0-rc1 --namespace fission fission ``` -------------------------------- ### Check Fission Installation Status Source: https://fission.io/docs/usage/observability/opentelemetry Performs a health check on the Fission installation to verify that all components are running correctly. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: List Environments Source: https://fission.io/docs/architecture/logger Lists all available Fission environments. This provides an overview of all configured runtimes. ```CLI fission environment list ``` -------------------------------- ### Fission CLI Main Command Overview and Options Source: https://fission.io/docs/reference/fission-cli/fission This documentation provides an overview of the `fission` command, the core entry point for the Fission serverless framework CLI. It includes a synopsis of its purpose and a list of global options that can be used to configure its behavior, such as specifying the Kubernetes context, namespace, and verbosity level. ```APIDOC fission: Fast and Simple Serverless Functions for Kubernetes Synopsis: Fission: Fast and Simple Serverless Functions for Kubernetes * GitHub: * Documentation: Options: --kube-context string Kubernetes context to be used for the execution of Fission commands -n, --namespace string -n |:|: If present, the namespace scope for this CLI request -v, --verbosity int -v |:|: CLI verbosity (0 is quiet, 1 is the default, 2 is verbose) (default 1) -h, --help help for fission ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/usage/observability/loki Performs a check of the Fission installation to ensure all components are running correctly. ```APIDOC fission check ``` -------------------------------- ### Deploying Fission Consumer Function Source: https://fission.io/docs/usage/triggers/message-queue-trigger-kind-keda/nats-jetstream This Fission CLI command creates a Fission function named 'helloworld', associating it with the previously created 'go' environment. It specifies 'hello.go' as the source file and 'Handler' as the entrypoint for the consumer function. ```bash fission fn create --name helloworld --env go --src hello.go --entrypoint Handler ``` -------------------------------- ### Check Fission Installation Status Source: https://fission.io/docs/usage/ingress/ingress-extra-settings Performs a diagnostic check of the Fission installation and its components to verify health and readiness. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: List Environments Source: https://fission.io/docs/installation/authentication Lists all Fission environments configured in the system. This command provides an overview of available runtimes. ```APIDOC fission environment list ``` -------------------------------- ### Fission CLI Installation Check Command Source: https://fission.io/docs/reference/fission-cli/fission_spec_init A utility command to check the status and health of the Fission installation and its components. ```CLI fission check ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/reference/fission-cli/fission_httptrigger_list Performs a diagnostic check of the Fission installation, verifying components and their readiness. ```APIDOC fission check ``` -------------------------------- ### Simple Fission Go Hello World Function Source: https://fission.io/docs/usage/languages/go This Go code defines a basic Fission function named 'Handler'. It takes an `http.ResponseWriter` and `http.Request` as input, writes 'Hello, world!' to the response, and must be in the `main` package due to Go plugin mechanisms. ```Go // Due to go plugin mechanism, // the package of function handler must be main package package main import ( "net/http" ) // Handler is the entry point for this fission function func Handler(w http.ResponseWriter, r *http.Request) { msg := "Hello, world!\n" w.Write([]byte(msg)) } ``` -------------------------------- ### Check Fission Installation Status Source: https://fission.io/docs/reference/fission-cli/fission_canary_update Performs a health check on the Fission installation to verify its components are running correctly. ```CLI fission check ``` -------------------------------- ### Example Fission Project Directory Structure Source: https://fission.io/docs/usage/languages/go This snippet illustrates the typical directory layout for a Fission function project that includes a custom build script alongside the main Go source file. ```text . ├── customBuild.sh └── main.go ``` -------------------------------- ### Fission CLI: Manage Packages Source: https://fission.io/docs/usage/triggers/http-trigger Commands for managing Fission packages, including creating, deleting, getting deployment, getting source, viewing info, listing, rebuilding, and updating. ```APIDOC fission package fission package create fission package delete fission package getdeploy fission package getsrc fission package info fission package list fission package rebuild fission package update ``` -------------------------------- ### Fission CLI: fission spec init Source: https://fission.io/docs/usage/function/package Reference for the `fission spec init` command, detailing its usage and options for initializing Fission specifications. ```APIDOC fission spec init ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/installation/env_vars Performs a check of the Fission installation to ensure all components are running correctly. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: Options for 'fission canary list' Source: https://fission.io/docs/reference/fission-cli/fission_canary_list Details the specific command-line options available for the `fission canary list` command, including options to fetch resources from all namespaces and display help information for the command. ```APIDOC -A, --all-namespaces -A |:|: Fetch resources from all namespaces -h, --help help for list ``` -------------------------------- ### Check Fission Installation Status with CLI Source: https://fission.io/docs/usage/triggers/message-queue-trigger-kind-keda/rabbitmq Command to check the status and health of the Fission installation, verifying components and connectivity. ```APIDOC fission check ``` -------------------------------- ### Fission CLI Command to Create Function from Source Package Source: https://fission.io/docs/usage/languages/nodejs This command creates a Fission function named "node-builder-example" using a previously created source package (e.g., 'node-source-example-abcd'), specifying the "nodejs" environment and the "momentExample" entrypoint. ```Shell fission function create --name node-builder-example --pkg node-source-example-abcd --env nodejs --entrypoint "momentExample" ``` -------------------------------- ### Install cert-manager for OpenTelemetry Operator Source: https://fission.io/docs/usage/observability/opentelemetry Command to install `cert-manager` in a Kubernetes cluster, which is a prerequisite for deploying the OpenTelemetry Operator for Kubernetes. ```Shell # cert-manager kubectl apply -f https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.yaml ``` -------------------------------- ### Create a Simple Node.js Fission Function Source: https://fission.io/docs/usage/languages/nodejs Demonstrates how to write a basic 'hello world' Node.js function for Fission, returning a simple HTTP response. ```nodejs module.exports = async function(context) { return { status: 200, body: "hello, world!\n" }; } ``` -------------------------------- ### Create Fission Function from Go Source Source: https://fission.io/docs/usage/languages/go This command creates a Fission function named 'helloworld' using the 'go' environment. It specifies the source file `hw.go` and sets 'Handler' as the function's entrypoint, allowing Fission to build and deploy the Go code. ```Shell # Create golang env with builder image to build go plugin $ fission fn create --name helloworld --env go --src hw.go --entrypoint Handler ``` -------------------------------- ### Check Fission Installation Status Source: https://fission.io/docs/trouble-shooting Command to check the status and health of the Fission installation, providing insights into its components and readiness. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/reference/fission-cli/fission_timetrigger Reference for the 'fission check' command, used to verify the Fission installation status. ```APIDOC fission check ``` -------------------------------- ### Check Fission Installation Status Source: https://fission.io/docs/reference/fission-cli/fission_mqtrigger_update Performs a check of the Fission installation to ensure all components are running correctly and the system is healthy. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: fission environment create Source: https://fission.io/docs/usage/function/package Reference for the `fission environment create` command, detailing its usage and options for creating a Fission environment. ```APIDOC fission environment create ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/reference/fission-cli/fission_environment_update Performs a check of the Fission installation to ensure all components are running correctly and are accessible. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: fission canary create Source: https://fission.io/docs/usage/function/package Reference for the `fission canary create` command, detailing its usage and options for creating a Fission canary deployment. ```APIDOC fission canary create ``` -------------------------------- ### Install Promtail with Custom Configuration using Helm Source: https://fission.io/docs/usage/observability/loki This Helm command installs or upgrades Promtail in the `monitoring` namespace. It uses the `promtail-config.yaml` file to apply the custom label-forwarding configuration, ensuring Promtail collects all necessary log metadata. ```shell $ helm upgrade -n monitoring --install promtail grafana/promtail -f promtail-config.yaml ``` -------------------------------- ### Fission CLI: Package Management Commands Source: https://fission.io/docs/reference/fission-cli/fission_mqtrigger_create Commands for managing Fission packages, including operations to create, delete, get deployment packages, get source packages, view info, list, rebuild, and update packages. ```APIDOC fission package fission package create fission package delete fission package getdeploy fission package getsrc fission package info fission package list fission package rebuild fission package update ``` -------------------------------- ### Fission CLI: fission canary Source: https://fission.io/docs/reference/fission-cli/fission_package_create Manages Fission canary deployments. ```bash fission canary ``` -------------------------------- ### Fission CLI Installation Check Command Source: https://fission.io/docs/index A utility command to verify the status and health of the Fission installation and its components. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: Get Function Source: https://fission.io/docs/usage/function/enabling-istio-on-fission Reference for the `fission function get` command, used to retrieve details of a Fission function. ```APIDOC fission function get ``` -------------------------------- ### Fission CLI: fission canary create Source: https://fission.io/docs/reference/fission-cli/fission_package_create Creates a Fission canary deployment. ```bash fission canary create ``` -------------------------------- ### List Fission Packages Source: https://fission.io/docs/usage/ingress/ingress-extra-settings Lists all available packages in Fission. ```APIDOC fission package list ``` -------------------------------- ### Fission CLI: Get Environment Source: https://fission.io/docs/usage/function/enabling-istio-on-fission Reference for the `fission environment get` command, used to retrieve details of a Fission environment. ```APIDOC fission environment get ``` -------------------------------- ### Fission CLI: Initialize Specifications Source: https://fission.io/docs/installation/authentication Initializes a directory for Fission specifications. This command sets up the necessary structure for declarative Fission deployments. ```APIDOC fission spec init ``` -------------------------------- ### Fission CLI: Get Function Source: https://fission.io/docs/reference/fission-cli/fission_timetrigger Reference for the 'fission function get' command, used to retrieve details of a Fission function. ```APIDOC fission function get ``` -------------------------------- ### Fission CLI: Get Environment Source: https://fission.io/docs/reference/fission-cli/fission_timetrigger Reference for the 'fission environment get' command, used to retrieve details of a Fission environment. ```APIDOC fission environment get ``` -------------------------------- ### Fission CLI: List Packages Source: https://fission.io/docs/usage/languages/python Lists all Fission packages currently available in the system, showing their names, environments, and build status. ```APIDOC fission package list [flags] ``` -------------------------------- ### Fission CLI: Check Fission Installation Source: https://fission.io/docs/usage/spec/podspec Performs a check of the Fission installation. This command verifies the health and readiness of the Fission components. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: fission environment create Source: https://fission.io/docs/reference/fission-cli/fission_package_create Creates a Fission environment. ```bash fission environment create ``` -------------------------------- ### Install Jaeger Operator on Kubernetes Source: https://fission.io/docs/usage/observability/opentelemetry This command installs the Jaeger Operator for Kubernetes into the 'observability' namespace. The operator manages Jaeger instances. ```bash kubectl create namespace observability kubectl create -n observability -f https://github.com/jaegertracing/jaeger-operator/releases/download/v1.39.0/jaeger-operator.yaml ``` -------------------------------- ### Fission Package Create Command Usage Source: https://fission.io/docs/reference/fission-cli/fission_package_create Illustrates the basic command-line usage for creating a Fission package. ```CLI fission package create [flags] ``` -------------------------------- ### Fission CLI: Core Commands Overview Source: https://fission.io/docs/reference/fission-cli/fission_function_pods Provides an overview of the main Fission CLI command and its top-level subcommands for managing serverless resources. ```APIDOC fission archive canary check environment function httptrigger mqtrigger package spec ``` -------------------------------- ### Fission CLI: Check Installation Status Source: https://fission.io/docs/usage/function/executor Performs a health check on the Fission installation, verifying the status of core components and dependencies. ```APIDOC fission check ``` -------------------------------- ### List Fission Environments and Their Configurations Source: https://fission.io/docs/usage/function/executor Command to list all configured Fission environments, displaying their names, images, pool sizes, and environment-level resource limits (min/max CPU and memory). ```shell fission env list ``` -------------------------------- ### Fission CLI: Check Fission Installation Status Source: https://fission.io/docs/reference/fission-cli/fission_function_update-container Documentation for the 'fission check' command, which verifies the status and health of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: Check Fission Installation Source: https://fission.io/docs/reference/fission-cli/fission_archive_list Performs a health check on the Fission installation, verifying that all components are running correctly and are accessible. ```APIDOC fission check ``` -------------------------------- ### Fission CLI: List Environments Source: https://fission.io/docs/usage/function/canary-deployments Lists all existing Fission environments. Provides an overview of available runtimes. ```APIDOC fission environment list ``` -------------------------------- ### Fission CLI: Check Installation Source: https://fission.io/docs/contributing Reference for the Fission CLI command: fission check. This command performs a check of the Fission installation. ```APIDOC fission check ``` -------------------------------- ### Create and Test Fission Function from Deployment Package Source: https://fission.io/docs/usage/function/package This command creates a Fission function named 'deploypy' using the previously created deployment package. It specifies the entrypoint (`hello.main`) for the function. The subsequent command tests the deployed function, showing its 'Hello, world!' output. ```bash $ fission fn create --name deploypy --pkg demo-deploy-pkg-zip-whzl --entrypoint "hello.main" $ fission fn test --name deploypy ``` -------------------------------- ### Fission CLI: fission httptrigger get Source: https://fission.io/docs/usage/triggers Reference for the 'fission httptrigger get' command, used to retrieve details of an HTTP trigger. ```CLI fission httptrigger get ``` -------------------------------- ### Fission CLI: Initialize Specification Source: https://fission.io/docs/usage/function/enabling-istio-on-fission Reference for the `fission spec init` command, used to initialize Fission specifications. ```APIDOC fission spec init ``` -------------------------------- ### Fission CLI: Inherited Global Command Options Source: https://fission.io/docs/reference/fission-cli/fission_token_create Lists common command-line options inherited by `fission token create` and other Fission CLI commands, such as specifying Kubernetes context, namespace, and verbosity level. ```APIDOC --kube-context string Kubernetes context to be used for the execution of Fission commands -n, --namespace string -n |:|: If present, the namespace scope for this CLI request -v, --verbosity int -v |:|: CLI verbosity (0 is quiet, 1 is the default, 2 is verbose) (default 1) ``` -------------------------------- ### Fission CLI: fission function get Source: https://fission.io/docs/usage/triggers Reference for the 'fission function get' command, used to retrieve details of a Fission function. ```CLI fission function get ``` -------------------------------- ### Fission CLI: fission environment get Source: https://fission.io/docs/usage/triggers Reference for the 'fission environment get' command, used to retrieve details of a Fission environment. ```CLI fission environment get ``` -------------------------------- ### Fission CLI: `fission canary create` Command Options Source: https://fission.io/docs/reference/fission-cli/fission_canary_create Detailed options for the `fission canary create` command, including parameters for naming the config, specifying functions, and controlling the canary deployment process. ```APIDOC --name string Name for the canary config --httptrigger string Http trigger that this config references --newfunction string --newfn |:|: New version of the function --oldfunction string --oldfn |:|: Old stable version of the function --increment-step int --step |:|: Weight increment step for function (default 20) --increment-interval string --internal |:|: Weight increment interval, string representation of time.Duration, ex : 1m, 2h, 2d (default "2m") --failure-threshold int --threshold |:|: Threshold in percentage beyond which the new version of the function is considered unstable (default 10) -h, --help help for create ``` -------------------------------- ### Create Fission Package from Source Archive Source: https://fission.io/docs/usage/languages/python Shows how to create a Fission package using a previously created source archive (`demo-src-pkg.zip`), specifying the Python environment and the build command (`./build.sh`). This initiates the build process within Fission. ```Shell $ fission package create --sourcearchive demo-src-pkg.zip --env python --buildcmd "./build.sh" Package 'demo-src-pkg-zip-8lwt' created ``` -------------------------------- ### Fission CLI: fission canary get Source: https://fission.io/docs/usage/triggers Reference for the 'fission canary get' command, used to retrieve details of a canary deployment. ```CLI fission canary get ```