StatCan / jupyter-apis

A Golang replacement for the Kubeflow Jupyter Web APIs / Un remplacement Golang pour les API de Web de Jupyter, partie de Kubeflow
Other
13 stars 4 forks source link

Investigate how to deploy angular i18n #126

Closed wg102 closed 2 years ago

wg102 commented 2 years ago

This ticket is child of https://github.com/StatCan/daaas/issues/1242

The purpose is now that we have the basis of the i18n by angular (without our changes), we will try to get it up into dev. Figure out how to deploy it correctly.

If it ends up not possible, we will need to back down and reset the branch to the previous commit, and make their changes into our code. The codes will then probably be literally too different to ever merge. If we do want such a thing in the future...

Update

wg102 commented 2 years ago

I am trying to build the application with all the locales ./node_modules/.bin/ng build --prod --localize

Then to go in the dist folder cd path/to/jupyter/dist/frontend

And run the python python -m http.server --bind=127.0.0.1 8080

now Just need to navigate to the fr or eng link and the UI shows up

Sites:

Install NGINX: sudo apt install nginx

wg102 commented 2 years ago

Created a k3d cluster based of https://github.com/Collinbrown95/demo-dask-k8s and https://github.com/StatCan/aws-js-s3-explorer/blob/main/k8s/s3proxy-nginx-cm.yaml

sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/src/local/bin https://k3d.io/v5.4.6/#install-current-latest-release

Use commands like task k8s:manifest:apply -w to update cluster on file change also need to add sources in the taskfile

wg102 commented 2 years ago

After multiple small fixes, the root was not set to the correct url. Hence it did not work. The html now appears and the redirection seems to behave, but the css does not. it complains about MIME types. I therefore added the test/css type to the complaing files. If this works, it will need to be done on the index.html original file.

wg102 commented 2 years ago

The issue was also in nginx-conf file and the root /etc/nginx/html/;

Second trouble is FF. When changing the language, need to change both language possibilities, then reset Cookies (ctrl+shift+r does NOT work)

This have giving me the constant result of when hitting localhost:8080/ being redirected to /fr or /en-US based on the language of my browser. As we wanted.

The first task to do next week will be to figure how to drag this into dev.

Collinbrown95 commented 2 years ago

JWA Refactor TODO Items

CC @wg102 @cboin1996

Testing TODO

wg102 commented 2 years ago
  1. Get k3d deployment working with manual port-forward on pod.
  2. Modify service so that we are forwarding to the right port (the one ngx in listening on by default, prob 8080)
  3. Refactor aaw kubeflow manifest deployment, to reflect our local k8s manifest folder
  4. Testing against dev.
wg102 commented 2 years ago

This ticket is getting closed because the actual investigation part is done. The work will be continued in this ticket: https://github.com/StatCan/jupyter-apis/issues/133