Search code examples
fiware-pegasus

Including custom blueprint templates


I would like to upload my own blueprint templates, then teploy blueprint instanced based on them. Can FIWARE Pegasus do that? In positive case, could you detail the procedure, please?


Solution

  • You can upload your own blueprint template into the FIWARE template catalogue, by using the Pegasus API (see https://jsapi.apiary.io/apis/fiwarepaas/reference/paasmanager-v1/blueprint-templateenvironment-api.html).

    It is a POST request to /catalog/org/{your-organization}/vdc/{your tenant id in the Cloud}/environment with a payload similar to:

    Body

    <environment>
        <name>{environment-name}</name>
        <tiers>
            <tier>
                <initial_number_instances>1</initial_number_instances>
                <maximum_number_instances>1</maximum_number_instances>
                <minimum_number_instances>1</minimum_number_instances>
                <name>{tier-id}</name>
                <networkDto>
                        <networkName>Internet</networkName>
                        <subNetworkDto>
                                <subnetName>sub-net-Internet</subnetName>
                        </subNetworkDto>
                </networkDto>
                <productReleases>
                    <product>postgresql</product>
                    <version>0.0.3</version>
                    <withArtifact>true</withArtifact>
                    <productType>
                        <id>5</id>
                        <name>Database</name>
                    </productType>
                </productReleases>
            </tier>
        </tiers>
    </environment>