Skip to content

Commit f20ca36

Browse files
Merge pull request #54 from OS2iot/stage
Release stage into master
2 parents a5cde9b + fed7ffe commit f20ca36

File tree

4 files changed

+56
-9
lines changed

4 files changed

+56
-9
lines changed

source/installation-guide/installation-guide.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ Steps
7777

7878
iv. Chirpstack Gateway (UDP from gateways to Chirpstack): 1700
7979

80+
7. For communicating with the chirpstack api, which is necessary for OS2IoT to work, it is necessary to create a api key on Chirpstack, which you must insert in the environment variable: :code:`CHIRPSTACK_API_KEY`.
81+
Access the chirpstack page on http://localhost:8080, navigate to API Keys under Network Server in the sidebar, and create the api key. After this, you must create an .env file where you fill out the :code:`CHIRPSTACK_API_KEY` with the api key created in chirpstack.
82+
8083
Troubleshooting
8184
^^^^^^^^^^^^^^^
8285

@@ -264,6 +267,51 @@ OS2IoT-backend takes several environment variables as configuration, if these ar
264267
| CHIRPSTACK_PORT | Chirpstack port | :code:`8080` |
265268
+-------------------------------+------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
266269
270+
We recommend disabling the HTTP "Server" header in your responses, as it can reveal information that may expose your application to vulnerabilities.
271+
The following example demonstrates how to disable the HTTP "Server" header when running in Kubernetes with an Istio setup.
272+
273+
Create a new file named envoyfilter.yaml and place it in the helm/template directory.
274+
275+
a. Add the following content to envoyfilter.yaml:
276+
277+
.. code-block:: bash
278+
279+
apiVersion: networking.istio.io/v1alpha3
280+
kind: EnvoyFilter
281+
metadata:
282+
name: ef-removeserver
283+
namespace: {{ .Values.envoyFilter.namespace }}
284+
spec:
285+
configPatches:
286+
- applyTo: NETWORK_FILTER
287+
match:
288+
listener:
289+
filterChain:
290+
filter:
291+
name: "envoy.filters.network.http_connection_manager"
292+
patch:
293+
operation: MERGE
294+
value:
295+
typed_config:
296+
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager"
297+
server_header_transformation: PASS_THROUGH
298+
- applyTo: ROUTE_CONFIGURATION
299+
patch:
300+
operation: MERGE
301+
value:
302+
response_headers_to_remove:
303+
- "x-envoy-upstream-service-time"
304+
- "server"
305+
306+
2. In the values.yaml file for your backend Helm chart, add the following configuration:
307+
308+
.. code-block:: bash
309+
310+
# Add EnvoyFilter settings here
311+
envoyFilter:
312+
enabled: true # Set to 'false' to disable the filter
313+
namespace: "istio-system" # The namespace where the EnvoyFilter should be applied
314+
267315
Logs levels
268316
"""""""""""""""
269317
Specifying a LOG_LEVEL makes sure that only logs with that level or higher are included. Using 'debug' or 'verbose' LOG_LEVEL in a production environment is not recommended.

source/maintenance-guide/maintenance-guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ Setup developement
7676
To setup your dev environment please follow these instructions:
7777

7878
1. Get the solution from Github. Clone the OS2IoT-docker, OS2IoT-backend, and OS2IoT-frontend.
79-
2. Install typescript and angular globally on your computer.
80-
a. Angular 9 – install by open terminal and type :code:`npm install -g @angular/cli`
79+
2. Install typescript and Angular globally on your computer.
80+
a. Angular – Find the current Angular version in the package.json file, and install that Angular version by open terminal and type :code:`npm install -g @angular/cli@{{VERSION_NUMBER}}`
8181
b. Typescript – install by open terminal and type :code:`npm install -g typescript`
8282
3. For OS2IoT-frontend install dependencies and start
8383
a. Navigate terminal to the OS2IoT-frontend folder and type :code:`npm install`

source/programming-guidelines/programming-guidelines.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Form and style
2727

2828
- Each logical component is in its own file.
2929

30-
- Indentation is 4 spaces
30+
- Indentation is 2 spaces
3131

32-
- Lines should be broken if they exceed 160 characters
32+
- Lines should be broken if they exceed 120 characters
3333

3434
- Only have one declaration pr. Line
3535

@@ -43,7 +43,7 @@ orchestration using docker.
4343
Front-end
4444
^^^^^^^^^
4545

46-
Angular 9 is used for the frontend. The file structure described in the
46+
Angular is used for the frontend. The file structure described in the
4747
Angular documentation will be used. This can be seen here:
4848
https://angular.io/guide/file-structure
4949

@@ -112,7 +112,7 @@ SIG is used to weekly evaluate code-quality: https://www.softwareimprovementgrou
112112
Front-end – Programming standards
113113
---------------------------------
114114

115-
The frontend code is written in TypeScript [2]_ (Angular 9). In the
115+
The frontend code is written in TypeScript [2]_ (Angular). In the
116116
project ESLint [3]_ is setup to lint the code for preventable and/or
117117
syntax related errors. To keep code formatting consistent Prettier [4]_ is used to format the code.
118118
We try to follow the do’s and don’ts of TypeScript

source/user-interface-guidelines/user-interface-guidelines.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,9 +365,8 @@ JavaScript
365365
~~~~~~~~~~
366366

367367
In accordance with the Angular best practices TypeScript is used and
368-
compiled to JavaScript. As of the date of writing this document the
369-
newest version of Angular (9.1) uses TypeScript 3.8. This supports the
370-
newest browsers in accordance with the agreement with the customer and
368+
compiled to JavaScript. The current version of Angular and Typescript is found in the package.json file.
369+
This supports the newest browsers in accordance with the agreement with the customer and
371370
thus this is used.
372371

373372
.. _in-general-2:

0 commit comments

Comments
 (0)