This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Docker

Install OpenServerless on a local machine

    Local Docker installation

    This page describes how to install OpenServerless on your local machine. The services are limited and not accessible from the outside so it is an installation useful only for development purposes.

    Prerequisites

    Before installing, you need to:

    💡 NOTE

    The static service works perfectly for the default namespace nuvolaris which is linking the http://localhost to the nuvolaris web bucket. With this setup adding new users will add an ingress with host set to namespace.localhost, that in theory could also work if the host file of the development machine is configured to resolve it to the 127.0.0.1 ip address.

    WARNING

    You cannot have https in a local installation. If you enable it, the configuration will be ignored.

    Installation

    Run the commands:

    1. Minimal configuration
    ops config minimal
    

    Behind the scene, this command will write a cluster configuration file called ~/.ops/config.json activating these services: static, redis, postgres, ferretdb, minio, cron constituting the common baseline for development tasks.

    1. Setup the cluster
    ops setup devcluster
    

    and wait until the command terminates.

    Click here to see a log sample of the setup
    ops setup devcluster
    Creating cluster "nuvolaris" ...
     ✓ Ensuring node image (kindest/node:v1.25.3) 🖼
     ✓ Preparing nodes 📦 📦
     ✓ Writing configuration 📜
     ✓ Starting control-plane 🕹️
     ✓ Installing CNI 🔌
     ✓ Installing StorageClass 💾
     ✓ Joining worker nodes 🚜
     ✓ Waiting ≤ 1m0s for control-plane = Ready ⏳
     • Ready after 1s 💚
    Set kubectl context to "kind-nuvolaris"
    You can now use your cluster with:
    
    kubectl cluster-info --context kind-nuvolaris --kubeconfig /Users/bruno/.ops/tmp/kubeconfig
    
    Thanks for using kind!
    
    [...continue]
    

    💡 NOTE

    The log will continue because, after kind is up and running, OpenServerless namespace and relative services are installed inside.

    It will take some minute to complete, so be patient.

    Troubleshooting

    Usually the setup completes without errors.

    However, if ops is unable to complete the setup, you may see this message at the end:

    ops: Failed to run task "create": exit status 1
    task execution error: ops: Failed to run task "create": exit status 1
    ops: Failed to run task "devcluster": exit status 1
    task execution error: ops: Failed to run task "devcluster": exit status 1
    

    If this is your case, try to perform a uninstall / reinstall:

    ops setup cluster --uninstall
    ops config reset
    ops config minimal
    ops setup devcluster
    

    If this will not solve, please contact the community.

    Post install

    Check the tutorial to learn how to use it.

    Uninstall

    To uninstall you may:

    Uninstall devcluster

    This will actually remove the ops namespace and all the services from kind. Useful to re-try an installation when something gone wrong.

    ops setup cluster --uninstall
    ops config reset
    

    Remove devcluster

    This will actually remove the nodes from kind:

    ops setup devcluster --uninstall