HewlettPackard / squest

Service request portal on top of Ansible Tower/AWX
https://hewlettpackard.github.io/squest/latest
Apache License 2.0
297 stars 53 forks source link

Kubernetes - django error during installation #793

Closed Scregneugneu closed 2 months ago

Scregneugneu commented 2 months ago

Hello,

I try to install SQUEST on k3s but during the installation, I got this error message :

TASK [squest_k8s : Django env as config map] [WARNING]: Unable to find '/path/to/id_ed25519_squest_k8s_dev' in expected paths (use -vvvvv to see paths) fatal: [localhost]:

FAILED! => {"msg": "An unhandled exception occurred while templating '{'image': 'quay.io/hewlettpackardenterprise/squest:latest', 'ingress': {'enabled': True, 'host': 'squest.{{ k8s_cluster_fqdn }}', 'annotations': {'kubernetes.io/ingress.class': 'nginx', 'ingress.kubernetes.io/ssl-redirect': 'true', 'nginx.ingress.kubernetes.io/backend-protocol': 'HTTP'}}, 'env': {'TZ': 'Europe/Paris', 'DB_HOST': 'mariadb', 'DB_PORT': '3306', 'REDIS_CACHE_HOST': 'redis-standalone', 'DEBUG': 'true', 'DB_USER': '{{ squest_db.user }}', 'DB_PASSWORD': '{{ squest_db.password }}', 'WAIT_HOSTS': 'mariadb:3306,rabbitmq:5672'}, 'backup': {'enabled': False, 'crontab': '0 1 * * *'}, 'externalize_backup_via_rsync': {'enabled': False, 'crontab': '30 1 * * *', 'private_ssh_key': \"{{ lookup('file', '/path/to/id_ed25519_squest_k8s_dev') + '\\n' }}\", 'ssh_user': 'squest_k8s_dev', 'ssh_server': 'remote.server.ssh.net', 'remote_path': '/backup/squest_k8s_dev/'}}'. Error was a <class 'ansible.errors.AnsibleError'>,

original message: An unhandled exception occurred while running the lookup plugin 'file'. Error was a <class 'ansible.errors.AnsibleError'>, original message: could not locate file in lookup: /path/to/id_ed25519_squest_k8s_dev"}

Indeed, the file "id_ed25519_squest_k8s_dev" doesn't exist and the path "/path/to" doesn't exist to. I want to modify this path, but I don't know to which file I have to make it go, since the file have a specific name "id_ed25519...".

I'm not even sure this section of yaml is "use" because "externalize_backup_via_rsync" is false :

env: # squest settings TZ: "Europe/Paris" DB_HOST: "mariadb" DB_PORT: "3306" REDIS_CACHE_HOST: "redis-standalone" DEBUG: "true" DB_USER: "{{ squest_db.user }}" DB_PASSWORD: "{{ squest_db.password }}" WAIT_HOSTS: "mariadb:3306,rabbitmq:5672" backup: # backup squest db and media to a PVC enabled: false crontab: "0 1 " externalize_backup_via_rsync: # rsync backup files into and external server enabled: false crontab: "30 1 " private_ssh_key: "{{ lookup('file', '/path/to/id_ed25519_squest_k8s_dev') + '\n' }}" ssh_user: "squest_k8s_dev" ssh_server: "remote.server.ssh.net" remote_path: "/backup/squest_k8s_dev/"

I add # in front of every line for "backup" and "externalize_backup_via_rsync", but could you help me with this error ? I mean, if it's an important part, it's better to make it work instead of bypass it :)

Sispheor commented 2 months ago

Be careful @Scregneugneu with the provided link by @abdulhkeemGit . The account seems weird.

Scregneugneu commented 2 months ago

Yes, his answer look a bit weird, I didn't click on it :)

a-belhadj commented 2 months ago

Try to put the private ssh key that is allowed to connect into your remote backup system (in ~/.ssh/authorized_keys) here: https://github.com/HewlettPackard/squest/blob/17a0bb5b4c75c7b9e336baf14dbda6a31fd73167/k8s/inventory/group_vars/all/squest.yml#L66

Full documentation here: https://hewlettpackard.github.io/squest/2.6.0/administration/backup/#externalize-backup-via-ssh This part is optional and can be skipped for testing

Scregneugneu commented 2 months ago

Oh ok, thanks for your answer. I don't have remote backup system, I'll delete this section then and try to resolve my new error during the "Wait until Django deployment available" part :)

Have a good day :)

Sispheor commented 2 months ago

Hope it's now working for you. I close this issue. Feel free to comment again if needed.