Infoworks 6.1.3
Getting Started

Infoworks Installation on Azure Kubernetes Service (AKS)

NOTE If you have not installed Azure Kubernetes Service, refer to Installing Azure Kubernetes Service (AKS).

NOTE To check the supported version of MongoDB by Infoworks, refer to MongoDB Atlas Recommended Configuration.

Prerequisites

Package InstallerVersion Used
Kubernetes1.27.x or above
Kubectl1.27.x or above
Helm3.14.x
Ingress-Controller4.10.x
Python3.8 or above

NOTE

If you are using MAC OS to deploy Infoworks on to cluster, you must install the following package:

Package InstallerVersion Used
GNU-SED4.8 or more

NOTE If you are managing external VNet, refer to the official AKS documentation.

  • Ensure that AKS Kubernetes cluster is connected to internet.

  • Set up AKS Kubernetes cluster. For more information, refer to the Azure Docs.

  • Ensure that Kubernetes version should be 1.27.x or above.

  • Infoworks recommends creating the AKS Kubernetes cluster with private access and a VM as a Bastion host with Linux-based OS should be created within the VPC.

  • To use an external Azure Container Registry (ACR) for pulling the images for Infoworks setup, ensure that all the required images are pushed to the the specified external registry and it is integrated with AKS. This is applicable if IW_HOSTED_REGISTRY is set to false. To get the required container images, contact your Infoworks representative.

  • If INGRESS_CONTROLLER_CLASS is set to nginx, then Infoworks recommends setting up ingress-controller externally with the required configuration. To set up nginx ingress-controller externally, refer to External Setup for Ingress Controller.

  • If KEDA_ENABLED is set to true, then Infoworks recommends setting up KEDA externally with the required configuration. To set up KEDA externally, refer to External KEDA Setup.

  • Install Azure CLI, Helm, and Kubectl on the Bastion host VM instance.

  • To install pip module, run apt install python3-pip command.

  • Ensure that the following Python packages are available on the server before starting the installation.

    • pycryptodomex (version3.15.0)
    • argparse
  • If the aforementioned packages are not available, execute the following command

Command
Copy
  • Verify the following prerequisites
    • Run az version to ensure that az is installed.
    • Run helm version to ensure that Helm is installed.
    • Run kubectl version to ensure that Kubectl is installed.
    • Run python3 -V to ensure that python3 is installed.
    • Run python3 -m pip to ensure that pip model is installed.
Command
Copy
  • Set up Kubernetes Cluster in AKS for connection using az

linkerd is the service mesh currently supported by Infoworks. At the time of setup, the Linkerd latest version is 2.12. To install Linkerd, refer to Linkerd documentation from step 0-3.

To improve stability of jobs, it is suggested to increase the linkerd init-proxy memory requests and limits to 30Mi. This can be done by passing the appropriate flags while running linkerd install/upgrade commands.

For example: linkerd upgrade --set proxyInit.resources.memory.limit=30Mi --set proxyInit.resources.memory.request=30Mi | kubectl apply -f -

NOTE The following procedure is a one-time activity for the user.

Step 1: Execute az login.

Command
Copy

After successful verification, the following confirmation message appears.

Command
Copy

Step 2: Identify the cluster name, zone/region, and project you want to connect to. Run the following command with these details:

Command
Copy
Output
Copy

Persistent Storages

NOTE Azure Kubernetes Service RBAC Cluster Admin is required to run Infoworks installation.

Persistence ensures to persist the data even if a pod restarts or fails due to various reasons. Infoworks needs the following persistent storages to be configured:

  • Databases (MongoDB and Postgres) and RabbitMQ
  • Infoworks Job Logs and Uploads

Run the following command to fetch the storage classes:

Command
Copy

NOTE The storageclass should have the reclaim policy Retain.

Output
Copy
Storage Class CategoryComments
azurefile-premiumIt comes along with the cluster. It is recommended for NFS (logs, uploads, etc.).
azurefile-csi & azurefile-csi-premiumIt comes along with the cluster if CSI driver is enabled.
managed-premiumIt comes along with the cluster. It is recommended for databases.
managed-csi & managed-csi-premiumIt comes along with the cluster if CSI driver is enabled.

Installing Infoworks on Kubernetes

Take a backup of values.yaml file before every upgrade.

NOTE Assuming IW_HOME=/opt/infoworks.

NOTE The following steps must be performed by the user who has completed the prerequisites procedure mentioned earlier.

Step 1: Create Infoworks directory under /opt.

sudo mkdir -p /opt/infoworks

Step 2: Change permissions of /opt/infoworks directory

sudo chown -R <user>:<group/user> /opt/infoworks

Step 3: Change the directory path to /opt/infoworks.

cd /opt/infoworks

Step 4: To download Infoworks Kubernetes template, execute the following command:

Command
Copy

Step 5: Extract the downloaded file.

