Provisioning

There are several capabilities in the Morpheus provisioning engine. Things ranging from application / service deployments via containers, virtual machines, and even bare metal. Deployment management and app template construction are also core aspects of the provisioning engine. Take advantage of custom tasks and workflows within any environment by building tasks and workflows from those tasks. There is a lot of information to cover with regards to provisioning but Morpheus makes it intuitive and smooth.

Provisioning Concepts

Morpheus is a powerful infrastructure agnostic Cloud Application Management Platform. As a result of this there are some differing concepts compared to other CMP platforms in the space. It is here that it is important to notice the qualification difference between Morpheus and other platforms.

Morpheus refers to itself as a CAMP (Cloud Application Management Platform) as opposed to a (Cloud Management Platform). While that may seem minor, it actually is a big deal. Many CMP based applications start at the IaaS layer and work up to the application layer (often needing additional PaaS) architectures to fill out the model. Morpheus was designed from a middle-ground perspective. As such some concepts are a bit different. This provides a more complete platform that allows for greater capabilities out of the box as will be seen when these concepts are covered.

Instances

Morpheus starts with provisioning Instances. In some platforms an Instance is representative of a singular object like a “Virtual Machine” in Amazon. In Morpheus , this concept was rethought. An Instance is more of a representation of a Resource or Service. This service may involve several virtual machines or even several docker containers.

For example, in the morpheus Instance wizard Mongo is an option and contains several “Instance Configurations”. One of these configurations is a full Mongo cluster consisting of either seven virtual machines or seven docker containers. Rather than representing these directly as seven individual “instances”, Morpheus groups them together into a singular instance of a service that contains multiple containers or virtual machines. This even allows for instance actions that can be performed to expand capacity on an instance (either horizontally or vertically). In the past, a database server may have been representative of a singular server, but this model has drastically changed in a big data world. This same concept also can apply to something like a simple Apache web server where there are 10 copies of a web server horizontally scaled out to handle traffic.

When viewing an instance detail page, one is able to look at details/statistics specific to a virtual machine or container. Morpheus simply helps simplify the management model for tracking these services.

Containers / Nodes / Virtual Machines

In relation to Instances, an instance can have many nodes. A node is a generic representation of a container or a virtual machine. In most cases, Morpheus will represent a node as a Container or Virtual Machine depending on the provisioning engine used for the instance. Node is just a generic naming representation when referring to these types of items. The public developer API, however, often refers to both virtual machines and docker containers as Containers. The UI was since updated to better deliniate this concept for easier understanding but In essence the name is valid for both concepts of containerized environments as well as Virtual Machines. In fact, one can even think of a Docker Host as a Hypervisor (which we do).

Hosts / Servers

This concept is mostly tailored to users of morpheus responsible for managing and maintaining the underlying infrastructure integrations. A Host typically refers to a Docker Host in which a container in an instance is running, or a hypervisor virtual machines can be provisioned onto. A Server is the underlying general representation of a physical or virtual server. It could be a Host representation , a Virtual Machine, or even a Bare Metal delineation.

When a user provisions a vm based instance, a corresponding server record is created to represent the link to the actual resource via the underlying provisioning engine. This may seem a bit odd but provides an aspect of Morpheus that is quite powerful. This singular concept is what allows Morpheus to injest “Brownfield” environments. We do not need to start clean. Morpheus can be integrated into existing environments and manage existing virtual machines. The way Morpheus does this is by periodically syncing existing vms from the added cloud integrations. A server record will be created and periodically updated (5 minutes typically) with realtime information and changes. This, in essence, provides CMDB based capabilities as well. When a server is discovered, the user (given the appropriate access) can convert the virtual machine to a managed instance. When this is done a corresponding Instance is made in the provisioning section of Morpheus and the Morpheus Agent can also optionally be installed to provide more refined guest operating system level statistics and logging.

Apps

On top of all the previous concept, Morpheus provides an Apps layer. An App is a collection of Instances linked together via application tiers. Tiers allow the user to define segregated sections of connectivity between the various elements / instances within an application. Once these instances are all linked together in an application concept, this may affect Instance environments and provide service discovery capabilities for them to cross connect. There are several service discovery aspects within morpheus as well as integrations with services like Consul.

Templates

A template is typically referred to as an Application Template. It allows a user to define an application structure for easy reproducibility and deployment into various environments. They can be used to mix and match various instance types to provision an application dependent on multiple layers of services.

Instances

Instances is a great starting point for taking advantage of self service features and spinning up both VM’s and containers. In Morpheus it may be advisable to cover the definition of a few terms used within the application so as to reduce confusion.

Instance
A set of containers or virtual machines that can correlate to a single horizontally scalable entity or a service suite like a database. (It is important to note that an instance can contain one or more containers/vms depending on the instance type and configuration).
Container
Typically a docker container provisioned via a Morpheus Docker host.
Virtual Machine
A virtualized compute server provisioned onto various hypervisor hosts.

The top of the main Instances page shows overall statistic for the listed Instances, including count, status, and resource utilization. You can search for instances by name, or filter by group, instance type, or category.

Note

Instances listed are determined by group access and role permissions.

