You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guide/install/building-from-source.md
+80-31Lines changed: 80 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,44 +10,61 @@ description: Building ThingsBoard IoT platform from sources
10
10
* TOC
11
11
{:toc}
12
12
13
-
This guide will help you to download and build ThingsBoard from sources. Instructions listed below are tested on Ubuntu 24.04 LTS
14
-
and CentOS 8/9
13
+
This guide will help you to download and build ThingsBoard from source code.
14
+
15
+
Instructions listed below are tested on Ubuntu 24.04 LTS and CentOS 8/9.
16
+
17
+
<hr>
15
18
16
19
## Required tools
17
20
18
21
This section contains installation instructions for build tools.
19
22
20
-
### Java
23
+
<b><fontsize="4">Java</font></b>
24
+
ThingsBoard is built using **Java 17**.
25
+
26
+
Install Java 17 using these instructions:
27
+
28
+
-[Install Java 17 on Ubuntu](/docs/user-guide/install/ubuntu/#step-1-install-java-17-openjdk){:target="_blank"}
21
29
22
-
ThingsBoard is built using Java 17. You can use [following instructions](/docs/user-guide/install/ubuntu/#step-1-install-java-17-openjdk) to install Java 17.
**Please note** that Maven installation may set Java 7 as a default JVM on certain Linux machines.
34
-
Use Java installation [instructions](#java) to fix this.
45
+
> Note: On certain Linux machines, Maven installation may set Java 7 as the default JVM. If this happens, reconfigure your system to use Java 17.
46
+
47
+
<hr>
35
48
36
49
## Source code
37
50
38
-
{% capture windows_line_endings %}
39
-
**NOTE: Building Docker image on Windows machine**
51
+
{% capture difference %}
52
+
**Important:** Building Docker images on Windows requires **LF** line endings.
53
+
54
+
To build Docker image, certain scripts, configuration files and sources that will be a part of the Docker image must have **LF** line endings.
40
55
41
-
To build Docker image, certain scripts, configuration files and sources that will be a part of the Docker image must have **LF** line endings.
42
-
So before cloning the repo set to _input_ the Git [core.autocrlf](https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf) configuration option.
56
+
So before cloning the repo set to _input_ the Git [core.autocrlf](https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf){:target="_blank"} configuration option.
You can find debian, rpm and windows packages in the target folder:
113
+
After a successful build, installation packages are available in:
82
114
83
115
```bash
84
116
application/target
85
117
```
86
118
{: .copy-code}
87
119
88
-
## Running tests
120
+
This directory contains:
121
+
- <spanclass="code-light">.deb</span> packages for Debian/Ubuntu
122
+
- <spanclass="code-light">.rpm</span> packages for CentOS/RHEL
123
+
- Windows installation packages
89
124
90
-
We are using [Docker](https://docs.docker.com/engine/install/) and [Docker Compose](https://docs.docker.com/compose/install/) to run all kinds of integration and [black-box tests](https://github.com/thingsboard/thingsboard/tree/master/msa/black-box-tests).
125
+
## Running tests (Optional)
91
126
92
-
Please, manage[Dockeras a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user) to run tests properly.
127
+
This requires[Docker](https://docs.docker.com/engine/install/){:target="_blank"} and [Docker Compose](https://docs.docker.com/compose/install/){:target="_blank"}. Make sure [Docker is configured to run as a non-root user](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user){:target="_blank"}.
93
128
94
-
Master and release branches are already tested, so you can skip tests and avoid installing Docker as well.
129
+
> **Note:**Master and release branches are already tested, so you can skip tests and avoid installing Docker as well.
95
130
96
-
Run all unit and integration tests:
131
+
<b><fontsize="4">Unit and integration tests</font></b>
97
132
133
+
Run all unit and integration tests:
98
134
```bash
99
135
mvn clean install
100
136
```
101
137
{: .copy-code}
102
138
103
-
To run black-box tests, please refer [black-box tests readme](https://github.com/thingsboard/thingsboard/blob/master/msa/black-box-tests/README.md).
139
+
<b><fontsize="4">Black-box tests</font></b>
104
140
105
-
Estimated time is about 1 hour on AMD Ryzen 5 3600 (6-cores), 32GB DDR4, fancy SSD and shiny weather. Actual time may vary and depends on particular hardware performance.
141
+
Black-box tests are located in [https://github.com/thingsboard/thingsboard/tree/master/msa/black-box-tests](https://github.com/thingsboard/thingsboard/tree/master/msa/black-box-tests){:target="_blank"}
142
+
143
+
Follow the instructions in the corresponding [README](https://github.com/thingsboard/thingsboard/blob/master/msa/black-box-tests/README.md){:target="_blank"} to execute them.
144
+
145
+
> Estimated runtime is approximately 1 hour, depending on hardware performance.
106
146
107
147
## Tips and tricks
108
148
@@ -134,12 +174,21 @@ Here are some tips and tricks to boost build experience:
134
174
```
135
175
{: .copy-code}
136
176
137
-
## Build and runtime errors
177
+
## Common build and runtime errors
178
+
179
+
<b><fontsize="4">Docker runtime error</font></b>
138
180
139
-
- If you see such errors when running locally-built Docker image, re-clone the repo with **LF**[file ending](https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf) and re-build the image.
140
-
To fix this read [Source code](#source-code) section.
181
+
If you see the following error when running a locally built Docker image:
141
182
142
183
```bash
143
184
Standard_init_linux.go:175 exec user process caused no such file
144
185
```
145
-
{: .copy-code}
186
+
187
+
This usually indicates incorrect [line endings](https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf){:target="_blank"}.
188
+
189
+
<b><fontsize="3">Solution:</font></b>
190
+
- Reconfigure Git to use LF line endings
191
+
- Re-clone the repository
192
+
- Rebuild the Docker images
193
+
194
+
Refer to the [Source code](#source-code) section above for details.
0 commit comments