Creation pipeline

  1. It is required a zip archive with the lambda; see lambda creation description and requirements for details.

  2. The first stage of lambda creation is Docker image creation.

    Granted zip archive will be supplemented by several files and transformed into another archive which will be stored in s3 storage. In the next step, the archive from s3 will be used by kaniko tool which allows building images in kubernetes cluster independently on kubernetes container runtime.

    It is possible to get lambda image creation status during image creation.

    Below is a table with possible image creation statuses:

    status

    description

    in_progress

    image creation in progress

    error

    an error occurred during image creation

    completed

    image creation completed but not cleaned up yet

    not_found

    image creation complete and cleaned up

    If any error occurred during image creation it is possible to get lambda image creation logs to find and resolve the problem. It is highly recommended to delete lambda before making the next attempt of lambda creation. During lambda image creation, lambda status is waiting.

    Completely created image will be pushed to the registry (LAMBDA_REGISTRY specified in the service configuration).

    There are several requirements to make this actions possible, see environment requirements for details.

    During docker image creation there will be one pod named pod/kaniko-lambda-<lambda_id> in kubernetes cluster, where lambda id matches the lambda id available by user from luna-lambda service.

  3. The second stage of lambda creation is to create a service in the kubernetes cluster.

    This stage will be executed automatically after image creation is completed.

    During lambda creation, it is not possible to get lambda image creation status or get lambda image creation logs.

    During lambda creation, it is possible to get lambda status.

    Below is a table with possible lambda statuses:

    status

    description

    running

    lambda running

    waiting

    waiting for lambda to start

    terminated

    lambda stopped

    not_found

    lambda not found in kubernetes cluster

    pending

    lambda waiting for suitable conditions

    If any error during lambda creation/initialization, it is possible to get lambda logs to find and resolve the problem.

    If lambda status is pending it means that there is no suitable conditions for such lambda, for example lambda requires GPU and kubernetes cluster cannot provides GPU for lambda.

    If lambda status is terminated and no logs can be found, it is most likely that there are several problems with registry access from the kubernetes cluster and/or some permission issues.

    Completely created service will have running status.

    After lambda creation successfully completed kubernetes cluster will contain replicaset, deployment, service and pod named lambda-<lambda-id> where lambda id matches the lambda id available by user from luna-lambda service.