MetalSoft Extensions

Available since 6.4

Extensions are a mechanism to extend the functionality of MetalSoft beyond what is provided out-of-the-box.

Currently there is only a single type of extension, the ‘app’ extension that adds a custom button in the Infrastructure Editor.

Creation Lifecycle:

  1. The user clicks the button and a custom form is shown with inputs defined in the yaml file in the inputs field:

  1. The instance arrays are created according to the yaml specification

  2. Upon Deploy the resources are deployed and the oncreate entrypoint is executed

Update lifecycle

  1. The user clicks the infrastructure elements and a form is opened allowing the user to change any of the input params.

  2. Upon deploy additional resources are deployed as needed and the onedit entrypoint is executed

Delete lifecycle

  1. The user clicks the delete button in the infrastrucure editor form associated with the button

  2. Upon deploy the ondelete entrypoint is executed and then all resources are released

kind: ExtensionDefinition
schema_version: 1.1
name: Incus Platform
label: incus_6x
type: app
vendor: MetalSoft
extension_version: 1.0
description: Enables the automatic deployment of private and shared incus clusters. Latest supported version is 6.0.
icon: svg..
dependencies:
 - metalsoft_controller_version: 6.3+
 - os_templates:
   - ubuntu_24_04
platform_service:
    inputs:
      - label: cluster_name
        type: string
        name: Cluster name
        validation_regexp: ^(.*)$
      - label: compute_nodes
        type: integer
        name: Compute nodes count
        validation_regexp: ^\d+$
      - label: compute_nodes_type
        type: server_type_list
        name: Compute nodes type
         
    infrastructure_requirements:
      - instance_array:
        label: compute_cluster
        min_instance_count: 1
        instance_count_validation: 1,3,5
        instance_count: Reference to the compute_nodes
        min_cpu: 16
        min_ram: 32
        connected_shared_drive_arrays: da2 #optional
        os_templates: ubuntu_20_04
      - shared_drive_array:
        label: storage_cluster
        min_size: 10TB

    outputs:
      - label: controller_url
        type: string
        name: The URL to the incus controller
        template: https://10.255.147.4:8443/ui/project/default

    assets:
      - my_ansible_bundle_1:
        url: The URL to the ansible bundle
        label: main
        type: ansible_bundle
        required_assets: A list of required assets  
        
    #entrypoints to call on create,edit,delete
    entrypoints: 
     - oncreate:
       pre_deploy: 
          - run_ansible_task:
              asset: my_ansible_bundle_1
              args: my_playbook_1
          - run_ansible_task:
              asset: my_ansible_bundle_1
              args: my_playbook_2
          - run_webhook:
              asset: my_webhook
              args: Args for the webhook
      
       post_deploy: 
          - run_ansible_task:
              asset: my_ansible_bundle_1
              args: my_playbook_1
     - onedit:
       post_deploy: 
          - run_ansible_task:
              asset: my_ansible_bundle_1
              args: my_playbook_1
     - ondelete:
       post_deploy: 
          - run_ansible_task:
              asset: my_ansible_bundle_1
              args: my_playbook_1
              

To manage the extensions a series of CLI commands are provided:

extension list - Lists all extensions.
extension get - Get extension.
extension create - Create extension.
extension edit - Update extension.
extension archive - Archive extension.
extension publish - Publish extension.

It is not possible to delete an extension, only to archive it. Publishing an extension will allow users other than the owner to deploy it.