Repository navigation
Self-service task execution for users #484
Replies: 1 comment
|
Hi @santos-edu! Yes, xyOps supports this use case today! There are several ways to provide self-service task execution, depending on whether you want developers working inside the xyOps interface or using simple standalone forms. The TL;DR; is:
Setup details and examples for each option follow below. In xyOps, an Event is the saved definition of a task, including its script or plugin, parameters, target servers, and triggers. Each execution creates a Job, with its own status, output, and execution history. For the tasks you mentioned:
Add an enabled Manual Run trigger to make an event available for on-demand execution. Events can exist purely as manually launched tasks; they do not need a recurring schedule. Optional and required input parameters are built in. When editing an event, use the User Parameters section to define the inputs users should supply at launch time. These appear automatically in the run dialog. You can define text fields, dropdown menus, checkboxes, date/time inputs, and other controls, with defaults, captions, required fields, and validation where supported. For example, a cache invalidation event might ask for a required distribution and path, plus an optional change-ticket reference. Submitted values become job parameters, which scripts can access through environment variables or the job JSON provided on standard input. The same user parameters can also appear on a standalone Magic Form, described below. See Manual Runs and Prompts and Parameter Types. Dashboard Favorites provide a convenient task panel. Users can open an event and click Favorite to add it to their personal Favorite Events section on the Dashboard. This gives them a convenient list of frequently used tasks, with Run, History, and status information directly available. Clicking Run opens the normal confirmation/parameter dialog, so users can launch their everyday tasks directly from the Dashboard without navigating through the event list. Their existing permissions still apply. For your developer use case, this would be a good starting point: favorite events such as “Invalidate Staging CDN,” “Restart Test Container,” and “Run Data Refresh.” Users can be restricted to authorized tasks through privileges and roles. xyOps has built-in Users and Roles, with separate privileges for running jobs, editing events, managing plugins, and other operations. For example, an administrator could:
Running an existing event does not require granting permission to create, edit, or delete events. You can also grant Abort Jobs separately if users should be able to stop running tasks. The Shell Plugin’s script source is administrator locked by default, which lets administrators maintain the script while users supply the intended launch parameters. Authorization is enforced by the backend, including category and target checks. See the Privilege Reference for the available controls. Magic Links can provide standalone task forms. If you want an even simpler experience outside the main xyOps interface, add a Magic Link trigger to an event or workflow. It provides two URLs:
For a form-based task, define the user parameters, add the Magic Link trigger, and copy the landing-page URL when it is generated. You can add custom Markdown instructions explaining what the task does. The page streams progress while the job runs and displays its results afterward, including output files when applicable. Magic Forms do not require an xyOps login. Access is authorized by the secret token in the URL, so anyone holding that link can invoke the associated task. For your requirement to authorize individual developers and record which account launched a job, I would use signed-in accounts and roles. Magic Forms are an additional option for tasks where access through a private link is appropriate. Scheduling a script for a future date and time is supported too. For ordinary scheduling, an event can have a Single Shot trigger for a one-time execution, or a Schedule trigger for recurring runs. For a self-service “submit this request now, execute it later” form, we have a recipe specifically covering that pattern: The recipe uses a Magic Form to collect the task parameters and requested date/time. Submitting it immediately runs an intake event, which calls the xyOps API to create a separate event with a Single Shot trigger. The scheduled event then performs the actual work at the requested time. The example is future user offboarding, but you can adapt the same pattern to a script execution, container restart, or cache invalidation. It also demonstrates storing the API credential in a Secret Vault and automatically removing the one-time event after success while retaining the job’s execution history. You can use the same intake pattern with an authenticated Manual Run event if you want requesters to sign in. The intake job handles event creation, so requesters do not need general event-creation privileges. Execution history and audit logs are already included. Completed jobs retain their results, timing, parameters, logs, output data, and files. Users can access an event’s history or use Job Search to filter by event, category, result, server, date range, and other criteria. Signed-in manual executions also record the username that initiated the job. See Job Search and Job Sources. Administrators also have a searchable System Activity Log covering configuration changes, account activity, and other system operations. Individual accounts have their own security logs as well. This provides both the execution record for each task and the administrative audit trail around it. Hope this helps! |
Uh oh!
There was an error while loading. Please reload this page.
Is there a built-in or recommended way to use xyOps as a self-service task execution panel?
In Rundeck, for example, i used to provide developers with simple jobs such as:
Invalidating a CDN cache
Restarting a container
Running or scheduling a specific script
Executing tasks with optional or required input parameters
Ideally, users would be able to run only authorized jobs, with permissions, execution history, and audit logs.
Can xyOps support this use case today? If not, would this be a good fit for the project?
All reactions