Assets
Assets are the inner-most level of MintPress's organisational structure. They are linked to an asset template and an asset template version, which give them their actions.rb and their Git revision. An asset should be the closest representation of an actual infrastructure component or service that you want to manage with MintPress.
Assets can be created inside a project or an environment. Properties and settings configured at the asset level override those defined on the project and the parent environment, so the asset is the most specific place to put configuration that only applies to one instance.
This tab lists the assets available for the project. It only shows assets that are immediate children of the project - assets belonging to an environment must be accessed via the environment details screen, but will show a similar view.
Each row includes:
| Column | Description |
|---|---|
| Name | The name describing the asset. |
| Code | Shows the asset's unique code. |
| Actions | Shows the action-generation status and, where available, when the asset's available actions were last refreshed. |
| Template | The asset template the asset uses. |
| Template version | The template version the asset uses, and that version's state. |
| Description | Provides a short summary or purpose of the asset. |
| Archived | Indicates the archival status of the asset. |
Buttons & links
| Buttons & links | Function |
|---|---|
| Bulk actions | Perform operations on multiple assets, such as archiving, restoring, permanently deleting them, running an action across the selected assets, refreshing their available actions, updating their template version or generating their MintModels. To run changes across several projects or environments at once, see run bulk changes. |
| Search bar | Filter the contents of the table based on these criteria. |
| Include archived | List archived assets alongside active ones. |
| Columns | Hide or display columns in the table. |
| CSV | Download the assets as a CSV file. Archived assets are included only when Include archived is ticked; the search is not applied. |
| Create asset | Add a new asset to the project or environment |
Creating a new asset
To create a new asset, first create an asset template and an associated asset template version, and then follow these steps:
- Click on the Create asset button.
- Fill in the mandatory fields in the dialog, including the asset name, code, template name and template version.
- (Optional) Add a description to clarify the purpose of the asset for other users.
- Click the Create asset button. The new asset will appear in the assets list of the project.
Cloning an asset
Clone an asset to copy it, with its properties and settings, to a new asset or onto an existing one in the same project. Open the asset, select the menu (⋮) in its header and choose Clone asset…. Pick the Location - the project or one of its environments - then choose A new asset or An existing asset, and what to copy. Preview shows what the clone will create or update before you select Clone. The options work as they do when cloning an environment. A cloned asset uses the same template and template version as the original.
Promoting an asset to a new template version
Once an asset has been created, its template cannot be changed. To alter the asset's configuration, either update the asset's properties or create a new version of the existing asset template and assign it to the asset:
- Open the asset template details page and create a new template version pointing at the desired Git revision.
- Open the asset details page.
- Click the Update template version icon in the page header, select the new version in the Template version field and click Update template version.
This intentional two-step promotion ensures you're in control of when a new code revision starts being used by the asset.
The asset's Version history tab lists each template version the asset has used, with its commit, when it was active and who changed it.
Updating the template version of several assets
To move several assets to a new template version at once, select them in the assets table and choose Update template version from Bulk actions. The dialog lists each selected asset with its template, its current version and the version it will be given:
- Pick a template, then a version, above the table to give that version to every selected asset using the template. Repeat for each template in the selection.
- Pick All templates to give every asset the version of that name in its own template, where it has one.
Only versions that are ready can be picked, and the newest is marked latest. Assets that will be updated are highlighted and counted at the foot of the dialog; any left without a version are not changed. Each asset is updated separately, and any that cannot be updated is reported in its own notification.
Running changes on an asset
The run button at the top of the page lets you run any of the template version's MintModel or documented actions by selecting it in the Action field. To run an action defined in actions.rb that does not include a description (and is therefore not listed), type its name into the field.
You can also select several of the asset's available actions using their checkboxes and choose Run selected to run them together from a single dialog, rather than starting each change one at a time.
See the run change dialog for a walkthrough of the form fields.
The asset's action tree
The Actions tab lists the asset's available actions and draws the steps each one will run, using the same tree view, search and controls as the change step tree. The list of actions and the tree can be resized against each other, so a long action name or a wide tree can be given the room it needs. Search actions, above the list, and the tree's own search both match a step's name or action.
Hover over the code icon beside an action to see the file and line where it is defined.
A step whose action has a timeout carries a Timeout badge showing it, e.g. Timeout 5m.
Each step in the tree carries a play button. Using it on the root step runs the whole action. On a step further down it opens a menu: Run branch from here runs that step and its children, and Run action from here opens the run change dialog with that step as the change's starting step, so the change begins there rather than at the top of the tree.
The Actions tab is shown only for the nodes that have an action catalog, which is assets.
Refreshing an asset's available actions
An asset's available actions are read from its template version's actions.rb. To pick up newly added or changed actions, refresh them - either from an individual asset, or for several assets at once by selecting them in the assets table and choosing Refresh actions from the Bulk actions menu. The Actions column shows when each asset's actions were last refreshed. The asset's action generation history also lists each retry of a failed MintModel generation, labelled MintModel generation retry.
Refreshing actions in a new image
Refreshing builds the image that generates the asset's actions from the build service's cache, so any layer whose inputs in the repository have not changed is reused. If the Dockerfile installs something that has changed outside the repository - a newer version of a gem, for example - the cached layer still holds the old one. Choose Refresh actions in a new image from the arrow beside the asset's Refresh actions button to rebuild the image from scratch instead. The refresh is marked New image in the asset's action generation history.
Rebuilding is available for a single asset's actions refresh, and needs the same permission as refreshing. See Dockerfile for how the image is built.
When an asset's MintModel actions are unavailable
The actions an asset gets from its MintModel are generated for a particular set of properties at a particular commit, so they stop being available when either of those moves. Where they are, MintPress says which of the following it is rather than only reporting the actions as out of date:
| Reason | What to do |
|---|---|
| The asset's properties have changed since its MintModel was generated | Refresh the asset's actions to regenerate it against the current properties |
| The asset's template version has resolved a new commit since it was generated | Refresh the asset's actions to regenerate it against the new commit |
| The MintModel has not been generated yet | Refresh the asset's actions to generate it for the first time |
| The last attempt to generate the MintModel failed | Address the reported generation failure, then refresh the asset's actions |
| The asset's template version does not include a MintModel | Nothing - this asset's actions come from its actions.rb alone |
Properties anywhere above the asset count here, so editing a project's or an environment's properties can take the MintModel actions of every asset beneath it out of date until they are regenerated.
Generating MintModels for several assets
To generate the MintModel of several assets at once, select them in the assets table and choose Generate MintModel from Bulk actions. Only assets whose template version includes a MintModel are generated; the confirmation lists them. A notification then lists each asset as submitted or failed, with a link to its MintModel. Follow each generation from the asset's MintModel tab.
Artifacts
The Artifacts tab lists the artifacts stored against the asset, whether a change's step stored them or someone uploaded them by hand. Projects and environments have the same tab, listing the artifacts stored against them. To see artifacts from every project in one list, use the top-level Artifacts page.
Each row is one artifact code, showing its latest version:
| Column | Description |
|---|---|
| Code | The artifact's code. Select it to open the artifact's versions page. |
| Latest file | The file name of the newest version. |
| Size | The size of that file. |
| Labels | The labels on that version. |
| Source | The change step that stored the version, or the user who uploaded it. |
| Updated | When the newest version was stored. |
| Versions | How many versions the artifact has. |
Each row also has buttons to preview a text file, download the latest version, copy a link to the artifact's versions and open its history. The list loads more rows as you scroll, and the footer shows how many artifacts are loaded out of how many match. Upload artifact adds an artifact by hand; it is shown only if you have permission to update the project, environment or asset.
Filtering and sorting artifacts
The toolbar above an artifact list filters it. The same filters appear on the Artifacts tab, on an artifact's versions page and on the top-level Artifacts page.
| Filter or button | Function |
|---|---|
| Search | Match part of an artifact's code, file name, description, labels, creator or location. Hover over the help icon in the box for what it matches. |
| User | Show only artifacts created by the users you pick. |
| Source | Show only artifacts that were Uploaded, or only those stored by a Change step. |
| Updated | Show only artifacts stored within a date range. On the versions page this filter is called Created. |
| More | Opens Advanced filters, holding any of the filters above that do not fit in the toolbar, as well as Labels and Purged. |
| Apply | Apply the filters you have chosen. |
| Clear | Remove every filter. Shown while a filter is applied. |
Filters take effect when you select Apply, or press Enter in the search box. Under More:
- Labels shows only artifacts carrying every one of the labels you enter, separated by commas. A label must match in full.
- Purged has Include fully purged on the Artifacts tab, to list artifacts whose versions have all been purged by retention, and Include purged versions on the versions page. Purged artifacts and versions are hidden by default.
Select the Size or Updated column heading (Created on the versions page) to sort by it. The list is sorted newest first by default.
The search, filters and sort are held in the page URL, so a filtered view can be bookmarked or sent to someone else.
Uploading an artifact
To upload an artifact without running a change - for a hotfix that skips the normal build pipeline, for example:
- Click Upload artifact.
- Choose the file. The code is filled in from the file name; change it if you want a different one.
- (Optional) Enter a description of up to 1,000 characters.
- (Optional) Enter labels, separated by commas.
- Click Upload.
A code may contain only lowercase letters, numbers and underscores. Uploading under a code that already exists adds a new version to that artifact rather than replacing the earlier one. An uploaded artifact can be loaded by an action in the same way as one a change stored. To upload from a script, use the artifacts API.
Artifact versions
Select an artifact's code, or its history button, to open its Artifact history page, which lists every version of it, newest first.
Each version shows when it was created, and its file, size, labels and source. The Status column marks the newest version that has not been purged with a Latest pill, and shows Purged with the date for a version whose file retention has removed. A purged version stays listed, but its download button is disabled.
| Button | Function |
|---|---|
| Download latest | Save the file of the latest version. |
| Copy link | Copy a link to this page. |
The versions page has the same filters and sorting as the Artifacts tab, with Created in place of Updated and Include purged versions under More. The latest version's description, if it has one, is shown below the page's title.
Use the back arrow beside the page's title to return to the Artifacts tab. A change's own Artifacts tab links each artifact code to this page.
Archiving an asset
Archive an asset by selecting it from the assets table and choosing Archive assets from the Bulk actions menu.
Archiving an asset:
- disables the asset's scheduled activities - they will not run until the asset is restored
- prevents new changes, workflow runs and scheduled activities from being created against the asset
An asset cannot be archived if it contains a queued or running activity. Wait for those activities to complete (or cancel them) before archiving.
Deleting an asset
Delete an asset from its actions menu, or delete several at once by selecting them in the assets table and choosing Delete assets from the Bulk actions menu.
Deleting an asset is permanent and irreversible. An asset that has changes recorded against it cannot be deleted - archive it instead.