Skip to content

Deployment with Docker Desktop on Windows

NOTICE

DOCKER DESKTOP IS INTENDED FOR DEVELOPMENT PURPOSES ONLY.

Preconditions

NOTICE

Enable Kubernetes in Docker Desktop"

  • Download Helm v3.8.2, move folder to Program Files and add to Path.

  • Verify that Helm has downloaded successfully with the command helm version.

helm version

# output

version.BuildInfo{Version:"v3.11.0", GitCommit:"472c5736ab01133de504a826bd9ee12cbe4e7904", GitTreeState:"clean", GoVersion:"go1.18.10"}

Preparing Cluster for IEM Pro installation

  1. Switch the context of the kube config kubectl config use-context docker-desktop

Creating Certificate for Local IEM Pro

Create a self signed certificate with DNS.

Create san.conf configuration file
[req]
default_bits  = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
countryName = TR
stateOrProvinceName = N/A
localityName = N/A
organizationName = Self-signed certificate
commonName = 120.0.0.1: Self-signed certificate
[req_ext]
subjectAltName = @alt_names
[v3_req]
subjectAltName = @alt_names
[alt_names]
DNS.1 = local.iem
  1. Open Ubuntu in WSL on your Windows desktop.

    1. Run cd /mnt/c/Users/<your_user>/Desktop/
    2. Run openssl req -x509 -nodes -days 730 -newkey rsa:2048 -keyout local-iem.key -out local-iem.pem -config san.conf
    3. Add local-iem.pem certificate to Trusted Root Certification Authorities as shown in the link.
  2. Add 127.0.0.1 local.iem to C:\Windows\System32\drivers\etc\hosts file.

    # localhost name resolution is handled within DNS itself.
    
    
    #   127.0.0.1       localhost
    
    
    #   ::1             localhost
    
    127.0.0.1 local.iem
    

Deploy IEM Pro

For further informations see the Deploying Industrial Edge Management section.

ieprovision install <config.json> \
  --namespace <namespace> \
  --set ingress-nginx.enabled=false \
  --set global.hostname="local.iem" \
  --set global.storageClass="<storageclass>" \
  --set global.storageClassPg="<storageclass>" \
  --set global.iamAdminPassword="<iamAdminPassword>" \
  --set global.iemAdminPassword="<iemAdminPassword>" \
  --set global.customerAdminPassword="<customerAdminPassword>" \
  --set global.certChain="$(cat ./certificate/local-iem.pem | base64 -w 0)" \
  --set edgeeye.enabled=true \
  --set device-catalog.firmwaremanagement.enabled=true \
  --set device-catalog.workflowexecutor.enabled=true \
  --set global.sni.enabled=true \
  --set licensing-service.envVariables.skipTLSCheck=true
To provision the IEM Pro from Windows or MacOS System use the IECTL

Use iectl provision install insted of ieprovision install

Configure Ingress

  1. Create Secret with Certificate and Key that was created above.

    kubectl -n iem create secret tls clusterdns-cert --key ./local-iem.key --cert ./local-iem.pem
    
  2. Deploy Nginx Ingress Controller to the Kubernetes Cluster using the values.yaml file

    helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
    helm repo update
    helm install ingress-nginx ingress-nginx/ingress-nginx -n iem -f values.yaml
    
  3. Create the Ingress Ressource

    Example Ingress
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
      name: nginx-ingress
      namespace: iem
    spec:
      ingressClassName: nginx
      rules:
      - host: local.iem
        http:
          paths:
          - backend:
              service:
                name: ingress-nginx-controller
                port:
                  number: 443
            path: /
            pathType: Prefix
      tls:
      - hosts:
          - local.iem
        secretName: clusterdns-cert
    
    kubectl apply -f ingress.yaml
    

Now, IEM Pro is reachable as https://local.iem.