Command
Copy

Step 6: Navigate to the extracted directory iw-k8s-installer.

Step 7: Open configure.sh file in the directory.

Step 8: Configure the following parameters as described in the table, and then save the file

NOTE Namespace and release names should not contain underscore (_). Release names should not start with numbers.

NOTE If you want to enable SSL before installing Infoworks, refer to Enabling SSL section.

Generic Configuration

FieldDescriptionDetails
IW_NAMESPACENamespace of Infoworks DeploymentThis field is autofilled. However, you can also customize the namespace as per your requirement.
IW_RELEASE_NAMERelease Name of Infoworks DeploymentThis field is autofilled. However, you can also customize the release name as per your requirement.
IW_CLOUD_PROVIDERName of the cloud provider of Kubernetes clusterEnter azure.
NFS_STORAGECLASS_NAMEName of the NFS storage classEnter a valid Storage class name. Ex: azurefile-premium .
DB_STORAGECLASS_NAMEName of the Database Storage ClassEnter a valid Storage class name. Ex: managed-csi
INGRESS_ENABLEDThis field indicates enabling Ingress for Infoworks DeploymentSelect true or false. Default: true. Infoworks requires you to select true.
INGRESS_CONTROLLER_CLASSName of the ingress controller classDefault value: nginx.
INGRESS_TYPEName of the ingress type

Two values: external and internal. Default value: internal.

external: Infoworks app is exposed to internet. internal: Infoworks app is restricted to internal network.

INGRESS_AUTO_PROVISIONERThis field indicates installing ingress controller provisioner

Select true or false. Default: true.

If ingress-controller is already installed, set this as false.

NOTE Infoworks recommends setting up ingress-controller externally with the required configuration. To set up ingress-controller externally, refer to External Setup for Ingress Controller.

IW_DNS_NAMEDNS hostname of the Infoworks deployment

Enter a valid DNS name.

NOTE If ingress is enabled, make sure to create the respective DNS records to the IP address/DNS address of LoadBalancer for DNS to resolve in your Domain service provider.

IW_SSL_PORTThis field enables port and protocol for SSL communicationSelect true or false. Default: true
IW_HAThis field enables high-availability of Infoworks deployment.Select true or false. Default value: true. Infoworks recommendation: true i.e. enabling HA.
USE_GCP_REGISTRYThis field enables separate registry for cloud. GCR is being used by Infoworks by default. To override cloud specific registry images, provide input "false".Select true or false. Default value: true.

Autoscaling Configuration

FieldDescriptionDetails
KEDA_ENABLEDThis field enables to configure autoscaling to Infoworks deployment using KEDA.

Select true or false. Default value: false.

NOTE If the field is set to false, Infoworks is reset to Horizontal Pod Autoscaling (HPA) mode.

KEDA_AUTO_PROVISIONERThis field enables installing KEDA Kubernetes deployment automatically by Infoworks deployment

Select true or false. Default value: false.

NOTE Infoworks recommends setting up KEDA externally with the required configuration. To set up KEDA externally, refer to External KEDA Setup.

NOTE The total number of concurrent Infoworks jobs that can be submitted by each Hangman instance/pod is configured using num_executors in conf.properties. If the number of Hangman instances changes due to autoscaling, then the total number of jobs Infoworks handles also changes. To fix the total number of concurrent Infoworks jobs, you must disable the autoscaling on the Hangman service and set the number of Hangman replicas manually as described in the Enabling Scalability section.

External Container Registry Configuration

The following table lists the External Container Registry Configuration for Infoworks Setup. These configurations should be set only if the Container Registry used to pull the images is different from the one hosted by Infoworks.

FieldDescriptionDetails
IW_HOSTED_REGISTRYThis field indicates if the Container Registry hosted by Infoworks.Select true/false. If the registry is different from the one hosted by Infoworks, set the value to false.

The following fields are valid if IW_HOSTED_REGISTRY set to false

FieldDescriptionDetails
IMAGES_BASE_REGISTRYThe field is about Container Registry Server URL hosted by the user.

Provide the Container Registry Server URL.

NOTE Ensure to integrate the Container Registry to the AKS Cluster.

IMAGES_SECRET_NAMEProvide the image secret

Provide the name of the secret created to authorize and authenticate (if any) to access all the Infoworks Images.

If Container Registry is integrated with the AKS cluster, then no authorization is required and you should keep the value for this field empty.

Service Mesh Configuration for Security

NOTE Infoworks supports linkerd as of now.

FieldDescriptionDetails
SERVICE_MESH_ENABLEDThis field enables to configure service mesh to Infoworks deploymentSelect true or false. Default value: false.
SERVICE_MESH_NAMEThis field is the name of the service mesh.Provide the name of the service mesh. Default value: linkerd

Keyvault and Keyvault Authentication Configuration

FieldDescriptionDetails
KEYVAULT_GLOBAL_ENABLEDThe flag indicates whether all secrets like Databricks Tokens will always be stored on an External Keyvault

Enter "true" if Infoworks forces all secret keys to be stored on an External Keyvault

Enter "false" if the user will be given the option to store them in encrypted form in the MetaDB

KEYVAULT_ENABLEDThis flag indicates whether a default Keyvault to store external MongoDB and PostgresDB Credentials will be given

Only Applicable if either or both of the Databases are external

Enter "true" if a default keyvault to store external DB credentials will be used

Enter "false" if all DB credentials will be stored natively, i.e. as part of Kubernetes Secrets and Pod Environment Variables

AZURE_KEYVAULT_URIThe URI of the Azure Keyvault containing any External DB Credentials

Only Applicable if KEYVAULT_ENABLED="true"

The URI of the Azure Keyvault which will store the DB credentials, generally following the format - https://keyvault-name.vault.azure.net/

FLAG_AZURE_KEYVAULT_AUTH_SPThis flag indicates whether the aforementioned Keyvault is to be accessed through a service principal

Only Applicable if KEYVAULT_ENABLED="true"

Enter Y if Infoworks uses a Service Principal to authenticated to the Keyvault, and proceed to provide SP details.

Enter false if the Nodes have been granted User or System Managed Identity to Authenticate

AZURE_SERVICE_PRINCIPAL_TENANT_IDThe ID of the Service Principal Tenant

Only Applicable if FLAG_AZURE_KEYVAULT_AUTH_SP=”true

Enter the Azure Object ID/Tenant ID of the Service Principal.

AZURE_SERVICE_PRINCIPAL_SUBSCRIPTION_IDThe ID of the Subscription the Service Principal Exists In

Only Applicable if FLAG_AZURE_KEYVAULT_AUTH_SP=true

Enter the Azure Object ID of the Service Principal

AZURE_SERVICE_PRINCIPAL_CLIENT_IDThe Client ID of the Service Principal

Only Applicable if FLAG_AZURE_KEYVAULT_AUTH_SP=true

Enter the Azure Client ID of the Service Principal

AZURE_SERVICE_PRINCIPAL_CLIENT_SECRETThe Encrypted Client Secret of the Service Principal

Only Applicable if FLAG_AZURE_KEYVAULT_AUTH_SP=true

Keep it empty if not sure. During Installation Client Secret prompt will be displayed and then Infoworks encrypts the password on the fly.

AZURE_MI_TYPE_IS_USERFlag whether the Managed Identity use to authenticate to keyvault is System Assigned or User-Managed

Only Applicable if FLAG_AZURE_KEYVAULT_AUTH_SP=false

Enter true if Managed Identity used is User Assigned, and proceed to enter ID in next input

Enter false if the Nodes have been granted System Managed Identity to Authenticate (default is N)

AZURE_USER_MI_CLIENT_IDThe Client ID of the User-assigned Managed Identity attached to the nodesOnly Applicable if AZURE_MI_TYPE_IS_USER=true

MongoDB Configuration

FieldDescriptionDetails
EXTERNAL_MONGOThis field enables external mongoDB support for Infoworks deploymentSelect true or false. Default value: false.

The following fields are applicable if EXTERNAL_MONGO= true.

Keyvault Configuration for MongoDB

The following fields are applicable if EXTERNAL_MONGO= true and KEYVAULT_ENABLED=true.

NOTE If KEYVAULT_GLOBAL_ENABLED= true, the following will default to true. If KEYVAULT_GLOBAL_ENABLED=false, configure the following fields.

FieldDescriptionDetails
KEYVAULT_FLAG_METADB_HOSTThis flag indicates whether to use the default Keyvault to store external Mongo HostOnly Applicable if KEYVAULT_GLOBAL_ENABLED=false and KEYVAULT_ENABLED=true
KEYVAULT_FLAG_METADB_USERThis flag indicates whether to use the default Keyvault to store external Mongo UserOnly Applicable if KEYVAULT_GLOBAL_ENABLED=false and KEYVAULT_ENABLED=true
FieldsDescriptionDetails
MONGO_SRVThis field enables DNS connection string for MongoDB AtlasSelect true or false. Default value: true (If external MongoDB Atlas is enabled)
MONGODB_HOSTNAMEThe Mongo Host URL to connect to

Enter the Mongo Server or Seed DNS hostname (without prefix)

If KEYVAULT_FLAG_METADB_HOST=true

Enter the Secret Name on the Keyvault (defaults to METADBHOST)

If KEYVAULT_FLAG_METADB_HOST=false

Enter the plaintext value

MONGODB_USERNAMEThe Mongo User to authenticate as.

Enter a user that has at least read/write permissions over the databases mentioned.

If KEYVAULT_FLAG_METADB_USER=true

Enter the Secret Name on the Keyvault (defaults to METADBUSER)

If KEYVAULT_FLAG_METADB_USER=false

Enter the plaintext value (defaults to Infoworks)

MONGODB_USE_SECRET_PASSWORDThis field enables user to configure MongoDB password in the secrets before installing Infoworks. Steps will be documented

Select true or false. Default Value: false. If value is false then we need ENCRYPTED_PASSWORD field to be filled, else secret name is required. (Optional value).

WARNING This field is deprecated if KEYVAULT_ENABLED=true.

MONGODB_SECRET_NAMEThis is the name of the MongoDB encrypted password stored in secrets. (Manual Creation)User will create the secret and has to provide the name of the secret. (Optional value) Keep it empty if not sure. For more information, refer to the "For MongoDB" section mentioned below.
MONGODB_ENCRYPTED_PASSWORDThe Password of the aforementioned MONGODB_USERNAME

Enter the Password of the MONGO_USER

If KEYVAULT_ENABLED=true

Enter the Secret Name on the Keyvault (defaults to METADBPASS)

If KEYVAULT_ENABLED=false

Enter the plaintext value (defaults to the default Infoworks password)

MONGO_FORCE_DROPThis field delete all the data in the MongoDB Atlas and initialize the data freshly.Select true or false. Default value: false. Infoworks recommends to keep the value to false always.
INFOWORKS_MONGODB_DATABASE_NAMEThis field indicates the name of the Infoworks MongoDB database in Atlas.Provide the name of the database for Infoworks setup.
INFOWORKS_SCHEDULER_MONGODB_DATABASE_NAMEThis field indicates the name of the Infoworks scheduler MongoDB database in AtlasProvide the name of the scheduler database for Infoworks setup.

PostgresDB Configuration

FieldDescriptionDetails
EXTERNAL_POSTGRESDBThis field enables external PostgresDB support for Infoworks deploymentSelect true or false. Default value: false.

The following fields are applicable if EXTERNAL_POSTGRESDB= true

Keyvault Configuration for PostgresDB

The following fields are applicable if EXTERNAL_POSTGRESDB=true and KEYVAULT_ENABLED=true.

NOTE If KEYVAULT_GLOBAL_ENABLED=true, the following will default to true. If KEYVAULT_GLOBAL_ENABLED=false, configure the following fields.

FieldDescriptionDetails
KEYVAULT_FLAG_POSTGRESDB_HOSTThis flag indicates whether to use the default Keyvault to store external PostgresDB HostOnly Applicable if KEYVAULT_GLOBAL_ENABLED=false and KEYVAULT_ENABLED=true
KEYVAULT_FLAG_POSTGRESDB_USERThis flag indicates whether to use the default Keyvault to store external PostgresDB UserOnly Applicable if KEYVAULT_GLOBAL_ENABLED=false and KEYVAULT_ENABLED=true
FieldDescriptionDetails
POSTGRESDB_HOSTNAMEThe PostgresDB Host URL to connect to

Enter the PostgresDB Server hostname (without prefix) If KEYVAULT_FLAG_POSTGRESDB_HOST=true

Enter the Secret Name on the Keyvault (defaults to POSTGRESDBHOST)

If KEYVAULT_FLAG_POSTGRESDB_HOST=false

Enter the plaintext value

POSTGRESDB_USERNAMEThe PostgresDB User to authenticate as.

Enter a user that has at least read/write permissions over the databases mentioned.

If KEYVAULT_FLAG_POSTGRESDB_USER=true

Enter the Secret Name on the Keyvault (defaults to POSTGRESDBUSER)

If KEYVAULT_FLAG_POSTGRESDB_USER=false

Enter the plaintext value (defaults to infoworks-user)

POSTGRESDB_USE_SECRET_PASSWORDThis field enables user to configure Postgres password in the secrets before installing Infoworks. Steps will be documented

Select true or false. Default Value: false. If value is false then we need ENCRYPTED_PASSWORD field to be filled, else secret name is required. (Optional value).

WARNING This field is deprecated if KEYVAULT_ENABLED=true.

POSTGRESDB_SECRET_NAMEThis is the name of the Postgres encrypted password stored in secrets. (Manual Creation)User will create the secret and has to provide the name of the secret. (Optional value) Keep it empty if not sure. For more information, refer to the "For Postgres" section mentioned below.
POSTGRESDB_ENCRYPTED_PASSWORDThe Password of the aforementioned POSTGRESDB_USERNAME

Enter the Password of the POSTGRESDB_USER

If KEYVAULT_ENABLED=true

Enter the Secret Name on the Keyvault (defaults to POSTGRESDBPASS)

If KEYVAULT_ENABLED=false

Enter the plaintext value (defaults to the default Infoworks password)

INFOWORKS_POSTGRESDB_DATABASE_NAMEThis field indicates the name of the Infoworks Postgres database in the Postgres server.