The Instance list contains important information about each instance, including the instance name, environment tag, instance type icon, ip and port info, instance version, the number of virtual machines or containers in the instance, the group the instance is in, and the cloud or clouds the instance is in.

Creating Instances

The instance catalog is the one stop shop for selecting items to be provisioned and pieced together. It contains not only basic container and vm options but also tailored services for SQL databases, NoSQL databases, cache stores, message busses, web servers, and even full fledged apps. The list contains a lot of items to choose from and they are represented to the user based on what provisioning engines are enabled and integrated in the Morpheus environment.

To get started, simply click the + Add Instance button in the upper right of the Provisioning -> Instances section. A modal will display allowing the catalog to be searched. Once an item is selected it is just a matter of following the steps through the wizard.

Tip

The instance catalog can be customized via role based access control thereby restricting access to non sanctioned catalog items, as well as added to via the Provisioning -> Library section. It is completely customizable.

The next step will ask for a Group and Cloud to be selected. The Group is an abstract representation that can contain multiple cloud integrations. These cloud integrations can also be in multiple groups and is also useful for using role based access control to restrict provisioning access and set retainment policies. If the environment is new and these do not yet exist, It may be advisable to refer to the main section on Getting started by setting up some cloud integrations and infrastructure first. The wizard continues by allowing us to choose a name for the instance as well as an environment.

Note

Currently the Environment option is mostly useful for presenting the user with informative metadata around the instance when coming back to it later.

Moving on, it is now time to configure the Instance. Depending on the option that was chosen and the Instance Configuration that is chosen fields will change. This can include cloud specific fields (i.e. Datastore for VMware or Network). There will also be options like initial username. Some of these fields are optional and will be represented as such.

Configuration options provided in this screen are very powerful. An example is Mysql where a Master/Slave or Master/Master layout can be selected. These configurations will automatically deploy two MySQL VMs or containers and link them together to provide replication. These types of configurations exist for a wide range of instance types and are optimized for high performance and scale. It is even possible to provision entire sharded Mongo clusters.

One last step before the instance can be provisioned is the Automation step. This wizard step may or may not appear depending on the capabilities of the instance type or previous configurations in the account. It is here one can easily select a post provisioning workflow to run ( see more on Tasks and Workflows), assign a load balancer, or even configure the backup job that gets created.

Now that the steps are completed for provisioning the selected instance type , simply review your selections and complete. The instance will automatically show up in the instances list and its provisioning state will be represented. Depending on what was provisioned this step can range from seconds to minutes (typically a container configuration will be rather quick if the instance type has previously been provisioned before.)

Instance Details

The instance detail page is where you can view and fully manage an instance. To get to an instance detail page, navigate to provisioning, instances, and click on an instance. Please note instance details and actions differ between instance types and user permissions.

There are several sections within an Instance page that provide useful capabilities to the user.

Summary
Stats and status information
Deploy
Track deployment history for instance types that support deployments or manually kick off a deployment (only visible for instance types that support deployments)
Settings
Some instance types support custom configuration settings (i.e. mysql presents the my.ini)
Network
Useful for configuring security groups and access to the instance.
Monitoring
Quick summary of the monitoring system and all checks that were configured to test the state of the instance
Backups
Quick backup dashboard. Useful for viewing historical backups as well as kicking off new ones.
Logs
View all aggregated logs from the containers or VM’s representing the instance.
Environment
View the environment variables presented to the instances or exported by the instances via Apps (more on this in the Apps section). Even see Imported environment variables that may be referenced by the running instance.
Scale
For instances that support load balancing and auto scaling. Easily configure auto scaling thresholds and load balancer settings that pertain to a particular instance.
Console
Access the instance or container via a client-less Console supporting SSH, RDP, VNC, and even hypervisor level remote consoles.

Instance Actions

Instance actions allow you to perform numerous management tasks on instances. The actions available depend on the instance type, hypervisor, roles permissions, and instance state.

Edit
Edit the Name, Description, Environment, or Group for the Instance.
Delete
Deletes the Instance.

Important

Deleting an Instance will delete associated VM’s or Containers and cannot be undone. To delete instances without deleting associated VM’s, delete the VM from the Infrastructure section and uncheck “Remove Infrastructure” while checking “Remove Associated Instances” in the delete modal options.

Actions

Available options in the Actions dropdown can include:

Suspend
Puts the VM in a suspended state without shutting down the OS.
Stop/Start/Restart Service
Stops, Starts or Restarts the service associated with the Instance Type.
Stop/Start/Restart Server
Stops, Starts or Restarts the Virtual Machine.
Lock/Unlock Instance
A locked instance cannot be deleted until it is unlocked.
Import As Image
Creates a Virtual Image template from the Instance at its current state and adds it to the Virtual Image library with corresponding metadata.
Reconfigure
The Reconfigure action allows service plan, disk, cpu, ram, networks and storage controller changes. Available options depend on the instance type and service plan configuration. Some resize actions require an instance restart.
Clone
Creates a new Instance from the Instance at its current state.
Backup
Immediately executes a backup of the Instance. Only available for Instances with backups enabled.
Run Workflow
Presents workflow options and then immediately runs selected Workflow on the Instance. Workflows can be created in the Provisioning -> Automation section.
Run Script
Presents Script options and immediately executes selected Script on the Instance. Scripts can be created in the Provisioning -> Library section.
Apply Template
Presents Template options and immediately applies selected Template to the Instance. Templates can be created in the Provisioning -> Library section.
Add Node
Adds an additional node to the configuration. Additional options and configurations are required in the add node wizard depending on instance configuration and type.
Eject Disk
Ejects attached disk/iso.
Add Slave
Adds a database slave in the Instance.
Change Master
Changes the database Master node in an Instance.

