Build Process
To build the Azure reference architecture:
Create a
.tfvarsfile or modify the providedexample.tfvarsto specify configurations for the environment. Refer to the section Terraform Modules for a full list of configuration values.Configure the environment variable
TFVAR_FILEto the newly created configuration file:shellexport TFVAR_FILE=/path/to/myfile.tfvarsLogin with the Azure Command Line:
shellaz login(Optional) Create a
backend.tfdefinition suitable to your environment. For example, to store state in an Azure blob storage container (created separately):initerraform { backend "azurerm" { resource_group_name = "my-resource-group-name" storage_account_name = "mystorageaccount" container_name = "mycontainer" key = "logscale-terraform.tfstate" } }Create a
main.tfwith the modules necessary to build LogScale in the target environment or leverage a provided quickstart example. By default, this repository links toexamples/full-no-bastion.tf:shellln -s repository-path/examples/full-no-bastion.tf repository-path/main.tfInitialize terraform:
shellterraform init -upgradeBuild the Azure infrastructure. This instruction assumes the use of the quickstart template
examples/full-no-bastion.tfand targets need to be updated accordingly when using a different example or self-built modules:shellterraform apply -target module.azure-core -target module.azure-keyvault -target module.azure-kubernetes -target module.logscale-storage-account -var-file $TFVAR_FILEConfigure kubectl. The previous command output will show a value for k8s_configuration_command. This value represents a command you can run to configure
kubctl, as shown in the following example:shellaz aks get-credentials --resource-group ${var.name_prefix}-rg --name aks-${var.name_prefix}Apply custom resource definitions to Kubernetes:
shellterraform apply -target module.crds -var-file $TFVAR_FILERun the LogScale prerequisites module to prepare the environment for __ls_shortname:
shellterraform apply -target module.logscale-prereqs -var-file $TFVAR_FILEInstall Strimzi:
shellterraform apply -target module.kafka -var-file $TFVAR_FILEInstall the Humio Operator and __ls_shortname cluster definitions:
shellterraform apply -target module.logscale -var-file $TFVAR_FILETo confirm the procedure was successful, you can monitor the created pods using the following command:
shellkubectl get pods -n logYou can check that the pods are all running and there are no errors.
You can also point your web browser at the endpoint for the ingress node, for example:
https://<host>.<azure_region>.cloudapp.azure.com