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

Modification to instalation instructions required for installing on Auto Pilot GKE #35

Closed
drrk opened this issue May 16, 2023 · 10 comments
Assignees

Comments

@drrk
Copy link

drrk commented May 16, 2023

On GKE in Auto Pilot mode a change to the installation instructions is required to install correctly. On this installation command, you need to append --set global.leaderElection.namespace=harmony This is to ensure that cert-manager is correctly setup due to a security limitation imposed by Google. Seehttps://github.com/cert-manager/cert-manager/issues/3717#issuecomment-931567578 for further information.

@bradenmacdonald bradenmacdonald self-assigned this May 16, 2023
@bradenmacdonald
Copy link
Contributor

Thanks for the report @drrk! I'll come up with a fix and get your help testing it.

@drrk
Copy link
Author

drrk commented May 16, 2023

You are welcome - there might be a bit more to it - whilst this meant the helm chart installed correctly, when I then deployed an instance with tutor it didn't get an SSL certificate correctly, it was still on the fake ingress certificate. I don't know if this was user error, or if there is still some missing steps to get cert-manager functional. I am going to test again tomorrow (I am in the UK)

@drrk
Copy link
Author

drrk commented May 18, 2023

I've tested again, using a different method, which I thought should work from looking at the cert-manager documentation https://cert-manager.io/docs/installation/compatibility/#gke-autopilot and https://cert-manager.io/docs/installation/helm/#installing-cert-manager-as-subchart

I set the relevant section of values.yaml as such:

cert-manager:
  # Set your email address here so auto-generated HTTPS certs will work:
  email: "[email protected]"
  namespace: harmony
  global.leaderElection.namespace: harmony

However this didn't work at all, the helm chart failed to instal, as it would without trying anything:

Error: INSTALLATION FAILED: failed post-install: 1 error occurred:
        * timed out waiting for the condition

I think another option is to try installing cert-manager separately first, and then installing harmony without cert-manager. I will try that when I get a chance.

@drrk
Copy link
Author

drrk commented May 24, 2023

Okay, I have it working by installing cert-manager first, then installing harmony, then manually adding the Issuer config. However, I think it might also work with my initial step of just adding to the helm command line. The part I missed before is you need an additional DNS entry of app.<lmsfqdn> for cert-manager to get the certificate correctly.

I can do any more tests you need, but only for the next 10 day after which I will change job, but @amirtds should be able to followup.

@drrk
Copy link
Author

drrk commented May 24, 2023

My process was as follows

helm repo add jetstack https://charts.jetstack.io
helm repo update
helm install \
  cert-manager jetstack/cert-manager \
  --namespace cert-manager \
  --create-namespace \
  --version v1.11.1 \
  --set installCRDs=true \
  --set global.leaderElection.namespace=cert-manager

After this completes successfully, harmony should be installed, with cert-manager.enabled: false set in the values.yaml as documented in GitHub - openedx/openedx-k8s-harmony: A Prototype Helm Chart for deploying multiple Open edX instances (via Tutor) onto a cluster.

Once this is complete, the cert-manager issuer config is needed based on this template: openedx-k8s-harmony/issuer.yaml at main · openedx/openedx-k8s-harmony

This needs to be installed after the harmony chart, as it depends on nginx-ingress

An example file (named issuer.yaml) is:

apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: harmony-letsencrypt-global
spec:
  acme:
    email: [email protected]
    preferredChain: ""
    privateKeySecretRef:
      name: harmony-letsencrypt-global
    server: https://acme-v02.api.letsencrypt.org/directory
    solvers:
    - http01:
        ingress:
          class: nginx

which is installed with kubectl apply -f issuer.yaml

@bradenmacdonald
Copy link
Contributor

Thanks for the updates @drrk! I'm sorry for the delay here; I'll try to incorporate this next week.

@drrk
Copy link
Author

drrk commented May 31, 2023

No worries at all. As I said before, Friday is my last day at Appsembler, and thus working with Open edX for now, but hopefully this will help others. I know others at Appsembler will be following up too.

@felipemontoya
Copy link
Member

@drrk nothing has moved in this issue for a while and nobody from Appsembler has reached out. Are you ok if we close this issue for the time being?

@drrk
Copy link
Author

drrk commented Oct 3, 2023 via email

@felipemontoya
Copy link
Member

Thanks. Closing now

@felipemontoya felipemontoya closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants