Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate how to deploy angular i18n #126

Closed
5 of 7 tasks
wg102 opened this issue Sep 1, 2022 · 7 comments
Closed
5 of 7 tasks

Investigate how to deploy angular i18n #126

wg102 opened this issue Sep 1, 2022 · 7 comments
Assignees

Comments

@wg102
Copy link
Contributor

wg102 commented Sep 1, 2022

This ticket is child of StatCan/aaw#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

  • What is the new way of building the application (local and not)
  • Do the build (both fr and eng at the same time)
  • Python http command
  • Manual toggle to fr ui
  • Routing logic
  • Router logic on cluster
  • Check on dev
@wg102 wg102 added the size/M 2-3 days label Sep 1, 2022
@wg102 wg102 self-assigned this Sep 1, 2022
This was referenced Sep 1, 2022
This was linked to pull requests Sep 6, 2022
@wg102
Copy link
Contributor Author

wg102 commented Sep 8, 2022

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
Copy link
Contributor Author

wg102 commented Sep 9, 2022

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
Copy link
Contributor Author

wg102 commented Sep 9, 2022

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
Copy link
Contributor Author

wg102 commented Sep 9, 2022

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
Copy link
Contributor

Collinbrown95 commented Sep 13, 2022

JWA Refactor TODO Items

CC @wg102 @cboin1996

Testing TODO

  • Can we successfully run the 2-container pod (NGINX and golang API) locally (i.e. all AJAX calls from browser are successful, i18n routing works correctly).

@wg102
Copy link
Contributor Author

wg102 commented Sep 16, 2022

  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 wg102 removed the size/M 2-3 days label Sep 20, 2022
@wg102 wg102 mentioned this issue Sep 20, 2022
14 tasks
@wg102
Copy link
Contributor Author

wg102 commented Sep 20, 2022

This ticket is getting closed because the actual investigation part is done. The work will be continued in this ticket: #133

@wg102 wg102 closed this as completed Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants