All rapyuta.io docs are open source. See something that's wrong or unclear? Submit a pull request.Make a contribution
A package is a fundamental rapyuta.io resource that represents a declaration of your application. It is the smallest unit of deployment in rapyuta.io, and it can be deployed either on a device or the cloud or both.
Creating a software package consists of the following high-level procedures.
Step1: Define Package information
Step2: Create Components
To add the metadata of the package, do the following.
In the package information section, do the following.
a. Type a package name in the Package Name field.
b. Type the package version in the package version field.
c. Click one of the following.
IS Singleton package: Select this option if a package is not dependent on another package.
Is a bindable package: Select this option if a package depends on another package or deployment of another package, the package bindings link the package to its dependencies.
In the Description field, type a brief description about the package and click Next.
A component is a set of executables. All executables are deployed in unison on the desired Component Runtime. All executables of a component communicate via Inter-Process Communication (IPC). An executable listening on a port is accessible to its sibling executables via localhost.
Perform the following procedure to create components.
Click the Components tab.
In the component metadata area, do the following.
a. In the Component Name field, type a name for the component.
b. In the Component Runtime field, select the component runtime either as Device or Cloud. For more information about device run-time, click here
c. If the component is to be deployed on a ROS-enabled device, click the IS ROS Component check-box.
d. In the Replicas to run the component field, type the number of replication of the component that you want to include.
In the executables area, do the following.
a. In the Executable Name field, type a name of the executable.
b. From the executable Type drop-down menu, select the executable type as Build, Docker, or Default.
For more information about the type of executables, click here
c. If you have selected the executable type as Development>Builds, from the Choose Build drop-down menu, select the build.
d. If you have selected the executable type as Docker, in the Docker Image field, type the docker image that you want to use. For more information about creating the build recipe as docker, click here.
e. Optionally, if the docker image is private, click the Private Image check-box and select the credential from the Credentials drop-down menu.
f. In the Command to Run field, in the docker container box, enter the command to run the executables.
g. From the Resource limit drop-down menu, select the CPU and memory requirement for the executable.
Optionally, to add an end-point, click Add Endpoint and do the following. For more information on endpoint configuration, click here
a. In the Endpoint Name field, type a name for the endpoint.
b. If the endpoint is exposed publicly, click the Exposed externally radio button and do the following.
c. From the protocol section, select one of the following available protocols.
HTTP/Websocket exposed on port 80
HTTP/Websocket exposed on port 443
Secure TCP (TLS/SNI) exposed on port 443
d. In the Target Port field, type the target port. Port is where the application’s service is made visible to other services.
The Secure TCP (TLS/SNI) protocol uses SNI headers for routing the request to the desired backend.
e. If the endpoint is accessed internally, do the following.
f. In the port field, type the port number for the endpoint. Port is where the application’s service is made visible to other services. g. In the Target Port field, type the target port. The target port is where the application needs to be listening for network requests for the service to work.
h. Optionally, You can also use port range for an endpoint by selecting Port Range toggle. A Port Range on an endpoint will allow you to open multiple ports on a single DNS hostname.
A maximum of 50 ports is allowed for an endpoint. The allowed format is comma-separated Port Ranges. Each Port Range is either a single port or a range of port mentioning the from port and to port separated by a hyphen (-). Examples: 5000 or 443-445 or 3446-3449,3500,3510-3530
If you want to add a ROS topic to the package, click Add ROS topic and do the following. A ROS topic is intended for unidirectional, streaming communication. For more information, click here
a. In the name field, type the name of the ROS topic.
b. Select one of the following. Compressed, Scoped, Targeted:
c. To add a tunable level of reliability for ROS topics for the transport layer even over the public internet, select one of the following QOS types.
If you want to add a ROS service to the package, click Add ROS and do the following.
a. In the name field, type a name for the ROS service.
b. In the Timeout field, enter the timeout in seconds.
Optionally, to add configuration parameter to the executable, click Add Parameter. configuration parameters operate at the level of the component and apply to executables in the component only.
rapyuta.io allows you to configure the following additional information for the package.
Volumes: Applications running on the cloud de-allocate any resources consumed when they stop, scale down, or fail. This implies that the working storage associated with them is ephemeral. To get around this problem rapyuta.io provides a mechanism to consume persistent block storage for your applications running in the cloud. This storage can be associated with at most one running deployment at any given point of time. A user is typically required to manage the lifecycle of the application code independently from the associated storage.
The Rapyuta IO Persistent Volume is a storage package. A storage package is a public package that is available to all users out of the box. You cannot delete or modify storage packages, and they are available to every user.
Dependent Deployment: If your package has a dependency on a deployment, you must define the dependent deployment.
Inbound ROS interface: While having provider semantics provides flexibility but can potentially lead to a case where a user may deploy a package that depends on a previously deployed one without sufficient knowledge of the internal workings of the parent package. Cross talk between topics/services/actions in such cases can cause unintended hard to debug errors and failure of application code.
To prevent such unintentional cross-communication between deployments of two packages, rapyuta.io requires a package to declare a whitelist of ROS inbound topics/services/interfaces it can receive from a child dependant on it.
Perform the following procedure to add additional information to the package.
Click Additional Information tab.
To add a volume to the package, click the refresh icon next to the Volume field and do the following. Before adding a volume package, ensure that you have created a volume package. Under Deployment, select the volume deployment that you created.
To add a dependent deployment, click the refresh icon next to the Dependent Deployment field and select the dependent deployment.
Click Confirm Package Creation.