-
Notifications
You must be signed in to change notification settings - Fork 1
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 #7 from wizzdev-pl/devel
Merge-devel-v1.0.3
- Loading branch information
Showing
15 changed files
with
102 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ commit_hash.txt | |
#*moc* | ||
*.backup* | ||
*LOCAL* | ||
!locals.tf |
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
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
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 |
---|---|---|
|
@@ -9,21 +9,20 @@ The board was programmed using MicroPython, which is a Python implementation | |
for embedded devices. | ||
|
||
|
||
## Cloning repository | ||
To clone repository use following lines: | ||
```bash | ||
[email protected]:wizzdev/internal-projects/iot-starter.git | ||
cd iot-starter | ||
git submodule init | ||
git submodule update --init --recursive | ||
``` | ||
|
||
## Prerequisites | ||
|
||
Before compiling there are some packages required to install on the PC. Run the following command to install them: | ||
|
||
``` | ||
sudo apt-get install git wget bison gperf python python-pip python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools ninja-build libssl-dev | ||
sudo apt-get install git wget bison gperf python python-pip python3-virtualenv python-setuptools python-serial python-click python-cryptography python-future python-pyparsing python-pyelftools ninja-build libssl-dev | ||
``` | ||
|
||
## Cloning repository | ||
To clone repository use following lines: | ||
```bash | ||
git clone https://github.com/wizzdev-pl/iot-starter.git | ||
cd iot-starter | ||
git submodule init | ||
git submodule update --init --recursive | ||
``` | ||
|
||
To flash and debug device it is required to add user to dialout group: | ||
|
@@ -41,11 +40,11 @@ sudo usermod -a -G dialout $USER | |
## Installing | ||
### AWS configuration | ||
AWS's configuration is handled using terraform. Detailed description of this | ||
procedure is available in the ".terraform" directory. | ||
procedure is available in the "terraform" directory [here](terraform/README.md). | ||
|
||
### Flashing the board | ||
A dedicated Python script was prepared for this procedure. For more information, | ||
please go to the "MicroPython" directory. | ||
please go to the "MicroPython" directory [here](MicroPython/README.md). | ||
|
||
## Working with configured device | ||
After all these steps, the board should send data from the sensor into AWS. | ||
|
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,9 @@ | ||
# Create lambdas specific names | ||
# Due to the lack of consistency of naming on AWS, some names require only '-' and some require only '_' | ||
|
||
locals { | ||
lambda_collect_measurements_name = replace(var.lambda_collect_measurements.function_name, "_", "-") | ||
lambda_collect_measurements_name_ = replace(var.lambda_collect_measurements.function_name, "-", "_") | ||
lambda_health_check_name = replace(var.lambda_health_check.function_name, "_", "-") | ||
lambda_health_check_name_ = replace(var.lambda_health_check.function_name, "-", "_") | ||
} |
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,7 @@ | ||
# Create REST API specific names | ||
# Due to the lack of consistency of naming on AWS, some names require only '-' and some require only '_' | ||
|
||
locals { | ||
name = replace("${var.prefix}-${basename(var.rest_api_python_source_directory)}", "_", "-") | ||
s3_bucket_name = replace(var.rest_api_s3_bucket_name, "_", "-") | ||
} |
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
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
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 |
---|---|---|
|
@@ -9,4 +9,5 @@ requests==2.24.0 | |
flask-lambda-support==0.1.5 | ||
flask_jwt_extended==3.25.0 | ||
sentry_sdk==0.17.4 | ||
werkzeug | ||
werkzeug | ||
|