Skip to content

Cloud infrastructure for reading RFID tags / [PT-BR] Infraestrutura em nuvem para leitura de tags RFID

Notifications You must be signed in to change notification settings

yagoluiz/rfid-reader-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infrastructure RFID Tag Reading

Terraform CI

Infrastructure RFID Tag Reading, implemented after Master's Work.

Project architecture

This repository provides the implementation of infrastructure of the projects rfid-reader-middleware, rfid-reader-api and rfid-reader-web.

Project structure

The infrastructure was organized through modules.

├── src
    ├── modules (resources)
        ├── container
        ├── databases
        ├── functions
        ...
    ├── main.tf (execute modules)
    ├── outputs.tf (connections)
    ├── provider.tf (Azure)
...

Master's work

See the work repository for more details of the project.

Technologies

  • Terraform (Azure Provider)
  • Azure CLI

Instructions for run project

  1. Install Terraform

  2. Install Azure CLI

  3. Azure account login

az login

  1. (Optional) Create service principal credentials for Azure authentication

az ad sp create-for-rbac --name "{NAME}" --role contributor --scopes /subscriptions/{YOUR_AZURE_SUBSCRIPTION_ID}

Result create service principal:

{ 
  "clientId": "{AZURE_CLIENT_ID}",
  "clientSecret": "{AZURE_CLIENT_SECRET}",
  "subscriptionId": "{AZURE_SUBSCRIPTION_ID}",
  "tenantId": "{AZURE_TENANT_ID}",
  "activeDirectoryEndpointUrl": "https://login.microsoftonline.com",
  "resourceManagerEndpointUrl": "https://management.azure.com/",
  "activeDirectoryGraphResourceId": "https://graph.windows.net/",
  "sqlManagementEndpointUrl": "https://management.core.windows.net:8443/",
  "galleryEndpointUrl": "https://gallery.azure.com/",
  "managementEndpointUrl": "https://management.core.windows.net/"
}

Use variables clientId, clientSecret, subscriptionId and tenantId in provider:

provider "azurerm" {
  version         = ">= 2.0.0"
  subscription_id = var.subscription_id
  client_id       = var.client_id
  client_secret   = var.client_secret
  tenant_id       = var.tenant_id
  features {}
}

In this project the variables are in GitHub Secrets.

  1. In path src in project root execute desired the commands Terraform

terraform init (install modules and provider)

terraform validate (validate scripts)

terraform apply (apply infrastructure)

terraform destroy (remove infrastructure)

More commands.

[PT-BR] Infraestrutura de Leitura de Tags RFID

Infraestrutura de Leitura de Tags RFID, implementado após trabalho de Mestrado.

Arquitetura do projeto

Este repositório apresenta a implementação de toda infraestrutura dos projetos rfid-reader-middleware, rfid-reader-api e rfid-reader-web.

Estrutura do projeto

A infraestrutura foi organizada através de módulos.

├── src
    ├── modules (recursos)
        ├── container
        ├── databases
        ├── functions
        ...
    ├── main.tf (executar módulos)
    ├── outputs.tf (conexões)
    ├── provider.tf (Azure)
...

Trabalho de Mestrado

Consulte o repositório do trabalho para mais detalhes do projeto.

Tecnologias

  • Terraform (Azure Provider)
  • Azure CLI

Instruções para execução do projeto

  1. Instalar Terraform

  2. Instalar Azure CLI

  3. Logar em uma conta Azure

az login

  1. (Opcional) Criar credenciais service principal para autenticação no Azure

az ad sp create-for-rbac --name "{NAME}" --role contributor --scopes /subscriptions/{SEU_AZURE_SUBSCRIPTION_ID}

Resultado da criação do service principal:

{
  "clientId": "{AZURE_CLIENT_ID}",
  "clientSecret": "{AZURE_CLIENT_SECRET}",
  "subscriptionId": "{AZURE_SUBSCRIPTION_ID}",
  "tenantId": "{AZURE_TENANT_ID}",
  "activeDirectoryEndpointUrl": "https://login.microsoftonline.com",
  "resourceManagerEndpointUrl": "https://management.azure.com/",
  "activeDirectoryGraphResourceId": "https://graph.windows.net/",
  "sqlManagementEndpointUrl": "https://management.core.windows.net:8443/",
  "galleryEndpointUrl": "https://gallery.azure.com/",
  "managementEndpointUrl": "https://management.core.windows.net/"
}

Utilize variáveis clientId, clientSecret, subscriptionId e tenantId no provider:

provider "azurerm" {
  version         = ">= 2.0.0"
  subscription_id = var.subscription_id
  client_id       = var.client_id
  client_secret   = var.client_secret
  tenant_id       = var.tenant_id
  features {}
}

Neste projeto as variáveis estão no GitHub Secrets.

  1. Na pasta src na raíz do projeto executar os comandos Terraform desejados

terraform init (iniciar modulos e provider)

terraform validate (validar scripts)

terraform apply (aplicar infraestrutura)

terraform destroy (remover infraestrutura)

Mais comandos.

About

Cloud infrastructure for reading RFID tags / [PT-BR] Infraestrutura em nuvem para leitura de tags RFID

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages