-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from industrial-edge/dev-v1.3
Updates for V1.3
- Loading branch information
Showing
10 changed files
with
339 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"uischema":{ | ||
"type": "Group", | ||
"elements": [ | ||
{ | ||
"type": "Group", | ||
"elements": [ | ||
{ | ||
"type": "Control", | ||
"scope": "#/properties/MQTT_IP" | ||
}, | ||
{ | ||
"type": "HorizontalLayout", | ||
"elements": [ | ||
{ | ||
"type": "Control", | ||
"scope": "#/properties/MQTT_USER" | ||
}, | ||
{ | ||
"type": "Control", | ||
"scope": "#/properties/MQTT_PASSWORD" | ||
} | ||
] | ||
} | ||
], | ||
"label": "IE Databus credentials" | ||
}, | ||
{ | ||
"type": "Group", | ||
"elements": [ | ||
{ | ||
"type": "HorizontalLayout", | ||
"elements":[ | ||
{ | ||
"type": "Control", | ||
"scope": "#/properties/TOPIC_1" | ||
}, | ||
{ | ||
"type": "Control", | ||
"scope": "#/properties/TOPIC_2" | ||
} | ||
] | ||
} | ||
], | ||
"label": "IE Databus topics" | ||
} | ||
] | ||
}, | ||
"dataschema":{ | ||
"type": "object", | ||
"properties": { | ||
"TOPIC_1": { | ||
"title": "Topic 1", | ||
"default": "topic1", | ||
"type": "string" | ||
}, | ||
"TOPIC_2": { | ||
"title": "Topic 2", | ||
"default": "topic2", | ||
"type": "string" | ||
}, | ||
"MQTT_IP": { | ||
"title": "MQTT Broker", | ||
"default": "ie-databus", | ||
"type": "string" | ||
}, | ||
"MQTT_USER": { | ||
"title": "Username", | ||
"type": "string" | ||
}, | ||
"MQTT_PASSWORD": { | ||
"title": "Password", | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["TOPIC_1", "TOPIC_2", "MQTT_IP", "MQTT_USER", "MQTT_PASSWORD"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,36 @@ | ||
|
||
# ------ STAGE 1 (build container) --------------------- | ||
|
||
FROM ubuntu:20.04 as build-env | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
RUN apt update && apt install -y build-essential gcc-9 make cmake libssl-dev libjson-c-dev git | ||
|
||
# download mqtt client library | ||
RUN git clone https://github.com/eclipse/paho.mqtt.c.git | ||
|
||
|
||
#Compile paho library from sources | ||
# compile paho library from sources | ||
RUN cmake -DPAHO_ENABLE_TESTING=FALSE -DPAHO_BUILD_STATIC=TRUE -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_SAMPLES=FALSE paho.mqtt.c/ | ||
RUN cd paho.mqtt.c/ && make install && cd / | ||
|
||
|
||
# copy source files into filesystem of container | ||
ADD . /src | ||
RUN cd /src && cmake . && make | ||
|
||
# build code | ||
RUN cd /src && cmake . && make | ||
|
||
FROM ubuntu:20.04 | ||
|
||
#install the libssl-dev and libjson-c-dev package | ||
RUN apt update && apt install -y libssl-dev libjson-c-dev | ||
#copy the compiled application and library from the build image to the applciation image | ||
COPY --from=build-env /src/paho_pingpong / | ||
COPY --from=build-env /usr/local/lib/libpaho-mqtt3as.so.1 / | ||
# ------ STAGE 2 (application container) ----------------- | ||
|
||
FROM ubuntu:20.04 | ||
|
||
#install the libssl-dev and libjson-c-dev package | ||
# install the libssl-dev and libjson-c-dev package | ||
RUN apt update && apt install -y libssl-dev libjson-c-dev | ||
|
||
#copy the compiled application and library from the build image to the applciation image | ||
# copy the compiled application and library from the build image to the applciation image | ||
COPY --from=build-env /src/paho_pingpong / | ||
COPY --from=build-env /usr/local/lib/libpaho-mqtt3as.so.1 /usr/local/lib | ||
RUN export LD_LIBRARY_PATH=/usr/local/lib && ldconfig | ||
|
||
|
||
# run application | ||
CMD ["./paho_pingpong"] |
Oops, something went wrong.