Tip

Scrolling down in the Actions dropdown may be necessary to see all options.

Performing Instance Actions

  1. Select the Provisioning link in the navigation bar.
  2. Click the Instance from the list of instances you wish to perform an action on.
  3. Click the Actions drop down button and select an Action.

Notes

Every Instance has a Notes section for adding useful information about the Instance. Notes can be added by selecting the ADD NOTES button on the bottom of Instance Detail pages. Existing notes can be edited by selecting the EDIT NOTES

Tip

Markdown Syntax is supported in Instance Notes.

Apps

Apps allow instances having general relationships to be grouped in a clean and organized manner. App functionality enables full control of which instances belong in an app as well setting Firewall and Access Control List (ACL) rules. Use Apps to structure all necessary components into a single place. Add checks and groups for web servers, database nodes, etc.

Apps can be created from Templates, which are made in Provisioning -> Templates or from Existing Apps.

Creating Apps from Templates

  1. Click “+ADD APP” on the right side of the main Apps section in Provisioning.

  2. Select an existing App Template and click NEXT.

    Note

    Templates must be created in in Provisioning -> Templates. to appear as options when creating an App.

  3. Enter a Name for the App and select a Group. Default Cloud and Env can also be selected.

  4. Click NEXT. Template configurations matching the Group, Cloud and Environment selections will auto-populate the configurations of the Instances in the App. If no Template Configuration matched the Group, Cloud or Env selections, the Instances will have default configurations.

  5. Configure your Instances. Depending on the Template Configurations settings, instances may already be fully configured. Fields that are locked in a Template cannot be edited when creating an App.

    Note:: Once an Instance is fully configured, a green checkmark will appear next to the Instance. Instances that have required fields that need populated will have a red X and must be completed. If your Template is already fully configured you can simply select complete!

  6. Select COMPLETE and the App will be created and the Instances will begin provisioning.

../_images/apps_301_1.png

Creating Apps from Existing Instances

  1. Click “+ADD APP” on the right side of the main Apps section in Provisioning.

  2. Select APP FROM EXISTING INSTANCES from the Templates list and click NEXT.

  3. Enter a Name for the App and select a Group. Default Cloud and Env can also be selected.

    Note

    Only instances within the selected Group and Cloud will be available to be added to the App.

  4. In the STRUCTURE section, select + to add a Tier

  5. Select or enter a Tier Name.

  6. Select the Tier to set Boot Order, rename, or once multiple Tiers are added, connect the Tier to other Tiers.

  7. In the STRUCTURE section, select + in a Tier to add an Instance

  8. Select the Instance Type of the Existing Instance to be added to the App.

  9. In the STRUCTURE section, select the Instance.

  10. In the CONFIGURATION section, select the Cloud the Existing Instance is in. Existing INSTANCES that match the Group, Cloud and Instance Types set will populate.

  11. Select the desired Instance from the INSTANCES list. Selected instance will show in the SELECTED INSTANCE section.

    Note

    Only one existing Instance can be added per Instance. To add multiple Existing Instances, repeat the step above including adding an Instance for each Existing Instance to be added to the App.

  12. Once all Existing Instances have been selected, click COMPLETE.

  13. A new App will be created out of the Existing Instances.

../_images/apps_301_2.png

Exporting JSON or YAML

  1. Navigate to Provisioning -> Apps
  2. On an existing App, select ACTIONS -> EXPORT
  3. Select YAML or JSON in the top right.
  4. Select the Configurations to include in the Export by clicking on a Configuration. Selected Configurations will be highlighted.
  5. Select the DOWNLOAD CONFIGURATION button.
  6. The Template Export file will be downloaded to your computer as {app_name}-config.json or {app_name}-config.yaml.

Tip

JSON or YAML can also be Viewed, Edited, Copied, or Exported by selecting ``ACTIONS -> EDIT``on an App and clicking the RAW section in the Edit App modal.

../_images/apps_301_3.png

Templates

Overview

App Templates allow to pre-configure full multi-tier application deployments for multiple environments. Templates can be provisioned from the Provisioning -> Apps section and can be fully configured for one click provisioning. Templates can be built within the Builder section or by code in the Raw section. Templates can also be exported as YAML or JSON and created with the Morpheus API and CLI.

../_images/templates_301_1.png

Creating App Templates

  1. Navigate to Provisioning -> Templates
  2. Select + ADD TEMPLATE
  3. Enter a NAME for the Template and select NEXT
  4. Optionally add a Description, Category, and Image for the Template.

