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

fix: WIP mac dev environment #50

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

fix: WIP mac dev environment #50

wants to merge 6 commits into from

Conversation

cooper667
Copy link
Collaborator

All WIP including the following instructions, but should get close...

  • Install Minikube yourself (I didn't use brew, I used the script)
  • Install Helm yourself (again, I didn't use brew, ymmv)
  • Basically follow the Conflence Docs

When it comes to:
"Run the setup_local_dev playbook:"

append -t setup_arm_mac to the command (this will skip the install minikube/helm playbooks`

Then deploy ckan as instructed.

There are now ARM images build in GH packages which help, I've got as far as CKAN starting and the init container failed.

TO BE CONTINUED....

Comment on lines 77 to 89
# - name: Check if DB is alive [local] (10 tries, 5sec interval)
# community.postgresql.postgresql_ping:
# db: ckan
# login_host: "{{ ckan_fqdn }}"
# login_user: "{{ rds_admin_username }}"
# login_password: "{{ ckan_postgres_password }}"
# when: (fjelltopp_env_type == 'local')
# register: db_ping_result
# retries: 10
# delay: 5
# until: db_ping_result is defined and db_ping_result.get('is_available')
# failed_when: db_ping_result is not defined or not db_ping_result.is_available
# # For this check to work psycopg2 must be installed for the venv python referenced from your inventory
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't work, probably didn't have psycopg2 installed or something. Will deal with another time

Comment on lines +77 to +91

---
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: ingress-nginx-controller
namespace: ingress-nginx
labels:
addonmanager.kubernetes.io/mode: EnsureExists
app.kubernetes.io/component: controller
app.kubernetes.io/instance: ingress-nginx
app.kubernetes.io/name: ingress-nginx
data:
allow-snippet-annotations: "true"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow-snippet-annotations: "true"

is required on all the versions of helm i've installed 🤷

@cooper667
Copy link
Collaborator Author

cooper667 commented Jan 1, 2025

Ok, it kind of works but I can't get the ingresses working, as I get 502 bad gateways, even with a new ingress following https://kubernetes.io/docs/tasks/access-application-cluster/ingress-minikube/

(it works ok pointed at the dummy web service)

Also, im not entirely sure of the workflow once it's running.

Do ckan changes and then docker build? with the same tag? Or is it only rebuild on dep changes?

@cooper667
Copy link
Collaborator Author

I think that my Nginx woes come from using a later version of minikube (minikube version: v1.34.0, commit: 210b148df93a80eb872ecbeb7e35281b3c582c61) which comes with the latest NGINX.

With each upgrade, NGINX continues to adhere and to strictly enforce HTTP protocol.

## Description
You just upgraded NGINX to version R32 
After the upgrade, however, you noticed error "2024/07/07 07:07:07 [error] 6954#6954: *1112149 upstream sent "Content-Length" and "Transfer-Encoding" headers at the same time while reading response header from upstream" in NGINX error log.
With the above and the presence of the above error, you failed to access applicationa and NGINX responded with 502 Bad Gateway error response  

## Cause
None HTTP compliance response from Application Server

## Recommended Actions
To rectify this issue, it is recommended that you work with the Application team to improve server compliance of RFC 9112.

Downgrading minikube and nginx feels like a very temp fix so i'll fix the problem at the ckan (or whatever) level

@cooper667
Copy link
Collaborator Author

cooper667 commented Jan 6, 2025

NGINX is 'fixed" by dropping the rogue header with uWSGI
rem-header = Transfer-Encoding

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding

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 this pull request may close these issues.

2 participants