Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💥 Remove false extension points #4170

Draft
wants to merge 25 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6221517
:boom: KapuaListResult is now concrete, as are all subclasses (needed…
dseurotech Jan 13, 2025
4ead78b
:boom: breaking KapuaQueries down to basic bits
dseurotech Jan 14, 2025
90e2728
revert me - changing the version to differentiate artifacts
dseurotech Jan 15, 2025
ad7d882
:boom: Creators are now concrete classes, without factories
dseurotech Jan 17, 2025
790a38e
:boom: stripping storable queries and lists from false extension points
dseurotech Jan 21, 2025
afd95a7
:boom: stripping storable creators from false extension points
dseurotech Jan 22, 2025
7c61cdb
:boom: splitting internal and external representations of login crede…
dseurotech Jan 24, 2025
3fa264c
:boom: merging UserProfile and its implementation
dseurotech Jan 27, 2025
21960ae
:boom: merging SystemInfo and its implementation
dseurotech Jan 27, 2025
099e5c4
:boom: collapsing Metatypes
dseurotech Jan 28, 2025
3f57d76
:coffin: removing no longer needed factory references
dseurotech Jan 30, 2025
5f36586
:boom: splitting Permission external and internal representations
dseurotech Jan 30, 2025
cbba4e4
:boom: removing unwanted PermissionFactory
dseurotech Jan 31, 2025
a080fc4
:boom: first attempt to break entity factories, centered around Tags …
dseurotech Feb 4, 2025
6ceb68c
:boom: removed DevicePackageFactory, in favour of councrete DTOs
dseurotech Feb 5, 2025
08eba5a
:boom: collapsing LoginInfo into single dto
dseurotech Feb 6, 2025
08c1ab5
:boom: collapsing JobStartOptions
dseurotech Feb 6, 2025
93aa1ff
:boom: removed unused class
dseurotech Feb 6, 2025
fb391d8
:boom: concrete ServiceConfiguration
dseurotech Feb 6, 2025
d2c86a6
:boom: concrete DeviceAsset and DeviceAssetChannel
dseurotech Feb 6, 2025
1012347
:boom: concrete deviceBundle(s)
dseurotech Feb 6, 2025
d6eb6cc
:boom: concrete Device Command Inputs and Outputs; and DeviceConfigur…
dseurotech Feb 6, 2025
6ca575e
:boom: concrete Device Inventory classes
dseurotech Feb 7, 2025
27aefd4
:boom: make DeviceKeystore classes concrete
dseurotech Feb 7, 2025
012bdd2
:bug: post-rebase fixes
dseurotech Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
112 changes: 77 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@

![GitHub Actions CI](https://img.shields.io/github/actions/workflow/status/eclipse/kapua/kapua-ci.yaml) <br/>

[Eclipse Kapua&trade;](http://eclipse.org/kapua) is a modular platform providing the services required to manage IoT gateways and smart edge devices. Kapua provides a core integration framework and an
initial set of core IoT services including a device registry, device management services, messaging services, data management, and application enablement.
[Eclipse Kapua&trade;](http://eclipse.org/kapua) is a modular platform providing the
services required to manage IoT gateways and smart edge devices. Kapua provides a core
integration framework and an
initial set of core IoT services including a device registry, device management services,
messaging services, data management, and application enablement.

## Quick Start Guide

Expand All @@ -33,48 +36,62 @@ Two more backend services are required that implement the data tier:
* The SQL database
* The NoSQL datastore

Eclipse Kapua&trade; can be deployed in a variety of modes. A practical way for running a local demo is through Docker containers.
Eclipse Kapua&trade; can be deployed in a variety of modes. A practical way for running a
local demo is through Docker containers.

### Requirements

Before starting, check that your environment has the following prerequisites:

* 64 bit architecture
* Docker Version 1.2+
* Docker compose V2 for release >= 1.6.12 (present in latest docker desktop versions)
* Docker compose V2 for release >= 1.6.12 (present in latest docker desktop versions)
* Internet Access (needed to download the artifacts)

### Demo Setup

The team maintains some docker images in a Docker Hub repository at [Kapua Repository](https://hub.docker.com/r/kapua/). Check the repo to view the list of available images, if you haven't found one
fitting your needs you may create your own. Please refer to the paragraph [More deployment info](#more-deployment-info) to find more about creating your own images and/or alternative demo deployment
The team maintains some docker images in a Docker Hub repository
at [Kapua Repository](https://hub.docker.com/r/kapua/). Check the repo to view the list of
available images, if you haven't found one
fitting your needs you may create your own. Please refer to the
paragraph [More deployment info](#more-deployment-info) to find more about creating your
own images and/or alternative demo deployment
scenarios.

***
**Note:** the Docker Hub repository mentioned above is not the official project repository from Eclipse Foundation.
**Note:** the Docker Hub repository mentioned above is not the official project repository
from Eclipse Foundation.
***

Suppose the target is the released version V (for example, 1.6.7).

* Clone Eclipse Kapua&trade; into a local directory
* Open an OS shell and move to Kapua project root directory
* Start Docker runtime
* Perform a checkout to the related git tag for version V. For the proposed example, the command is:
* Perform a checkout to the related git tag for version V. For the proposed example, the
command is:

git checkout 1.6.7

git checkout 1.6.7
* Set the `IMAGE_VERSION` environment variable with a value equal to the target version.
For the proposed example:

* Set the `IMAGE_VERSION` environment variable with a value equal to the target version. For the proposed example:
export IMAGE_VERSION=1.6.7

The repository mentioned above hosts only images of released versions. If your target is a
SNAPSHOT version, a local build is required
in order to create the docker images and proceed to the next
step. [Here you can found instructions for building](docs/developer-guide/en/building.md)

export IMAGE_VERSION=1.6.7
***
**A note regarding Docker Compose:** starting from Kapua 1.6.12, the project migrated to
Docker Compose V2. This means that,
depending on your terget version V, your Docker Desktop version should be aligned
accordingly in order to smoothly deploy the application. If you are trying to deploy a
version BEFORE 1.6.12, make sure to have a Docker Desktop version released before july

The repository mentioned above hosts only images of released versions. If your target is a SNAPSHOT version, a local build is required
in order to create the docker images and proceed to the next step. [Here you can found instructions for building](docs/developer-guide/en/building.md)
2023. Otherwise, the latest should be fine.**

***
**A note regarding Docker Compose:** starting from Kapua 1.6.12, the project migrated to Docker Compose V2. This means that,
depending on your terget version V, your Docker Desktop version should be aligned accordingly in order to smoothly deploy the application. If you are trying to deploy a version BEFORE 1.6.12, make sure to have a Docker Desktop version released before july 2023. Otherwise, the latest should be fine.**
***

* Start Kapua:
Expand Down Expand Up @@ -117,31 +134,41 @@ On Windows (PowerShell):

### Access

Once the containers are running, the Kapua services can be accessed. Eclipse Kapua&trade; is a multi tenant
system. The demo installation comes with one default tenant, called _kapua-sys_, which is also the root tenant.
Once the containers are running, the Kapua services can be accessed. Eclipse Kapua&trade;
is a multi tenant
system. The demo installation comes with one default tenant, called _kapua-sys_, which is
also the root tenant.
In Eclipse Kapua&trade; a _tenant_ is commonly referred to as an _account_.

#### The console

The administration console is available at [http://localhost:8080/](http://localhost:8080/).
Copy paste the URL above to a Web browser, as the login screen appears, type the following credentials:
The administration console is available
at [http://localhost:8080/](http://localhost:8080/).
Copy paste the URL above to a Web browser, as the login screen appears, type the following
credentials:

* Username: `kapua-sys`
* Password: `kapua-password`

Press _Login_ button and start working with the console.

**Note**: If you are using Docker on Windows the hostname will most likely not be `localhost` but
**Note**: If you are using Docker on Windows the hostname will most likely not be
`localhost` but
the IP address of your docker instance.

#### RESTful APIs

The documentation of RESTful API is available at [http://localhost:8081/doc/](http://localhost:8081/doc/) while the mount points are available at [http://localhost:8081/v1/](http://localhost:8081/v1/)
The documentation of RESTful API is available
at [http://localhost:8081/doc/](http://localhost:8081/doc/) while the mount points are
available at [http://localhost:8081/v1/](http://localhost:8081/v1/)
.

The documentation is available through Swagger UI which greatly helps testing and exploring the exposed services.
The documentation is available through Swagger UI which greatly helps testing and
exploring the exposed services.

In order to get access a REST resource through an API, an authentication token is needed. Fortunately the token can be easily obtained by executing the authentication API. There are several ways to
In order to get access a REST resource through an API, an authentication token is needed.
Fortunately the token can be easily obtained by executing the authentication API. There
are several ways to
invoke the API, an easy one is by using the Swagger UI:

* Open the URL http://localhost:8081/doc/
Expand All @@ -158,7 +185,8 @@ invoke the API, an easy one is by using the Swagger UI:
}
```

**Note:** as an alternative to the previous, if curl is available on your machine, execute the following from the shell:
**Note:** as an alternative to the previous, if curl is available on your machine, execute
the following from the shell:

```bash
curl -X POST 'http://localhost:8081/v1/authentication/user' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
Expand All @@ -174,17 +202,24 @@ The system will return a JSON object.
* Copy the value of the field _tokenId_
* Paste the value in the box labelled _api\_key_ at the top of the web page

Swagger will automatically add the authentication token to each subsequent request done using the Swagger UI. You're ready to try executing the documented APIs.
Swagger will automatically add the authentication token to each subsequent request done
using the Swagger UI. You're ready to try executing the documented APIs.

**Note**: If you are using Docker on Windows the hostname will most likely not be `localhost` but
**Note**: If you are using Docker on Windows the hostname will most likely not be
`localhost` but
the IP address of your docker instance.

#### The Broker

The broker container exposes an [Mqtt](http://mqtt.org/) end point at tcp://localhost:1883/.
The broker can be accessed through either [Eclipse Kura&trade;](http://www.eclipse.org/kura/) or a plain Mqtt client like, for example, [Eclipse Paho&trade;](http://www.eclipse.org/paho/).
The broker container exposes an [Mqtt](http://mqtt.org/) end point at tcp://localhost:
1883/.
The broker can be accessed through
either [Eclipse Kura&trade;](http://www.eclipse.org/kura/) or a plain Mqtt client like,
for example, [Eclipse Paho&trade;](http://www.eclipse.org/paho/).

In order for a client to establish a Mqtt connection with the broker, a client must provide a valid identity. The _kapua-sys_ account provides the user named _kapua-broker_ which has been pre-seeded
In order for a client to establish a Mqtt connection with the broker, a client must
provide a valid identity. The _kapua-sys_ account provides the user named _kapua-broker_
which has been pre-seeded
and profiled for the purpose.

The credentials for the user kapua-broker are the following:
Expand All @@ -194,7 +229,8 @@ The credentials for the user kapua-broker are the following:

**Note:** do not use the user `kapua-sys` to establish Mqtt connections.

**Note**: If you are using Docker on Windows the hostname will most likely not be `localhost` but
**Note**: If you are using Docker on Windows the hostname will most likely not be
`localhost` but
the IP address of your docker instance.

### Connecting Kura to Kapua
Expand All @@ -203,19 +239,24 @@ the IP address of your docker instance.

#### Simulation

Kapua comes with a framework that you can use to simulate Kura gateways. It can be used to test your Kapua deployments easily. See [Simulator documentation](docs/user-manual/en/simulator.md) for more
Kapua comes with a framework that you can use to simulate Kura gateways. It can be used to
test your Kapua deployments easily.
See [Simulator documentation](docs/user-manual/en/simulator.md) for more
info.

#### More deployment info

Installing and running a demo using Docker is easy, but it's not the only way. There are other scenarios that the users may be interested in. We provide advanced setup scenarios in the following
Installing and running a demo using Docker is easy, but it's not the only way. There are
other scenarios that the users may be interested in. We provide advanced setup scenarios
in the following
guides:

* [Running with Docker](deployment/docker/README.md)
* [Running with OpenShift](docs/developer-guide/en/running.md#openshift)
* [Running with Minishift](docs/developer-guide/en/running.md#minishift)

They will provide more advanced deployment scenarios. For example, if you are interested in having debugging/logging capabilities we recommend you to consult them.
They will provide more advanced deployment scenarios. For example, if you are interested
in having debugging/logging capabilities we recommend you to consult them.

### User & Developer guides

Expand All @@ -224,7 +265,8 @@ They will provide more advanced deployment scenarios. For example, if you are in

### Contributing

If you're interested to get involved in IoT and Eclipse Kapua&trade; project, join the community and give your contribution to the project, please
If you're interested to get involved in IoT and Eclipse Kapua&trade; project, join the
community and give your contribution to the project, please
read [how to contribute to Eclipse Kapua&trade;](https://github.com/eclipse/kapua/blob/develop/CONTRIBUTING.md).

### Community
Expand Down
68 changes: 42 additions & 26 deletions UPGRADE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,79 +1,95 @@
# Upgrade Notes v 2.1.0-SNAPSHOT
# Upgrade Notes v 2.1.0-FALSE_EXTENSIONS-SNAPSHOT

Below are described most important changes, features, additions and bugfixes that needs attention while performing the upgrade from the previous version.
Below are described most important changes, features, additions and bugfixes that needs
attention while performing the upgrade from the previous version.

This report is only partial for Eclipse Kapua release 2.1.0-SNAPSHOT, since we started to maintain it mid-release development.
This report is only partial for Eclipse Kapua release 2.1.0-FALSE_EXTENSIONS-SNAPSHOT,
since we started to maintain it mid-release development.

## Changes

### Deprecation of `db.pool.size.min` and `db.pool.size.max` sizing options [[#4112](https://github.com/eclipse/kapua/pull/4112)]
### Deprecation of `db.pool.size.min` and

Deprecated `commons.db.pool.size.min` and `commons.db.pool.size.max` settings, switching to a new `commons.db.pool.size.fixed` setting which will configure the database connection pool to a fixed size with a default value of `5`.
`db.pool.size.max` sizing options [[#4112](https://github.com/eclipse/kapua/pull/4112)]

Backward compatibility is granted by `db.pool.size.strategy`. Default value is `fixed`, but it can be changed to `range` to continue use of a variable database connection pool. Be aware that at some point `range` strategy will be removed and only fixed size will be available.
Deprecated `commons.db.pool.size.min` and `commons.db.pool.size.max` settings, switching
to a new `commons.db.pool.size.fixed` setting which will configure the database connection
pool to a fixed size with a default value of `5`.

Backward compatibility is granted by `db.pool.size.strategy`. Default value is `fixed`,
but it can be changed to `range` to continue use of a variable database connection pool.
Be aware that at some point `range` strategy will be removed and only fixed size will be
available.

### Duplicate Name Exception is now returned as a 409 error [[#4133](https://github.com/eclipse/kapua/pull/4112)]

Fixed the HTTP response code when a `KapuaDuplicateNameException` occurs from `500 Internal error` to the correct `409 Conflict`.
Fixed the HTTP response code when a `KapuaDuplicateNameException` occurs from
`500 Internal error` to the correct `409 Conflict`.

The body of the response will contain additional information on the error.


### Introduction of un-scoped entities for Job Step Definitions [[#3996](https://github.com/eclipse/kapua/pull/3996)]

Introduced the concept of "Un-scoped entities" as opposite of "Scoped entities".

Normally entities belongs to a certain scope. For example: Users, Tags, Devices belongs to an Account.
There are some entities that are available for all Accounts because of their nature and usage. For example: JobStepDefinitions are available to all scopes.

With this feature we changed the way this "availability" was implemented and made it available at the core of the Service API.
Normally entities belongs to a certain scope. For example: Users, Tags, Devices belongs to
an Account.
There are some entities that are available for all Accounts because of their nature and
usage. For example: JobStepDefinitions are available to all scopes.

User is not required to perform any action to the existing data and the migration of the Job Step Definitions will be performed by the Job Step Definition Aligner that will reflect any change to the Job Step Definitions coded into the Database.
With this feature we changed the way this "availability" was implemented and made it
available at the core of the Service API.

User is not required to perform any action to the existing data and the migration of the
Job Step Definitions will be performed by the Job Step Definition Aligner that will
reflect any change to the Job Step Definitions coded into the Database.

### Invalid Trigger Exceptions are now returned as a 400 error [[#4147](https://github.com/eclipse/kapua/pull/4147)]

Fixed the HTTP response code when a `TriggerInvalidDatesException` or `TriggerInvalidSchedulingException` occurs from `500 Internal error` to the correct `400 Bad Request`.
Fixed the HTTP response code when a `TriggerInvalidDatesException` or
`TriggerInvalidSchedulingException` occurs from `500 Internal error` to the correct
`400 Bad Request`.

The body of the response will contain additional information on the error.


### Max Number Of Entity Reached exception is now returned as a 403 error [[#4154](https://github.com/eclipse/kapua/pull/4154)]

Fixed the HTTP response code when a `KapuaMaxNumberOfItemsReachedException` occurs from `500 Internal error` to the correct `403 Forbidden`.
Fixed the HTTP response code when a `KapuaMaxNumberOfItemsReachedException` occurs from
`500 Internal error` to the correct `403 Forbidden`.

The body of the response will contain additional information on the error.


### Job Step Property value now supports JSON format for complex types [[#4161](https://github.com/eclipse/kapua/pull/4161)]

Allowed complex objects to be inserted with JSON format. Before only XML format was allowed.
Allowed complex objects to be inserted with JSON format. Before only XML format was
allowed.

### Datastore search APIs will now allow multiple

### Datastore search APIs will now allow multiple `clientId` to be specified [[#4130](https://github.com/eclipse/kapua/pull/4130)]
`clientId` to be specified [[#4130](https://github.com/eclipse/kapua/pull/4130)]

Allowed the following REST API resources to accept more than one `clientId` as query parameter.
Allowed the following REST API resources to accept more than one `clientId` as query
parameter.

- `GET /{scopeId}/data/messages`
- `GET /{scopeId}/data/metric`
- `GET /{scopeId}/data/clients`
- `GET /{scopeId}/data/channels`


## DB Changes

### New column in MFA Option table [[#4115](https://github.com/eclipse/kapua/pull/4115)]

New `has_trust_me` column has been added to the `atht_mfa_option`.

New column defaults to `null` and doesn't need any migration. The code itself will populate the column accordingly on first update.
New column defaults to `null` and doesn't need any migration. The code itself will
populate the column accordingly on first update.
For large `atht_mfa_option` tables it might take sometime to be added.


### New column in Trigger Definition Property table [[#4134](https://github.com/eclipse/kapua/pull/4134)]

New `description` column has been added to `schdl_trigger_properties` and `schdl_trigger_definition_properties`.

The column default to `null` and the migration/population procedure will be performed by the Trigger Definition Aligner at application startup.
New `description` column has been added to `schdl_trigger_properties` and
`schdl_trigger_definition_properties`.

The column default to `null` and the migration/population procedure will be performed by
the Trigger Definition Aligner at application startup.
2 changes: 1 addition & 1 deletion assembly/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<artifactId>kapua-assembly</artifactId>
<groupId>org.eclipse.kapua</groupId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-FALSE_EXTENSIONS-SNAPSHOT</version>
</parent>

<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion assembly/broker-artemis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<parent>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-assembly</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-FALSE_EXTENSIONS-SNAPSHOT</version>
</parent>

<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion assembly/console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.eclipse.kapua</groupId>
<artifactId>kapua-assembly</artifactId>
<version>2.1.0-SNAPSHOT</version>
<version>2.1.0-FALSE_EXTENSIONS-SNAPSHOT</version>
</parent>

<packaging>pom</packaging>
Expand Down
Loading
Loading