Add Tiers

  1. In the STRUCTURE section, select + to add a Tier
  2. Select or enter a Tier Name.
  3. Select the Tier to set Boot Order, rename, or once multiple Tiers are added, connect the Tier to other Tiers.

Add Instances to Tiers

  1. In the STRUCTURE section, select + in a Tier to add an Instance
  2. Select an Instance Type
  3. Optionally add a name for the Instance. Instances with blank names will automatically be named based off the App name.

Add Configurations to Instances

  1. In the STRUCTURE section, select + in an Instance to add a Configuration
  2. Select at least one option from Group, Cloud or Environment.
  3. Select ADD CONFIG to create the configuration
  4. Populate the Configuration
    • Configurations can be fully partially or populated
    • Fields can be locked by selecting the Lock icon next to the Field. Locking prevent the field from being editable when provisioning an App using the Template.
    • ALLOW EXISTING INSTANCE will allow users to add existing Instances to the App when using the template

Save

Once all desired Tiers, Instances and Configurations are added, select Save. The Template will be created, can be edited after saving, and will available in the Apps section for provisioning.

Note

Templates are not provisioned when created. To provision a Template, use Provisioning -> Apps.

RAW

Templates can be create, edited or Exported in the RAW section when creating or editing a template.

../_images/templates_301_2.png

To Export a Template as JSON or YAML:

  1. Create or Edit a Template
  2. Select the RAW section on the top of the APP TEMPLATE modal.
  3. Select JSON or YAML in the top right of the RAW section.
  4. Select the EXPORT button.
  5. Select the Configurations to include in the Export by clicking on a Configuration. Selected Configurations will be highlighted.
  6. Select the DOWNLOAD CONFIGURATION button.
  7. The Template Export file will be downloaded to your computer as {template_name}-config.json or {template_name}-config.yaml.

Preview

In the APP TEMPLATE modal, select the Preview section to display a graphical representation of your Templates Tiers, Instances and Tier Connections.

../_images/templates_301_3.png

Important

When Tiers are connected, the Instances in a Tier will import the evars from Instances in connected Tiers, and if |morpheus] is managing the Instance Firewalls, communication between the Instances will be facilitated based on the Instances port configurations.

Provisioning

To provision a Template, navigate to Provisioning -> Apps and select the Template when creating an App.

Automation

Provisioning -> Automation

The Automation section is composed of Tasks and Workflows. Tasks can be scripts added directly, scripts and templates from the Library section, recipes, playbooks, salt states, puppet agent installs, or http (api) calls. These Tasks are are combined into workflows, which can be selected to run at provision time or executed on existing instances via Actions -> Run Workflow.

Tasks

Available Task Types:

  • Ansible Playbook
  • Chef Bootstrap
  • Groovy Script*
  • HTTP
  • Javascript*
  • jRuby Script*
  • Library Script: Adds an existing script from the Library section as a task
  • Library Template: Adds an existing script from the Library section as a task
  • Puppet Agent Install
  • Python Script (jython)*
  • Shell Script
  • SSH Script
  • WinRM Script
  • Restart: Executes a restart on the Instance. Morpheus will wait until the restart is complete to execute the next task in the workflow phase.

Note

  • executes locally

To Add Tasks:

  1. Select the Provisioning link in the navigation bar.
  2. Select Automation from the sub-navigation menu.
  3. Click the Add Task button.
  4. From the New Task Wizard input a name for the task.
  5. Select the type of task from from the type dropdown.
  6. Input the appropriate details dependent on the task type you selected from the dropdown.
  7. Save

Edit Task

  1. Select the Provisioning link in the navigation bar.
  2. Select Automation from the sub-navigation menu.
  3. Click the Edit icon on the row of the task you wish to edit.
  4. Modify information as needed.
  5. Click the Save Changes button to save.

Delete Task

  1. Select the Provisioning link in the navigation bar.
  2. Select Automation from the sub-navigation menu.
  3. Click the Delete icon on the row of the task you wish to delete.

Workflows

Add Workflow

To Add Workflows:

  1. Select the Provisioning link in the navigation bar.
  2. Select Automation from the sub-navigation menu.
  3. Click the Workflows tab to show the Workflows tab panel.
  4. Click the Add Workflow button.
  5. From the New Workflow Wizard input a name for the workflow.
  6. Optionally input a description.
  7. Expand the execution phases to add tasks to, and type the name of a created task and click the task when it appears to add.
  8. If multiple tasks are added to the same execution phase, their execution order can be changed by selecting the grip icon and dragging the task to the desired execution order.
  9. For multi-tenant environments, select Public or Private visibility for the Workflow.
  10. Click the Save Changes button to save.

Workflow Execution Phases

For VM’s, Pre-Provision and Provision execute after the VM is running. Pre-Provision can be used for a template so it is added before a script set at the Provision phase executes. Pre-Provision for scripts is mainly for Docker as you can execute on the host before the container is up. Post-Provision will execute after the entire provisioning process is complete.

Edit Workflow

To Edit Workflows:

  1. Select the Provisioning link in the navigation bar.
  2. Select Automation from the sub-navigation menu.
  3. Click the Workflows tab to show the workflows tab panel.
  4. Click the Edit icon on the row of the workflow you wish to edit.
  5. Modify information as needed.
  6. Click the Save Changes button to save.

