how-tos:manual-deployment:start

Manual Deployment: Wiring and Naming Services

This HowTo aims for experts who whant to understand and to manually perform the behind-the-sceens deployment process that is automated within the SmartMDSD Toolchain.

The overall automated deployment process consists of several steps, such as preparing the component's ini files (that provide the components' startup configurations), as well as the actual copying of all required artefacts (like the component binaries and their directly required libraries) to the target platform, and finally executing all the components of a current system within the target platform. These steps are automated within the SmartMDSD Toolchain and can be executed in one click. However, these steps can also be executed manually and this page descibes how this can be done.

Component Execution Manually

To execute a component manually on the development PC (i.e. the target is the same as the development PC) without using the SmartMDSD Toolchain's deploment functionality, it is necessary to provide a startup configuration (i.e. the ini file) of that component, to compile the component, and finally to execute it along with the SmartSoft naming service.

Step 1: Rename ini files

Each component automatically generates a so called ini file template that consists of the component's default start-up configurations. While this generated ini file template already provides the majority of all the configuration options required to start the component, there are a few parameters that are initially empty and that are automatically filled within the SmartMDSD Toolchain's deployment process. Since we are not using the deployment functionality here, these properties need to be provided manually.

  • The ini file template can be located in <componentproject-path>/smartsoft/src-gen/ folder and has the file extension “.ini.template”.
  • For manual execution, remove the .template file extension.
  • So, it will become <Componentname>.ini (where “<Componentname>” is the name of your component).

Step 2: Edit ini files

You can now modify the ini file using any standard text editor of your choice. The minimally required information, that you have to provide in the ini file relates to the connection information for the component's client ports. You will find this parameters below the heading named client port parameter (within the ini file).

By default you will see the keyword unknown which reflects the fact that this information has not yet been provided. Here you will need to provide a serverName – this is a component-name of the other component that provides the respective service – and the serviceName – this is the name of the server port that this client port should connect to (you will find the service names in the other ini file of the respective component that provides the relevant service). If you are using the SmartMDSD Toolchain, these values would be filled out automatically based on your component architecture.

Please note, that some client ports of a component are optional and thus must not be necessarily connected. You can identify optional client ports if they provide the parameter initialConnect false. If you like to connect an optional client port, you need to specify its serverName and serviceName, as well as change the initialConnect value to true. All other client ports that do not have initialConnect flag specified are mandatory client ports and must be strictly connected to a respective service of another component.

As an example, we will provide the connection information for the client port named “NavigationVelocityServiceOut”. The generated ini file template looks as follows:

##########################
# client port parameter

# ... other generated parameters

[NavigationVelocityServiceOut]
initialConnect false
serverName unknown
serviceName unknown
wiringName NavigationVelocityServiceOut
interval 1

# ... other generated parameters

##########################

We can change the parameters to this:

##########################
# client port parameter

# ... other generated parameters

[NavigationVelocityServiceOut]
initialConnect true                          # this field is by default false, so change it to true. 
serverName ComponentPlayerStageSimulator     # this is the other component's name
serviceName NavigationVelocityServiceIn      # this is the remote service name (i.e. the server-port name)
wiringName NavigationVelocityServiceOut
interval 1

# ... other generated parameters

##########################

Please note that you can modify all the other parameters as well, but the connection information is the only required information that you must provide as the minimum.

Step 3: Move ini files

Please move the modified ini file from the component project's smartsoft/src-gen/ folder to the $SMART_ROOT_ACE/etc location (you might need to create the etc folder under $SMART_ROOT_ACE if it does not yet exist). etc/ is the default location where component ini files are expected.

> mkdir -p $SMART_ROOT_ACE/etc
> cd <component-project-path>
> mv smartsoft/src-gen/*.ini $SMART_ROOT_ACE/etc

Step 4: Building and executing the component(s)

Before you can execute the components, you will need to start the naming service daemon. It assists the component in finding and connecting to each other. Therefore open a new terminal window and provide these commands:

> cd $SMART_ROOT_ACE
> ./startSmartSoftNamingService

Now you can build and execute the component(s). This can be done as follows:

I. Open a new terminal window.

II. Change to the directory of the component's location and then build the component as follows:

> cd smartsoft/
> mkdir -p build
> cd build/
> cmake ..
> make

III. The component binary is automatically installed into the SmartSoft's default installation folder (specified in the environment variable named SMART_ROOT_ACE) and the component can be executed from there as follows:

> cd $SMART_ROOT_ACE
> ./bin/<ComponentName>

Repeat these three steps for all your components.

Now you should be able to see different components (each in a separate terminal window) executing together as a system.

You can stop the components by typing the shortcut CTRL+C in each of the component terminal windows. This will shut down the components in a controlled way. The naming-service daemon can be stopped by the command ./stopSmartSoftNamingService.

how-tos/manual-deployment/start.txt · Last modified: 2022/12/23 11:06 by 127.0.0.1

DokuWiki Appliance - Powered by TurnKey Linux