Module: Elevage
- Defined in:
- lib/elevage.rb,
lib/elevage/new.rb,
lib/elevage/build.rb,
lib/elevage/health.rb,
lib/elevage/runner.rb,
lib/elevage/version.rb,
lib/elevage/generate.rb,
lib/elevage/platform.rb,
lib/elevage/constants.rb,
lib/elevage/environment.rb,
lib/elevage/provisioner.rb,
lib/elevage/provisionerrunqueue.rb
Overview
rubocop:disable ClassLength
Defined Under Namespace
Classes: Build, CLI, Environment, Generate, Health, New, Platform, Provisioner, ProvisionerRunQueue, Runner
Constant Summary collapse
- VERSION =
'0.1.0'- DESC_VERSION =
options description messages DESC_followed by command and the description
'Display installed elevage gem version (Can also use -v)'- DESC_NEW =
'Prepare new platform files and folder structure at current location'- DESC_LIST =
'List ITEMs from platform desired state yml files'- DESC_LIST_NODES =
'used with environment name to list node names and ip addresses'- DESC_HEALTH =
'Health check of the Platform desired state yml files'- DESC_GENERATE =
'Generate new environment file based on platform template'- DESC_BUILD =
'Provision vms in an environment definition'- DESC_BUILD_DRY_RUN =
'Do not actually do anything, just display the commands that would be run.'- DESC_BUILD_ENV =
'Name of the platform environment to provision'- DESC_BUILD_USER =
'User name for vSphere'- DESC_BUILD_PASSWD =
'Password for vSphere'- DESC_BUILD_ALL =
'Build everything for the named environment'- DESC_BUILD_TIER =
'Build everything for the specified tier in the named environment'- DESC_BUILD_COMPONENT =
'Build all nodes for the specified component'- DESC_BUILD_NODE =
'Build the single specified node'- DESC_BUILD_VSUSER =
'Username for vSphere'- DESC_BUILD_VSPASS =
'Password for vSphere'- DESC_BUILD_SSH_USER =
'Unix username for ssh for chef-client bootstrap (must have sudo NOPASSWD access for root)'- DESC_BUILD_SSH_KEY =
'Path to SSH private key for ssh username for key-based authentication'- DESC_BUILD_TEMPLATE_FILE =
'File to be used as the chef-client bootstrap template script'- DESC_BUILD_BOOTSTRAP_VERSION =
'Version of chef-client to bootstrap on node'- DESC_BUILD_CONCURRENCY =
'Maximum number of simultaneous provisioning tasks'- DESC_BUILD_LOGFILES =
'Path where log files should be written'- LIST_CMDS =
available List commands
%w(environments tiers pools components network vcenter compute)- TIMEZONE_LIMIT =
Health check range settings
159- CPU_LIMIT =
16- RAM_LIMIT =
128- POOL_LIMIT =
256- MSG_HEALTHY =
Health check messages
'All base platform desired state files created and syntactically correct'- MSG_ENV_HEALTHY =
' specific definition yml syntactically correct'- MSG =
{ empty_environments: "Empty environment definitions\n", empty_tiers: "Empty tier definitions\n", empty_nodenameconvention: "Empty nodenameconvention definitions\n", pool_count_size: "Must define 1 or more nodes in a pool\n", invalid_tiers: "Pool contains invalid tier reference\n", no_image_ref: "No vm image referenced in pool definition\n", invalid_compute: "Pool contains invalid compute reference\n", invalid_port: "Pool contains invalid port definition\n", invalid_runlist: "No pool runlist definition\n", invalid_componentrole: "Pool Componentrole missing #\n", invalid_geo: "no vCenter geo defined\n", invalid_timezone: "Invalid vCenter timezone\n", invalid_host: "vCenter host not accessible\n", invalid_datacenter: "No datacenter defined for vCenter\n", invalid_imagefolder: "No image location defined for vCenter build\n", invalid_destfolder: "No destination folder defined for vCenter build\n", invalid_appendenv: "Append environment to destination folder must be true or false\n", invalid_appenddomain: "prepend app name to domain must be true or false\n", empty_datastores: "No data stores defined for vCenter build\n", invalid_domain: "No domain defined for node fqdn\n", invalid_ip: "Invalid IP's defined for DNS lookup\n", empty_network: "Empty Network defintions\n", invalid_gateway: "Invalid gateway defined in network\n", invalid_cpu: "Invalid compute cpu settings\n", invalid_ram: "Invalid compute ram settings\n", invalid_env_vcenter: "Environment contains invalid vcenter definition\n", invalid_env_network: "Environment contains invalid network definition\n", invalid_env_count: "Environment contains invalid number of nodes in pool\n", invalid_env_compute: "Environment component pool contains invalid compute definition\n", invalid_env_ip: "Environment component pool contains invalid or missing ip address definition\n", invalid_env_tier: "Environment component pool contains invalid tier definition\n", invalid_env_image: "Environment component pool contains invalid image definition\n", invalid_env_port: "Environment component pool contains invalid port definition\n", invalid_env_runlist: "Environment component pool contains invalid runlist specification\n", invalid_env_componentrole: "Environment component pool contains invalid componentrole definition\n", env_component_mismatch: "Environment components do not match platform definition\n" }
- TEMPLATE_PLATFORM =
Templates
'templates/platform.yml.tt'- TEMPLATE_VCENTER =
'templates/vcenter.yml.tt'- TEMPLATE_NETWORK =
'templates/network.yml.tt'- TEMPLATE_COMPUTE =
'templates/compute.yml.tt'- TEMPLATE_ENV =
'templates/environment.yml.tt'- YML_PLATFORM =
filename defaults
'platform.yml'- YML_VCENTER =
'infrastructure/vcenter.yml'- YML_NETWORK =
'infrastructure/network.yml'- YML_COMPUTE =
'infrastructure/compute.yml'- ENV_FOLDER =
'environments/'- BUILD_CONCURRENT_DEFAULT =
Build defaults
4- BUILD_CHILD_WAIT_TIMEOUT =
0.5
- BUILD_STATUS_INTERVAL =
60- ERR =
error messages
{ platform_exists: 'elevage: platform files already exist!', not_list_cmd: 'elevage: used an unknown LIST command', no_platform_file: 'elevage: platform.yml file not found!', no_vcenter_file: 'elevage: infastructure/vcenter.yml file not found!', no_network_file: 'elevage: infastructure/network.yml file not found!', no_compute_file: 'elevage: infastructure/compute.yml file not found!', env_exists: 'elevage: environment file already exists!', env_not_defined: 'elevage: environment file not defined in platform', no_env_file: 'elevage: Environment file in platform.yml not found', fail_health_check: 'elevage: health check revealed errors' }