Blueprints

Introduction

An application blueprint is a packaged tarball file (*.tar.gz) that contains the application manifest YAML file (jovianx.yaml) and the Helm Charts directories that are referenced by the application manifest. The application manifest defines the components used by the application. The components can be Helm Charts or other cloud-managed services. JovianX uses the Application Blueprint to create resources and set up services when a new account signs up.

Blueprint Structure

The application blueprint contains the following:
  1. 1.
    Application Manifest - The application manifest is a YAML file named jovianx.yaml. The manifest defines the components that are created for a new SaaS account. For example Kubernetes Helm Charts, DynamoDB, CloudDNS or other cloud managed services.
  2. 2.
    Helm Charts - The blueprint can also include the Helm Charts that are used for creation of application services.

Application Manifest(jovianx.yaml)

The application manifest is a YAML file that describes the application. JovianX uses the manifest to create the needed resources and services when a new account signs-up.
A basic template of an application manifest looks as following:
jovianx.yaml
1
# v1 - JovainX API Compatability
2
jovianx_api_version: v1
3
​
4
# string - Name of this SaaS application
5
application_name: '<APP-NAME>'
6
​
7
# semantic versioning - version of this JovianX blueprint
8
version: <SEM-VERSION>
9
​
10
# string - Name of a component to be used a main application entry point
11
main_endpoint_component: '<COMPONENT-NAME>'
12
​
13
# Components section defines all application components and their helm chart implementations
14
components:
15
- name: '<COMPONENT-NAME>'
16
version: <COMPONENT-SEMVER>
17
provider: helm_chart
18
helm_chart_name: <PATH/TO/HELM/CHART>
19
helm_set:
20
# List of key-value pairs to pass to helm on account creation
21
- key: '<SET-KEY>'
22
value: '<SET-VALUE>'
23
endpoints:
24
- name: '<ENTRYPOPINT-NAME>'
25
type: entry_point
26
service_name: '<KUBERNETS-SERVICE-NAME>'
27
port: <KUBERNETES-SERVICE-PORT>
28
path: '<KUBERNETES-SERVICE-PATH>'
29
​
30
# Settings Descripts define user inputs and
31
settings_descriptors:
32
# list of descriptos
33
- name: <DESCRIPTOR-NAME>
34
display: '<A QUESTION TO ASK THE USER ON SIGN-UP>'
35
input_type: string
36
default: '<DEFAULT ANSWER>'
37
components:
38
- name: '<COMPONENT-NAME>' # Provide value to this componet
39
helm_set:
40
- key: '<SET-KEY>'
Copied!

Creating Application Blueprint

To create an application blueprint archive the application manifest and helm charts into a blueprint tar.gz
1
$ tar -cf <BLUEPRINT-NAME> jovianx.yaml <HELM-CHART> ...
Copied!
Note: The Helm Charts should be open, untar direcotry.
Example: the following directory has an application manifest jovianx.yaml and a Chart my-helm-chart
1
β”œβ”€β”€ my-helm-chart
2
β”‚ β”œβ”€β”€ charts
3
β”‚ β”œβ”€β”€ templates
4
β”‚ β”œβ”€β”€ Chart.yaml
5
β”‚ └── values.yaml
6
└── jovianx.yaml
Copied!
To create an application blueprint for the directory use the following command:
1
$ tar -cf blueprint-1.0.0.tar.gz jovianx.yaml my-helm-chart
Copied!

Upload Application Blueprint

Upload Blueprint via Web UI

To upload your application blueprint to JovianX via the web console:
  1. 1.
    Navigate to Blueprints page
  2. 2.
    Click on Upload a new Blueprint bar
  3. 3.
    Click on Choose blueprint tar.gz file
  4. 4.
    Click on Upload to upload your blueprint
Once the blueprint is upload you will be able to find it in the blueprints list, and view the application manifest.

Upload Blueprint via CURL(CI)

