European_Backpackers
所属分类:土木工程
开发工具:HCL
文件大小:0KB
下载次数:0
上传日期:2023-09-07 07:24:58
上 传 者:
sh-1993
说明: 欧洲背包客项目是如何实现地形架构的简单演示。,
(The European Backpackers Project is a simple demonstration how to implement a Terraform architecture.,)
文件列表:
DynamoDB/ (0, 2023-09-19)
DynamoDB/.terraform.lock.hcl (2487, 2023-09-19)
DynamoDB/main.tf (932, 2023-09-19)
DynamoDB/outputs.tf (701, 2023-09-19)
DynamoDB/variables.tf (0, 2023-09-19)
DynamoDB/versions.tf (228, 2023-09-19)
Terraform-EB/ (0, 2023-09-19)
Terraform-EB/.terraform.lock.hcl (1407, 2023-09-19)
Terraform-EB/apigw.tf (2402, 2023-09-19)
Terraform-EB/lambda-zip/ (0, 2023-09-19)
Terraform-EB/lambda-zip/get_cities.zip (372, 2023-09-19)
Terraform-EB/lambda-zip/import_cities.zip (597, 2023-09-19)
Terraform-EB/lambda-zip/post_city.zip (613, 2023-09-19)
Terraform-EB/main.tf (1956, 2023-09-19)
Terraform-play/ (0, 2023-09-19)
Terraform-play/APIGW/ (0, 2023-09-19)
Terraform-play/APIGW/.terraform.lock.hcl (1407, 2023-09-19)
Terraform-play/APIGW/main.tf (2286, 2023-09-19)
Terraform-play/DB/ (0, 2023-09-19)
Terraform-play/DB/.terraform.lock.hcl (1407, 2023-09-19)
Terraform-play/DB/main.tf (424, 2023-09-19)
Terraform-play/S3-AN/ (0, 2023-09-19)
Terraform-play/S3-AN/.terraform.lock.hcl (1377, 2023-09-19)
Terraform-play/S3-AN/iam.tf (285, 2023-09-19)
Terraform-play/S3-AN/main.tf (1056, 2023-09-19)
Terraform-play/S3-AN/templates/ (0, 2023-09-19)
Terraform-play/S3-AN/templates/s3-policy.json (910, 2023-09-19)
Terraform-play/S3-Hosting-Karte/ (0, 2023-09-19)
Terraform-play/S3-Hosting-Karte/.terraform.lock.hcl (1377, 2023-09-19)
Terraform-play/S3-Hosting-Karte/main.tf (4034, 2023-09-19)
Terraform-play/S3-Hosting-Karte/project-cities-map/ (0, 2023-09-19)
Terraform-play/s3/ (0, 2023-09-19)
Terraform-play/s3/.terraform.lock.hcl (2422, 2023-09-19)
Terraform-play/s3/cities-reduced.json (382582, 2023-09-19)
Terraform-play/s3/european-cities-list.json (366249, 2023-09-19)
Terraform-play/s3/main.tf (853, 2023-09-19)
Terraform-templates/ (0, 2023-09-19)
Terraform-templates/.terraform.lock.hcl (1406, 2023-09-19)
... ...
# The European Backpackers Project
## Frontend
Frontend Project at https://github.com/n9br/map-display-osm-ol
## Please make sure you have met the following requirements:
### 1. What need to be installed?:
- [Python](https://www.python.org/downloads/) required is [ version >=3 ] and pip package manager for Python [ >=20 ]
- run: ```python --version``` ...on your comandline to see if the version meets the requirement.
- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) [ version >= 2 ] You need an AWS account, or at least have access to one.
- run: `aws sts get-caller-identity` ...on your comandline to get the S-ecurity T-oken S-ervice identity informations...
- [Terraform](https://developer.hashicorp.com/terraform/downloads) [ version >= 5 ] The common notation for "greater than or equal to" in terraform is: "~> 5.0"
- run: `terraform version` ...and:
- run: `terraform init` ...on your commandline to validate the version, and initialize [ in the right folder ] the terraform project.
### 2. Place your credentials in the following file:
- consider storing your AWS Credentials in `~/.aws/config`[^1] using `aws_access_key_id`, `aws_secret_access_key`, and `aws_session_token`
- [ The [Terraform](https://github.com/jamigeo/European_Backpackers/tree/main/Terraform%20templates/credentials.txt) access data is usually stored in a separate file that ends with the file extension: `.tfvars` ] Please keep them safe, because big solutions are also big responsibilities[.](images/stand_alone.jpg)
### 3. The knowlegde of the data structure underlying the project:
- The [JSON](data_structure.json) data structure on which this project is based, must have a [marshalled](https://en.wikipedia.org/wiki/Marshalling_(computer_science)) JSON format for import into the [DynamoDB](https://github.com/jamigeo/European_Backpackers/tree/main/Terraform%20templates/dynamodb.tf) database. Otherwise the import from the [s3](https://github.com/jamigeo/European_Backpackers/tree/main/Terraform%20templates/s3.tf) bucket is not possible. Please take care of it.
| Table | Field | Type | Maps | Types |
| ------- | ---------------- | ------- | ------ | ------- |
| cities | | | | |
| | name | string | | |
| | country | string | | |
| | population | integer | | |
| | average age | float | | |
| | area | float | | |
| | founding year | date | | |
| | population density | integer | | |
| | districts | integer | | |
| | transportation | Map (M) | | |
| | | | | |
| | subway connections | Map (M) | | |
| | | | | |
| | | north | integer | |
| | | south | integer | |
| | | east | integer | |
| | | west | integer | |
| | train connections | Map (M) | | |
| | | | | |
| | | north | integer | |
| | | south | integer | |
| | | east | integer | |
| | | west | integer | |
| | highway connections | Map (M) | | |
| | | | | |
| | | north | integer | |
| | | south | integer | |
| | | east | integer | |
| | | west | integer | |
| | airports | List (L) | | |
| | | [0] | string | |
| | geography | Map (M) | | |
| | | | | |
| | | latitude | float | |
| | | longitude | float | |
| | | nearest city distance km | Map (M) | |
| | | | value | float |
| | | | unit | string |
| | | rivers | List (L) | |
| | | | [0] | string |
| | | elevation meters | integer | |
| | | max daily temperature celsius | double | |
| | | min daily temperature celsius | double | |
| | | precipitation | string | |
| | | rainy days | integer | |
| | | monthly sunshine hours | integer | |
| | coat of arms image path | string | | |
#### 3.1 AWS Infrastructure we are creating
* API Gateway (not yet)
* retrieve new API Endpoint with Powershell:
$($api | ConvertFrom-Json).Items.ApiEndpoint
or more precise:
aws apigatewayv2 get-apis --query 'Items[?Name==`api-cities`].ApiEndpoint'
* Lambda functions:
GET-cities
POST-city
import-cities (von s3)
* DynamoDB Table
> Name : 'european-cities'
> Key : 'name'
### 4. File Structure
- Working Directory: Terraform-EB
- edit variables.tf
[^1]: Wichtig ist es zu beachten, dass diese Funote auch irgendwann einen Sinn bekommt...
近期下载者:
相关文件:
收藏者: