[]
        
(Showing Draft Content)

Deploying to Azure Kubernetes Service

This article describes how to deploy Wyn Enterprise to run on Azure Kubernetes Service.

You will find the following information in this help article;

Quick Overview

Create the following resources in the same resource group:

  1. Resource Group: Create a resource named wyn-aks, all the Wyn AKS-related resources should be in this resource group.

  2. Kubernetes cluster: Deploy Wyn Enterprise.

  3. Storage account: Use the Azure files to store the Wyn configuration file and logs.

  4. Managed Disk: Store the cached database data.

Please note that you should have an existing SQL Server, MySQL, Postgres, or Oracle database.

Create Resources

Follow the below steps to create the resources discussed above.

  1. Create a wyn-aks resource group.

  2. Create a wyn Kubernetes cluster. Restrict the availability zones of the cluster because the cached database data is stored in the managed disks, which means the disk and the AKS node must be in the same availability zone.


    Kubernetes Cluster

    Note: While creating the wyn Kubernetes cluster, the recommended node size to be selected is 4 cores with 16GB of RAM.

    To change the node size, click the Change Size hyperlink and select the recommended size.


    Kubernetes Cluster

  3. Create a wyn storage account. Set its performance to Standard as shown.


    Kubernetes Cluster


    The Standard Performance is suitable for writing logs and reading the configuration file. Moreover, Wyn Enterprise uses the asynchronous non-blocking method to write logs, so it will not affect the performance.


    a. Create a conf and logs file share in the wyn storage account.


    Kubernetes Cluster


    b. Click here to download the zip file and later unzip it.


    c. Update the database connection string in the conf/Wyn.conf file.


    Kubernetes Cluster


    d. Upload the Wyn.conf file to the conf file share you just created.


    Kubernetes Cluster

  4. Enter the Kubernetes cluster and click Connect, and then click Open Cloud Shell to open the cloud shell.


    Kubernetes Cluster


    Run the appropriate command to connect to the cluster.

    //The following example gets the node resource group for the wyn AKS cluster in the wyn-aks resource group, and creates the disk in the node resource group.
    
    az aks show --resource-group wyn-aks --name wyn --query nodeResourceGroup -o tsv

    Then, create a wyn managed disk. Select its availability zone and set the performance tier to P30. You can also choose a higher performance tier based on your requirements.


    Managed Disk

Deploy Wyn Enterprise

  1. Use the following command in the cloud shell to get the zip file, and later unzip it.

    wget https://cdn.mescius.com/wyn/installation/aks/wyn-enterprise-aks-7.1.00145.0.zip
    unzip wyn-enterprise-aks-7.1.00145.0.zip
  2. Copy the Resource ID of the Managed Disk and use it to update the services/analysisdb.yaml file.


    Managed Disk

    Managed Disk

  3. Use the storage key to create the wyn-aks-secret. Get the storage key from the storage account Access Keys tab.

    kubectl create secret generic wyn-aks-secret --from-literal=azurestorageaccountname=wyn --from-literal=azurestorageaccountkey=<STORAGE_KEY>

    Access Keys Tab

  4. Use the following command to create volumes and services as shown.

    # enter the wyn-aks folder
    cd wyn-enterprise-aks-7.1.00145.0
    # create the volumes
    kubectl apply -f pv
    # create services
    kubectl apply -f services
  5. Run the following command to check the pods' status.

    kubectl get pods

    Kubernetes pods' status

Expose Wyn Enterprise to the External Network

  1. You can use the Application Gateway ingress controller to expose Wyn.

    # create application-gateway ingress
    kubectl apply -f ingress 
  2. Enable the Application Gateway ingress controller.


    Enable the Application Gateway ingress controller.

  3. Enter the ingress-appgateway to get the public IP address to access Wyn Enterprise. (http://<public-IP-address>)


    Public IP Address

Expose Wyn Enterprise Service Over HTTPS

  1. Create a Kubernetes secret to host the private key and certificate.

    kubectl create secret tls {your-secret-name} --key {path-to-key} --cert {path-to-cert}
  2. Modify the Ingress file, ingress/ingress.yaml as shown in below code snippet,

    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: wyn-ingress
      annotations:
        kubernetes.io/ingress.class: azure/application-gateway
    spec:
      tls:
        - hosts:
          - {your.domain.name}
          secretName: {your-secret-name}
      rules:
      - host: {your.domain.name}
        http:
          paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: wyn-server
                port:
                  number: 51980
  3. Apply the Ingress using the following command.

     kubectl apply -f ingress
  4. Get information on Ingress using the following command.

    kubectl get ingress wyn-ingress

    The output of the above operation will be as follows,

    NAME

    CLASS

    HOSTS

    ADDRESS

    PORTS

    AGE

    wyn-ingres

    <none>

    wyn-k8.gces.dev

    20.195.39.193

    80, 443

    14m

    Note: You need to wait until the Address is assigned successfully, and then add a record to the DSN resolution provider.

  5. You can now visit the Wyn Enterprise application with the HTTPS URL,

    https://{your.domain.name}