diff --git a/README.md b/README.md index 71bc1c8..d9b9d8b 100644 --- a/README.md +++ b/README.md @@ -108,13 +108,63 @@ kubectl create secret generic funcx-sdk-tokens \ ```shell script helm install -f deployed_values/values.yaml funcx funcx ``` -6. You can access your web service through the ingress or via a port forward -to the web service pod. Instructions are provided in the displayed notes. -7. You should be able to see the endpoint registering with the web service +6. You should be able to see the endpoint registering with the web service in their respective logs, along with the forwarder log. Check the endpoint's logs for its ID. +## Exposing FuncX to external clients and endpoints + +You need to expose two ports from your cluster to clients. There are two ways: +ingress and port-forward. These instructions talk about ingress, which is more +complicated to set up but easier to maintain and closer to the production +configuration. If you do not configure ingress, then the post-install notes +output by `helm install` will tell you which port-forward commands to run. + +1. Install an ingress controller. Minikube and microk8s do this differently. + +1.a Minikube: + +Run this: + +``` +minikube addons enable ingress +``` + +1.b microk8s + +Run this: + +``` +microk8s enable ingress +``` + +Then configure microk8s to serve all namespaces. (by default, it only +serves the `public` ingress class). [TODO: i need to write the exact commands for this] + +2. Get a hostname that your kubernetes install is accessible under. + +Depending on your development environment, this might be the public hostname of your +kubernetes server, or it might be an entry in `/etc/hosts` pointing to 127.0.0.1. +Maybe even `localhost` works in that case. + +3. Enable ingress in the funcx install + +Edit `deployed_values/values.yaml` to enable funcx ingress and to tell funcx the +host name from step 2. + +``` +ingress: + enabled: true + host: amber.cqx.ltd.uk +``` + +4. Redeploy funcx + +``` +helm upgrade --atomic -f deployed_values/values.yaml funcx funcx +``` + ### Forwarder Debugging > :warning: *Only for debugging*: You can set the forwarder curve server key manually by creating diff --git a/funcx/templates/NOTES.txt b/funcx/templates/NOTES.txt index 9f89276..f425e9f 100644 --- a/funcx/templates/NOTES.txt +++ b/funcx/templates/NOTES.txt @@ -4,14 +4,18 @@ progress via the command kubectl get pods --namespace {{ .Release.Namespace }} -To access the REST server you will need to run a Kubernetes Port-Forward: - {{- if .Values.ingress.enabled -}} Your service will be waiting for you at http://{{ .Release.Name }}-funcx.{{ .Values.ingress.host }} {{- else }} +To access the REST server, either enable ingress or run Kubernetes port-forward commands: + +For the web service: + kubectl port-forward service/{{ .Release.Name }}-funcx-web-service 5000:8000 + +For the websocket service: + + kubectl port-forward service/{{ .Release.Name }}-funcx-websocket-service 6000:6000 {{- end }} -To access the websocket service you will need to run a Kubernetes Port-Forward: -kubectl port-forward service/{{ .Release.Name }}-funcx-websocket-service 6000:6000