Provide the name of the database for Infoworks setup.

NOTE Hyphens are not allowed.

Step 9 (Optional): Enable NodeSelector/Toleration and Custom annotations etc. by editing values.yaml file manually before deploying Infoworks deployment.

Step 10 (Optional): To run Infoworks jobs on separate workloads, edit values.yaml file under infoworks folder. Specifically, you need to edit jobnodeSelector and jobtolerations fields based on the node pool you created in the Node Pools.

NOTE If you want to run Infoworks services on other node pools, you can edit nodeSelector and tolerations fields.

value.yaml
Copy

Step 11 (Optional): To define the PaaS passwords, there are two methods:

First method

The password must be put in pre-existing secrets in the same namespace.

For MongoDB

(i) Set MONGODB_USE_SECRET_PASSWORD=true

(ii) To create the custom secret resource, run the following commands from the iw-k8s-installer directory.

Command
Copy

NOTE Set the MONGODB_SECRET_NAME and IW_NAMESPACE according to the inputs given to the automated script. <mongo-password> is the plaintext password.

For Postgres

(i) Set POSTGRESDB_USE_SECRET_PASSWORD=true

(ii) To create the custom secret resource, run the following commands from the iw-k8s-installer directory.

Command
Copy

NOTE Set the POSTGRESDB_SECRET_NAME and IW_NAMESPACE according to the inputs given to the automated script. postgres-password is the plaintext password.

Second Method

You can give the password to the Automated Script, which will encrypt it to store it in the templates.

Step 12 (Optional): Enable NodeSelector/Toleration and Custom annotations etc. by editing values.yaml file manually before deploying Infoworks deployment.

Step 13: To run the script, you must provide execute permission beforehand by running the following command.

Command
Copy

Step 14: Run the script

NOTE If you see this error, "INSTALLATION FAILED: failed post-install: timed out waiting for the condition", you can ignore this as it does not affect Infoworks installation.

Command
Copy
Output
Copy

Since the above installation was configured for ingress-controller, run the following command to get the domain mapping done.

Output
Copy
Command
Copy
Output
Copy

NOTE Make sure to enable DNS mapping for IP address as per the above sample output.

Get the application URL by running these commands: http://sample.infoworks.technology

Log Archival Configuration

FieldDescriptionDetails
IW_LOG_ARCHIVALThis field automatic log archival mechanism for Infoworks job logs and service logs.Select true or false. Default value: true.

The following field is applicable if IW_LOG_ARCHIVAL= true

FieldDescriptionDetails
IW_JOB_LOGS_MAX_AGEThe number of days after which Infoworks job logs logs are moved to an archive. Logs older than this threshold are automatically archived into a tar.gz file.Enter a number of days (integer) Default: 30

Users will also be able to further customise archival and retention periods, set maximum log sizes, and the schedule of the archival operation. Please refer to Custom Infoworks Configurations.

Enabling Linkerd Service Mesh for Ingress Controller

To enable the communication between the ingress controller and the infoworks pods via linkerd service mesh, perform the following steps:

There are two options to enable the communication which depends on the method by which ingress controller was set up.

Option 1 - Infoworks deployed the ingress controller.

If INGRESS_AUTO_PROVISIONER is set to true during installation, no additional configuration is required.

Option 2 - User deployed the Ingress Controller

If INGRESS_AUTO_PROVISIONER is set to false during installation, refer to the official Linkerd documentation to enable service mesh for your corresponding ingress controller.

Enabling SSL

If you set INGRESS_CONTROLLER_CLASS to nginx, add SSL Termination in the TLS section of values.yaml file either before running the automated script or after the deployment.

Step 1: Log in to Linux machine on the latest Debian-based OS.

Step 2: Ensure libssl-dev package is installed.

Step 3: Provide DNS Name for Infoworks deployment

Generating Self-Signed SSL Certificate:

To generate SSL, run the following commands:

Command
Copy
Command
Copy
Command
Copy

NOTE Refer the following commands to replace "Infoworks.domain" and "subdomain.infoworks.domain" keywords with required domain and subdomain name.

Command
Copy
Command
Copy
Command
Copy

Keep a note of server.crt and server.key files for self-signed certificates for Nginx SSL Termination and provide the valid values for ingress_tls_secret_name and namespace_of_infoworks.

Run the following command to add the tls certificates to the Kubernetes cluster.

Command
Copy

Edit values.yaml file to look similar to the following sample file.

values.yaml
Copy

It is suggested to make changes in the values.yaml file and add the below parameters as annotations in the ingress block, replacing <URL> to the DNS of your deployment, as defined in IW_DNS_NAME.

Command
Copy

After adding the annotations, the values.yaml file should look as shown below.

values.yaml
Copy

NOTE If you have already performed the deployment and edit the values.yaml file, then run helm upgrade command.

