Stratus5

Blueprints

Blueprints are reusable templates based on Docker images, fundamental for deploying applications (Sites) quickly and consistently on Stratus5. This guide covers managing Blueprints through the Admin Console and API.

Introduction to Blueprints

A Stratus5 Blueprint uses a Docker image to bundle your application's code, runtime, and default settings.

  • Reusable: Define once, deploy many Sites.
  • Consistent: Ensures identical starting points for Sites.
  • Fast: Enables rapid Site deployment (cloning).
  • Abstracted: Simplifies deployment for users.
  • Sourced: Created from public or private Docker images.
  • Defaults: Can store default resources (CPU, Memory, Storage) and initial credentials.

Using Blueprints facilitates rapid deployment, standardization, simplified management, and version control via Docker image updates.


Listing Blueprints

View all Blueprints available within your Workspace in the Admin Console.

Using the Admin Console (UI)

  1. Navigate: Go to the "Blueprints" section in the Admin Console.
  2. View: A table displays your available Blueprints.
  3. Information: The list typically includes the Blueprint's icon, name, provider/source, last update date, and action buttons.
  4. Search/Filter: Use the search bar or filters to find specific Blueprints.
  5. Count: The total number of Blueprints is shown.

Using the API

Retrieve a list of available Blueprints using the GET /blueprints endpoint.

curl -u YOUR_API_KEY_ID:YOUR_API_KEY_SECRET \
  https://<your-stratus5-api-domain>/s5Api/v1/blueprints
bash

Example Response:

[
  {
    "id": "ff8081815148ce01015148d21e370003",
    "name": "Wordpress-Latest-Optimized",
    "createdAt": "2023-01-01T01:01:01Z",
    "updatedAt": "2023-01-01T01:01:01Z"
  },
  {
    "id": "dd2323ljkklj3ce01015148d21e370003",
    "name": "NodeJS-App-v1.2",
    "createdAt": "2023-02-15T10:30:00Z",
    "updatedAt": "2023-02-15T10:30:00Z"
  }
]
json

Creating Blueprints

Create new Blueprints from existing Docker images available to your Workspace.

Using the Admin Console (UI)

  1. Navigate: Go to the "Blueprints" list page.
  2. Initiate: Click the "New Blueprint" button.
  3. Choose Image Source: Select either the "Public Images" or "My Images" tab to view available base Docker images.
  4. Select Image: Click the "Select" button next to the desired base image. A modal window will appear.
  5. Name the Blueprint: Enter a descriptive name for your new Blueprint.
  6. (Optional) Advanced Options: Click "Show Advanced Options" to configure default resource limits for Sites deployed from this Blueprint:
    • Default Memory Limit
    • Default Storage Limit
    • Default Bandwidth Limit
    • Default CPU
  7. Confirm: Click "Yes, Create This Package" (or similar confirmation button) to create the Blueprint.

Viewing Blueprint Details

Inspect the configuration and details of an individual Blueprint.

Using the Admin Console (UI)

  1. Navigate: From the Blueprints list, click on a Blueprint's name or a "View" action.
  2. View Details: The details page displays:
    • Name
    • Icon
    • Description
    • Snapshot ID (if applicable)
    • Initial Username
    • Initial Password
    • Default Memory
    • Default Storage
    • Default Bandwidth
    • Default CPU
    • Creation Date
    • Last Updated Date
    • Associated App Template/Base Image
    • Snapshot History (if available)
    • Tags associated with the Blueprint.

Using the API

Retrieve details for a specific Blueprint using the GET /blueprints/{id} endpoint.

curl -u YOUR_API_KEY_ID:YOUR_API_KEY_SECRET \
  https://<your-stratus5-api-domain>/s5Api/v1/blueprints/{blueprint_id}
bash

Replace {blueprint_id} with the actual ID.

Example Response:

{
  "id": "ff8081815148ce01015148d21e370003",
  "name": "Wordpress",
  "createdAt": "2013-01-01T01:01:01Z",
  "updatedAt": "2013-01-01T01:01:01Z"
  // Additional details like description, default resources etc. may be included
}
json

Editing Blueprints

Modify the properties of an existing Blueprint you own.

Using the Admin Console (UI)

  1. Navigate: Go to the Blueprint's detail page.
  2. Initiate Edit: Click the "Edit" button (pencil icon).
  3. Modify Fields: Update the available fields, such as:
    • Name
    • Icon (upload a new image file)
    • Description
    • Initial Username
    • Initial Password
    • Default Memory, CPU, Storage, Bandwidth limits.
  4. Save: Click the "Save" button.

Cloning Blueprints

Create a new Blueprint based on an existing one.

Using the Admin Console (UI)

  1. Navigate: Go to the detail page of the Blueprint you wish to clone.
  2. Initiate Clone: Click the "Clone" button (copy icon).
  3. Confirm: Confirm the action in the dialog box.
  4. Result: A new Blueprint, identical to the original, is created. You might be taken to the edit page for the new clone.

Tagging Blueprints

Apply tags to Blueprints for organization or identification.

Using the Admin Console (UI)

  1. Navigate: Go to the Blueprint's detail page.
  2. View Tags: Existing tags are listed in the "Tags" section.
  3. Add New Tag:
    • Click the "New Tag" button.
    • Enter the tag name in the modal window.
    • Click the confirmation button (e.g., "Yes, Create New Tag").
  4. Delete Tag: Click the delete action associated with a tag in the list and confirm the deletion.

Deleting Blueprints

Remove Blueprints that are no longer needed.

Using the Admin Console (UI)

  1. Navigate: Go to the Blueprint's detail page.
  2. Initiate Delete: Click the ellipsis (three dots) button and select "Delete Blueprint".
  3. Confirm: Confirm the deletion in the dialog box.

Needs manual review

  • API Endpoints: The provided s5.yaml API specification does not include explicit endpoints for Creating, Editing, Cloning, Tagging, or Deleting Blueprints. These actions might be handled differently (e.g., internally, via different API versions, or only through the UI).
  • API Detail Response: The example response for GET /blueprints/{id} is minimal. Verify if the actual API response includes more details shown in the UI (like description, default resources, etc.).
  • Blueprint Source/Provider: Confirm how the "Provider" information is determined and displayed in the Blueprint list UI.
  • Deleting Tags: Confirm the exact UI element/action used to delete a tag from the list on the Blueprint details page.