From e97f1e9c801e00c6a9db2f38ff010a8178b256db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Vol=C3=A1k?= Date: Wed, 25 Sep 2024 12:34:03 +0200 Subject: [PATCH] Upgrade docs for Frinx Machine, chartVersion v10.x (#252) Co-authored-by: Jozef Volak --- frinx-machine/installation/basic/readme.md | 23 ++++-- .../create-kind-cluster/readme.md | 2 +- .../frinx-machine-customization/readme.md | 21 ++--- .../installation/oauth2-proxy/readme.md | 16 +--- .../python-sdk/development/readme.md | 77 +++---------------- 5 files changed, 34 insertions(+), 105 deletions(-) diff --git a/frinx-machine/installation/basic/readme.md b/frinx-machine/installation/basic/readme.md index 9ad948251..6274db36b 100644 --- a/frinx-machine/installation/basic/readme.md +++ b/frinx-machine/installation/basic/readme.md @@ -67,7 +67,7 @@ Please complete this step before continue [!ref icon="briefcase" text="Create do Install the FRINX Machine using Helm: ```bash -helm install -n frinx frinx-machine frinx/frinx-machine +helm install -n frinx frinx-machine frinx/frinx-machine --timeout 10m ``` Verify the installation by checking the pods in the frinx namespace: @@ -110,18 +110,25 @@ uniconfig-postgresql-2 1/1 Running 0 ## Step 6: Access the UI -Add the following entries to your /etc/hosts file: +To access ui, use krakend-nginx ingress hostname. +```bash +kubectl get ingress -n frinx ``` -# /etc/hosts -... -192.168.49.2 krakend.127.0.0.1.nip.io fm.127.0.0.1.nip.io + +You should see output similar to: + +```bash +NAME CLASS HOSTS ADDRESS PORTS AGE +krakend-nginx nginx krakend.127.0.0.1.nip.io 192.168.49.2 80 56m ``` -Enable the KrakenD ingress for the FRINX Machine: +In case of minikube is required to add the following entries to your /etc/hosts file: ``` -helm upgrade --install -n frinx frinx-machine frinx/frinx-machine --set krakend.ingress.enabled=true +# /etc/hosts +... +192.168.49.2 krakend.127.0.0.1.nip.io fm.127.0.0.1.nip.io ``` -Visit Frinx Machine page in your browser on `https://krakend.127.0.0.1.nip.io/frinxui` +and visit Frinx Machine page in your browser on `https://krakend.127.0.0.1.nip.io/frinxui` diff --git a/frinx-machine/installation/customization/create-kind-cluster/readme.md b/frinx-machine/installation/customization/create-kind-cluster/readme.md index b66092e8c..61cf78710 100644 --- a/frinx-machine/installation/customization/create-kind-cluster/readme.md +++ b/frinx-machine/installation/customization/create-kind-cluster/readme.md @@ -77,7 +77,7 @@ Create a Cilium configuration file named cilium-helm-values.yaml with the follow ```yaml # cilium-helm-values.yaml -kubeProxyReplacement: strict +kubeProxyReplacement: true k8sServiceHost: kind-control-plane k8sServicePort: 6443 hostServices: diff --git a/frinx-machine/installation/customization/frinx-machine-customization/readme.md b/frinx-machine/installation/customization/frinx-machine-customization/readme.md index 50ec34633..60c4d2c35 100644 --- a/frinx-machine/installation/customization/frinx-machine-customization/readme.md +++ b/frinx-machine/installation/customization/frinx-machine-customization/readme.md @@ -66,13 +66,13 @@ name: frinx-machine description: Kubernetes deployment of FRINX-machine icon: https://avatars.githubusercontent.com/u/23452093?s=200&v=4 type: application -version: 6.1.0 +version: 6.2.0 maintainers: - name: FRINX dependencies: - name: frinx-machine repository: https://FRINXio.github.io/helm-charts - version: 9.0.0 + version: 10.0.1 ``` This configuration sets up the basic information about the Helm chart and defines FRINX Machine as a dependency, pulling it from the specified repository. @@ -91,18 +91,9 @@ For mapping the Helm chart release to the product release and more details on th # values.yaml frinx-machine: krakend: - ingress: - enabled: true - className: nginx - annotations: - nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600" - nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" - nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" - hosts: - - host: krakend.127.0.0.1.nip.io - paths: - - path: "/" - pathType: ImplementationSpecific + nginx: + ingress: + hostname: krakend.127.0.0.1.nip.io uniconfig: image: @@ -113,7 +104,7 @@ frinx-machine: repository: "frinxio/performance-monitor" ``` - - krakend: Configures the Ingress settings for the KrakenD API Gateway. It enables the Ingress, sets the class to nginx, and includes custom annotations for proxy timeouts. The host is set to krakend.127.0.0.1.nip.io with the path /. + - krakend.nginx.ingress.hostname: Configures the Ingress settings for the KrakenD API Gateway. - uniconfig: Specifies the Docker image repository for the Uniconfig component. diff --git a/frinx-machine/installation/oauth2-proxy/readme.md b/frinx-machine/installation/oauth2-proxy/readme.md index a58197444..214c27386 100644 --- a/frinx-machine/installation/oauth2-proxy/readme.md +++ b/frinx-machine/installation/oauth2-proxy/readme.md @@ -74,17 +74,6 @@ oauth2-proxy: enabled: true architecture: standalone - ingress: - enabled: true - className: nginx - hosts: - - "fm.127.0.0.1.nip.io" - annotations: - nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600" - nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" - nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" - sessionStorage: type: redis redis: @@ -99,7 +88,7 @@ oauth2-proxy: # https://oauth2-proxy.github.io/oauth2-proxy/configuration/overview custom_sign_in_logo = "/tmp/frinx/frinx.png" - upstreams = ["http://krakend:8080"] + upstreams = "file:///dev/null" cookie_secure = true cookie_expire = 0 @@ -123,8 +112,9 @@ oauth2-proxy: ssl_insecure_skip_verify = false pass_access_token = false - + set_xauthrequest = true skip_jwt_bearer_tokens = true + reverse_proxy = true extraArgs: azure-graph-group-field: displayName diff --git a/frinx-workflow-manager/python-sdk/development/readme.md b/frinx-workflow-manager/python-sdk/development/readme.md index 439686506..fe02e4849 100644 --- a/frinx-workflow-manager/python-sdk/development/readme.md +++ b/frinx-workflow-manager/python-sdk/development/readme.md @@ -13,84 +13,25 @@ This guide provides the step-by-step instructions for preparing develoment envir - `Helm`: Make sure that Helm is installed. Follow the Helm installation guide if necessary. - `Python`: Make sure that your environment have Python ^3.10 interpretter installed. - `Poetry`: Make sure that you have installed Poetry. Follow the Poetry installation guide if necessary. +- `Mirrord`: Make sure that you have installed Mirrord. Follow the [mirrord installation quide ](https://github.com/metalbear-co/mirrord) if necessary ## Step 1: Start Frinx Machine -Install Frinx Machine with ingress enabled [!ref icon="briefcase"](/frinx-machine/installation/customization/frinx-machine-customization/readme.md) +Install Frinx Machine [!ref icon="briefcase"](/frinx-machine/installation/customization/frinx-machine-customization/readme.md) - -Check out gitops-boilerplate repository to run Frinx Machine locally [!ref target="blank" icon="mark-github" text="frinx-workers-boilerplate"](https://github.com/FRINXio/gitops-boilerplate) - -Make sure you have enabled workflow-manager and krakend ingress, because it's required for local development. - -```bash -frinx-machine: - krakend: - ingress:s - enabled: true - className: nginx - annotations: - # force-ssl-redirect must be disabled in case you are using a self-signed certificate - # nginx.ingress.kubernetes.io/force-ssl-redirect: "true" - nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600" - nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" - nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" - hosts: - - host: krakend.127.0.0.1.nip.io - paths: - - path: "/" - pathType: ImplementationSpecific - - workflow-manager: - ingress: - enabled: true - hosts: - - host: workflow-manager.127.0.0.1.nip.io - paths: - - path: "/" - pathType: ImplementationSpecific - - uniconfig: - image: - repository: "frinxio/uniconfig" - - performance-monitor: - image: - repository: "frinxio/performance-monitor" -``` - -In case, you using minikube, get minikube ip - -```bash -minikube ip - -192.168.49.2 -``` - -add map that ip with ingres hosts to your /etc/hosts - -```bash -#/etc/hosts -192.168.49.2 krakend.127.0.0.1.nip.io -192.168.49.2 workflow-manager.127.0.0.1.nip.io -``` - -To verify ingresses - -```bash -$kubectl get ingress -n frinx - -NAME CLASS HOSTS ADDRESS PORTS AGE -conductor-server nginx workflow-manager.127.0.0.1.nip.io 192.168.49.2 80 161m -krakend nginx krakend.127.0.0.1.nip.io 192.168.49.2 80 161m -``` +Check out gitops-boilerplate repository to run Frinx Machine locally [!ref target="blank" icon="icon-mark-github" text="frinx-workers-boilerplate"](https://github.com/FRINXio/gitops-boilerplate) ## Step 2: Clone worker-example repository Clone repository and follow instructions in README.md -[!ref target="blank" icon="mark-github" text="frinx-workers-boilerplate"](https://github.com/FRINXio/frinx-workers-boilerplate) +[!ref icon="icon-mark-github" target="blank" text="frinx-workers-boilerplate"](https://github.com/FRINXio/frinx-workers-boilerplate) + +### Step 3: Local development with Mirrord +Mirrord is great tool, which simplifies development of workflows on local/remove kubernetes cluster. +Is only needed to install it to the IDE (CLI), set connection to the correct kubeconfig/namespace and run python worker in targetless pod. +No more need to workaround connection via ingress. ## Step 3: Deploy to cluster