Skip to content
forked from kjdowney/EC-Admin

A few procedures to help with the administration of your ElectricCommander server

Notifications You must be signed in to change notification settings

kjonick/EC-Admin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

288 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EC-Admin

EC-Admin is a collection of administrative procedures to help you manage your server. Its inception was sparked by requests from customers during my Professional Services engagements. It has grown over the years to what it is now.

It contains the following modules:

Installation

It is available as a plugin delivered in the form of a .jar file or you can simply get the source code and recompile it yourself.

To install the plugin, use the "Install from File/URL" tab in the administration/Plugins or use the "installPlugin" API.

To install on 4.0.x or or 4.1.x, import the EC_4.0.xml file. Be aware that some features are not present as the original project makes use of createJobStep() API which was introduced in 4.2.0:
ectool import /path_to/EC-Admin_for_EC_4.0.xml --disableSchedules 1

If you get an error with the passKey, use the "--force 1" option

IMPORTANT: For more details, consult the Help page after you have installed the plugin.

Look and Feel

changeBannerColor

If you work on multiple Commander servers like a development and a production instances, this procedure is for you. It allows you to change the color of the top banner and the logo to make it easier to identify your different servers. Feel free to send me new ones if you have a more artistic touch than me. Or better push your changes to GitHub.

Jobs and Workspaces management

This set of procedures will help you manage your old jobs and the associated workspaces.

jobsCleanup:

A procedure to delete jobs older than a specified number of days. It will also delete associated workspace job directories.

jobCleanup_byResult:

A procedure to delete jobs older than a specified number of days. It will also delete associated workspace job directories. It will keep the number of successful, failed and warning jobs you entered. You can also provide a property name, if this property is attached to the job, it won't be deleted no matter how old. A report only mode prevents any real deletion.

deleteWorksapceOrphans:

A procedure to crawl a workspace directory to find orphan jobs (directories without a matching job) on a specified resource.

deleteObjects:

A procedure to quickly delete jobs or workflows older than a specified number of days. It will not delete associated workspace job directories. This is for customers with huge job or workflow database.

Plugins

Plugin Synchronization

This procedure synchronizes plugins between the server and a resource. Plugins are uploaded first as artifacts if it has not been done already and then downloaded on the resource if it does not already exist in the plugins directory.

Plugin creation

createPluginFromProject

Note: This procedure requires access to the jar or zip executable in the PATH.

The procedure "createPluginFromProject" allows the transformation of a project into a plugin.

This procedure is obsolete and has been replaced by projectasCode explained below.

projectAsCode

Note: This procedure requires access to a resource with the Commander SDK installed.

This procedure is an extension of createPluginFromProject. It also creates a plugin but instead of simply exporting the project, it "explodes" each step in its own file for finer granularity check in in your favorite SCM tool.

Note: EC-Admin is released on GitHub using this procedure.

Artifact Management

artifactRepositorySynchronization

Synchronize the content of remote artifact repositories to a local resource. You can use pattern matching to select specific artifact versions to synchronize.

artifactsCleanup

A procedure to delete artifact versions older than a specified number of days. Same as for jobs above, a property allows preventing the deletion. Once the artifacts have been deleted, artifact repositories and artifact caches are cleaned as well (deleting stale artifacts). A report mode prevents any real deletion.

artifactsCleanup_byQuantity

As "ArtifactsCleanup"", this procedure deletes artifact versions older than a specified number of days but keeps only X per Artifact. Again, a property allows preventing the deletion. Once the artifacts have been deleted, artifact repositories and artifact caches are cleaned as well (deleting stale artifacts). A report only mode prevents any real deletion.

Object export and backup

This set of procedures is to help you export objects from ElectricCommander for a potential inclusion into your SCM for versioning.

saveProjects

This procedure simply exports your projects in a directory on the server. It is recommended to enable the nightly schedule associated with it to backup your projects on a regular basis.

saveAllObjects

This procedure brings a finer granularity to a full server export. For example, it may be easier to retrieve a simple project or procedure instead of the full server export or database backup to undo r a wrong action or a bad code change. By default it exports projects and each procedure individually. In addition by enabling the matching checkboxes, you can also export resources, resource pools, workspaces, users and groups, and with 5.x and later ElectricFlow Deploy objects (Applications, Components and Environments). It is recommended to enable the nightly schedule associated with it to backup your projects on a regular basis.

Note: Use saveProjects or saveAllObjects depending on the granularity you are requiring.

Semaphore Management

acquireSemaphore and releaseSemaphore:

Those 2 procedures are used to create a gate for a set of steps. The important part is to use a resource with a step limit of one to ensure the atomicity of increasing and decreasing the gate value.

Performance metrics

This procedure returns some information about your ElectricCommander server like number of processors, total RAM, available RAM, ping times with agents, relative performance of agents, ... In addition it checks the amount of time spent running steps on the server local agents as this should be minimized as much as possible.

License Logger

The License Logger mechanism is intended to collect and email various license-related statistics. It is implemented as a set of schedules and procedures, along with a set of configuration properties.

postp debugger helper

The debugPostp is a simple procedure to help you debug with postp. Traditionally you would call postp from the command line with the jobStepId of the faulty postp and adding some additional option to see details. This new procedure does that for you on Linux and Windows, you just have to pass the jobStepId as a parameter.

Contact authors

License Logger
Mike Westerhof (mwesterhof@electric-cloud.com)
Other
Laurent Rochette (lrochette@electric-cloud.com)

Legal Jumbo

This module is free for use. Modify it however you see fit to better your experience using ElectricCommander. Share your enhancements and fixes.

This module is not officially supported by Electric Cloud. It has undergone no formal testing and you may run into issues that have not been uncovered in the limited manual testing done so far.

Electric Cloud should not be held liable for any repercussions of using this software.

About

A few procedures to help with the administration of your ElectricCommander server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 55.6%
  • Other 34.9%
  • Prolog 8.7%
  • Other 0.8%