Delete Workflow

To Delete Workflows:

  1. Select the Provisioning link in the navigation bar.
  2. Select Automation from the sub-navigation menu.
  3. Click the Workflows tab to show the workflows tab panel.
  4. Click the Delete icon on the row of the workflow you wish to delete.

Virtual Images

Provisioning -> Virtual Images

Overview

The Virtual Image section displays a list of all images, local and synced, that are available to deploy. Morpheus includes a rich catalog of pre-configured System Images available for every cloud type. User Images are automatically synced from Cloud Integrations and added to the Virtual Images section. Images can also be uploaded directly into Morpheus via local file or url. Amazon and Azure Marketplace images can also be added to the Virtual Images Section.

Image Types

Morpheus provides a vast System Image repo with pre-configured images for every Cloud. All other images are User Images. User images can be added directly to Morpheus , or automatically synced from integrated clouds. It is important to configure synced User Images for metadata, including specifying the Platform and User Credentials, prior to provisioning. Provisioning a User Image that has not been configured may result in failed provisioning.

Important

Synced User Images need to be configured prior to provisioning.

Configuring Virtual Images

System Images

System Images are pre-configured with metadata and have Cloud-Init or Cloudbase-Init installed. These images are ready to be provisioned with no configuration necessary. It is highly recommended to populated the Administration -> Provisioning -> Cloud-Init section with user data prior to provisioning, as the user and password/key will be added to all Instances provisioned from System Images. Users can also be added during provisioning in the Add User provisioning wizard section.

Note

Editing System Images is disabled.

User Images

Typically Morpheus does not have sufficient metatdata to successfully provision synced User Images. After integrating clouds and User Images have synced, it is highly recommended to configure the images prior to provisioning.

To edit and configure an existing Virtual Image:

  1. Select Actions - Edit in the Virtual Images list, or Edit on a Virtual Image detail page.
  2. Configure the following on the Image:
Name
Name of the Virtual Image in Morpheus . This can be changed from the name of the Image, but editing will not change the name of the actual Image.
Operating System
Specifies the Platform and OS of the image. All Windows images will need to have Operating System specified on the Virtual Image, as Morpheus will assign Linux as the Platform for all Images without Operating System specified.
Cloud Init Enabled?
On by default, uncheck for any Image that does not have Cloud-Init or Cloudbase-Init installed.
Install Agent
On by default, uncheck to skip Agent install. Note this will result in the loss of utilization statistics, logs, script execution, and monitoring. (Some utilization stats are collected for agent-less hosts and vm’s from VMware and AWS clouds).
Username
Existing Username on the Image. This is required for authentication, unless Morpheus is able to add user data via Cloud-Init, Cloudbase-Init, or guest processes (VMware).
Password
Password for the Existing User on the image.
Cloud-Init User Data
Accepts what would go in runcmd and can assume bash syntax.
Permissions
Set Tenant permissions in a multi-tenant Morpheus environment. No impact on single-tenant environments.
Auto Join Domain?
Enable to have instances provisioned with this image auto-join configured domains (Windows only).
VirtIO Drivers Loaded?
Enable if VirtIO Drivers are installed on the image for provisioning to KVM based Hypervisors.
Force Guest Customization?
VMware only, forces sys-prep on image during provisioning.
Trial Version
Enable to automatically re-arm the expiration on Windows Trial Images during provisioning.
  1. Save Changes

Note

Cloud-Init is enabled by default on all Images. Images without Cloud-Init or Cloudbase-Init installed must have the cloud-init flag disabled on the Virtual Image setting or Provisioning may fail.

Provisioning Images

When provisioning a System Image for the first time, Morpheus will download and stream the image from S3 to the source Cloud if the image is not local to the Cloud. The Image will also be cached on the Morpheus Appliance under /var/opt/morpheus/vm/vmcache. Subsequent provisions of the image will use the created template in the Cloud or the cached local Image if the images does not exist in the selected Cloud, in which case the cached Image will be copied to the Cloud.

When using Images that already exist in the destination cloud, such as synced, marketplace, or previously copied images, no image transfer between the Morpheus Appliance and destination cloud will take place.

Note

The Morpheus Appliance must be able to download from Amazon S3 when provisioning System Images for the first time.

Note

The Morpheus Appliance must be able reach and resolve the destination Host when provisioning System Images or uploaded Images for the first time. This included being able to resolve ESXi host names in VMware vCenter clouds, and reach the destination ESXi host over port 443.

Add Virtual Images

Virtual Images can be upload to Morpheus from local files or URL’s. Amazon and Azure Marketplace metadata can also be added to the Virtual Images library, enabling the creation of custom catalog Instance Type from Marketplace images (no image is transferred to Morpheus when adding Marketplace images).

To Add Virtual Image:

  1. Select + Add Virtual Image in the Virtual Images page.
  2. Select Image format:
  • Amazon AMI
  • Azure Marketplace
  • Digital Ocean
  • ISO
  • PXE Boot
  • QCOW2
  • RAW
  • VHD
  • VirtualBox
  • VirtualBox (vdi)
  • VMware (vmdk/ovf/ova)
  1. Configure the following on the Virtual Image:
