Skip to content
LogScale Self-Hosted Deployment
This is an archived version of the documentation downloaded from LogScale Documentation Archives. Up to date documentation, and documentation for later versions, is available on LogScale Documentation

### Build Process

To build the Azure reference architecture:

1. Create a `.tfvars` file or modify the provided `example.tfvars` to specify configurations for the environment. Refer to the section Terraform Modules for a full list of configuration values.

2. Configure the environment variable `TFVAR_FILE` to the newly created configuration file:

   shell

       export TFVAR_FILE=/path/to/myfile.tfvars

3. Login with the Azure Command Line:

   shell

       az login

4. (Optional) Create a `backend.tf` definition 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"
               }
           }

5. Create a `main.tf` with 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

6. Initialize terraform:

   shell

       terraform init -upgrade

7. Build the Azure infrastructure. This instruction assumes the use of the quickstart template `examples/full-no-bastion.tf` and 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

8. 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}

9. Apply custom resource definitions to Kubernetes:

   shell

       terraform apply -target module.crds -var-file $TFVAR_FILE

10. Run the LogScale prerequisites module to prepare the environment for __ls_shortname:

    shell

        terraform apply -target module.logscale-prereqs -var-file $TFVAR_FILE

11. Install Strimzi:

    shell

        terraform apply -target module.kafka -var-file $TFVAR_FILE

12. Install the Humio Operator and __ls_shortname cluster definitions:

    shell

        terraform apply -target module.logscale -var-file $TFVAR_FILE

13. 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

#### Enter search term