Skip to content

MariuszKu/azure-terraform-duckdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Architecture

1 4K6CLEHHFEui_qcTOKv6WA

To deply this code in your enviroment

  • create a resorce group
  • create a Service Principal and generate its secrete Azure Active Directory -> App registration -> New Registration The secrete you can generate by clicking on your new application registry Certificates & Secretes -> New Client Secrete -> copy secrete value

image

  • add the Service Principal as a contributor in the resorce group

image

  • adjust .env file for local testing and create testing.tfvars file for terraform deployment

testing.tfvars:

resource_group = "mk-test"
region = "East US"

client_id = ""
secrete = ""
project = "az"

.env

AZURE_STORAGE_ACCOUNT_KEY=""
AZURE_STORAGE_ACCOUNT_NAME=""
  • execute terraform script to create resorces
az login

terraform init

terraform plan -var-file="testing.tfvars"

terraform apply -var-file="testing.tfvars"

1 u9cWuDaz-mG8M0geKP_-2g

Know issues

If you can't see the docker image in container registry you can build the docker and upload it using the instruction bellow "container registry - deploy docker to Azure container registy" and restart terraform script.

Build docker

docker build -t tree .

docker run --name tree -d tree

docker run -d --env-file .env --name tree tree

Container registry - deploy docker to Azure container registy

  • you need to start docker service

az acr login --name [registyname]

docker tag tree [registyname].azurecr.io/tree

docker push [registyname].azurecr.io/tree

az acr update -n [registyname] --admin-enabled true

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published