Docker Hub Authentification I have the Docker ima...
# umh-support
d
# Docker Hub Authentification I have the Docker image gontcharovd/highbyte:4.0.0 stored in my private Docker Hub repo I created a Kubernetes secret with the following command:
Copy code
bash
DOCKER_REGISTRY_SERVER=docker.io
DOCKER_USER=gontcharovd
[email protected]
DOCKER_PASSWORD=thisisnotmyrealpassword

sudo kubectl create secret docker-registry myregistrykey --docker-server=$DOCKER_REGISTRY_SERVER   --docker-username=$DOCKER_USER   --docker-password=$DOCKER_PASSWORD   --docker-email=$DOCKER_EMAIL  -n united-manufacturing-hub --kubeconfig /etc/rancher/k3s/k3s.yaml
# Persistent Volume Claim I created a PersistentVolumeClaim for HighByte based on the attached persistent-volume-claim.yaml file:
Copy code
sudo kubectl apply -f persistent-volume-claim.yaml --kubeconfig /etc/rancher/k3s/k3s.yaml
# Kubernetes Deployment I deployed the attached deployment.yaml file (based on the Docker command specified in the HighByte Docker documentation: https://guide.highbyte.com/setup/docker/):
Copy code
sudo kubectl apply -f deployment.yaml --kubeconfig /etc/rancher/k3s/k3s.yaml
I can see that the pod is created, but the pod fails to start up:
Copy code
sudo kubectl get pods -n united-manufacturing-hub --kubeconfig /etc/rancher/k3s/k3s.yaml
Copy code
NAME                                                              READY   STATUS      RESTARTS        AGE
united-manufacturing-hub-kafka-configuration-tbf2q                0/1     Completed   0               38d
...
highbyte-deployment-556444bcbc-zk7mv                              0/1     Pending     0               26m
...
# Troubleshooting This command does not return any output:
Copy code
sudo kubectl logs highbyte-deployment-556444bcbc-zk7mv -n united-manufacturing-hub --kubeconfig /etc/rancher/k3s/k3s.yaml
I suspect there's an authenticaton issue with Docker Hub, because the gontcharovd/highbyte:4.0.0 image shows 0 downloads. I'll investigate the further. Are there perhaps any obvious flaws you see in my workflow?
j
Hi, do you think it would be possible for me to get credentials to your docker registry? then I could try to do it myself
d
Yes, I'll send them to you
j
1. the PVC should have ReadWriteOnce (ReadWriteMany is not supported by k3s) 2. yaml vs yml as file ending (I assume you noticed this as well) --> image gets pulled correctly and it also works now. But you still need a service to access highbyte externally, let me create something for you
(ignore this)
that the service
Copy code
apiVersion: v1
kind: Service
metadata:
  name: highbyte-service
  namespace: united-manufacturing-hub
spec:
  selector:
    app: highbyte
  ports:
    - name: port-45245
      protocol: TCP
      port: 45245
      targetPort: 45245
    - name: port-1885
      protocol: TCP
      port: 1885
      targetPort: 1885
    - name: port-8885
      protocol: TCP
      port: 8885
      targetPort: 8885
  type: LoadBalancer
you can also put them all into a single file separated with
---
then to connect UMH broker use as IP: united-manufacturing-hub-mqtt
here also a small tutorial for example usage: 1. create input and output connection 2. create a model, ensure you also create a timestamp_ms 3. create an instance of the model, select stuff on the right and drag and drop into references of the model. for timestamp_ms you take a system variable datetime 4. create a pipeline that polls every second, reads then the instance, and writes into the output connection
it feels quite complex to be honest
d
Worked like a charm! Thank you for figuring it out Can you explain why we need both a LoadBalancer and a ClusterIP service?
j
ah sorry, you need to replace the ClusterIP with Loadbalancer
(i fixed it)
d
Can you help me interpret this error? The value looks like a float to me
I'm trying to do the string to float conversion in the HighByte Instance:
j
for _historian you need to follow the historian format. In MQTT explorer it does not look like you have timestamp_ms
(but it shows up in highbyte)
also I did not use expressions, I used models instead
d
So I mostly have it working. The problem now is that HighByte adds its own
_timestamp
value to the message (I checked it with the UMH MQTT broker as well as the built-in HighByte MQTT broker: the
_timestamp
appears in both cases). So far I haven't discovered a way to remove it
I got it working. I had to use the "Write New" node instead of the "Write" node. The latter adds this weird
_timestamp
topic and key-value pair. With the former, I can manually filter it out using the Attribute Filter. I read all the HighByte documentation and couldn't find anything related to
_timestamp
so I think this is a bug. I'll write them an email