Creating shortcuts for Container Stack based applications¶
In DataOS, the home page prominently showcases pre-built applications. Nevertheless, when a data developer hosts an application on the Container Stack, the responsibility for integrating a shortcut to their application and ensuring its accessibility to all users rests with them.
This can be accomplished through the utilization of the appDetailSpec
attribute.
appDetailSpec: {
"name": {{name of application, e.g. "Depot-Cluster-Builder"}},
"title": {{title of application, e.g. "Create your depot and cluster effortlessly"}},
"releaseLevel": {{release level of application, e.g. "alpha", "beta"}},
"description": {{description, e.g. "Empower your Depot management"}},
"icon": {{icon of application in base64 format, else DataOS will provide a default image, e.g. "data:image/svg+xml;base64, abcdefghijklmnopqrstuvwxyz"}},
"section": {{category or section of the application, e.g. "Business"}},
"path": {{path or url associated with the application, e.g. "/depot-catalyst/"}},
"keyword": {{keywords related to application, e.g. "Create Depot"}},
"isInternal": {{true/false}},
"disabled": {{true/false}},
"navigation": {{additional navigation-related settings}}
}
Structure of appDetailSpec
¶
The appDetailSpec
value is a JSON string containing the subsequent attributes:
Attribute | Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|---|
name |
string | mandatory | none | any valid string |
title |
string | optional | none | any valid string |
releaseLevel |
string | optional | none | "alpha", "beta", or any other valid string |
description |
string | optional | none | any valid string |
icon |
string | optional | default image identifier provided by DataOS | Base64-encoded image |
section |
string | optional | none | any valid string |
path |
string | mandatory | none | any valid path |
keyword |
string | optional | none | any valid string |
isInternal |
boolean | optional | false | true/false |
disabled |
boolean | optional | false | true/false |
navigation |
mapping | optional | none | custom navigation settings |
Procedure for creating the application shortcut¶
Incorporate the Application Icon¶
Should you possess a custom application icon, it is imperative that it be provided in SVG format for subsequent encoding as a Base64 string.
Procedure for Encoding Icon to Base64 Format
Two methods for converting an SVG image to a Base64 string are provided for your reference:
- Employ the following CLI command to encode an SVG image as a Base64 string:
- Consult this Link for base64 encoding.
Following the successful transformation of the SVG image to a Base64 encoded string, it can be introduced as the value of the icon
key within the appDetailSpec
.
Sample Container manifest¶
The ensuing YAML example serves to illustrate the practical implementation of these directives.
name: depot-catalyst
version: v1
type: service
service:
title: depot-deployer
replicas: 1
servicePort: 8501
ingress:
appDetailSpec: '{
"name": "Depot-Cluster-Builder",
"title": "Create your depot and cluster effortlessly",
"releaseLevel": "beta",
"description": "Power your Depot management.",
"icon": "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MDAgNTAwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6IzQ5NDk0YTt9LmNscy0ye2ZpbGw6I2ZmYzQzZDt9LmNscy0ze2ZpbGw6bm9uZTtzdHJva2U6IzAwMDtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLXdpZHRoOjIwcHg7fS5jbHMtNHtmaWxsOiNmYWFlMTc7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5tYW5hZ2VtZW50PC90aXRsZT48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik0zNzAuMDgsMjc3LjY3LDM2Mi40NSwzMTNIMzE1LjIzbC03LjYzLTM1LjI5YTExOS4yNiwxMTkuMjYsMCwwLDEtMjguNTEtMTEuODJsLTkuODYsNi4zNUE4MCw4MCwwLDEsMSwyMjksMjMwLjg4bDUuOTMtOS4yMWExMTkuMjQsMTE5LjI0LDAsMCwxLTExLjgxLTI4LjUxbC0zNS4yOS03LjYzVjEzOC4zMWwzNS4yOS03LjYzYy43NS0yLjgsMS42MS01LjU0LDIuNTYtOC4yNWwtMS00LjQzaC01OGwtOS4zNyw0My4zNmExNDUuOTIsMTQ1LjkyLDAsMCwwLTM1LDE0LjUxTDg1LDE1MS44NCw2NS40NSwxNzEuMzdsLTIsMS45NUw0NCwxOTIuODZsMjQsMzcuMjlhMTQ2LjU3LDE0Ni41NywwLDAsMC0xNC41MSwzNWwtNDMuMzYsOS4zN3Y1O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"keyword": "Create Depot",
"isInternal": false,
"disabled": false,
"navigation": []
}'
enabled: true
noAuthentication: true
path: /depot-catalyst
stripPath: true
stack: container
compute: runnable-default
resources:
requests:
cpu: 1
memory: 500Mi
limits:
cpu: 2
memory: 10Gi
envs:
LOG_LEVEL: info
DATAOS_ENV: 'https://{{dataos-context}}.dataos.app'
stackSpec:
command:
- streamlit
arguments:
- run
- main.py
- --server.port=8501
- --server.address=0.0.0.0
image: iamgroot/alphaapp:latest
Result¶
Once you've successfully applied the YAML, your app icon will appear in the home page of the environment along with other apps as shown in the screenshot below.
![Container Stack based App Shortcut](/resources/stacks/container/container_stack_based_app_shortcut/container_stack_based_app_shortcut.png)
Attributes of appDetailSpec
¶
name
¶
Description: the name
attribute specifies the name of the application.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | mandatory | none | any valid string |
Example Usage:
title
¶
Description: the title
attribute specifies the title of the application.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | optional | none | any valid string |
Example Usage:
releaseLevel
¶
Description: the releaseLevel
attribute specifies the release level of the application.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | optional | none | "alpha", "beta", or any other valid string |
Example Usage:
description
¶
Description: the description
attribute provides a brief description of the application.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | optional | none | any valid string |
Example Usage:
icon
¶
Description: the icon
attribute specifies the icon of the application in base64 format. If not provided, DataOS will use a default image.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | mandatory | default image identifier provided by DataOS | Base64-encoded image in data:image/svg+xml;base64,{{base64-encoded-image}} |
Example Usage:
section
¶
Description: the section
attribute categorizes the application into a specific section or category.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | optional | none | any valid string (like Business, Marketing) |
Example Usage:
path
¶
Description: the path
attribute specifies the path or URL associated with the application.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | mandatory | none | valid path |
Example Usage:
keyword
¶
Description: The keyword
attribute provides keywords related to the application.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
string | optional | none | any valid string |
Example Usage:
isInternal
¶
Description: The isInternal
attribute indicates whether the application is for internal use.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
boolean | mandatory | false | true/false |
Example Usage:
disabled
¶
Description: The disabled
attribute specifies whether the application is currently disabled.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
boolean | mandatory | false | true/false |
Example Usage:
navigation
¶
Description: The navigation
attribute may contain additional navigation-related settings for the application. The content and format of this attribute can vary depending on specific navigation needs.
Data Type | Requirement | Default Value | Possible Value |
---|---|---|---|
mapping | optional | none | none |
Example Usage: