I am facing some issue while deploying community b...
# umh-support
c
I am facing some issue while deploying community broker (Hive-Mq ) on k8s. My problem is I am unable to config the extensions to autheticate the mqtt clients. For this deployment i am not using helm chart instead i am using normal manifest files to deploy as pods in cloud. I added my jar file to extension folder and deploy as a custom docker image and other files like extension.-config, hivemq-extension.xml as a configmap and mount to path "/opt/hivemq/extensions/hivemq-file-rbac-extension" . I did credentials.xml as secret to "/opt/hivemq/extensions/hivemq-file-rbac-extension" when we start broker by default the hivemq looks for extension folder and authecticate the clients . Meanwhile i am facing the issue when i mount to subpath i am unable to do that it overwrites the extension folder that contains jar file . I am still able to see the credentials is there any way to hide the secrets .? . Please find the below attachement link for my sample repo and if you don't understand i can try to write my query better. Here is my repo https://github.com/chinnu0209/hivemqce-k8s , please read the goal folder to understand what the problem is about and what i want to achieve finally. If there any sample repos please share me i can look into that. I would like to hear from you soon.
there is some Helm templating in it, but I am sure if you know Kubernetes that you are able to fill them out
we also used extensions
for example, look at these lines: lifecycle: postStart: exec: command: [ null, null, null ]
c
Thanks @Jermuk but i am not good in helm , but i have worked with k8s , can you give more explanation how i can achieve this .
j
Helm is actually quite easy. you just need to replace the stuff in the curly brackets {{ }} with the entries in the values.yaml (https://github.com/united-manufacturing-hub/united-manufacturing-hub/blob/main/deployment/united-manufacturing-hub/values.yaml)
you can basically copy a lot from there
c
yes when ever we have custom we update our values.yaml and pass helm add like that but for my project i am not going for helm deployment .
j
to convert helm to kubernetes manifests, you can use this command
helm install --dry-run --debug
https://helm.sh/docs/chart_template_guide/debugging/
c
When i see the mount path name but i did find where you defined the name like usally we defined volume and give to volume mounts right but in the statefulset i didnt see that , can you guide me
Thanks
if i try with your helm template i can get manifest individually .?
@Jermuk when i use this command helm template united-manufacturing-hub https://repo.umh.app --output-dir C:\Users\eedag\Documents\LocalGit\Helm\hivemq-extension\my-chart , it shows non-absolute URLs should be in form of repo_name/path_to_chart, got: https://repo.umh.app when i go to link nothing there
can you please help me why this happend ..?
@Scarjit can you please answer ..
j
the command should be like helm template united-manufacturing-hub united-manufacturing-hub
and previously you just download the chart by using helm repo add
to be honest, this is a community and we love to help you. but this is the non-commercial part and you tagged the personal account of someone. forcing people to answer you in their free-time most likely makes them not answer to you anymore. you did not buy any software from anyone here, so nobody needs to help you. we just love to help people that are asking nicely 🙂
f
@chinnu6273 Please do not tag @Scarjit , but use my UMH account ( @Ferdinand ) Getting hive to work with rbac inside kubernetes was a bit tricky. What we are doing, is using an init container, to setup the extensions (https://github.com/united-manufacturing-hub/united-manufacturing-hub/blob/main/deployment/hivemq-init/Dockerfile & https://github.com/united-manufacturing-hub/united-manufacturing-hub/blob/main/deployment/hivemq-init/runner.sh) We then are able, to simply mount or configs (https://github.com/united-manufacturing-hub/united-manufacturing-hub/blob/main/deployment/united-manufacturing-hub/templates/hivemq/statefulset.yaml#L93C11-L103) and using a postStart exec, we copy the credentials.xml (https://github.com/united-manufacturing-hub/united-manufacturing-hub/blob/main/deployment/united-manufacturing-hub/templates/hivemq/statefulset.yaml#L155-L163), since some of the folders where not present during the init container execution. Anyways, back to the topic: Taking a look at your deploy,yaml, it looks like you are mounting the credential files into the wrong folder. Have you tried mounting it to /opt/hivemq/extensions/hivemq-file-rbac-extension/credentials.xml ? If so, what was the error ?
c
@Jermuk sorry jermuk.
@Ferdinand Sorry for that and Thanks for mention and suggestion. I tried to mout the credentials at "/opt/hivemq/extensions/hivemq-file-rbac-extension/credentials.xml" what excatly the problem when i mount this credentials old files got overwrite to the existing files . when i start pod logs showing there was no extension (jar) file. I followed this thread https://github.com/hivemq/hivemq-file-rbac-extension/issues/3. Thanks for the init container idea , i will try to understand the setup and implement. If i get any errors i will ask here with official umh accounts , please dont take this to heart that wantedly i didnt do that . Hope you understand . Thanks ..
2 Views