To upload your application blueprint to JovianX via an automated CI process or from command line, you will need to find your API Access Key and API Secret. You can find both in Upload a new Blueprint bar under Blueprints navigation bar.
1
curl -u '<ACCOUNT-API-ACCESS-KEY>:<API-SECRET>' -F '[email protected]<PATH/TO/BLUEPRINT/FILE.TAR.GZ>' 'https://<ACCOUNT-API-PATH>/api/v1/upload_blueprint?make_default=true'
Copied!

Application Manifest (jovianx.yaml) Reference

Application Manifest Root

Key
Description
jovianx_api_version
Description: Version of the JovianX Manifest API.
Parent: Root Type: v1
Required
application_name
Description: Name of the SaaS Application.
Parent: Root Type: string
Required
version
Description: Version of the JovianX blueprint.
Parent: Root Type: semantic version
Required
main_endpoint_component
Description: Main application end-point.
Parent: Root Type: string
Required
​components​
Description: components section is a list of all components(Helm Charts or Cloud Managed Services) used as part of the application, and their settings.
Parent: Root Type: list Required
application_launch_timeout
Description: Application timeout configuration
Parent: Root Type: collection
Optional
status_check: failure_threshold:
Description: How many status error detection are accepted before changing the app status to error.
Parent: Root Type: collection
Default: 1
Optional
agents
Description: The list of agents
Parent: Root Type: list
Optional
settings_descriptors
Description: A list of settings descriptors
Parent: Root Type: list
Optional
hooks
Description: List of hooks
Parent: Root Type: list
Optional

Components

Components section is a list of all components used as part of the application, and their settings. Components are Helm Charts or Cloud Managed Services.
Key
Description
name
Description: Name of the component
Parent: components Type: string
Example: name: 'my-component'
Required
version
Description: Version of the component
Parent: components Type: semantic_version
Example: version: 14.5.2
Required
provider
Description: Provider that implements the component
Parent: components Type: Select Options:
  • helm_chart
  • [Additional providers available in private alpha]
Example: provider: helm_chart
Required
helm_chart_name
Description: Path to unarchived helm chart within the blueprint
Parent: components Type: string
Example: helm_chart_name: /my-helm-chart/
Required for helm_chart provider
helm_values_file
Description: Path to values.yaml file for the component
Parent: components Type: string
Example: helm_values_file: /my-helm-chart/my-values.yaml
Optional for helm_chart provider
helm_set
Description: List of helm set key and value pairs
Parent: components Type: list
Example:
helm_set:
- key: image
value: registry.hub.docker.com/my-company/image
Optional for helm_chart provider

Settings Descriptors

Key
Description
name
Type: string
display
Type: string
input_type
value: string | number | radio | select
default
Type: string
description_title
Type: string
select_options
Type: list

Hooks

Key
Description
pre_install
Description: List hooks that are executed before app install
Parent: hooks Type: list
Optional
post_install
Description: List of hooks that are executed after app install
Parent: hooks Type: list
Optional

Hook

Key
Description
name
​
on_failure
​
timeout
​
provider
​
image
​
command
​
args
​
env
​

Variables

Account

1
{{ account://vendor_company }}
Copied!
1
{{ account://end_company }}
Copied!
1
{{ account://account_api_key }}
Copied!
1
{{ account://admin_email }}
Copied!
1
{{ account://admin_password }}
Copied!
1
{{ account://api_host }}
Copied!
1
{{ account://application_version}}
Copied!
example
1
components:
2
- name: node-component
3
version: 1.0.0
4
provider: helm_chart # helm_chart | docker
5
helm_chart_name: node-chart
6
helm_values_file: values-jovianx.yaml
7
helm_set:
8
- key: repository
9
value: https://gitlab.com/jovianx-saas-platform/hello-world-app.git
10
- key: replicas
11
value: 1
12
- key: vendor_company
13
value: '{{ account://vendor_company }}'
14
- key: end_company
15
value: '{{ account://end_company }}'
16
- key: account_api_key
17
value: '{{ account://account_api_key }}'
18
- key: admin_email
19
value: '{{ account://admin_email }}'
20
- key: admin_password
21
value: '{{ account://admin_password }}'
22
- key: api_host
23
value: '{{ account://api_host }}'
Copied!

Application

Last modified 9mo ago