Adding Python FaaS action blocks in an air-gapped instance

If you want to use Python function-as-a-service (FaaS) action blocks in an air-gapped instance of IBM® Rapid Infrastructure Automation®, you must add YAML configuration and run a Helm upgrade.

Before you begin

  1. If you do not have a local pip registry in your air-gapped instance, create one by using the steps in Creating a Python pip registry in air-gapped environments.
  2. During this task, images are downloaded from your local Python pip registry. Ensure that Docker Engine is installed and running in this registry’s location. For installation instructions, see Install Docker Engine.

About this task

In air-gapped environments where IBM Rapid Infrastructure Automation® is installed, the capability to run programs using Python FaaS action blocks, such as the Python FaaS and Python CLI FaaS blocks, is not built into the software. If you want to use these blocks, you must add the necessary YAML configuration and upgrade the instance.

Procedure

  1. On the host where IBM Rapid Infrastructure Automation® is installed, search for the rna-core-values.yaml file and open it for editing.
  2. In the rna-core-values.yaml file, in the rna section, define a faas section that contains the following attributes:
    faas_namespace
    A string that contains the Kubernetes namespace where the FaaS containers are created.

    The default value is faas, but you can override this value.

    python
    A set of attributes that specifies the location of the Python pip registry.
    Note: This section may contain either the pip-registry or pip-proxy attributes, but not both.
    pip_registry
    The URL of the Python pip registry server.

    The URL must contain the Docker image library name and location.

    pip_proxy
    The URL of the Python pip proxy server.
    pip_ignore_ssl_errors
    A Boolean flag that indicates whether SSL certification is bypassed for the Python pip registry.

    Set this to true to disregard SSL certification during the FaaS action block installation.

    For example, you might add this YAML configuration:
    rna:
      ...
      ... 
      faas:
        faas_namespace: "faas"
        python:
          pip_registry: "http://<pip_registry_IP_address>:5000"
          pip_ignore_ssl_errors: true
    <pip_registry_IP_address> is the IP address of the Python pip registry,
  3. Add the FaaS action blocks to your air-gapped instance of IBM Rapid Infrastructure Automation® by running this command:
    helm upgrade -n rna-core --create-namespace -f rna-core-values.yaml rna-core ./RNA/images/rna-core
  4. In the dashboard, click Global settings > Worker Groups.
  5. Turn off the Certificate Validation toggle for the default group.