This guide will guide you through the process of setting up Nuclio services (dashboard and controller) locally for testing your changes and provide faster development cycles.
Ensure that your setup includes the following prerequisite components:
- Linux or OSX
- Git
- Docker version 19.03+
- The Go toolchain (CI tests with 1.19, best use that)
- Kubernetes version 1.20+ (mostly for testing) -
minikube
recommended; (you can follow the Minikube getting-started guide) - Node version 10.x
- Goland IDE
The guide assumes you're running Nuclio in kubernetes. If you're running it as a docker container, you can skip some steps.
-
(Kubernetes only) Install Nuclio CRDs. You can install them by running
test/k8s/ci_assets/install_nuclio_crds.sh
. -
In
hack/env
directory, createplatform_config.yaml
with the following body (you can update the example file inhack/env/platform_config.yaml.example
):
logger:
sinks:
myStdoutLoggerSink:
kind: stdout
system:
- level: debug
sink: myStdoutLoggerSink
functions:
- level: debug
sink: myStdoutLoggerSink
# Kubernetes only
kube:
kubeConfigPath: <your-home-dir>/.kube/config
containerBuilderConfiguration:
DefaultOnbuildRegistryURL: "localhost:5000"
- Run local registry:
docker run --rm -d -p 5000:5000 registry:2
- Run Dashboard:
- In Goland - open the
dashboard-kube
run configuration. Make sure the program arguments are as follows:
--platform kube --platform-config hack/env/platform_config.yaml --namespace default --registry localhost:5000 --run-registry localhost:5000 --templates-archive-address "" --templates-git-repository "https://github.com/nuclio/nuclio-templates.git"
- In Goland - open the
--templates-git-ref "refs/heads/master"
2. If you want to run a specific Nuclio version, you can add the following flags to `Go tool aruments` in the run configuration:
```sh
-ldflags="-X github.com/v3io/version-go.label=<Nuclio-version>"
-
Run it - see that it's listening on port
8070
-
Run Controller:
- In Goland - open the
contorller-kube
run configuration. Make sure the program arguments are as follows, with your own kube/config directory:
--platform-config hack/env/platform_config.yaml --namespace default --kubeconfig-path path/to/.kube/config
- Run it.
- In Goland - open the
-
Run UI:
- Open
pkg/dashboard/ui
in a terminal - Run:
npm install gulp watch --dev
And make sure it's listening on port
8000
- Open
localhost:8000
in a browser and use Nuclio as you please!
- Open
You can now perform operations on the Nuclio UI and view the dashboard and controller logs live on Goland's run console.