Code Monkey home page Code Monkey logo

homeiot-proxy-smallrye's Introduction

homeiot-proxy-smallrye

Build prerequisites

Before building, install the following software.

  • OpenJDK 11
  • Maven

After installing the software, execute the following command.

$ mvn wrapper:wrapper

Prepare the client certificate file

To subscribe the MQTT broker(AWS IoT Core), need to identify the client. You have to copy the certificates to the resource directory.

  • AmazonRootCA1.pem: AWS CA Certificate
  • [ClientCert]-certificate.pem.crt: the client certificate
  • [ClientCert]-private.pem.key: the private key for the client certificate

Modify the application's property file

Modify the application.properties file.

  • mp.messaging.incoming.mqtt-broker.host
  • mp.messaging.incoming.mqtt-broker.client-id
  • mp.messaging.incoming.mqtt-broker.ssl.keystore.location
  • mp.messaging.incoming.mqtt-broker.ssl.keystore.password
  • tt.rest-client.keys=[KEY1],[KEY2],...,[KEYn]
  • tt.rest-client.[KEYn].url

Build

$ ./mvnw package

Run the service

To run the proxy service, execute this command.

$ /usr/bin/java -jar <BASE_DIR>/target/quarkus-app/quarkus-run.jar

Register to Systemd

$ cp -a  homeiot-proxy.service /etc/systemd/system/
$ systemctl enable homeiot-proxy

To run as a systemd service, execute the following command.

$ systemctl start homeiot-proxy

Check the logs

You can view the journal logs.

$ journalctl -u homeiot-proxy.service --no-pager --since="2023-01-27 18:00:00"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.