# \[AIAB-03] Create the system and its components

Akamas provides an out-of-the-box optimization pack called Web Application that comes very handy for modeling typical web applications, as it includes metrics such as `transactions_throughput` and `transaction_response_time` which you will use in this guide to define the optimization goal and to analyze the optimization results. These metrics will be gathered from LRE, thanks to Akamas out-of-the-box LoadRunner Enterprise telemetry provider.

### Create the system

Let's start by creating the system and its components.

The file `system.yaml` contains the following description of the system:

```yaml
name: konakart
description: The konakart eCommerce shop
```

Run the command to create it:

```bash
akamas create system system.yaml
```

### Add the components <a href="#user-content-add-the-components" id="user-content-add-the-components"></a>

#### Add the Web Application component <a href="#user-content-add-the-web-application-component" id="user-content-add-the-web-application-component"></a>

The Web Application component is used to model the typical performance metrics characterizing the performance of a web application (e.g. the response time or the transactions throughput).

Akamas comes with a Web Application optimization pack out-of-the-box. You can install it from the UI:

<figure><img src="/files/EKpov6bwDLVrzydgdqMv" alt=""><figcaption></figcaption></figure>

You can now create the component modeling the Konakart web application.

The `comp_konakart.yaml` file describes the component as follows:

```yaml
name: konakart
description: The konakart web application
componentType: Web Application
properties:
  loadrunnerenterprise: ""
```

As you can see, this component contains the `loadrunnerenterprise` property that instructs Akamas to populate the metrics for this component leveraging the LoadRunner Enterprise integration.

Create the component running:

```bash
akamas create component comp_konakart.yaml konakart
```

You can now explore the result of your system modeling in the UI. As you can see, your `konakart` component is now populated with all the typical metrics of a web application:

<figure><img src="/files/wHzO4KTBaOk5aDnV1775" alt=""><figcaption></figcaption></figure>

#### Add the JVM component

Before starting the optimization, you need to add the JVM component to your system.

First of all, install the Java optimization pack:

<figure><img src="/files/n75LAuh0h0aRjpBkTIHb" alt=""><figcaption></figcaption></figure>

The `comp_jvm.yaml` file defines the component for the JVM as follows:

```yaml
name: jvm
description: The JVM running e-commerce platform
componentType: java-openjdk-11
properties:
  prometheus:
    instance: sut_konakart
    job: jmx
```

Notice how the *jvm* component has some additional properties, *instance* and *job*, under the *prometheus* group. These properties are used by the Prometheus telemetry provider as values for the corresponding *instance* and *job* labels used in Prometheus queries to collect JVM metrics (e.g. JVM garbage collection time or heap utilization). Such metrics are collected out-of-the-box by the Prometheus telemetry provider - no query needs to be specified.

You can create the JVM component as follows:

```bash
akamas create component comp_jvm.yaml konakart
```

You can now see all the JVM parameters and metrics from the UI:

<figure><img src="/files/D7Yy6OEbooKJb0HtAFKN" alt=""><figcaption></figcaption></figure>

You have now successfully completed your system modeling.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.akamas.io/quick-guides/quick-guides-akamas-in-a-box/aiab-03-optimize-a-java-based-application-konakart-with-lre/aiab-03-create-the-system-and-its-components.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
