From 0a6c3042fa63b84a3cad958cf494be5a7277a093 Mon Sep 17 00:00:00 2001 From: Aditya <60684641+0x0elliot@users.noreply.github.com> Date: Thu, 19 Oct 2023 17:36:39 +0530 Subject: [PATCH] fix: updating docs --- functions/kubernetes/kubernetes.md | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/functions/kubernetes/kubernetes.md b/functions/kubernetes/kubernetes.md index 384a9082..f8b9d8e5 100644 --- a/functions/kubernetes/kubernetes.md +++ b/functions/kubernetes/kubernetes.md @@ -2,17 +2,16 @@ ### Prerequisites: - Clone the https://github.com/shuffle/shuffle repository using Git then, navigate to the functions/kubernetes directory, which contains all the necessary Kubernetes configuration files for deployment. -- [Running a Kubernetes cluster](https://kubernetes.io/docs/setup/). You can do that with either minikube or run the cluster locally. If you're running on minikube, make sure to have exposed the ports ```30007-30008```, which you can do by running minikube like this: ```minikube start --extra-config=apiserver.service-node-port-range=30007-30008``` +- [Running a Kubernetes cluster](https://kubernetes.io/docs/setup/). You can do that with either minikube or run the cluster locally. If you're running on minikube and you can't access the ports 30007-30008, you can use ```kubectl port-forward svc/frontend 3000:80 -n shuffle``` to access the frontend on port 3000 - Ensure you have a local Docker registry set up to store and manage Docker images for applications built with Shuffle. While the registry is crucial for handling custom-built apps, you’ll still be able to run workflows without it. To setup a docker registry, if you have docker installed on one of your node run following commands. ``` - openssl req -newkey rsa:4096 -nodes -sha256 -keyout certs/reg.key -x509 -days 365 -out certs/reg.crt -subj "/CN=" - docker run -d -p 5000:5000 --restart=always --name shuffle-local-registry \ - -v $(pwd)/certs:/certs \ - -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/reg.crt \ - -e REGISTRY_HTTP_TLS_KEY=/certs/reg.key \ - registry:2 + chmod +x generate_certs.sh + ./generate_certs.sh ``` - - If you've used the above commands to set up a registry, you'll need to skip an SSL verification for your registry. If you're using Containerd as a runtime + +This will give you a NODE_IP which is you're local IP if you're not sure about what to use. + +- If you've used the above commands to set up a registry, you'll need to skip an SSL verification for your registry. If you're using Containerd as a runtime add the following lines in /etc/containerd/config.toml ``` [plugins."io.containerd.grpc.v1.cri".registry.mirrors.""] @@ -20,13 +19,10 @@ [plugins."io.containerd.grpc.v1.cri".registry.configs."".tls] insecure_skip_verify = true - ``` Step 1: Create a namespace called shuffle in a cluster by running ```kubectl create ns shuffle```. -Step 2: Open the ```all-in-one.yaml``` file and review the configuration values. Change the value of REGISTRY_URL with ':5000' where the registry is at. Adjust other variables as per your deployment requirements; otherwise, the application will deploy using the default settings provided within the file. Then apply the configmap with ```kubectl apply -f shuffle-cm.yaml -n shuffle```. - -Step 3: Now, Do ```kubectl apply -f all-in-one.yaml -n shuffle```. This will deploy all the necessary components of Shuffle! +Step 2: Open the ```all-in-one.yaml``` file and review the configuration values. Change the value of REGISTRY_URL with ':5000' where the registry is at. Adjust other variables as per your deployment requirements; otherwise, the application will deploy using the default settings provided within the file. Then apply the configmap and deploy with ```kubectl apply -f all-in-one.yaml -n shuffle``` Now, open ```https://:30008``` or ```http://:30007```. You should be seeing a signup page. NODE_IP should be where the frontend is deployed.