The following instructions explain how to build a Kaa endpoint SDK and integrate it with snappy Ubuntu Core.
Required software components
Ensure the following components are installed on your machine.
To integrate Kaa with snappy Ubuntu Core, you need to use two virtual boxes: one to deploy snappy Ubuntu and a Kaa client and the other to deploy the Kaa sandbox.
Configuring and building sample Kaa client
We assume that the Kaa sandbox is already started.
NOTE: Make sure that the Kaa client is able to connect to Bootstrap and Operations servers deployed on the Kaa sandbox.
To configure and build a sample Kaa client, proceed as follows:
- Go to http://localhost:8080/sandbox/.
- Enter the IP address of your Kaa sanbox VM into the text field and then click Change (in the following screenshot, the IP address is 192.168.100.100).
- Wait till the service restarts.
Get the latest Kaa code from github.
Configure and generate C SDK for your Kaa client.
NOTE: You can find sample Avro schemas in c-sdk-sample/avro/path.
- Create a snappy application in web UI.
NOTE: Refer to managing applications in case of difficulties.
- Add a new configuration schema for your application (look at configuration.avsc).
NOTE: Refer to the configuration schema section in Admin UI guide in case of difficulties.
- Add a new profile schema for your application (look at profile.avsc).
NOTE: Refer to the profile schema section in Admin UI guide in case of difficulties.
- Add a new log schema for your application (look at log.avsc).
NOTE: Refer to the log schema section in Admin UI guide in case of difficulties.
- Generate the C SDK for your application.
NOTE: Refer to the generating SDK section in Admin UI guide in case of difficulties.
Build a Kaa client with the generated C SDK. Remove everything in the c-sdk-sample/libs/kaa folder and unzip the generated SDK to that folder.
If the build is successful, you will get the result on your screen as follows:
Building snappy package
To build a snap package, proceed as follows:
Install snappy Ubuntu tools by executing the following commands either from Ubuntu or from the Kaa sandbox (in case you are using another OS). Building inside Kaa sandbox is preferable, because system upgrade step may harm your system.
Create the correct folder structure. Refer to the official snappy Ubuntu Core documentation for details.
Copy the previously built Kaa client to the snappy-kaa/bin directory.
Create the package.yaml file in the snappy-kaa/meta directory with the following context.
Create the readme.md file in the snappy-kaa/meta directory with the following context.
Build a snap package from the snappy-kaa directory.
As a result, you should get the kaa_0.0.1_all.snap file.
Known issue: your readme.md should contain at least two lines of text or package build will silently fail. this is some kind of undocumented behavior.
Installing snappy Ubuntu
To locally deploy snappy Ubuntu, run the following commands.
As a result, you should be connected to your snappy Ubuntu box.
Installing sample Kaa client on snappy Ubuntu
To install the previously built sample Kaa client on snappy Ubuntu, proceed as follows:
From the snappy Ubuntu shell, copy kaa_0.0.1_all.snap from your host machine.
Start the Kaa client on the snappy Ubuntu box.
As a result, you should get the logs similar to the following:
To learn more about snappy Ubuntu Core, visit the official Ubuntu web site.
To learn more about Kaa, look at the following guides and references.
What it is for
Use it to quickly create your first Kaa application.
Use this guide to create your own Kaa applications.