Name
Name of the Virtual Image in Morpheus . This can be changed from the name of the Image, but editing will not change the name of the actual Image.
Operating System
Specifies the Platform and OS of the image. All Windows images will need to have Operating System specified on the Virtual Image, as Morpheus will assign Linux as the Platform for all Images without Operating System specified.
Cloud Init Enabled?
On by default, uncheck for any Image that does not have Cloud-Init or Cloudbase-Init installed.
Install Agent
On by default, uncheck to skip Agent install. Note this will result in the loss of utilization statistics, logs, script execution, and monitoring. (Some utilization stats are collected for agent-less hosts and vm’s from VMware and AWS clouds).
Username
Existing Username on the Image. This is required for authentication, unless Morpheus is able to add user data via Cloud-Init, Cloudbase-Init, or guest processes (VMware).
Password
Password for the Existing User on the image.
Storage Provider
Location where the Virtual Image will be stored. Default Virtual Image Storage location is /var/opt/morpheus/morpheus-ui/vms. Additional Storage Providers can be configured in Infrastructure -> Storage.
Cloud-Init User Data
Accepts what would go in runcmd and can assume bash syntax.
Permissions
Set Tenant permissions in a multi-tenant Morpheus environment. No impact on single-tenant environments.
Auto Join Domain?
Enable to have instances provisioned with this image auto-join configured domains (Windows only).
VirtIO Drivers Loaded?
Enable if VirtIO Drivers are installed on the image for provisioning to KVM based Hypervisors.
Force Guest Customization?
VMware only, forces sys-prep on image during provisioning.
Trial Version
Enable to automatically re-arm the expiration on Windows Trial Images during provisioning.

Note

Default Storage location is /var/opt/morpheus/morpheus-ui/vms. Additional Storage Providers can be configured in Infrastructure -> Storage. Ensure local folders are owned by morpheus-app.morpheus-app if used.

  1. Upload Image

Images can be uploaded by File or URL:

File
Drag and Drop the image file, or select “Add File” to select the image file.
Url
Select the URL radio button, and enter URL of the Image.

Note

Morpheus provides a file upload progress. The Virtual Image configuration can be saved while the upload is in progress, and the upload will finish in the background.

Library

Overview

The Library section is used to add virtual images as custom instances to the provisioning catalog. The Library Section is composed of:

  • Instance Types
  • Layouts
  • Node Types
  • Option Types
  • Option Lists
  • Templates
  • Scripts

Uploaded or synced images from the virtual images section are added to nodes, a node or multiple nodes are added to layouts, and layouts are added to Instance Types. Scripts and Templates can be attached to nodes, with phased execution options for scripts.

Instance Types

Adding an Instance Type creates a new Library Item category. Multiple layouts can be added to an instance type, and these layout can have different nodes attached. The instance wizard will present the layout options compatible with the selected cloud. If cloud selection is turned off, all layouts will be presented for all cloud types accessible by the user.

Name
Name of the Instance Type in the Provisioning Library
Code
Useful shortcode for provisioning naming schemes and export reference.
Description
The description of the Instance Type shown in the Provisioning Library. (255 characters max)
Category
For filtering in Instance sections and Provisioning Wizard
  • Web
  • SQL
  • NoSLQ
  • Apps
  • Network
  • Messaging
  • Cache
  • OS
  • Cloud
  • Utility
Icon
Suggested Dimensions: 150 x 51
Visibility
  • Private- Only accessibly by assigned Accounts/Tenants
  • Public- accessible by all Accounts/Tenants
Environment Prefix
Used for exportable environment variables when tying instance types together environment Variables in app contexts. If not specified a name will be generated
Enable Scaling (Horizontal)
Enables load balancer assignment and auto-scaling features
Supports Deployments
Enables deployment features (Requires a data volume be configured on each version. Files will be copied into this location)

Upon saving, this Instance Type will be available in the Provisioning Catalog, per user role access. However we still need to add layouts to the Instance Type, and prior to creating a layout, we will add a node type.

Node Types

The following fields are for all node technology types:

  • Name
  • Short Name
  • Version
  • Category
  • Technology

** Azure ** Docker ** Google ** Hyper-V ** KVM ** Nutanix ** OpenStack ** VMware ** Xen * Environment Variables

The Options fields will change depending on the Technology option selected.

For VM provisioning technology options, select an image from the VM Image dropdown, which is populated from the Virtual Images Section and will include images uploaded into Morpheus, and synced images from added clouds.

Note

Amazon and Azure Marketplace Images can be added in the Virtual Images section for use as node types in custom library items.

For Docker, type in the name and version of the Docker Image and select the integrated registry.

Expose Ports
To open port on the node, select “Add Port” and enter the name and port to expose. The Load Balancer http, https or tcp setting is only required when attaching to load balancers.

Scripts & Templates

To attach scripts and templates that have been added to the Library to a node type, start typing the name and then select the script(s) and/or template(s).

  • Multiple scripts and templates can be added to a node type
  • Scripts and Templates can be added/shared among multiple node types
  • The Execution Phase can be set for scripts in the Scripts section.
  • Search will populate Scripts or Templates containing the characters entered anywhere in their name, not just the first letter(s) of the name.

