Build Process
To build the Azure reference architecture:
- Create a - .tfvarsfile or modify the provided- example.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:shell- export TFVAR_FILE=/path/to/myfile.tfvars
- Login with the Azure Command Line: shell- az login
- (Optional) Create a - backend.tfdefinition suitable to your environment. For example, to store state in an Azure blob storage container (created separately):ini- terraform { 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 to- examples/full-no-bastion.tf:shell- ln -s repository-path/examples/full-no-bastion.tf repository-path/main.tf
- Initialize terraform: shell- terraform init -upgrade
- Build 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:shell- terraform apply -target module.azure-core -target module.azure-keyvault -target module.azure-kubernetes -target module.logscale-storage-account -var-file $TFVAR_FILE
- Configure 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:shell- az aks get-credentials --resource-group ${var.name_prefix}-rg --name aks-${var.name_prefix}
- Apply custom resource definitions to Kubernetes: shell- terraform apply -target module.crds -var-file $TFVAR_FILE
- Run the LogScale prerequisites module to prepare the environment for __ls_shortname: shell- terraform apply -target module.logscale-prereqs -var-file $TFVAR_FILE
- Install Strimzi: shell- terraform apply -target module.kafka -var-file $TFVAR_FILE
- Install the Humio Operator and __ls_shortname cluster definitions: shell- terraform apply -target module.logscale -var-file $TFVAR_FILE
- To confirm the procedure was successful, you can monitor the created pods using the following command: shell- kubectl get pods -n log- You 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