How to install OEE application on Cumulocity IoT Edge
Tags: iot, microservices, cumulocity, manufacturing
Published: 2023-02-23 14:00:42

---
title: How to install OEE application on Cumulocity IoT Edge
published: true
date: 2023-01-23 10:49:55 UTC
tags: iot, microservices, cumulocity, manufacturing 
canonical_url: https://tech.forums.softwareag.com/t/how-to-install-oee-application-on-cumulocity-iot-edge/268199
---

 

_Authors: [@yiz](https://tech.forums.softwareag.com/u/yiz) [@kanishk.chaturvedi](https://tech.forums.softwareag.com/u/kanishk.chaturvedi)_

## Introduction

OEE application can be used for configurating and displaying the OEE calculation of production processes. That is beneficial for Cumulocity IoT Edge instances, which are connected to multiple machines and devices in the production environment. Edge administrators can complete the installation of OEE application on the Edge locally by themselves. The purpose of this article is to show how to install OEE application on a Cumulocity IoT Edge instance.

[![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/8/e/8ec184cf6eddf2e2b88968c7449009e4f9c8071a_2_517x334.png)](https://aws1.discourse-cdn.com/techcommunity/original/3X/8/e/8ec184cf6eddf2e2b88968c7449009e4f9c8071a.png "image")

## Pre-requisite

To be able to follow this instruction, the following requirements should be fulfilled:

- Completed Edge installation following the [Edge guide](https://cumulocity.com/guides/edge/introduction/)
- Proper network configuration of Edge
- Enabled Microservice hosting feature of Edge
- Minimum system and OEE app hosting requirements: 6 CPU cores and 10 GB RAM
- Valid Apama license
- OEE installation ZIP-files (Please contact your Sales Rep to get these files)

### Network configuration of Edge

Before enabling Microservice hosting feature, the network configuration should be set properly. The Kubernetes services reserved IP range 10.96.0.0/12 cannot be used as the IP address of Edge appliance. Besides, if the address range CIDR overlaps with the Edge appliance’s IP, it needs to be reset. Instructions for network settings can be found [here](https://cumulocity.com/guides/edge/configuration/#configuring-the-network).  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/6/9/69a83b619432fa0de36d47abdf2183231f180386.png)

### Increase system Performance

The minimum system requirements for microservice hosting feature are 4 CPU cores and 8GB RAM. The OEE application requires an additional 2 CPU cores and 2 GB RAM. Therefore, the Edge appliance should have at lease 6 CPU cores and 10 GB RAM in total. If the [system performance](https://cumulocity.com/guides/edge/configuration/#increasing-the-system-performance) of the virtual machine needs to be increased, you can first shut down the hypervisor/virtual machine and change the system setting.  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/7/2767322439b5013e46b705646996bfef5407dd9d.png)  
When the memory of the Edge appliance has been increased, the JVM must be increased afterwards as the following steps:

- Restart the Edge appliance and log in to it.
- Open the file `/usr/share/cumulocity-core-karaf/bin/setenv`.
- Edit the parameter **JAVA\_MAX\_MEM** as desired.
- Restart karaf service:  
`[admin@iot-edge-server ~]$ sudo service cumulocity-core-karaf stop`  
and  
`[admin@iot-edge-server ~]$ service cumulocity-core-karaf start`

The above custom setting will be overwritten after Edge updating, so it needs to be set again.

## Installation

The OEE application consists of the following three components:

- The oee-bundle microservice – _oee-bundle.zip_
- The apama-oeeapp microservice – _apama-oeeapp.zip_
- The oee web application – _oee.zip_

All components need to be installed on the management tenant. If the zip file names include version information, remove the version, rename them according to the names above, like “oee-bundle.zip”.

### Install Microservices

The Microservices can be installed via the Administration application of the management tenant on the edge or via the REST API. Two methods are described below separately.

![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/9/1/91e0e8ec27749d46ebe0b06aa155d1c16e0590e3.png)

If you have access to the Administration application, you can install the microservices via UI on the management tenant:

- Log in to the management tenant and switch to the Administration App
- Click Microservice in the Ecosystem menu in the navigator
- In the resulting dialog box, drop the zip file or browse for it on your file system
- You can subscribe to the microservice during the first installation. You can also subscribe to it after the installation in the properties tab of the microservice.

If you cannot access the UI, you can still install microservices via the REST API:

- Create the application entries for the two microservices. Microservice name in the request body should be the same as the zip file name, so either _oee-bundle_ or _apama-oeeapp_. Send the following payloads to the endpoint `POST application/applications` in two separat requests:
```
{
  “name”: “oee-bundle”,
  “key”: “oee-bundle-key”,
  “type”: “MICROSERVICE”
}


{
  “name”: “apama-oeeapp”,
  “key”: “apama-oeeapp-key”,
  “type”: “MICROSERVICE”
}

```

> Here is an example of the response, which is in JSON format with the application ID:
> 
> ```
> {
> “id”: “21”,
> “name”: “oee-bundle”,
> “key”: “oee-bundle-key”,
> “type”: “MICROSERVICE”
> }
> 
> ```
> 
> Keep the ID in mind. It will be used in the following steps.

- Upload the zip files severally to the platform with the ID you got in the last responses  
`POST /application/applications/{id}/binaries`  
`X-Cumulocity-Processing-Mode: TRANSIENT`  
`Content-Type: multipart/form-data`  
`Accept: application/json`  
`Form: “file=@<name>.zip”`

> An example of the request and response in the Postman is shown in the following figure:  
> ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/2/3278a3afd682c426a5f1e0b7b7826c50dc353adc.png)

- Subscribe the management tenant to the microservices with the same ID as above  
`POST /tenant/tenants/management/applications`  
`{“application”: {“id”: “<id>”}}`

### Install Web Application

After installing the microservices, the OEE UI can be installed on the management tenant

- Click Applications in the Ecosystem menu in the navigator
- In the All applications page click Add application
- In the resulting dialog box, select Upload web application
- Drop the web application oee.zip or browse for it on your file system

Refresh the page after upload the web application you will see it the application switcher.  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/6/9/699fe98273e802508b8e534255d81d3f19376354.png)

### Upload Apama license

To make sure that apama-oeeapp microservice is working properly, a valid Apama license needs to be uploaded on the tenant. Via REST API, you can install or upload the Apama license:  
`POST /tenant/options`

```
{
  “category”, “apama”,
  “key”: “credentials.license”,
  “value”: “<?xml version=\“1.0\” encoding=\“US-ASCII\”?><SoftwareAG_License>…</SoftwareAG_License>”
}

```

As in the example of payload, all the double quotes must be escaped using “\”, and line breaks must be removed. If the response code is 200, the request is successful. You can also use GET request to `/tenant/options/apama/credentials.license` to check the uploaded license. After uploading the Apama license, the apama-oeeapp microservice needs to be restarted by un- and re-subscribing to the apama-oeeapp microservice, so that the new license can be detected. To verify that the apama-oeeapp microservice is running with the license, click the Logs tab to check whether there is complete License Data in it or not.

### Subscribe OEE Application on a subtenant

For the already created subtenants:

- Log in to the management tenant and click Subtenants in the Tenants menu in the navigator
- Click the tenant on which you need to subscribe to OEE application
- Subscribe the OEE web application and the Oee-bundle microservice under the Applications tab. Do not subscribe to the Apama-oeeapp.
- Log in the subtenant. If you already logged into the subtenant, you need to refresh the page to be able to see the OEE tab in the application switcher.
- Give the users Oeeconfigurator READ and ADMIN permissions to allow them to use OEE application.  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/9/8/98e9ba374f35d72abede4e6993270b8670fb73e7.png)

For the new subtenant creation:

- Log in the management tenant and click Default subscriptions in the Ecosystem in the navigator
- Select OEE and Oee-bundle under the “Subscribed on tenant creation”.
- Save the change. Do not tick Apama-oeeapp here
- OEE application will be one of the default subscribed applications for the subsequent subtenants
- Give the users Oeeconfigurator READ and ADMIN permissions in the subtenant to allow them to use OEE application.  
 ![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/a/f/af611b340e39e826814b1ebc6806bea026185292.png)

## Summary

This article shows you the installation process of OEE app and the method to subscribe the app for subtenants. If you are interested in learning more about the OEE application, please contact our sales or schedule an online demo [here](https://www.softwareag.com/en_corporate/platform/iot/oee-solution.html).

After the successful installation of OEE application, the next step would be using OEE application to monitor the performance of production processes. More information about that can be found in the OEE application [guide](https://cumulocity.com/guides/oee/overview/).

[Read full topic](https://tech.forums.softwareag.com/t/how-to-install-oee-application-on-cumulocity-iot-edge/268199)