Upon save the Node Type will be created, and available for adding to layouts.

Layouts

Layouts are added to Instance types, and will be presented under the Configuration Options dropdown in the Provisioning Wizard for that Instance type.

Instance Type
Select the Instance Type to add the new Layout to. Custom Instance Types must already be created and one layout cannot be added to multiple instance types, or change Instance Types after creation.

Note

Layouts cannot be added to Morpheus provided library items at this time.

Name
The name the layout will present as in the Configuration Options dropdown in the provisioning wizard
Version
The version number or name for the Layout. Layouts in an Instance Type with the same version will all show under the Configuration Options dropdown when that version in selected while provisioning.
Description
Description of the layout
Technology
Technology determines which cloud this layout will be available for.
Environment Variables
Custom evars to be added to the instance when provisioned.
Nodes
Single or multiple nodes can be added to a Layout by searching for and selecting the node(s). An example of a layout with multiple nodes is the Hyper-V MySQL Master/Slave layout pictured below (note this is the Layout detail screen after the layout has been created.)

..Multi-node Layout example:

Upon save, the layout will be attached to the selected Instance Type, and available when provisioning that Instance Type for the appropriate cloud technology.

Option Types

Option Types allow you to create additional fields within the provisioning wizard.

These field entries can then be used in scripts and templates using our variable naming convention (more here).

Option List

Much like Option Types, Option Lists allow you to give the user more choices during provisioning to then be passed to scripts and/or automation. Option Lists, however, are pre-defined insofar as they are not free-form. They can either be manually entered CSV or JSON or they can be dynamically compiled from REST calls via GET or POST requests.

Your new Library Item is now ready for provisioning. Multiple Layouts, Versions and Technology types can be added to a single Instance Type.

Migrations

Migration Types

Hypervisor to Hypervisor

Store
Morpheus will create a snapshot of existing VM and upload the snapshot to virtual image directory. Images that have been uploaded to the Virtual Images library can be converted to VHD, QCOW2, RAW and VMDK formats and then re-provisioned.
New
Morpheus will create a snapshot of an existing VM, convert from source format to required destination format, and then provision the VM into the target environment.
Source
VMWare, Openstack, Xen, ESXi, Nutanix* Azure* Hyper-V* ( *in-development)
Destination
Softlayer, Openstack, Metapod, Xen, Amazon, VMWare, ESXi, Nutanix, Hyper-V Supported OS Type: Windows or Linux
Service Impact
Disruptive Migration

Virtual Image Extract

The Virtual Image extract capabilities allow for a virtual image to be extracted and stored in the virtual image repository or the image can be migrated into a cloud.

Source
Any Cloud
Destination
SoftLayer (Only)
Supported OS Type
Windows
Service Impact
Non Disruptive
Requirements
Requires a separate disk or network share to store the image during conversion process. Capacity of the disk or network share should be sized appropriately to support the data that will be exported.

Live Stream

Live Stream is a linux only streaming process that will take a snapshot of a volume and allow it to be streamed to a destination linux system that is either existing or new. The destination linux must already exist and it can either be a managed or unmanaged VM in Morpheus . The destination will be overwritten from a root level perspective.

Source
Any Cloud
Destination
Morpheus
Supported OS Type
Linux (Only)
Service Impact
Non Disruptive
Requirements
Requires the Linux host/guest to be configured for LVM and that free space of the capacity to be streamed is available. A destination linux host/guest must be available to receive the stream.

Add Migration

  1. Select the Provisioning link in the navigation bar.
  2. Select the Migrations link in the sub-navigations bar.
  3. Click the Add Migration button.
  4. From the Create Migration Wizard select the type of migration, then click the Next button.

Depending on the Migration Type selected input the following, then click the Next button.

  • Hypervisor to Hypervisor * Select Cloud, and Server * Input Host, Remote Port, Username, and Password
  • Virtual Image Extract * Select Platform, Existing or New, Cloud, and Server. * Input Host, WinRM Port, WinRM User, WinRM Password, and Snapshot path.
  • Live Stream * Select Platform, Existing or New, Cloud, and Server * Input Host, SSH Port, SSH User, SSH Password, Public Key, and Logical Volume Device. * Enter Destination details, then click the Next button.
  1. Finalize your configuration if needed, then click the complete button.

Manually Start Migration

If you chose to not run your migration in the Create Migration Wizard then you will be able to manually start the migration.

  1. Select the Provisioning link in the navigation bar.
  2. Select the Migrations link in the sub-navigations bar.
  3. Click the actions dropdown of the row of the migration you wish start, and select Run.

Remove Migration

  1. Select the Provisioning link in the navigation bar.
  2. Select the Migrations link in the sub-navigations bar.
  3. Click the actions dropdown of the row of the migration you wish remove, and select Remove.

Deployments

The deployments section provides very useful PaaS like capabilities when it comes to deploying applications into the newly provisioned environment. These can be uploaded directly from the UI, pulled from a build server, pulled from a public or private Git repository or even via the API and the various plugins created, such as Jenkins, and Gradle to support continuous build / integration workflows.

