Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

\uD83D\uDCD8 Instructions

  1. Get a local copy of the hivemq-operator Helm chart. This will create a directory “./hivemq-operator" in your working directory:

    helm pull hivemq/hivemq-operator --untar
  2. Go to the ./hivemq-operator/operator-tmpls and make a copy of the cluster-stateful-set.yaml in the same directory:

    cd ./hivemq-operator/operator-tmpls
    cp cluster-stateful-set.yaml my-cluster-stateful-set.yaml
  3. Update the configuration of the liveness and readiness probe from this:

              readinessProbe:
                exec:
                  command:
                    - /opt/hivemq/bin/readiness_probe.sh
                initialDelaySeconds: 3
                periodSeconds: 5
              livenessProbe:
                tcpSocket:
                  port: {{ util:getPort(spec, "mqtt").port }}
                initialDelaySeconds: 15
                periodSeconds: 30
                failureThreshold: 240

    to this:

              readinessProbe:
                httpGet:
                  path: /api/v1/health/readiness
                  port: 8889
                  scheme: HTTP
                initialDelaySeconds: 20
                periodSeconds: 5
              livenessProbe:
                httpGet:
                  path: /api/v1/health/liveness
                  port: 8889
                  scheme: HTTP
                initialDelaySeconds: 20
                periodSeconds: 30
                failureThreshold: 240
  4. Copy the values.yaml file to make updates in it:

    cd ./hivemq-operator
    cp values.yaml ../my-values.yaml
    cd ..
  5. Update the hivemq.cofingOverride in the my-values.yaml. Add the block that enables the Health API:

    hivemq:
      configOverride: |
        <hivemq>
            ... 
            ...
            <health-api>
                <enabled>true</enabled>
                <listeners>
                    <http>
                        <port>8889</port>
                        <name>health-api-listener</name>
                        <bind-address>0.0.0.0</bind-address>
                    </http>
                </listeners>
            </health-api>
        </hivemq>

  6. Deploy from the local directory and supply the updated controller template file and updated values.yaml file:

    cd ..
    helm upgrade hivemq --install ./hivemq-operator --namespace=hivemq \
      --values my-values.yaml \
      --set hivemq.controllerTemplate=my-cluster-stateful-set.yaml \
      --set global.rbac.pspEnabled=false

In case the installation process cannot complete, cannot spawn a hivemq pod, check the journalctl on the affected node for errors. To do that, find out which node the pod fails on, ssh to the Kubernetes node, run journalctl -f | grep hivemq and see which error(s) are there.

  • No labels