Skip to content

Latest commit

 

History

History
80 lines (58 loc) · 4.27 KB

minimal_mode.md

File metadata and controls

80 lines (58 loc) · 4.27 KB

ManageIQ allows developers to start minimal services and/or the rails app via a "minimal" mode setting when starting the application. Starting in minimal mode limits the number of workers that are started for a quicker application startup, or for targeted end-user testing of specific pieces of the application.

Standard Startup

In development, to start the application in standard mode, run:

$> rake evm:start

This command will start the following workers:

  • two generic workers
  • two priority workers
  • two reporting workers
  • one schedule worker
  • one UI worker
  • one web service worker
  • any additional event workers (based on configured External Management Systems)
  • any additional refresh workers (based on configured External Management Systems)

Strict Minimal Startup

In development, to start the application in minimal mode, run:

$> MIQ_SPARTAN=minimal rake evm:start

The MIQ_SPARTAN environment variable is inspected by the MiqServer class (specifically, the EnvironmentManagement mixin), which determines whether the application is starting in a minimal mode. In this strict minimal mode, the following workers are started:

  • one generic worker
  • one UI worker

Specific Minimal Startup

ManageIQ allows developers to augment the minimal startup mode by specifying a colon-separated list of worker roles. These worker roles are used to determine which workers should be started in addition to the strict minimal list above.

To start the application with a specific set of workers in minimal mode, run

$> MIQ_SPARTAN=minimal:<role_name>:<role_name> rake evm:start

Following is a mapping of role names to worker types:

Role name Worker
ems_inventory miq_vim_broker_worker, miq_ems_refresh_worker, miq_ems_refresh_core_worker
ems_metrics_collector miq_vim_broker_worker, miq_ems_metrics_collector_worker
ems_metrics_processor miq_ems_metrics_processor_worker
ems_operations miq_vim_broker_worker
event miq_event_catcher, miq_event_handler
reporting miq_reporting_worker
schedule miq_schedule_worker
smartproxy miq_smart_proxy_worker, miq_vim_broker_worker
smartstate miq_vim_broker_worker
user_interface miq_ui_worker
web_services miq_web_services_worker
no_ui Prevent starting the UI worker normally provided by minimal

For example, to start in minimal mode with event catching and EMS refreshing enabled, run:

$> MIQ_SPARTAN=minimal:event:ems_inventory rake evm:start

Note:

  • A value specified in MIQ_SPARTAN will not start the worker if the server is not configured with that role. All MIQ_SPARTAN does is filter down the existing list of assigned server roles to a smaller set.
  • Some of the workers can be started with different roles
    • For example, miq_vim_broker_worker can be started with any of
      • smartstate
      • smartproxy
      • ems_operations
      • ems_metrics_collector
      • ems_inventory
  • All of these workers are subclasses of MiqWorker::Runner
  • Some workers will only start if there is a corresponding External Management System configured, such as the miq_ems_refresh_worker.

Some Suggested Startups

Values Purpose
minimal:ems_inventory:event Testing EMS Refresh and Eventing from a provider
minimal:no_ui:reporting Testing UI changes, when needed to run the UI through a debugger instead of a worker
minimal:schedule Testing real world schedules