A deployment can be considered a set of versions that relate to a particular project or application being deployed. This allows one to keep track of a history of versions and easily reuse these deployment versions across instances that may exist in different environments. An example might be to deploy a version from a deployment to a staging instance and (once approved) also deployed into production.

Getting Started

Getting started with deployments is easy. They can vary slightly for the application stack being deployed but the simplest phase of a deployment is adding a version and adding the appropriate files to the deployment archive that are needed for the application to run. This could be a single file like a WAR file for Tomcat, or it could be hundreds of files for stacks like Ruby on Rails.

There are a few ways to create a deployment. The first is to use the Provisioning -> Deployments section of the application to create them. Simply add a new deployment and give it a name representing the application that is being deployed. Once a deployment is created select the deployment to view its versions (which will be empty to start). Next, its time to add a version.

When adding a version there are several options. There are 3 types represented by the UI. These include File, Fetch, and Git respectively. A File deployment allows the user to simply drag their files into the file explorer presented by the dialog. This file explorer can take single files or entire file trees (If files exist in subfolders then only the Chrome browser is supported due to browser limitations at the time of this writing). This is also the common type that is represented when files are uploaded via the CLI, or available build tool integration plugins. Once the files have completed their upload simply save the version for use.

Git

For performing git based deploys Morpheus supports both public and private repositories. To utilize a private git repository the add version dialog will display a public keypair that can be added to the git service for authentication purposes. Currently this keypair is shared across the account and not specifically scoped to the user so it may be advisable to connect this integration to a deployment account in git. From here either a ssh or https git url can be entered along with a git branch or tag name. Once the version is saved, this repository will be copied down into the deployment archive for use.

Fetch

Fetch based deployments are pretty straightforward. Simply enter a url to a file representing the deployment. This can be a single file (in which case it will just be added to the deployment archive singularly) or it can be a zip file (which will automatically be expanded into the archive). HTTP Authentication options can also be entered if the url requires some form of basic authentication scheme for access by the appliance.

Deploying to an Instance

Now that a version has been added to a deployment it is easy to push that deploy out to any instance provisioned within Morpheus . Simply navigate to the specific Instance that needs deployed to. On the Instance detail page there is a tab called Deploy. From here simply add a deploy. The dialog will ask firstly from which deployment the deploy is from (or allow you to create a new one on the spot) , and secondly which version to deploy (also with the option to add one on the fly). The next step of the wizard will display any configuration options that might be specific to the instance type being deployed to (i.e. CATALINA_OPTS for Tomcat or Java Command for java) as well as the file explorer and deployment type selections for review (or use when creating a new version on the fly). Fill in the required items then simply hit complete. The deploy will now be asynchronously sent off to all of the virtual machines or containers within the instance in a rolling restart and the deployment status will be represented.

Tip

When deploying to an instance, the custom configuration options that were entered during the previous deployment are automatically carried forward allowing one to edit them or leave them as is.

Rolling Backwards and Forwards

Because of the tracked history of deployments kept within Morpheus , the deploy tab of instance detail makes it easy to choose a previously run deployment and jump back to it in the event of a failed deployment. The history will automatically be updated and the configuration, as well as data from the previous deployment state of the instance will be restored.

Offloading Storage

Since a full history of the backup builds are kept in Morpheus , as the appliance grows it becomes necessary to change where these are stored. On a fresh install these are stored on the local appliance in /var/opt/morpheus or wherever the master account may have changed the configuration to point to. It is also possible to adjust the deployment archive store by creating a Storage Provider tied to an S3 compatible object store, Openstack Swift object store, or any other type of mountpoint provided. This option can be adjusted in Admin->Provisioning once a storage provider is created within the account.

Add Deployment

Add Deployment

  1. Select the Provisioning link in the navigation bar.
  2. Select the Deployments link in the sub-navigation bar.
  3. Click the Add Deployment button.
  4. Enter a Name for the deployment and a description (optional)
  5. Click the Save Changes button to save.

Add Version

  1. Select the Provisioning link in the navigation bar.
  2. Select the Deployments link in the sub-navigation bar.
  3. Click the Name of the deployment you would like to add a version to.
  4. Click the Add Version button.
  5. From the Add Version Wizard select the deployment type.
  6. Input the Version of the deployment.
  7. Depending on the type of deployment selected perform one of the following:
Files
Drag files into the file explorer presented by the dialog. This file explorer can take single files or entire file trees.
Fetch
Enter a url to a file representing the deployment.
Git
The add version dialog will display a public key pair that can be added to the git service for authentication purposes. Either a ssh or https git url can be entered along with a git branch or tag name.

Click the Save Changes button to save.

Edit Deployment

To Edit Deployment:

  1. Select the Provisioning link in the navigation bar.
  2. Select the Deployments link in the sub-navigation bar.
  3. Click the Edit Deployment icon on the row of the deployment you wish to edit.
  4. Modify information as needed
  5. Click the Save Changes button to save.

Delete Deployment

To Delete Deployment:

  1. Select the Provisioning link in the navigation bar.
  2. Select the Deployments link in the sub-navigation bar.
  3. Click the Delete Deployment icon on the row of the deployment you wish to delete.