Configuring Network Policy Rules

  • Network policies are enabled by default for additional security. Please refer here for detailed documentation on network policies and for whitelisting additional namespaces.
  • Navigate to the directory IW_HOME/iw-k8s-installer. And Run the iw_deploy script.
Command
Copy

Custom Infoworks Configurations

Email Configuration

The following table lists the Custom Email Configuration for Infoworks Setup using custom email attributes.

NameDescriptionDefault Values
smtpHostThe SMTP host URL to connect tosmtp.gmail.com
smtpPortSMTP port587
smtpUsernameThe SMTP User to authenticate asemail address
smtpPasswordThe Password for the SMTP userEncrypted password
ttlsEnabledThe TTLS Flagfalse
sslEnabledThe SSL flagtrue
sslPortThe SSL Port465
fromAddressVisible Sender Emailinfoworks_user@gmail.com
fromNameVisible Sender Nameinfoworks_user

Step 1: Update Email Configs as necessary.

  • Navigate to the directory IW_HOME/iw-k8s-installer/infoworks.
  • Edit the values.yaml file.
  • Email configurations can be found under customiwConfigs section followed by emailSettings sub-section in values.yaml

Step 2: The structure and indentation of your values.yaml file should mirror the example provided below. Note that the actual values and entries may vary.

Update the values and save the file.

Step 3: Navigate to the directory IW_HOME/iw-k8s-installer. And Run the iw_deploy script.

Command
Copy

NOTE During the above command's execution, when it prompts if we need to override, type y and press Enter.

Step 4: Restart all the deployments

Command
Copy

Airflow Configurations

The following table lists the airflow configurations for Infoworks setup. Follow below instructions to update them as necessary.

NameDescriptionDefault Values
minFileProcessIntervalThe number of seconds after which a DAG file is parsed. The DAG file is parsed every min_file_process_interval number of seconds10800
dagDirListIntervalHow often (in seconds) to scan the DAGs directory for new files5
parsingProcessesThe number of processes the Airflow scheduler can use for parsing DAG files5
parallelismParallelism is the maximum number of tasks across all the workers and DAGs16
podsPendingTimeoutSeconds scheduler waits before killing pods stuck in pending state1200
taskWeightRuledefault priority assignment of tasks based on the position of the task in dag (ie number of dependencies of task)absolute

Step 1: Update Airflow Configs as necessary.

  • Navigate to the directory IW_HOME/iw-k8s-installer/infoworks.
  • Edit the values.yaml file.
  • Airflow configurations can be found under customiwConfigs section followed by airflowCfg sub-section in values.yaml

Step 2: The structure and indentation of your values.yaml file should mirror the example provided below. Note that the actual values and entries may vary.

Update the values and save the file.

Step 3: Navigate to the directory IW_HOME/iw-k8s-installer. And Run the iw_deploy script.

Command
Copy

NOTE During the above command's execution, when it prompts if we need to override, type y and press Enter.

Step 4: Restart all the deployments

Command
Copy

Log Archival Configurations

The following table lists the global Log Archival configurations for Infoworks setup. Follow below instructions to update them as necessary.

NameDescriptionDefault Values
cronExpressionCron schedule expression which will be used for scheduling log archival job.0 22 * * 6
serviceLogs.archiveDaysThe number of days after which logs are moved to an archive. Logs older than this threshold are automatically archived into a tar.gz file. Applies only for Infoworks service logs.15
serviceLogs.archiveRetentionDaysThe number of days for which archived logs are retained before deletion. This setting ensures that archived tar.gz files are kept for a specific period for reference or compliance purposes and then systematically purged. Applies only for Infoworks service logs.10
serviceLogs.sizeInMbIf there is a log file not older than archiveDays exceeding this limit at the time of the archival process, then the log is rotated (archived and emptied). Applies only for Infoworks service logs.500
jobTaskLogs.archiveDaysSpecify archiveDays for Infoworks job logs and task logs.15
jobTaskLogs.archiveRetentionDaysSpecify archiveRetentionDays for Infoworks job logs and task logs.10

Step 1: Update Log Archival Configs as necessary.

  • Navigate to the directory IW_HOME/iw-k8s-installer/infoworks.
  • Edit the values.yaml file.
  • Log Archival configurations can be found under logArchival section in values.yaml

Step 2: The structure and indentation of your values.yaml file should mirror the example provided below. Note that the actual values and entries may vary.

Step 3: Navigate to the directory IW_HOME/iw-k8s-installer. And Run the iw_deploy script.

Command
Copy

Enabling High-Availability and Scalability

Enabling High-Availability

Infoworks installation enables high-availability configuration while setting up Infoworks in Kubernetes. You can enable high-availability by editing the helm file called values.yaml.

Step 1: To edit values.yaml file, perform the action given in the following snippet.

Command
Copy

Step 2: Run HELM upgrade command.

Command
Copy

This enables the high availability for Infoworks.

Limitation For Kubernetes HA setup, local Postgres database is not completely HA compliant. In certain conditions, if the Postgres containers crash, it might result in workflow failures.

Enabling Scalability

Infoworks installation supports auto-scaling of pods.

For a scalable solution:

  • There must be a minimum of two replicas, if HA is enabled.
  • They can be scaled to any number based on available resources (CPU and memory).
  • Infoworks supports scalability of source, pipeline, and workflow jobs out of the box. Ensure that there are available resources in the Kubernetes cluster.

Infoworks services will scale automatically based on the workloads and resource utilization for the running pods.

To modify any autoscaling configuration, edit the horizontalPodScaling sub-section under global section in the values.yaml file.

values.yaml
Copy
PropertyDetails
hpaEnabledBy default, hpa is enabled for the install/upgrade. Set the value to false to disable hpa.
hpaMaxReplicasThis field indicates the number of maximum replicas the pod can scale out horizontally.
scalingUpWindowSecondsThis field indicates the duration a pod must wait before scaling out activity.
hpaScaleUpFreqThis field indicates the duration HPA must wait before scaling out.
scalingDownWindowSecondsThis field indicates the duration a pod should wait before scaling in the activity.

However, there are three pods which require manual scaling based on workload increase, namely platform-dispatcher, hangman, and orchestrator-scheduler.

There are two ways to enable scalability:

1. By editing the values.yaml file.

Step 1: Edit the values.yaml file.

Command
Copy

NOTE The “deploymentname” mentioned in the above parenthesis is given just for the ease of understanding. This deployment name can be a platform-dispatcher, hangman, or orchestrator-scheduler with actual name.

For example:

Command
Copy

Step 2: To increase the scalability manually, run HELM upgrade command:

Command
Copy

2. Using Kubectl

Command
Copy

NOTE The “deploymentname” mentioned in the above parenthesis is given just for the ease of understanding. This deployment name can be a “releasename-platform-id” with the actual name.

For example:

Command
Copy

Optional Configuration

NOTE The following optional configurations hold true only when HA is enabled.

For setting up Pod Disruption Budget

A Pod Disruption Budget (PDB) defines the budget for voluntary disruption. In essence, a human operator is letting the cluster be aware of a minimum threshold in terms of available pods that the cluster needs to guarantee in order to ensure a baseline availability or performance. For more information, refer to the PDB documentation.

To set up PDB:

Step 1: Navigate to the directory IW_HOME/iw-k8s-installer .

Step 2: Edit the values.yaml file.

Command
Copy

Step 3: Under the global section and pdb sub-section, set the enabled field to true.

values.yaml
Copy

Step 4: Run HELM upgrade command.

Command
Copy

For setting up PodAntiAffinity

If the anti-affinity requirements specified by this field are not met at the scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. For more information, refer to the PodAntiAffinity documentation.

To set up PodAntiAffinity:

Step 1: Navigate to the directory IW_HOME/iw-k8s-installer .

Step 2: Edit the values.yaml file.

Command
Copy

Step 3: Under the global section, set the podAntiAffinity field to true.

values.yaml
Copy

Step 4: Run HELM upgrade command.

Command
Copy

LIMITATIONS If PodAntiAffinity is set to true, then node count = replicas+1. For example, let's assume that HA is enabled with two replicas, then we need to configure minimum three nodes running for the Infoworks Service Node Pool in Azure.

values.yaml
Copy

Increasing the Size of PVCs

To scale the size of PVCs attached to the pods:

Step 1: Note the storage class of the PVCs to be scaled.

Command
Copy

Step 2: Ensure allowVolumeExpansion is set to true in the storageClass.

Command
Copy

Step 3: Delete the managing statefulset without deleting the pods.

Command
Copy

Step 4: For each PVC, upscale the size (ensure all PVCs attached managed by a single statefulset have the same size. For example, all Postgres managed PVCs must have the same size).

Command
Copy

Step 5: Navigate to the helm chart used for Infoworks deployment.

Step 6: Edit the values.yaml file to update the size of the corresponding database to the new value.

Step 7: Run the helm upgrade command.

Command
Copy

Warning

Above upgrade command will recreate all pods with the same PVCs.

Updating the MongoDB and PostgresDB Credentials

To update the MongoDB and/or PostgresDB credentials in the Infoworks deployment, follow the below given procedure.

Updating the MongoDB Credentials

Updating Encrypted Passwords Stored in values.yaml

There are two methods to update password:

Method 1

To update MongoDB encrypted passwords that are stored in values.yaml file, with the existing configure.sh file, use the IW_DEPLOY script to populate values.yaml:

Step 1: Download and untar the Infoworks kubernetes template, if not already present, according to the iwx-version in your existing deployment.

Command
Copy

Step 2: If a new template was downloaded, replace the iw-k8s-installer/configure.sh as well as iw-k8s-installer/infoworks/values.yaml with the older file.

Command
Copy

Step 3: Change the directory path to iw-k8s-installer.

Command
Copy

Step 4: Replace the following values with a blank string in the configure.sh file.

Command
Copy

Step 5: Run iw_deploy.sh. Once you receive "Seems like you have already configured Infoworks once. Do you want to override? y/n Default: n", enter “Y”. This will prompt the user to provide input for the values that were blank in the previous step. The script will then replace the infoworks/values.yaml file with the updated values.

Command
Copy

Step 6: Run the following command to upgrade by specifying your namespace and helm release name according to the values given in the configure.sh file.

Command
Copy

Method 2

To update MongoDB encrypted passwords, you can directly modify the values.yaml file.

Step 1: Download and untar the Infoworks Kubernetes Template, if not already present, according to the iwx-version in your existing deployment.

Command
Copy

Step 2: If a new template was downloaded, replace the iw-k8s-installer/infoworks/values.yaml with the older file.

Command
Copy

Step 3: Change the directory path to iw-k8s-installer directory.

Command
Copy

Step 4: Generate the encrypted passwords as needed. To generate any encrypted string, execute the following command.

Command
Copy

This generates your passwords in a secure encrypted format, which has to be provided in the following steps.

Step 5: Replace the following yaml keys with the new values in the infoworks/values.yaml file, if needed.

Command
Copy

Step 6: Run the following command to upgrade by specifying your namespace and helm release name according to the installed kubernetes deployment specifications.

Command
Copy

Updating Encrypted Passwords Stored as a Separate Secret

To update the MongoDB password:

Step 1: Run the following commands from the iw-k8s-installer directory.

Command
Copy

Step 2: Restart all pods except the databases.

Command
Copy

Updating the PostgresDB Credentials

Updating Encrypted Passwords Stored in values.yaml

There are two methods to update password:

Method 1

To update PostgresDB passwords that are stored in values.yaml file, with the existing configure.sh file, use the IW_DEPLOY script to populate values.yaml.

Step 1: Download and untar the Infoworks Kubernetes Template, if not already present, according to the iwx-version in your existing deployment.

Command
Copy

Step 2: If a new template was downloaded, replace the iw-k8s-installer/configure.sh as well as iw-k8s-installer/infoworks/values.yaml with the older file.

Command
Copy

Step 3: Change the directory path to iw-k8s-installer.

Command
Copy

Step 4: Replace the following values with a blank string in the configure.sh file.

Command
Copy

Step 5: Run iw_deploy.sh. Once you receive "Seems like you have already configured Infoworks once. Do you want to override? y/n Default: n", enter “Y”. This will prompt the user to provide input for the values that were blank in the previous step. The script will then replace the infoworks/values.yaml file with the updated values.

Command
Copy

Step 6: Run the following command to upgrade by specifying your namespace and helm release name according to the values given in the configure.sh file.

Command
Copy

Method 2

To update PostgresDB encrypted passwords, you can directly modify the values.yaml file.

Step 1: Download and untar the Infoworks Kubernetes Template, if not already present, according to the iwx-version in your existing deployment.

Command
Copy

Step 2: If a new template was downloaded, replace the iw-k8s-installer/infoworks/values.yaml with the older file.

Command
Copy

Step 3: Change the directory path to iw-k8s-installer.

Command
Copy

Step 4: Generate the encrypted passwords as needed. To generate any encrypted string, execute the following command.

Command
Copy

This generates your passwords in a secure encrypted format, which has to be provided in the following steps.

Step 5: Replace the following yaml keys with the new values in the infoworks/values.yaml file, if needed.

Command
Copy

Step 6: Run the following command to upgrade by specifying your namespace and helm release name according to the installed kubernetes deployment specifications.

Command
Copy

Updating Encrypted Passwords Stored as a Separate Secret

To update the PostgresDB password:

Step 1: Run the following commands from the iw-k8s-installer directory.

Command
Copy

Step 2: Restart the orchestrator and orchestrator-scheduler pods.

Command
Copy

Limitations

MongoDB Limitations

With HA enabled, scaling the pods from higher to lower has the following limitations:

  • Pods need to be manually deleted from replication configuration.
  • Disabling HA to Non-HA is not supported once HA is enabled.

Database Limitations

Applicable to PostgresDB, MongoDB, and RabbitMQ.

  • PVC’s size can’t be decreased.
  • Increasing a PVC’s size requires downtime.
  • After downscaling pods, the extra PVCs needs to be manually deleted.

PostgresDB Limitations

In the current HA architecture, on Postgres connection disruption, airflow is unable to reconnect via new connection. Furthermore, the current Postgres proxy is too simplistic to handle connection pools. Hence, if a Postgres master goes down, all running workflows will fail.

  Last updated by Monika Momaya