diff --git a/.claude/skills/cb-onboarding/SKILL.md b/.claude/skills/cb-onboarding/SKILL.md new file mode 100644 index 00000000..89b00b83 --- /dev/null +++ b/.claude/skills/cb-onboarding/SKILL.md @@ -0,0 +1,119 @@ +--- +name: cb-onboarding +description: Walk a customer from a freshly deployed CloudBolt appliance to one that passes the CloudBolt POC Test Plan, over the CloudBolt MCP server. Reads status, hands the user a direct UI link for every step that involves a secret, verifies resource handlers and reads the appliance's own logs when something fails, imports environments and images, trims the order form, creates groups, users, parameters and mappings, drives the Custom Server order through MCP, records each test-plan item as done or not applicable, and reports a scorecard. +when_to_use: When the user says "onboard CloudBolt", "set up CloudBolt for a POC", "get this appliance ready", "connect my first cloud", "why did my resource handler fail", "walk me through the POC test plan", or asks for the next step on a new CloudBolt instance. Also when a CloudBolt MCP server is connected and the user asks what is configured. Not for authoring content (the cb-scaffold-* skills) or for testing content changes (cb-test-content). +--- + +# cb-onboarding + +Take a new CloudBolt appliance through the POC Test Plan with the connected CloudBolt MCP server. The procedure is tool-neutral: every step is an MCP tool call, a link the user opens, or a question. Any agent with the same MCP connection can follow it; clients without skill support get this text from the `onb_playbook` tool. + +## Required reading + +Before the first phase, read [references/bootstrap.md](references/bootstrap.md). Read the other references when their phase starts: [resource-handlers.md](references/resource-handlers.md) and [handler-forms.md](references/handler-forms.md) (Phase 1: the procedure, and what each technology's handler form asks on both screens), [phases.md](references/phases.md) (Phases 2 to 9), [troubleshooting.md](references/troubleshooting.md) (on any failure), [test-plan-map.md](references/test-plan-map.md) (what each item needs and whether it can be skipped). + +## Hard rules + +1. **One ask per message.** Lead the user one step at a time. Each message carries exactly one question or one action for the user, then stops and waits for the answer. Never send a numbered list of questions, never preview the questions coming later, and never ask about a prerequisite before the step that needs it starts. Give the default inside the question ("say skip if there is none") so a one-word answer works. Keep the context to a sentence or two: what this step is for, the ask, and the link when there is one. An action that fills a form is still one ask: give the link and the values the form wants. When something finishes, say what happened in a sentence and give the next single ask. How to ask, using the richest prompt the client offers and still one question at a time: + - **Inline form**, when the client can render one (the Claude desktop app's visual widgets, in chat and in the Code tab): a one-question form with buttons for choices, the default first, a text box for a typed value, and Skip. The answer arrives as the user's next message. + - **Question picker**, when the client has a structured question tool (Claude Code's `AskUserQuestion`): one question per call, two to four options with the default first and marked (Recommended); a typed value goes through its free-text option. + - **Plain text** everywhere else: one question, with choices numbered so a number answers it. + + Never put a secret in a form or a picker: the answer lands in the transcript, so secrets keep the UI link of rule 2. +2. **Secrets never pass through the agent.** Passwords, access keys, client secrets, service-account JSON, API tokens: the user enters them in the UI. Give the exact link from `onb_ui_link` (or the `editUrl` and `createInUi` fields the tools return), name the button that opens the form (`click`, `editClick`, `createInUi.click`), and list the non-secret values to type. Never ask for a secret in chat, never accept one that is pasted (say so and move on), never put one in a tool call. +3. **Root cause before retry.** When anything fails: read the tool's `error_message` and `hints`; for an order or job call `onb_failure_trace`, then `fetch_job_log` on the job it names; for a UI failure call `onb_recent_errors` for the last few minutes; then apply [troubleshooting.md](references/troubleshooting.md). State the cause and the fix before anyone retries. +4. **Status first.** Start every phase with `onb_status`. Never assume what is configured; the appliance is the source of truth. +5. **Echo and confirm every write.** Before a tool that changes the appliance or orders infrastructure, state what will change and wait for a clear yes. For `order_catalog_item` follow the server's echo-and-confirm text verbatim. `onb_remove_environment` is destructive: name the environment and get an explicit yes. +6. **Every step is skippable.** When the customer cannot or does not want to do an item (no SMTP, no LDAP, no SSO, no DNS record, no Terraform or Ansible), offer to skip it, record it with `onb_set_item_status` as `not_applicable` with the reason, and move on. The scorecard reports it as not applicable, never as failed. +7. **Record progress.** When an item's evidence exists (a successful order, a verified handler, a user who logged in), record it `done` with `onb_set_item_status`. The scorecard is built from these records plus live evidence. +8. **Scope is the test plan.** Up to two resource handlers, one environment each, the Custom Server and Standard Server blueprints, the test-plan items. Anything more is a follow-up to propose at the end, not a step. +9. **Two response shapes.** A synchronous tool answers inline: read `outputs`. An asynchronous tool answers `{"success": true, "ids": ["JOB-..."]}`: poll `fetch_job` (or `fetch_job_log`) on that id every five seconds and read its `outputs`. The asynchronous tools are the ones that call a cloud, a directory, a mail relay or the internet: `onb_verify_resource_handler`, `onb_sync_images`, `onb_handler_locations`, `onb_import_environments`, `onb_environment_networks`, `onb_network_addressing`, `onb_import_os_build`, `onb_verify_ldap`, `onb_smtp_test`, `onb_install_content_library_item`, `onb_install`. Start the long ones (`onb_sync_images`) and keep working; check them before the step that needs their result. If any other tool answers with a job id, `onb_install` has not run; run it and tell the user to reconnect the client. +10. **Reconnect after install.** Tool lists are cached per client session. After `onb_install` changes anything, the user reconnects the MCP client before the next phase. +11. **Links, not hostnames.** Every URL comes from a tool. Never compose an appliance URL from memory. +12. **Nothing is pinned to a value the user has not seen.** `onb_trim_environment` pins key pairs, security groups, resource groups, datastores and subnets to one value: show the `actions` list and let the user change a pin (`onb_pin field=value`) before the first order. + +13. **Prove each step before the next.** A tool's SUCCESS, or the user saying "done", is a claim, not proof. After every step, read the result back with a read-only call that checks what the next step depends on, and move on only when it holds; otherwise apply rule 3. Record an item `done` only after its proof, with the ids in the note. The proofs: + + | Step | Proof before moving on | + |---|---| + | Handler created | `onb_verify_resource_handler` returns `verified: true` | + | Image cache | the `onb_sync_images` job is SUCCESS and `onb_status` shows `cachedImages` above 0 for the handler | + | Environments | `onb_status` lists the one POC environment under each handler, with `networks` at least 1 and no environment the POC does not use | + | Networks | `onb_environment_networks` returns `verified: true` with exactly the chosen networks on NIC 1, every `onb_network_addressing` call returns `verified: true`, and `onb_status` shows no `networkProblems` | + | OS build | `onb_import_os_build` returns `verified: true`: CloudBolt resolves the image in every environment, the lookup an order makes | + | Image credentials | `onb_import_os_build` again for the build shows `password` or `key` true for each image (or `guestCredentials` in `onb_status`); after a build, `fetch_server_details` shows `credentials.password` masked, not null | + | Order form trimmed | `fetch_blueprint_item_parameters` for the environment shows the fields in `visibleNow` with their options; pinned fields come back with `is_provided` true. `key_name` comes back with no options and `is_provided` false, so MCP orders pass the environment's one key pair | + | Custom Server configured | `fetch_catalog_items` lists it as orderable | + | Group | `onb_group` with only the group name shows its environments, members, quota and auto-approval | + | User | `onb_group` with only the group name lists the user with their role; the user's first login proves the password worked | + | Parameter, tag or mapping | the field appears in `fetch_blueprint_item_parameters`, or the mapping in the tool's list output | + | Order | `fetch_order` is COMPLETE, the provision job is SUCCESS, and `fetch_server_list` shows the server | + | Anything done in the UI | the matching status or list call shows the change; never take the user's word alone | + +## Tools + +Built-in CloudBolt MCP tools used here: `fetch_identity`, `fetch_dashboard_link`, `fetch_catalog_items`, `fetch_orderable_groups`, `fetch_blueprint_schema`, `fetch_orderable_environments`, `fetch_blueprint_item_parameters`, `fetch_blueprint_parameter_options`, `order_catalog_item`, `fetch_order`, `fetch_orders_pending_my_approval`, `approve_order`, `fetch_job`, `fetch_server_list`, `fetch_server_actions`, `run_server_action`, `fetch_groups`, `fetch_group_details`, `fetch_environment_list`, `fetch_environment_details`, `set_server_power_schedule`, `fetch_server_power_schedule`. + +Toolkit tools (the Onboarding Toolkit package; `custom_` prefix when they appear as first-class tools, otherwise `run_mcp_tool_action(mcp_tool_name, parameters)`): + +| Phase | Tool | Mode | Use it to | +|---|---|---|---| +| all | `onb_status` | sync | See everything configured, recorded items and `nextSteps` with links | +| all | `onb_ui_link` | sync | Get the UI link for a global id or a named page (`new_resource_handler:aws`, `email_settings`, `user_edit:USR-...`) | +| all | `onb_recent_errors` | sync | Read the last minutes of application, jobengine, authentication or mcp log, grouped, with hints | +| all | `onb_failure_trace` | sync | Walk a failed order or job down to the job that failed, with hints and the id for `fetch_job_log` | +| all | `onb_failed_servers` | sync | List the servers failed orders left in Provision Failed state, or delete the ones the user agreed to (their VMs too) | +| all | `onb_set_item_status` | sync | Record a test-plan item or prerequisite as done, skipped, not_applicable or pending | +| 0 | `onb_install` | async | Finish the toolkit install (synchronous flags, enabled, egress checks) | +| 0 | `onb_playbook` | sync | Fetch this skill's text by section for clients without skills | +| 1 | `onb_verify_resource_handler` | async | Run Verify Connection on a handler and get the real error plus a technology hint | +| 1 | `onb_sync_images` | async | Fill the handler's image cache now without the whitelist and enable the cache job and rule with the whitelist off; start it right after verify and let it run | +| 1, 2 | `onb_handler_locations` | async | List regions, locations or clusters (and an AWS region's VPCs with CIDR, subnet count and a recommended one) with what is already imported | +| 1, 2 | `onb_import_environments` | async | Create the environment for the chosen location (AWS: one VPC) with its subnets or networks | +| 2 | `onb_environment_networks` | async | List an environment's networks, or set up to five as its only NIC 1 choices (removing every other NIC) and verify | +| 2 | `onb_network_addressing` | async | Set a network to DHCP, or static with gateway and netmask (DNS optional) plus an IP pool, an IPAM endpoint or a typed IP, and verify it the way an order resolves it | +| 2 | `onb_import_os_build` | async | List the cached images for a location, or import an AMI, Azure image or vCenter template into an OS build attached to the environments | +| 2 | `onb_trim_environment` | sync | Shorten an environment's order form to the size (and password or network where needed) | +| 2 | `onb_configure_custom_server` | sync | Make the Custom Server blueprint orderable with a hostname template | +| 2 | `onb_remove_environment` | sync | Undo a wrong environment import | +| 4, 7 | `onb_parameter` | sync | Create a parameter and attach it to environments or groups with options and constraints, or make it required (one flag for the whole appliance) | +| 4, 5 | `onb_tag_mapping` | sync | List, add or remove a handler's attribute-to-cloud-tag mappings | +| 5 | `onb_group` | sync | Create a group with entitled environments, auto-approval and a server quota | +| 5 | `onb_user` | sync | Assign a local user's roles; a user that does not exist yet comes back as `createInUi` for the admin to add with its password | +| 5 | `onb_action_approval` | sync | Turn Requires approval on or off for a server or resource action | +| 6 | `onb_verify_ldap` | async | Verify an LDAP utility and get the real bind error | +| 6 | `onb_ldap_mapping` | sync | Map a directory group DN to a CloudBolt group with roles | +| 5, 8 | `onb_smtp`, `onb_smtp_test` | sync, async | Set the non-secret mail settings (password on the returned link) and send a test | +| 8 | `onb_install_content_library_item` | async | List a Content Library collection or install one item | +| 8 | `onb_cit_from_order` | sync | Turn a finished order into a CIT test | +| 9 | `onb_scorecard` | sync | The test plan with recorded statuses, live evidence and points | +| 8 | `sync_from_source_control_repo`, `fetch_job_log`, `manage_blueprint_permissions`, `run_recurring_job`, `run_cit_tests` | sync | Reused from the testing toolkit: sync the Standard Server blueprint and echo webhook, read a job's log, restore blueprint entitlements, run a recurring job or CIT test | + +## The loop + +Phases follow the customer's natural order: self-service first (handlers, environments, the first order, parameters), then groups, RBAC and governance, then lifecycle, then extensibility, then the wrap-up. Reorder only when a step depends on another (SMTP before approval emails, a group before a non-admin login) and say why. + +For every phase: + +1. `onb_status`. Tell the user in a sentence or two where things stand for this phase, then give the first ask. +2. For each step, one at a time (rule 1): if a toolkit or built-in tool does it, echo, confirm, call it, read the result. If only the UI can do it (anything with a secret, SSO, the branded portal, email templates), give the `onb_ui_link` link, the non-secret values to enter, and the documentation link from [test-plan-map.md](references/test-plan-map.md). Then prove the outcome with the read-only check from rule 13 before the next step. +3. On failure, rule 3. Stop after three attempts at one step, record the item `pending` with what is known, and continue with steps that do not depend on it. +4. Record the phase's items with `onb_set_item_status`. +5. Close the phase in a few lines: what is now configured and what was recorded (done, not applicable, pending). End with the single first ask of the next phase. + +| Phase | Covers | Reference | +|---|---|---| +| 0 Bootstrap | MCP connection, admin check, toolkit install, the prerequisites the appliance already proves (each other one is asked by the step that needs it) | bootstrap.md | +| 1 Handlers | Up to two resource handlers, verified | resource-handlers.md | +| 2 Environments | One environment per handler, image, network, trimmed order form, hostname template | phases.md | +| 3 First order | Custom Server ordered through MCP in each environment, lifecycle actions | phases.md | +| 4 Self-service | Parameters, generated options, tags, cross-cloud visibility | phases.md | +| 5 RBAC and governance | Groups, roles, users, entitlements, approvals, quota | phases.md | +| 6 Authentication | LDAP, LDAP mapping, SSO, branded portal | phases.md | +| 7 Lifecycle | Power schedule, expiration, decommission, onboarding discovered servers | phases.md | +| 8 Extensibility | Content Library items, Standard Server blueprint with scripts and generated options, webhook, recurring job, rule, CIT | phases.md | +| 9 Wrap-up | Scorecard from recorded items and live evidence | phases.md | + +## Wrap-up report + +`onb_scorecard` gives every test-plan item with its weight and status (done, not applicable with reason, pending), the points possible per category, and the prerequisites. Take the pending items one at a time: name the item and its evidence, ask whether it is done or not applicable, record it, then the next. Call it again, and present the final table with the evidence (order ids, job ids, object names) next to each item. The score column is the customer's judgement; the agent supplies the evidence. Then list the follow-ups the customer asked about that were out of scope. diff --git a/.claude/skills/cb-onboarding/references/bootstrap.md b/.claude/skills/cb-onboarding/references/bootstrap.md new file mode 100644 index 00000000..dd6b351a --- /dev/null +++ b/.claude/skills/cb-onboarding/references/bootstrap.md @@ -0,0 +1,40 @@ +# Phase 0: Bootstrap + +Goal: the agent is connected to the appliance as a CloudBolt admin with write scope, the Onboarding Toolkit is installed and synchronous, and the prerequisites the appliance already proves are recorded. + +## 1. Connection + +1. Call `fetch_identity`. It must return a user with `superAdmin` or `cmpAdmin` true. If it fails, the client is not connected or not authenticated: the appliance's MCP endpoint is `https:///mcp` (no trailing slash), Streamable HTTP, OAuth 2.1 with browser login. In Claude Code: `claude mcp add --transport http --scope user cloudbolt https:///mcp`, then `/mcp`, choose the server, authenticate as the admin. Without `--scope user` the server is tied to the folder the command ran in and is missing from `/mcp` elsewhere: re-add it with `--scope user`. Other clients: add the same URL as a remote MCP server and complete the OAuth login. A TLS error (`self signed certificate in certificate chain`, a certificate altnames mismatch) means the appliance certificate is not trusted yet; the agent cannot fix it over MCP. Send the user to section 2 of [docs/onboarding-setup.md](../../../../docs/onboarding-setup.md): replace the certificate as root on the appliance, set `NODE_EXTRA_CA_CERTS`, restart the client. +2. The token must carry `write` scope. If every write or custom tool fails with a scope error, the client requested `read` only; reconnect and grant write when the consent page asks. +3. The API token on the user profile page and the `/api/v3/cmp/apiToken/` token do not work for `/mcp`; only the OAuth login does. +4. `fetch_dashboard_link` gives the portal base URL; confirm with the user that it is the appliance they mean. + +## 2. Toolkit install (one-time manual step, then agent-driven) + +Call `fetch_mcp_tool_actions`. If `onb_status` is missing, the toolkit is not installed. The sync tool cannot install itself, so the user installs it once in the UI through the Content Package Manager. Walk them through section 4 of [docs/onboarding-setup.md](../../../../docs/onboarding-setup.md): add the Source Code Repository `https://github.com/mbomb67/cloudbolt-as-code` (GitHub, no credentials), add the UI extension `extensions/XUI-iq65xgvr` from it, restart httpd as root, then Import from repository and Sync the package **Onboarding Toolkit** (`PKG-8aaadefz`). Every tool, the Standard Server blueprint and the echo webhook arrive together. If the Content Packages page is missing after the extension sync, httpd has not been restarted. + +After the import every tool is asynchronous (the importer leaves Synchronous Action off). Run `onb_install` (asynchronous itself, so it works now): `run_mcp_tool_action("onb_install", {})`, poll the job id with `fetch_job`, read `outputs.changed`, `outputs.missing`, `outputs.egress`. Tell the user to reconnect the MCP client (tool lists are cached per session), then call `fetch_mcp_tool_actions` again: every `onb_` name from [SKILL.md](../SKILL.md) must be present. Check: `run_mcp_tool_action("onb_status", {})` answers inline. + +Later toolkit updates: the user runs Import from repository again for Onboarding Toolkit (Sync alone uses the member list saved at the last import and misses new tools), then Sync with Refresh checked (section 7 of the setup doc), then `onb_install`, then reconnects the MCP client. + +## 3. First status + +Call `onb_status`. Tell the user in two sentences what is already in place and what comes next. Do not read the whole inventory unless they ask for it. + +## 4. Prerequisites + +Record what the appliance already proves, without asking, and mention it in one sentence: P1 from `onb_status.license`, P2 because `fetch_identity` works, P5 from `onb_status.contentLibrary.reachable`, P6 from `preferences.proxy` (not applicable when no proxy is needed). When P5 is false, that becomes the next single ask: the proxy link (`onb_ui_link proxy`), or skip, which shrinks Phase 8. + +Ask nothing else up front. Each remaining prerequisite is one question, asked when the step that needs it starts (rule 1 in [SKILL.md](../SKILL.md)), and recorded with `onb_set_item_status` right after the answer: + +| Id | Prerequisite | Asked or proven at | +|---|---|---| +| P3 | One or two resource handlers, one environment each | Phase 1 asks for the first cloud, and for a second only after the first is verified; Phase 2 records it | +| P4 | Custom Server deployed once in each environment | Phase 3, from the order | +| P7 | SMTP relay | Phase 5, before the first approval email | +| P8 | DNS record for a branded portal | Phase 6, branded portal step | +| P9 | SSO application and an SSO SME | Phase 6, SSO step | +| P10 | AD or LDAP service account and a mapping group DN | Phase 6, LDAP step | +| P11, P12 | Ansible, Terraform in a git repository | Phase 8, last step (both weight 0) | + +Then start Phase 1 ([resource-handlers.md](resource-handlers.md)) with its first ask. diff --git a/.claude/skills/cb-onboarding/references/handler-forms.md b/.claude/skills/cb-onboarding/references/handler-forms.md new file mode 100644 index 00000000..b23a733a --- /dev/null +++ b/.claude/skills/cb-onboarding/references/handler-forms.md @@ -0,0 +1,50 @@ +# Handler forms by technology + +What the user fills on each screen of the Add resource handler modal, per technology, read from the CloudBolt source (2026.3). Use it for Phase 1 steps 2 and 3 in [resource-handlers.md](resource-handlers.md): one action message per handler that covers both screens. + +## How the modal works + +- **Screen 1, credentials.** Continue checks the connection. When it passes, CloudBolt saves the handler under a default name, so closing the modal after this point leaves a handler without settings; send its edit link (`handler_edit:RH-...`) to finish. When it fails, the form shows only "Unable to connect to handler with the information provided"; SCVMM shows the real error. +- **Screen 2, settings.** Done saves. Some technologies create environments here, some create one environment named after the handler, some create none. For those, Phase 2 imports the POC location with `onb_handler_locations` and `onb_import_environments`; when the tools cannot list that technology's locations, send the handler page (`onb_ui_link` with the RH- id) and name the tab from the table as the single ask. +- **Every secret is typed in the form**, never in chat (SKILL.md rule 2). +- **Leave these as they are wherever they appear:** Tenant on screen 1 (unless the POC uses CloudBolt tenants), and on screen 2 Name (prefilled; renaming is fine), Description, VM Names to Ignore, VM Tags to Include, VM folder filters, Console feature, Split by region or cluster, Job Labels. +- **AWS closes screen 2.** On AWS, AWS GovCloud, AWS China and AWS JIT, Done creates one environment for every VPC in the chosen region. The POC needs one, so the user closes screen 2 with the X instead of clicking Done; the handler was saved by Continue. The agent then lists the region's VPCs and imports the one the user picks (Phase 1 step 5). +- **The "where" question.** Every environment is one more to set up and test, so ask for the one region, location, cluster or project the POC needs; more can be added after the POC passes. When screen 2 has a required region, location, cluster, project or datacenter field, ask for it before sending the link (Phase 1 step 2). When screen 2 has nothing to set, skip that question; the second-screen sentence is "On the second screen, leave everything as it is and click Done." + +## Shown in the chooser by default + +| Tile (slug) | Screen 1: what to enter | Screen 2: what to set | Environments on Done | +|---|---|---|---| +| Amazon Web Services (`aws`) | Credentials Type Account Credentials; Authentication Type Access & Secret Key; Access Key ID; Secret Access Key (secret); SSL Verification on | Nothing: close it with the X, do not click Done (Available Regions would create one environment per VPC) | None: the agent imports the one VPC the user picks, with the Name and Annotation tags | +| AWS GovCloud (US) (`aws_govcloud`), AWS China (`aws_china`) | Access Key ID; Secret Access Key (secret); IAM Role ARN only if one is assumed. GovCloud also offers optional commercial-account keys | Same as AWS: close it with the X | Same as AWS | +| Azure (`azure_arm`) | Cloud Environment Public (Default); Subscription ID; Application ID (the app's client id); Directory ID (the tenant id); Authentication Key = the client secret value (secret) | **Import locations** (required): the POC location only. Leave Azure Disk Name Template empty | A job creates one per location, then syncs networks | +| VMware vCenter (`vmware`) | IP address (the vCenter FQDN); Port 443; Account username (user@domain); Password (secret); SSL Verification off for a self-signed vCenter, or add its CA under Admin > SSL Certificates first | **Import VMware Clusters** (required): the POC cluster only. Keep Virtual folder path as prefilled | A job creates one per cluster, then syncs networks, datastores and templates | +| Google Cloud Platform (`gcp`) | Choose Upload .json file and upload a **service-account key** (secret). An OAuth web-client JSON instead sends the user to Google consent and skips screen 2 | **Projects** (required): the POC project only | A job creates one per project, with its networks | +| SCVMM (`scvmm`) | IP address (the FQDN when Kerberos is used); Account username (user@domain); Password (secret); WinRM Protocol HTTPS (5986) or HTTP (5985); WinRM Transport NTLM | **Import clusters** (optional): check the POC cluster | One per checked cluster; none if nothing is checked | +| Hyper-V (`hyperv`) | Hyper-V instance (host, or the cluster address); Account username (user@domain or domain\user); Password (secret); WinRM Protocol HTTPS; WinRM Transport NTLM (avoid CredSSP, which looks broken in this release); check Clustered Hyper-V for a cluster | **Images Directory** (required, prefilled): keep it if that folder exists on the host, otherwise the folder that holds the VM images | One, named after the handler | +| Nutanix Acropolis (`acropolis`) | Protocol https; IP address (Prism); Port 9440; Account username; Password (secret); Nutanix API version matching Prism (v4 by default) | **Import Nutanix Clusters** (required): the POC cluster only | One per cluster | +| OpenStack (`openstack`) | Protocol: HTTPS when Keystone uses TLS (HTTP is preselected); Domain; Project ID; IP address (the Keystone host); Port 5000; Account username; Password (secret) | Nothing | None: Phase 2 imports the POC project (the handler's Projects tab) | +| Oracle Cloud Infrastructure (`oci`) | Region (for example us-ashburn-1); User OCID; Certificate Fingerprint; Key File = the PEM private key pasted in (secret, shown unmasked); Passphrase (secret, optional); Tenancy OCID; Compartment OCID (optional) | Nothing | One, for the region on screen 1 | +| Alibaba Cloud (`alibaba`) | Region ID; Access Key; Access Key Secret (secret). An IllegalTimestamp error means the appliance clock has drifted | Nothing | One, named after the handler | +| IBM Cloud (`ibm_cloud`), IBM Cloud for Government (`ibm_gov`) | API Username; API Key (secret) | **Import IBM Cloud datacenters** (required): the POC datacenter only | One per datacenter | +| MAAS (`maas`) | Region Controller; Protocol https; Port; Account username; Password (secret) | Nothing | None: Phase 2 imports the POC availability zone (Locations tab) | +| MetalSoft (`metalsoft`) | IP address; Protocol: HTTPS for a TLS endpoint (HTTP is preselected); Port 443; API User Email; API Key (secret); Admin API Connection Info only if one is set up | Nothing | None: Phase 2 imports the POC datacenter (Datacenters tab) | +| IPMI (`ipmi`) | One screen only, with no credentials: each server's IPMI address and login are order parameters. The tile disappears once an IPMI handler exists | **Name** (required, empty): type one | None | + +## Hidden unless the appliance enables the technology + +These tiles appear only when the feature `resourcehandler::` is enabled on the appliance (off by default). If the user picks one and the tile is missing, say so and record the handler `pending` with that note. + +| Tile (slug) | Screen 1: what to enter | Screen 2: what to set | Environments on Done | +|---|---|---|---| +| Proxmox Virtual Environment (`proxmox`) | IP address; Protocol HTTPS (HTTP is preselected); Port: the API port, usually 8006 (the field shows 443); Username without the realm; Password (secret); Realm Type PAM or PVE | Nothing | None: Phase 2 imports the POC node (Nodes tab) | +| OpenShift Virtualization (`ovirt`) | Protocol HTTPS; IP address (the OpenShift API host); Port 6443; Authentication Type Service Account Token (default) with the token (secret), or Account Credentials with a username and password (secret) | Nothing | None: Phase 2 imports the POC namespace (Namespaces tab) | +| Oracle Linux Virtualization Manager (`olvm`) | IP address; Port 443; Account username; Password (secret) | Nothing | None: Phase 2 imports the POC cluster (Clusters tab) | +| Azure Local (`azurelocal`) | Subscription ID; Application ID; Authentication Key (secret); Directory ID | **Import Clusters** (required): the POC cluster only | One per cluster | +| Outscale (`outscale`) | Region; Access Key; Access Key Secret (secret) | Nothing | None: Phase 2 imports the POC VPC (Import VPCs on the handler page) | +| VMware Cloud on AWS (`vmc_aws`) | IP address (the vCenter host); Port 443; Account username; Password (secret); Api token (secret, shown in plain text) | Nothing | None: add environments from the handler page | +| Amazon Web Services - JIT (`awsjit`) | User Certificate (PEM file); User Certificate Key (PEM file, secret); Credentials endpoint; Agency; Mission; Role | Same as AWS: close it with the X | Same as AWS | +| MacStadium Orka (`orka`) | Controller IP/Host; Service Account Token (secret) | Nothing | One, named after the handler | +| H3C CAS (`h3ccas`) | Protocol https; IP address; Port 443; Account username; Password (secret) | **Import Clusters** (optional): check the POC cluster; leave VM Group empty | One per checked cluster | + +Not offered on a fresh appliance: vCloud Director appears only where it was seeded separately (screen 1: Protocol https, IP, Port 443, a System-org username, Password; screen 2: nothing; environments come from its Organizations tab). Dimension Data, Nebula and the private-AWS type have no tile. diff --git a/.claude/skills/cb-onboarding/references/phases.md b/.claude/skills/cb-onboarding/references/phases.md new file mode 100644 index 00000000..d6a9a946 --- /dev/null +++ b/.claude/skills/cb-onboarding/references/phases.md @@ -0,0 +1,95 @@ +# Phases 2 to 9 + +Each phase: `onb_status` first, then the steps one at a time with one ask per message ([SKILL.md](../SKILL.md) rule 1), record the items with `onb_set_item_status`, close with a short report that ends in the next single ask. Echo and confirm before every write. Asynchronous tools return a job id: poll `fetch_job` and read `outputs`. + +## Phase 2: Environments (P3, 1.1.4, 1.2.1) + +One environment per handler, able to build the Custom Server with the fewest questions on the order form. Create only what the POC needs; each extra environment is one more to set up and test. + +1. **Environments from the handler form.** For most technologies the handler form's second screen already created environments for the region, location or cluster the user chose in Phase 1 ([handler-forms.md](handler-forms.md), last column). `onb_status` lists them under the handler; start from those. A job creates them for Azure, vCenter and GCP, so they appear a minute or two after Done. AWS has the one VPC environment from Phase 1 step 5. When a handler has several environments the POC will not use (for example an AWS handler created with Done, which makes one per VPC), ask one question: which one to keep, and offer `onb_remove_environment` for the others (each confirmed first). Skip step 2 when the POC location has an environment. +2. **Import, only when needed.** For a technology whose Done creates no environment, or a location without one (a second region, a location the user adds later): `onb_handler_locations` with the handler shows what is not imported yet, then `onb_import_environments` with the handler and the location (`|`, a location, a cluster). AWS: pass `onb_region` to `onb_handler_locations` to list the region's VPCs and ask which one, as in Phase 1 step 5. When the tools cannot list a technology's locations, send the handler page and the tab named in [handler-forms.md](handler-forms.md) as the single ask. Azure: a tenant-level handler must first import a subscription on the handler page (`handler_import_locations:RH-...` link); the tool says so. Azure fills an environment's parameters in a separate job; wait a minute before step 5. Networks come next, in step 3. +3. **Networks, before any order.** A server without an IP fails to provision, so every environment's NIC 1 is set up here. Skip this step only when `onb_environment_networks` answers `category: none` (Proxmox, MetalSoft, Orka, IPMI). + 1. `onb_environment_networks` with the environment lists `nic1` and `available` (add `onb_refresh=true` when both are empty). Ask one question: "Which networks should servers in use? Pick up to five." Show the networks numbered, with their VLAN or CIDR. Then call it again with `onb_networks` set to the answer: it makes exactly those the NIC 1 choices, removes any network on NIC 2 and above (one NIC for now), and verifies. Azure offers only subnets already on the environment: to bring others back, pass `onb_refresh=true` together with `onb_networks`, because a subnet sync puts every subnet back on NIC 1 (on any technology). + 2. When the answer has `category: addressing` (vCenter, VMware Cloud on AWS, SCVMM, Hyper-V, Nutanix, H3C CAS, vCloud Director, Azure Local), take each chosen network in turn, one question at a time. When it already shows a gateway, netmask and source, confirm them instead of asking again. + - "How do servers on get an IP address: DHCP, or static?" DHCP: `onb_network_addressing` with `onb_addressing=dhcp`. Nutanix networks without Nutanix-managed DHCP import as static, and vCloud Director does not accept "both". + - Static: ask for the gateway and netmask (required), then for DNS 1, DNS 2 and DNS domain (optional, say skip). These are needed even when an IP pool or IPAM supplies the addresses. + - Then ask where static addresses come from: "an IP pool in CloudBolt, an IPAM you already run (Infoblox, BlueCat, phpIPAM or SolarWinds), or typed by the requester on each order?" + - Pool: ask for the range, for example 10.0.5.10-10.0.5.60, then `onb_network_addressing` with `onb_addressing=static`, the gateway, netmask and DNS, `onb_ip_source=pool` and `onb_pool_range`. It creates the pool and checks it has free addresses. + - IPAM: with no endpoint yet, send `onb_ui_link new_ipam` (the IPAM credentials are typed there) and wait until it is saved. Then call with `onb_ip_source=ipam` and `onb_ipam` set to the endpoint. The tool checks the connection and enables the IPAM's orchestration action; echo that first, since it applies to every endpoint of that IPAM product. When it answers `needsUiStep`, send its `ipamUrl` with its `next` text (Import IPAM Networks, then map the CloudBolt network with the pencil), and call again to verify. Infoblox also needs the DNS domain. + - Typed on each order: `onb_ip_source=manual`. The first order then asks the requester for the IP (Phase 3). + 3. With `category: cloud_assigns` (AWS, Azure, OCI, OpenStack) or `no_effect` (GCP, Alibaba, Outscale, IBM Cloud, MAAS, OpenShift Virtualization, OLVM) the cloud assigns addresses: nothing more to set. + Verify: every call returned `verified: true`, and `onb_status` shows no `networkProblems` for the environment. +4. **Image.** Confirm the `onb_sync_images` job from Phase 1 finished (`fetch_job`); `onb_status` shows `cachedImages` per handler. Ask which OS the POC will build (one Linux image, and Windows when the plan needs PowerShell). `onb_import_os_build` with the handler and `onb_image` empty lists the cached images for the environment's region or location; a partial name (`ubuntu`, `Windows Server 2022`) narrows the list. Then call it with the chosen AMI id, Azure `publisher:offer:sku:version` or vCenter template name and an OS build name. CloudBolt allows one image per OS build per handler (per region on AWS, per location on Azure). When the build already holds another image of the handler, the tool changes nothing and answers `confirmationRequired` with `existingImages`: ask one question, "OS build Linux already uses on vCenter. Replace it with ? Say no to keep it and use another OS build name." Yes: call again with `onb_replace_existing=true`. An AMI id that is not cached is fetched on the spot; an empty Azure or vCenter cache is refreshed without the whitelist first. For 1.2.1 call it on the second handler with the **same** OS build name so one blueprint deploys to both clouds; when the tool reports it attached the image to an existing build of another name, use that name for the other handler. Verify: the tool returns `verified: true`, meaning CloudBolt resolves the image in every environment it attached, the same lookup an order makes. FAILURE with `unresolved` names the environment: run the tool again for that image (it repairs an AWS image stored without its region) or check that the image's region or location matches the environment's. + Then guest access, one ask per message, so the in-guest items (1.1.3, 4.1.2, 4.3.2, 4.3.3) do not fail at the first order. When the user says the POC will run no in-guest scripts, skip it and record those four items `not_applicable`. + 1. **Image credentials.** For each entry of the result's `credentials` with a non-empty `missing`, send its `imagesUrl`, `click`, `values` and `steps` as one step; the password is typed in that dialog, never in chat. Every server built from the image gets these credentials. Prove it with `onb_import_os_build` again for the build (its `credentials` show `password` or `key` true) or `guestCredentials` in `onb_status`; after the first build, `fetch_server_details` shows `credentials.password` masked instead of null. AWS signs in with the key pair's private key instead (step 5, `keyMaterial`); Azure takes the password from the order form, so its images need nothing. + 2. **vCenter `new_password`.** CloudBolt's New Password parameter is the password customization sets on a new server, and CloudBolt then stores it as the server's password; on Linux it replaces the root password when the image has credentials. CloudBolt ships a generic default for Windows that differs from the image's password. One step: set it on the environment, equal to the image's password unless the customer wants a different password on every new server. `onb_trim_environment` returns `newPassword` with the link and steps: `onb_parameter` with `onb_param_name new_password` and the environment as target (no options) attaches it, then the admin clicks the pencil in New Password's Options column on the environment's Parameters tab and types the value. Prove it with `newPasswordSet` true. A Windows build also passes without it, on the image's password. + 3. **vCenter script path.** Ask one question: "Can the CloudBolt appliance reach the ESXi hosts directly on port 443? A hosted or provider-managed vCenter usually cannot." On no, or when the first script step times out uploading through `guestFile`: `onb_parameter` with `onb_param_name tech_specific_script_execution`, the environment as target and `onb_param_options False`. Scripts then run over SSH and WinRM, so check both now rather than at the first script: SSH 22 open from the appliance to Linux servers, and WinRM over HTTPS on 5986 to Windows servers (the image needs an HTTPS listener and a firewall rule for it). When the Windows image only listens on HTTP, `onb_parameter` with `onb_param_name winrm_protocol`, the environment and `onb_param_options http`, and then 5985 must be open. `scriptPath` in `onb_status` shows the path and ports each vCenter environment uses. Leave these parameters out of orders: the environment provides them, and an order that passes one is refused. +5. **Trim the order form.** `onb_trim_environment` with the environment (profile `poc_minimal`). Show the pins from `actions` as a short list (key pair, security group, resource group, datastore) and ask one question: keep them, or which one to change. Change a pin with `onb_pin field=value` or the size list with `onb_pin instance_type=a|b|c`; keep a field with `onb_keep`. On Azure the Windows password field stays. Target: `visibleNow` is the size (and on Azure the password). When `keyMaterial` lists a key with `materialUploaded` false, send the admin `keyMaterial.uploadUrl` with `keyMaterial.steps` and `keyMaterial.why` as one step (the private key is pasted there, never in chat), then check `sshKeys` in `onb_status` before the first order in that environment. +6. **Custom Server and hostname template.** `onb_configure_custom_server` with a hostname template for 1.1.4. CloudBolt numbers names with zeros followed by X: `poc-00X` gives poc-001, poc-002 and so on; `#` is not CloudBolt syntax and the tool refuses it (the template language is in [hostname specification](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/hostname-specification)). Pass `onb_environments` to put the template on the environments instead of the server tier. Verify: `fetch_catalog_items` lists Custom Server as orderable. +7. A wrong import: `onb_remove_environment` (confirm first). Record P3 `done` when every handler is verified and has at least one environment with an image and its networks verified. + +## Phase 3: First order (P4, 1.1.1, 1.2.3, 3.2.3) + +Fully through MCP. For each environment: + +1. `fetch_catalog_items` with `name: "Custom Server"`. Missing or not orderable: `onb_configure_custom_server`. +2. **Group.** Every order is placed in a group. When `onb_status` shows `groupCount` 0 (a fresh appliance), create the POC group first: echo, then `onb_group` with a name, the POC environments, `onb_group_auto_approval=true` and no server quota, so nothing blocks the first order (Phase 5 turns approval on and sets the quota on the same group). Verify with `onb_group` and only the group name: it changes nothing and shows the group's environments and members. To choose the group for the order, `fetch_orderable_groups` with the blueprint id: one group, use it; several, ask which; none, the user's group has no deploy permission (`manage_blueprint_permissions` with `grant_action: list` shows who has, and the user decides who should). On blueprints every group may deploy, such as Custom Server and Standard Server, `fetch_orderable_groups` fails with `'UserProfile' object has no attribute 'groups'` (a CloudBolt MCP server bug); use the POC group from `fetch_groups` instead. +3. `fetch_blueprint_schema`. For the server item, `fetch_orderable_environments`, then `fetch_blueprint_item_parameters` for the chosen environment, then `fetch_blueprint_parameter_options` for each parameter with dynamic options. Choose the smallest size. For NIC 1, use one of the networks chosen in Phase 2; when its `ipProvider` is `user_static` or `user_static_or_dhcp`, ask one question for the IP and pass it as `sc_nic_0_ip`. +4. Echo the whole order verbatim (group, resource name, item slug, environment, OS build, every parameter) and wait for yes. +5. `order_catalog_item`. On vCenter pass `mem_size` as the number of GB (`2`), not "2 GB" as the order echo shows it. Poll `fetch_order`; if `PENDING`, the group requires approval: `approve_order` as an approver (or that is test 2.4.1). Then `fetch_job` on the provision job. +6. On `FAILURE`: `onb_failure_trace` with the order id, then [troubleshooting.md](troubleshooting.md). When it lists `failedServers`, explain the cause first, then ask one question before ordering again: "The failed order left behind; shall I delete them?" (say when `inCloud` is true that the VM is deleted from the cloud too). On a yes, `onb_failed_servers` with `onb_delete_servers` set to those ids, poll each `deleteJob` with `fetch_job`, and call `onb_failed_servers` again to confirm they are gone. +7. Verify: `fetch_order` is COMPLETE, the provision job is SUCCESS, and `fetch_server_list` with `group_name` shows the new server. Only then record P4 and 1.1.1 `done` with the order id and the server id. +8. `fetch_server_list` with `group_name` shows both clouds' servers in one list (1.2.3). `fetch_server_actions` on one server, then `run_server_action` for power off, on and reboot, polling each job (3.2.3). [Lifecycle actions](https://academy.university.cloudbolt.io/guides/019403d1-422e-7471-826c-4a6c12820e2a/tasks/0193e483-6d74-7c94-a8c4-464683bd3b51). + +## Phase 4: Self-service (1.1.2, 1.2.2, 2.5.1, 4.3.1) + +1. **A user-defined parameter** (1.1.2): `onb_parameter` with name `backup_policy`, label `Backup Policy`, type STR, options `Gold`, `Silver`, `Bronze`, `None`, targets the POC environments (or the POC group, Phase 5). When the result has `existingParameter`, the appliance already has a parameter of that name that the toolkit did not create: show the user its label and `usedBy` and ask one question, use it as is or pick another name; call again with `onb_param_use_existing=true` only on a yes. Order again and check the value on the server (`fetch_server_details`). When the user wants a parameter mandatory, add `onb_param_required=true`. CloudBolt keeps one required flag per parameter, so when the result has `confirmationRequired`, show the user `alsoAffects` and ask one question, whether to make it required there too; call again with `onb_param_confirm_global=true` only on a yes. [Parameters](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/parameters). +2. **Generated options** (4.3.1): the Standard Server blueprint (Phase 8) carries `application` and `maintenance_window`, whose options come from Python actions; ordering it shows both dropdowns. [Generated options](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/options-generated-using-orchestration-actions). +3. **Tags** (1.2.2, 2.5.1): `onb_tag_mapping` on each handler with the same lines, for example `group=Group`, `owner=Owner`, `os_family=OSFamily`, `cost_center=CostCenter`, `backup_policy=BackupPolicy`; Phase 8 adds `application=Application` and `maintenance_window=MaintenanceWindow` once the Standard Server blueprint has brought those parameters. `cost_center` first needs `onb_parameter` with `onb_param_show_on_servers=true`, `onb_param_required=true` and one value on the group (`onb_param_targets` the group, `onb_param_options` one value): a required parameter with one option is filled in on API and MCP orders, an optional one is not, and the CostCenter tag is then missing unless the order passes it. Order a server in each cloud and check the tags in both consoles. [Tags](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/tags). + +## Phase 5: RBAC and governance (2.3.1 to 2.3.4, 2.4.1, 2.4.2, 2.5.2) + +1. **Group** (2.3.3, 2.5.2): `onb_group` with a name, the environments it may use, `onb_group_auto_approval=false` and `onb_group_quota_servers=3`. When Phase 3 created the POC group, pass its name: the tool updates that group instead of creating another. Verify with `onb_group` and only the group name, which changes nothing and shows its environments, members, quota and auto-approval (`fetch_group_details` shows neither environments nor members). [Groups and permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/groups-permissions). +2. **Users** (2.3.1, 2.4.1): a requestor (`onb_user_roles: requestor`) and an approver (`approver`) in that group, one user per message, requestor first. Ask for that user's email address first (one question; approval and completion emails go there); never make one up or take it from a network, lab or appliance domain. `onb_user` with the username, that email, names, group and role returns `createInUi` while the user does not exist: send the admin its link, the button (Add) and the values, and say the password goes in Password and Confirm password there. When they say it is created, call `onb_user` again with the same inputs to assign the role, check `passwordSet`, then do the next user. CloudBolt cannot add a password to an existing user without the current one, so never create users another way. A user with `passwordFix` (an earlier toolkit made it without a password) is deleted and added again the same way. The users log in; the requestor sees only their own servers, and after `onb_user` with `resource_admin` they see the group's. +3. **Blueprint entitlement** (2.3.2): Both toolkit blueprints are open to every group. `manage_blueprint_permissions` with `grant_action: restrict`, Standard Server and the POC group grants the group DEPLOY and turns Any group can deploy off; the result shows `anyGroupCanDeploy` false and the group (`open` turns it back on); the requestor still sees the blueprint in the catalog, and a user outside the group would not. A later sync of Standard Server opens it to every group again, because its metadata says so; restrict it again afterwards. [Blueprint permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/group-permissions-for-blueprints). +4. **Environment entitlement** (2.3.3): the environments passed to `onb_group`; `fetch_orderable_environments` as each user proves it. [Ordering environments](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ordering-servers-environments). +5. **Custom role** (2.3.4): UI, `onb_ui_link roles`; then `onb_user` with that role name. [Custom roles](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/groups-permissions/a/h2__322854237). +6. **Email (P7)**, before the first approval. Ask: "Is there an SMTP relay CloudBolt can send mail through? Say skip if not." Skip: record P7 `not_applicable`; approval emails (2.4.1) and 4.2.3, 4.2.6 become partial. Yes: ask for its host and port in one question, set them with `onb_smtp`, send its `editUrl` for the username and password (the user clicks Edit there), then ask which address should receive a test and run `onb_smtp_test`. +7. **Approvals** (2.4.1, 2.4.2): the requestor places the order in the UI, logged in as the requestor: an admin's own order is approved automatically, so an order placed over this MCP connection cannot prove the gate. Then `fetch_orders_pending_my_approval` shows it and `approve_order` approves it (or the approver does so in the UI). For the day-2 case use the stock `Change Resources` server action on a vCenter server: `onb_action_approval` with `Change Resources`, then the requestor runs it on their server in the UI and it becomes an order. Do not use a plug-in action such as Resize VM for this: with Requires approval, `run_server_action` puts it in the caller's cart instead of submitting it, and MCP has no tool to submit a cart. +8. **Quota** (2.5.2): the quota set in step 1; the fourth order is refused. A server in Provision Failed state counts toward the quota, so clear those first with `onb_failed_servers`. [Quotas](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/groups-permissions/a/h2_878037613). + +## Phase 6: Authentication (2.1.1, 2.1.2, 2.1.3, 2.2.1) + +1. **LDAP utility** (2.1.1): ask "Will this POC use Active Directory or LDAP logins? Say skip if not." Skip: record P10, 2.1.1 and 2.1.2 `not_applicable`. Yes: one action, because the service-account password is entered in the UI: the `onb_ui_link new_ldap` link (the user clicks Add) with the values the form wants (server, port 389 or 636, protocol, base DN, bind account). After save, `onb_verify_ldap`; on failure its `hints` and `onb_recent_errors` with `onb_log: authentication`. A directory user logs in. [LDAP authentication](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ldap-authentication). +2. **LDAP mapping** (2.1.2): ask for the DN of the directory group to map, then `onb_ldap_mapping` with that DN, the POC group and the roles; a member logs in and `onb_group` with only the group name lists them. [User permission synchronization](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/user-permission-and-attribute-synchronization/a/h2_1939259882). +3. **SSO** (2.1.3): ask "Is there an SSO application, and someone who manages it, available for this POC? Say skip if not." Skip: record P9 and 2.1.3 `not_applicable`. Yes: UI only, with the customer's SSO SME: `onb_ui_link sso`. [SSO and SAML](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/single-sign-on-and-saml). +4. **Branded portal** (2.2.1): ask "Is there a DNS name for a branded portal? Say skip if not." Skip: record P8 and 2.2.1 `not_applicable`. Yes: `onb_ui_link portals`. [Branded portals](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/branded-portals). + +## Phase 7: Lifecycle (3.1.1 to 3.1.4, 3.2.1) + +1. **Power schedule** (3.1.1): `onb_parameter` with name `power_schedule` and the POC environments as targets; order a server choosing a schedule, or `set_server_power_schedule` on an existing one and `fetch_server_power_schedule` to read it back. [Power scheduling](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/power-scheduling-servers/a/h2_1163015685). +2. **Expiration** (3.1.2): `onb_parameter` with name `expiration_date`, targets the environments, `onb_param_max=30` (days). `onb_parameter` also enables the Expire Servers recurring job, which acts on the date (`lifecycleJob` in its output; `onb_status` flags it when it is off). Order with a date. When `expiration_date` is required (it often is on an appliance already), every later order must carry a date: pass one on MCP orders from here on. [Server expiration](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/server-expiration). +3. **Self-service decommission** (3.1.3): the owner deletes the server from the portal, or `run_server_action` with the Delete action and poll. +4. **Onboard existing servers** (3.1.4): `fetch_server_list` with `group_name: Unassigned`, then `run_server_action` with Change Attributes to set group and owner; a group member then sees them. Skip when the clouds hold no existing VMs. +5. **Resize** (3.2.1): `fetch_server_actions` on a server shows the resize action the appliance has: the stock `Change Resources` on vCenter, and on AWS `Resize VM` when it is installed. When an AWS server has none, `onb_install_content_library_item` with collection `server-actions` and an empty `onb_cl_item` lists the collection; its AWS item is `Resize Instance`. Then `run_server_action`, poll, and confirm the size in the cloud console. + +## Phase 8: Extensibility (1.1.3, 4.1.2, 4.2.1 to 4.2.6, 4.3.1 to 4.3.3) + +Content Library installs need P5. Each `onb_install_content_library_item` call is a job; with `onb_cl_item` empty it lists the collection. + +1. **Standard Server blueprint** (1.1.3, 4.3.1, 4.3.2, 4.3.3): it is not in the package, because it brings the `application` and `maintenance_window` parameters and a sync reuses any parameter that already has the name. Check `onb_status` `parameterConflicts`: when either is listed, show the user its label and link and ask one question, whether the blueprint may use that existing parameter; on a no, skip this step and add it to the follow-ups. Then `sync_from_source_control_repo` with `blueprints/BP-x78p48gz` from the branch the package came from (the Hello World scripts and both generated-options actions come with it), poll `fetch_job_log`, and add `application=Application` and `maintenance_window=MaintenanceWindow` to each handler with `onb_tag_mapping`. The blueprint is open to every group. Guest credentials must be on the OS build or server (SSH on 22, WinRM on 5985 or 5986 from the appliance). Order it through MCP like the Custom Server: the Application and Maintenance Window dropdowns are Python-generated, and the job log of the Hello World item shows the message printed inside the guest. [Remote scripts](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/remote-scripts). +2. **Ad Hoc Script** (4.1.2): `fetch_server_actions` on a server shows whether the appliance already has an `Ad Hoc Script` server action; when it does not, list the `server-actions` collection with `onb_install_content_library_item` (empty `onb_cl_item`) and install the script item it offers. `run_server_action` with a one-line script; the output is in the job. On AWS the server's key pair needs its private key uploaded first (`sshKeys` in `onb_status`). +3. **Jupyter Notebook UI extension** (4.2.1): `onb_install_content_library_item` with `ui-extension-packages` and `Jupyter Notebook`. Its documentation has an installer the user runs as root on the appliance, and the web server needs a restart before the page opens (the tool says so). [UI extensions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ui-extensions). +4. **Recurring job** (4.2.2): `onb_install_content_library_item` with `recurring-jobs` and the tmp cleanup job ("Cleanup .zip files from tmp folder in CB"). Run it once with `run_recurring_job` and read the folder it scans in `fetch_job_log` (a 2026.3 appliance scans the job engine's private /tmp, `/tmp/systemd/*/tmp`, not /var/tmp); the user creates a test zip there, and the next run's log shows it deleted. Set the schedule in the UI (`onb_ui_link recurring_jobs`). [Recurring jobs](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/recurring-jobs). +5. **Rules** (4.2.3): `onb_ui_link rules`, enable "Email Group Admins when quota usage over threshold", set the POC group's quota below its server count with `onb_group`, execute rules on that page, check the email (needs P7). [Rules](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/rules). +6. **CIT** (4.2.4): each run provisions a server inside the POC group, so first clear Provision Failed servers with `onb_failed_servers` and make sure the group's quota leaves room for one more (`onb_group` with only the name shows it; raise it if not). `onb_cit_from_order` with the successful Custom Server order, then `run_cit_tests` with the test id and poll; each run provisions and decommissions a server. When a run fails, cancel the replay order it leaves PENDING (`fetch_orders`, `cancel_order`). [Continuous infrastructure testing](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/continuous-infrastructure-testing). +7. **Inbound webhook** (4.2.5): the Echo webhook from the package answers at `/api/v3/cmp/inboundWebHooks/echo/run/`; the user posts JSON with curl or Postman using their API token and gets it back with their username. [Inbound webhooks](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/inbound-webhooks/). +8. **Email template** (4.2.6): UI, `onb_ui_link email_templates`, edit Order Complete, order, read the email (needs P7). [Email templates](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/customizing-email-templates). +9. Terraform (4.3.4) and Ansible (3.2.2, 4.3.5) carry weight 0. Ask once: "Do you want to try Terraform or Ansible? They do not count toward the score. Say skip if not." Skip: record P11, P12 and their items `not_applicable`. + +## Phase 9: Wrap-up + +1. `onb_failed_servers`. When it lists servers, show them (hostname, environment, created) and ask one question, whether to delete them; on a yes, delete and verify as in Phase 3 step 6. +2. `onb_scorecard`. Take the `pending` items one at a time: name the item and its evidence line, ask, then record `done` with the evidence or `not_applicable` with the reason using `onb_set_item_status`. +3. `onb_scorecard` again and present it: categories, items with weight and status, points possible (and applicable), prerequisites. +4. List the follow-ups raised during the week that were out of scope. The customer fills the workbook's score column from the table. diff --git a/.claude/skills/cb-onboarding/references/resource-handlers.md b/.claude/skills/cb-onboarding/references/resource-handlers.md new file mode 100644 index 00000000..0ba85136 --- /dev/null +++ b/.claude/skills/cb-onboarding/references/resource-handlers.md @@ -0,0 +1,52 @@ +# Phase 1: Resource handlers + +Goal: up to two resource handlers (the POC clouds), each verified. Covers prerequisite P3 (first half). The user creates each handler in the UI because the form takes the credentials; the agent prepares, links, verifies and diagnoses. + +## Per handler + +1. **Which cloud.** Ask one question: "Which cloud should we connect first: AWS, Azure or vCenter?" Nothing else in that message. +2. **Where it builds.** Look the technology up in [handler-forms.md](handler-forms.md). When its screen 2 has a required (or useful) region, location, cluster, project or datacenter field, ask one question for it: AWS (no field to set, but the region decides which VPCs to offer) "Which AWS region will the POC use? Say us-east-1 if you are not sure.", Azure "Which Azure location will the POC use? Say eastus if you are not sure.", vCenter "Which vCenter cluster will the POC build in?", any other technology the same question with the field named in the table. When screen 2 has nothing to set, skip this step: Phase 2 imports the environment. +3. **Create it.** One message with one action: a sentence on what the handler is for, the `onb_ui_link` link for `new_resource_handler:` (it opens the technology chooser: tell the user to click the tile named in `clickTechnology`), the screen 1 values from [handler-forms.md](handler-forms.md) with each secret marked "typed in the form", the minimum-permissions link to apply to the credential first, then the second screen in one sentence: "On the second screen, choose under , leave every other field as it is, and click Done.", or "On the second screen, leave everything as it is and click Done." when it has nothing to set. AWS and its variants: "When the second screen opens, close it with the X and do not click Done: Done would create an environment for every VPC in the region, and I will create only the one we need." End with "tell me when it is saved". Ports come up only if verification fails. +4. **Verify.** When the user answers: + - Saved: `onb_status` to find the new `RH-` id, then `onb_verify_resource_handler` with `onb_handler` set to it; poll `fetch_job`. `verified: true` means done; record nothing yet (P3 completes with the environments). `verified: false`: read `error` and `hints`, explain the cause in two sentences, send `links.edit` for the fix as the single ask (the user clicks `links.editClick` there), and verify again after the user saves. + - Not saved (the form rejected it): `onb_recent_errors` with `onb_contains: "Failed to validate connection"` and `onb_minutes: 10`. The group's `traceback` and `hints` hold the cloud API's error. Explain it, then send the same `new_resource_handler:` link again. +5. **AWS: the one VPC.** AWS and its variants only, right after `verified: true`. `onb_handler_locations` with the handler and `onb_region` set to the step 2 region lists `vpcs` (id, name, CIDR, subnet count, default) and `recommendedVpc`. One VPC: say which one and import it without asking. Several: ask one question, "Which VPC should POC servers use?", with the VPCs numbered (name, CIDR, subnet count), `recommendedVpc` first and marked recommended; a VPC with no subnets cannot build servers, so leave it out. Then `onb_import_environments` with the handler and `onb_locations` `|` for that VPC only. Verify: the result shows `created` (or `existing`), `onb_status` lists exactly that one environment under the handler, and `tagsAdded` (or the handler's Tags tab) has Name and Annotation. +6. **Image cache, right away.** As soon as `verified: true`, the next ask is the echo for `onb_sync_images` with the handler: it fetches every image the credentials can see, without the whitelist, and enables the technology's Fetch and Cache recurring job and rule plus Execute all Rules, with their `use_whitelist` input mapped to false so the nightly refresh stays complete; on AWS the recurring job itself always uses the whitelist, the rule does the full refresh per imported region. It is a long job: AWS without a whitelist can take ten minutes or more per region, Azure a minute or two per location, vCenter a few minutes. Do not wait for it; continue, and check the job before importing OS builds. Without this step the image pickers and `onb_import_os_build` see an empty cache on a new appliance, and with the default whitelist they miss images customers use. By default it refreshes the regions or locations of the handler's environments, which after the second screen (or step 5 on AWS) is the POC region. +7. **Second cloud.** Ask one question: "Is there a second cloud for this POC? Say no to continue with one." Yes: steps 2 to 6 for it. Stop at two handlers; the test plan needs no more. + +## Technologies + +| Technology | Page key | Minimum permissions | Ports from the appliance | +|---|---|---|---| +| AWS | `new_resource_handler:aws` | [AWS minimum permissions](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/aws/a/h2__2010883827) (EC2 describe, run, terminate, tags, VPC and subnet describe, key pairs; S3 and IAM pass-role only if used) | 443 to the regional EC2, STS and SSM endpoints | +| Azure | `new_resource_handler:azure_arm` | [Azure minimum permissions](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/azure-resource-manager/a/h3_736726059) (Reader on the subscription plus Virtual Machine Contributor and Network Contributor on the POC resource group, or Contributor on the subscription for a POC) | 443 to login.microsoftonline.com and management.azure.com | +| vCenter | `new_resource_handler:vmware` | [vCenter minimum permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/minimum-required-permissions-in-vcenter-vmware) on the datacenter, cluster, datastore, network and folder used | 443 to vCenter and to every ESX host (console and ISO uploads) | +| SCVMM | `new_resource_handler:scvmm` | SCVMM administrator role | 5985 or 5986 to the SCVMM server | +| GCP | `new_resource_handler:gcp` | Compute Admin and Service Account User on the project | 443 to googleapis.com | +| Nutanix | `new_resource_handler:acropolis` | Cluster admin | 9440 to Prism | +| OpenStack | `new_resource_handler:openstack` | Member role on the project | 5000 and the service endpoints | + +The POC test plan documents AWS, Azure and vCenter. What each technology's form asks, on both screens, is in [handler-forms.md](handler-forms.md), which covers every tile the chooser offers; `new_resource_handler:` takes any slug listed there. + +## Reading verification errors + +`onb_verify_resource_handler.hints` and `onb_recent_errors.groups[].hints` already map the frequent errors to a fix. The pattern to explain to the user: + +| Error says | It means | Fix | +|---|---|---| +| `InvalidClientTokenId`, `SignatureDoesNotMatch`, `AuthFailure` (AWS) | The key id or secret is wrong, often a trailing space | Re-enter both on the edit link | +| `UnauthorizedOperation`, `AccessDenied` (AWS) | A permission is missing | Apply the minimum permissions policy to the IAM identity | +| `AADSTS7000215` (Azure) | The client secret is invalid or expired | New secret on the app registration; paste the value, not the id | +| `AADSTS700016`, `AADSTS90002` (Azure) | Application or tenant id is wrong | Check both ids on the app registration overview | +| `AuthorizationFailed`, `SubscriptionNotFound` (Azure) | No role on the subscription, or wrong subscription id | Assign Reader plus the roles in the permissions document | +| `Cannot complete login due to an incorrect user name or password` (vCenter) | Credentials | user@domain form; re-enter the password | +| `Permission to perform this operation was denied` (vCenter) | vCenter role lacks a privilege | Compare with the vCenter permissions document | +| `CERTIFICATE_VERIFY_FAILED`, `SSLError` | TLS inspection or a self-signed certificate | Add the CA under Admin > SSL Certificates (`onb_ui_link ssl_certificates`) or disable verification on the handler for the POC | +| `Name or service not known` | DNS on the appliance | Fix the appliance's resolver or use the IP | +| `Connection refused`, `timed out`, `EndpointConnectionError` | Firewall or proxy | Open 443 outbound to the endpoint, or set the web proxy (`onb_ui_link proxy`) | + +Hand the user the fix and the edit link, then verify again. After three failed rounds on one handler, record P3 as `pending` with the last error and continue with the other cloud. + +## Hand-off to Phase 2 + +Both handlers verified (or one, if the POC has one cloud): `onb_status` shows each with `lastVerify.ok: true`. Continue with the environments in [phases.md](phases.md). diff --git a/.claude/skills/cb-onboarding/references/test-plan-map.md b/.claude/skills/cb-onboarding/references/test-plan-map.md new file mode 100644 index 00000000..3e8fc772 --- /dev/null +++ b/.claude/skills/cb-onboarding/references/test-plan-map.md @@ -0,0 +1,66 @@ +# POC test plan map + +Every item of the CloudBolt CMP POC Test Plan with its weight (the workbook multiplies a 0 to 5 score by it), the phase that covers it, how the agent does or verifies it, the evidence to record, the documentation link, and whether the customer may record it as not applicable. Prerequisites are in [bootstrap.md](bootstrap.md). `onb_scorecard` reports the same items with recorded statuses and live evidence. + +Status values for `onb_set_item_status`: `done`, `pending`, `skipped`, `not_applicable` (reason required for the last two). + +## Self-service (weights total 35) + +| Id | Item | Weight | Phase | How | Evidence | Docs | Skippable | +|---|---|---|---|---|---|---|---| +| 1.1.1 | Provision a blueprint from the catalog as a non-admin | 5 | 3, 5 | MCP order flow; the requestor user orders too | Order id, server | [Blueprints](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/blueprints) | No | +| 1.1.2 | User-defined parameter at order time | 5 | 4 | `onb_parameter` on the environments, order through MCP | Parameter name, order id, value on server | [Parameters](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/parameters) | No | +| 1.1.3 | Post-provisioning automation from the blueprint | 5 | 8 | Standard Server blueprint (Hello World build items), order | Order id, job output | — | No | +| 1.1.4 | Hostname template with preview | 5 | 2 | `onb_configure_custom_server` with `onb_hostname_template` | Hostname of the built server | [Hostname specification](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/hostname-specification) | No | +| 1.2.1 | One blueprint deploys to two clouds | 5 | 2, 3 | `onb_import_os_build` with the same build name on both handlers; two orders | Two order ids, two servers | — | Yes, single-cloud POC | +| 1.2.2 | Cross-cloud tagging consistency | 5 | 4 | `onb_tag_mapping` with the same lines on both handlers; order; check tags | Tags on both servers | [Tags](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/tags) | Yes, single-cloud POC | +| 1.2.3 | Unified visibility across clouds | 5 | 3 | `fetch_server_list` by group | The list | — | Yes, single-cloud POC | + +## RBAC and governance (weights total 39) + +| Id | Item | Weight | Phase | How | Evidence | Docs | Skippable | +|---|---|---|---|---|---|---|---| +| 2.1.1 | LDAP or AD authentication | 3 | 6 | LDAP utility (UI, password there), `onb_verify_ldap`, AD login | Login in authentication log | [LDAP](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ldap-authentication) | Yes, when P10 unmet | +| 2.1.2 | Group and role from AD group membership | 3 | 6 | `onb_ldap_mapping` | AD user's group and role | [User permission sync](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/user-permission-and-attribute-synchronization/a/h2_1939259882) | Yes, when P10 unmet | +| 2.1.3 | SAML2 SSO | 2 | 6 | UI with the SSO SME | SSO login | [SSO](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/single-sign-on-and-saml) | Yes, when P9 unmet | +| 2.2.1 | Branded portal per tenant | 3 | 6 | Portal (UI) on the DNS record | Portal URL loads branded | [Branded portals](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/branded-portals) | Yes, when P8 unmet | +| 2.3.1 | Visibility constrained by group role | 4 | 5 | `onb_user` requestor, then resource_admin; the user logs in twice | What each user sees | [Groups and permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/groups-permissions) | No | +| 2.3.2 | Blueprint entitlement by group | 4 | 5 | `manage_blueprint_permissions`, `fetch_orderable_groups` | Which group can order | [Blueprint permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/group-permissions-for-blueprints) | No | +| 2.3.3 | Environment entitlement by group | 4 | 5 | `onb_group` with environments, `fetch_orderable_environments` | Which group sees it | [Ordering environments](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ordering-servers-environments) | No | +| 2.3.4 | Custom role | 3 | 5 | Role (UI), `onb_user` with that role, login | Permissions seen | [Custom roles](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/groups-permissions/a/h2__322854237) | No | +| 2.4.1 | Order approval | 3 | 5 | Requestor orders, `approve_order` as approver | Order id, approval | — | No | +| 2.4.2 | Approval on a day-2 action | 3 | 5 | `onb_action_approval` on Change Resources (vCenter), the requestor runs it in the UI and it becomes an order | Order id | — | No | +| 2.5.1 | Tagging policy from a parameter | 5 | 4 | `onb_parameter` cost_center on the group, `onb_tag_mapping` | Tag in the cloud | [Tags](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/tags) | No | +| 2.5.2 | Group quota | 2 | 5 | `onb_group` with `onb_group_quota_servers=3`, fourth order refused | Refused order | [Quotas](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/groups-permissions/a/h2_878037613) | No | + +## Resource management (weights total 26) + +| Id | Item | Weight | Phase | How | Evidence | Docs | Skippable | +|---|---|---|---|---|---|---|---| +| 3.1.1 | Power schedules | 5 | 7 | `onb_parameter` power_schedule on environments, `set_server_power_schedule` | Schedule read back, power events | [Power scheduling](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/power-scheduling-servers/a/h2_1163015685) | No | +| 3.1.2 | Leases (expiration) | 5 | 7 | `onb_parameter` expiration_date with `onb_param_max`, Expire Servers job | Expiration on server, job enabled | [Server expiration](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/server-expiration) | No | +| 3.1.3 | Self-service decommission | 4 | 7 | Owner deletes, or `run_server_action` Delete | Job id, server gone | — | No | +| 3.1.4 | Onboard existing cloud resources | 5 | 7 | Change Attributes on Unassigned servers | Servers in the group | — | Yes, when no existing VMs | +| 3.2.1 | Resize | 4 | 7 | Change Resources (vCenter) or Resize VM / Resize Instance (AWS), `run_server_action` | Job id, new size | — | No | +| 3.2.2 | Configuration update through Ansible | 0 | 8 | Ansible day-2 action | Job output | [Ansible](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ansible) | Yes, weight 0 | +| 3.2.3 | Lifecycle actions | 3 | 3 | `run_server_action` stop, start, reboot | Job ids | [Lifecycle actions](https://academy.university.cloudbolt.io/guides/019403d1-422e-7471-826c-4a6c12820e2a/tasks/0193e483-6d74-7c94-a8c4-464683bd3b51) | No | + +## Extensibility (weights total 42) + +| Id | Item | Weight | Phase | How | Evidence | Docs | Skippable | +|---|---|---|---|---|---|---|---| +| 4.1.1 | No in-guest agents | 5 | — | Architecture statement; the workbook pre-scores it | — | — | No | +| 4.1.2 | Agentless in-guest script | 5 | 8 | Ad Hoc Script server action (on the appliance or from the Content Library) | Script output | — | No | +| 4.2.1 | UI extension from the Content Library | 5 | 8 | `onb_install_content_library_item` ui-extension-packages | Extension launches | [UI extensions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ui-extensions) | Yes, when P5 unmet | +| 4.2.2 | Recurring job on a schedule | 4 | 8 | `onb_install_content_library_item` recurring-jobs, `run_recurring_job` | Job id, file gone | [Recurring jobs](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/recurring-jobs) | Yes, when P5 unmet | +| 4.2.3 | Rule-based automation | 3 | 8 | Quota rule enabled (UI), `onb_group` quota, executed | Email received | [Rules](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/rules) | Partial without P7 | +| 4.2.4 | Continuous infrastructure testing | 3 | 8 | `onb_cit_from_order`, `run_cit_tests` | Test run | [CIT](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/continuous-infrastructure-testing) | No | +| 4.2.5 | Inbound webhook | 4 | 8 | Echo webhook synced, curl POST | Response JSON | [Inbound webhooks](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/inbound-webhooks/) | No | +| 4.2.6 | Customizable notification templates | 0 | 8 | Edit Order Complete template (UI) | Email body | [Email templates](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/customizing-email-templates) | Yes, without P7 | +| 4.3.1 | Python generated options | 5 | 4, 8 | Standard Server's `application` and `maintenance_window` | Dropdown contents | [Generated options](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/options-generated-using-orchestration-actions) | No | +| 4.3.2 | PowerShell build item | 4 | 8 | Standard Server on a Windows OS build | Job output | [Remote scripts](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/remote-scripts) | Yes, when no Windows image | +| 4.3.3 | Bash build item | 4 | 8 | Standard Server on a Linux OS build | Job output | [Remote scripts](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/remote-scripts) | Yes, when no Linux image | +| 4.3.4 | Terraform-backed blueprint | 0 | 8 | Terraform blueprint | Plan and apply logs | [Terraform](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/terraform-integration-through-cmp-blueprints) | Yes, weight 0 | +| 4.3.5 | Ansible Automation Platform | 0 | 8 | AAP configuration manager | Job template run | [AAP](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ansible-automation-platform) | Yes, weight 0 | + +Possible points per category are five times the weight total: 175, 195, 130, 210, for 710 in all. diff --git a/.claude/skills/cb-onboarding/references/troubleshooting.md b/.claude/skills/cb-onboarding/references/troubleshooting.md new file mode 100644 index 00000000..dd827661 --- /dev/null +++ b/.claude/skills/cb-onboarding/references/troubleshooting.md @@ -0,0 +1,53 @@ +# Troubleshooting: root cause before retry + +Order of investigation for any failure: + +1. The tool's own `error_message` and `outputs.error`. +2. An order or job: `onb_failure_trace` with the `ORD-` or `JOB-` id. Read `failedJobs[].errors`, `progressTail`, `hints`, then `fetch_job_log` with `log_job_id` set to the job it names and `log_file_tail: 200` for the traceback. +3. Anything that failed in the UI or with no job: `onb_recent_errors` with `onb_minutes: 10` (add `onb_contains` for a handler name, hostname or error text; `onb_log: jobengine` for provisioning, `authentication` for logins, `mcp` for tool calls). +4. The table below. +5. Explain the cause and the fix in two sentences, give the link, and only then let the user retry. + +| Symptom | First tool | Usual cause | Fix | +|---|---|---|---| +| Handler form: "Unable to connect to handler with the information provided" | `onb_recent_errors` with `onb_contains: Failed to validate connection` | Credentials, permissions, TLS, DNS, firewall or proxy; the traceback names which | See the error table in [resource-handlers.md](resource-handlers.md) | +| `onb_verify_resource_handler` returns `verified: false` | its `hints` | Same causes, for a handler that was saved | Edit link, verify again | +| Handler verified but no regions, locations or clusters offered | the import-locations page | Credentials can authenticate but not list (describe) resources; an Azure subscription not yet imported as a child handler | Apply the permissions document; import subscriptions first on Azure | +| `onb_import_os_build` lists no images, or not the image the customer uses | `onb_status` handler `cachedImages` | The image cache is empty on a new appliance, or was filled with the default whitelist | `onb_sync_images` for the handler (no whitelist; enables the cache jobs), wait for the job, list again; an AMI id can be passed directly | +| Order fails with `There is no AMI available in ... for ... in ` | `onb_import_os_build` again for that AMI | The AMI was stored without its region (toolkit before this fix), or the image is in another region than the environment | Run the import again: it sets the region and returns `verified: true` only when the environment resolves the image | +| Order fails with `There should only be one OSBA in common between a resource handler and an OSB, but 2 were found` | `onb_status` environment `osBuildProblems` | The OS build holds two images of the same handler; it breaks every order in that handler's environments | Ask which image to keep, then `onb_import_os_build` with that image and `onb_replace_existing=true`: it removes the other one and verifies | +| A failed order left its server behind (it is not in `fetch_server_list`) | `onb_failed_servers`, or `failedServers` in `onb_failure_trace` | An order that fails leaves the server in Provision Failed state; only the UI's Re-run deletes it | After the cause is fixed, ask the user, then `onb_failed_servers` with `onb_delete_servers` | +| Servers are all named literally, for example `poc-#` | `fetch_server_details` hostname | The hostname template has no CloudBolt sequence | `onb_configure_custom_server` with zeros and X, for example `poc-00X` | +| An AWS handler has one environment per VPC | `onb_status` environments under the handler | The handler form's Done (Available Regions) imports every VPC of the region | Ask which one the POC uses; `onb_remove_environment` for each other one, confirmed first | +| `onb_import_environments` says the region has several VPCs | `onb_handler_locations` with `onb_region` | The region alone is accepted only when it has one VPC | Ask the user which VPC, then pass `|` | +| Order form offers no OS build or no network for an environment | `onb_status` environment `osBuildProblems` and `networkProblems` | The OS build's image is in another region or location; no network on NIC 1 | Import an image for that region; choose networks with `onb_environment_networks` | +| Provisioning fails with `Network must have netmask and gateway configured, since DHCP is not being used` | `onb_network_addressing` with only `onb_network` | A static network without gateway or netmask | `onb_network_addressing` with `onb_gateway` and `onb_netmask` | +| `Resource pool ... is full` | `onb_network_addressing` with only `onb_network` (ipPool free) | Every pool address is in use | Extend the pool: `onb_ip_source=pool` with more addresses in `onb_pool_range` | +| IPAM order gets no IP, or the IPAM hook did nothing | `onb_network_addressing` with `onb_ip_source=ipam` | The IPAM orchestration action is disabled, the network is not mapped, or the endpoint is unreachable | Run it again: it enables the action, reports the mapping step, and checks the connection | +| NIC 1 shows networks that were removed | `onb_environment_networks` | A subnet sync (Sync Regions, the Azure handler sync, Import Subnets) puts every subnet back | `onb_environment_networks` with the chosen `onb_networks` again | +| Order refused before submission with a missing deployment item | the schema | The order payload left out an item | Include every item from `fetch_blueprint_schema`, with `"parameters": {}` when it has none | +| Order `DENIED` or no orderable group or environment | `fetch_orderable_groups`, `fetch_orderable_environments` | Entitlement: the group cannot deploy the blueprint or use the environment | Fix the entitlement on the blueprint or environment, or `manage_blueprint_permissions` | +| Order `PENDING` for long | `fetch_order` | Awaiting approval | `approve_order` as an approver, or that is the test (2.4.1) | +| Provision job fails: `is required for Azure windows servers` | `onb_failure_trace` hints | Windows on Azure needs `password_arm` | Add the parameter to the environment or order form | +| `vmware_datastore parameter must be specified`, `Memory and CPU are required` | `onb_failure_trace` hints | vCenter environment missing pinned parameters | Set datastore, cpu_cnt, mem_size options on the environment | +| An MCP or API order leaves a parameter empty that the environment offers or pins, or the agent keeps skipping it | `fetch_blueprint_item_parameters`: `required` false, `is_provided` false | Only a required parameter is mandatory, and only a required parameter with one option is filled in automatically; `required` is global, a per-environment flag is ignored | `onb_parameter` with `onb_param_required=true`; when it answers `confirmationRequired`, ask the user about `alsoAffects`, then `onb_param_confirm_global=true` | +| A script step on an AWS Linux server cannot connect, or a Windows server's password times out | `onb_status` `sshKeys` (`materialUploaded`) | CloudBolt has no private key for the server's key pair | Upload it on the handler's SSH Keys tab (`onb_ui_link handler_ssh_keys:`) | +| A vCenter Windows order fails with `No password parameter set, cannot set the Administrator password for this VM!` (often only in the job's log file) | `onb_failure_trace`, `onb_status` `newPasswordSet` | The environment has no `new_password`, the initial Administrator password customization sets | Set `new_password` on the environment's Parameters tab, equal to the Windows image's password unless the password should change at build | +| A Windows server's stored password does not let CloudBolt or the user sign in | `onb_status` `newPasswordSet` and `guestCredentials` | The image password was set but `new_password` kept a different value, so customization set the guest to that value | Make `new_password` on the environment equal the image's password, or update the server's stored password to the `new_password` value | +| A script step fails with `Cannot run script, server's password is unknown` | `onb_status` `guestCredentials` | The image has no guest credentials, so the server has none | Set the username and password on the image (handler's Images tab, `onb_ui_link handler_images:`), then order again | +| A vCenter script step hangs about two minutes, then fails with `HTTPSConnectionPool(host='' ...) ConnectTimeoutError` | `onb_failure_trace` hints | The appliance cannot reach the ESXi host on 443 to upload the script through VMware Tools (`guestFile`); common with hosted vCenter | `onb_parameter` `tech_specific_script_execution` with options `False` on the environment; open SSH 22 and WinRM 5985/5986 from the appliance to the servers | +| An SSH script fails within seconds with `/etc/ssh/ssh_config: line N: Bad configuration option` | `onb_failure_trace` hints | The appliance's own SSH client file has a server-side option (for example PermitRootLogin); the guest is fine | On the appliance, as root, remove or comment out that line | +| A Windows script fails after about 150 seconds with `port=5986 ... ConnectTimeoutError` | `onb_failure_trace` hints, `onb_status` `scriptPath` | WinRM over HTTPS (the default) cannot reach the server: no HTTPS listener or firewall rule on the image, or the network blocks 5986 | Enable the HTTPS listener and open 5986, or `onb_parameter` `winrm_protocol` with options `http` on the environment and open 5985 | +| `InvalidKeyPair`, `key_name` | `onb_failure_trace` hints | AWS key pair named on the environment does not exist in the region | Pin an existing key pair | +| `InsufficientInstanceCapacity`, `QuotaExceeded` | `onb_failure_trace` hints | Cloud account quota or capacity | Smaller size or another region or zone | +| Guest script step fails (`WinRM`, `SSH`, refused, timed out) | `fetch_job_log` | Credentials on the OS build or server; port 22 or 5985/5986 blocked from the appliance | Fix credentials on the OS build; open the port | +| Editing a user says `Original password is required when changing password` | `onb_status` `groupsAndUsers.users[].passwordNeeded` | The user was created without a password, and Original Password Verification (on by default, hidden from the UI) needs the current one | Delete the user on its page, add it again on the Users list with its password, then `onb_user` to restore the roles | +| LDAP user cannot log in | `onb_recent_errors` with `onb_log: authentication` | Bind DN or password, base DN, port 389 vs 636, group DN typo in the mapping | Verify the utility (`onb_ui_link ldap_verify:`), fix the mapping | +| Content Library item install fails, library page empty | `onb_status.contentLibrary`, `onb_recent_errors` with `onb_contains: content.cloudbolt.app` | No egress to content.cloudbolt.app, proxy not set, SSL inspection | Set the proxy (`onb_ui_link proxy`), add the inspecting CA (`ssl_certificates`) | +| A `custom_onb_*` tool is missing from the client | `fetch_mcp_tool_actions` | Client cached the tool list; tool not synced; tool disabled; caller not admin; token without write scope | Reconnect the client; sync and `onb_install`; check the admin flag and scope | +| A toolkit tool answers `{"success": true, "ids": [...]}` | `fetch_job` on the id | Synchronous Action still off on that tool | Run `onb_install`, reconnect; meanwhile poll the job | +| `Parameters not allowed [name]` from `run_mcp_tool_action` | the tool's edit form | A stored default hides the input (every BOOL does after an edit-form save) | Clear the default on the edit form or re-sync the tool | +| `onb_playbook` fails | its `error` | No egress to raw.githubusercontent.com | Open the `browserUrl` in a browser and read the section there | +| Email never arrives (approval, completion, test) | `onb_ui_link email_test`, `onb_recent_errors` with `onb_contains: smtp` | SMTP host, port, TLS or credentials | Fix on `email_settings` (password entered there); or record P7 as not applicable | + +When the cause is outside CloudBolt (a cloud permission, a firewall rule, a DNS record), say so, name the owner on the customer side, and record the item `pending` with that note so the scorecard shows what is waiting on whom. diff --git a/.claude/skills/cb-poc-onboarding/SKILL.md b/.claude/skills/cb-poc-onboarding/SKILL.md deleted file mode 100644 index fd24ea5a..00000000 --- a/.claude/skills/cb-poc-onboarding/SKILL.md +++ /dev/null @@ -1,73 +0,0 @@ ---- -name: cb-poc-onboarding -description: Walk a customer from a freshly deployed CloudBolt appliance to one that passes the CloudBolt POC Test Plan, over the CloudBolt MCP server. Reads status, hands the user a direct UI link for every step that involves a secret, verifies resource handlers and reads the appliance's own logs when something fails, drives the Custom Server order through MCP, records each test-plan item as done or not applicable, and reports a scorecard. -when_to_use: When the user says "onboard CloudBolt", "set up CloudBolt for a POC", "get this appliance ready", "connect my first cloud", "why did my resource handler fail", "walk me through the POC test plan", or asks for the next step on a new CloudBolt instance. Also when a CloudBolt MCP server is connected and the user asks what is configured. Not for authoring content (the cb-scaffold-* skills) or for testing content changes (cb-test-content). ---- - -# cb-poc-onboarding - -Take a new CloudBolt appliance through the POC Test Plan with the connected CloudBolt MCP server. The procedure is tool-neutral: every step is an MCP tool call, a link the user opens, or a question. Any agent with the same MCP connection can follow it; clients without skill support get this text from the `onb_playbook` tool. - -## Required reading - -Before the first phase, read [references/bootstrap.md](references/bootstrap.md). Read the other references when their phase starts: [resource-handlers.md](references/resource-handlers.md) (Phase 1), [phases.md](references/phases.md) (Phases 2 to 9), [troubleshooting.md](references/troubleshooting.md) (on any failure), [test-plan-map.md](references/test-plan-map.md) (what each item needs and whether it can be skipped). - -## Hard rules - -1. **Secrets never pass through the agent.** Passwords, access keys, client secrets, service-account JSON, API tokens: the user enters them in the UI. Give the exact link from `onb_ui_link` and list the non-secret values to type. Never ask for a secret in chat, never accept one that is pasted (say so and move on), never put one in a tool call. -2. **Root cause before retry.** When anything fails: read the tool's `error_message`; for an order or job call `onb_failure_trace`, then `fetch_job_log` on the job it names; for a UI failure call `onb_recent_errors` for the last few minutes; then apply [troubleshooting.md](references/troubleshooting.md). State the cause and the fix before anyone retries. -3. **Status first.** Start every phase with `onb_status`. Never assume what is configured; the appliance is the source of truth. -4. **Echo and confirm every write.** Before a tool that changes the appliance or orders infrastructure, state what will change and wait for a clear yes. For `order_catalog_item` follow the server's echo-and-confirm text verbatim. -5. **Every step is skippable.** When the customer cannot or does not want to do an item (no SMTP, no LDAP, no SSO, no DNS record, no Terraform or Ansible), offer to skip it, record it with `onb_set_item_status` as `not_applicable` with the reason, and move on. The scorecard reports it as not applicable, never as failed. -6. **Record progress.** When an item's evidence exists (a successful order, a verified handler, a user who logged in), record it `done` with `onb_set_item_status`. The scorecard is built from these records plus live evidence. -7. **Scope is the test plan.** Up to two resource handlers, one or two environments each, the Custom Server blueprint, the test-plan items. Anything more is a follow-up to propose at the end, not a step. -8. **Two response shapes.** A synchronous tool answers inline: read `outputs`. An asynchronous tool answers `{"success": true, "ids": ["JOB-..."]}`: poll `fetch_job` on that id every five seconds and read its `outputs`. `onb_verify_resource_handler` and `onb_install` are asynchronous by design. If a tool that should be synchronous answers with a job id, `onb_install` has not run; run it and tell the user to reconnect the client. -9. **Reconnect after install.** Tool lists are cached per client session. After `onb_install` changes anything, the user reconnects the MCP client before the next phase. -10. **Links, not hostnames.** Every URL comes from a tool (`onb_ui_link`, `onb_status`, the built-in `fetch_*_link` tools). Never compose an appliance URL from memory. - -## Tools - -Built-in CloudBolt MCP tools used here: `fetch_identity`, `fetch_dashboard_link`, `fetch_catalog_items`, `fetch_orderable_groups`, `fetch_blueprint_schema`, `fetch_orderable_environments`, `fetch_blueprint_item_parameters`, `fetch_blueprint_parameter_options`, `order_catalog_item`, `fetch_order`, `approve_order`, `fetch_job`, `fetch_server_list`, `fetch_server_actions`, `run_server_action`, `fetch_groups`, `fetch_environment_list`, `fetch_environment_details`, `set_server_power_schedule`. - -Toolkit tools (the POC Onboarding Toolkit package, `custom_` prefix when they appear as first-class tools; otherwise `run_mcp_tool_action(mcp_tool_name, parameters)`): - -| Tool | Mode | Use it to | -|---|---|---| -| `onb_status` | sync | See everything configured, recorded items, and `nextSteps` with links | -| `onb_ui_link` | sync | Get the UI link for a global id or a named page (`new_resource_handler:aws`, `email_settings`, `user_edit:USR-...`) | -| `onb_recent_errors` | sync | Read the last minutes of application, jobengine, authentication or mcp log, grouped, with hints | -| `onb_failure_trace` | sync | Walk a failed order or job down to the job that failed, with hints and the id for `fetch_job_log` | -| `onb_verify_resource_handler` | async | Run Verify Connection on a handler and get the real error plus a technology hint | -| `onb_playbook` | sync | Fetch this skill's text by section for clients without skills | -| `onb_install` | async | Finish the toolkit install (synchronous flags, enabled, egress checks) | -| `onb_set_item_status` | sync | Record a test-plan item or prerequisite as done, skipped, not_applicable or pending | -| `sync_from_source_control_repo`, `fetch_job_log`, `manage_blueprint_permissions` | sync | Reused from the testing toolkit: sync content, read a job's log, restore blueprint entitlements | - -## The loop - -Phases follow the customer's natural order: self-service first (handlers, environments, the first order, parameters), then groups, RBAC and governance, then lifecycle, then extensibility, then the wrap-up. Reorder only when a step depends on another (SMTP before approval emails, a group before a non-admin login) and say why. - -For every phase: - -1. `onb_status`. Summarize what exists and the `nextSteps` relevant to this phase in two or three sentences. -2. For each step: if a toolkit or built-in tool does it, echo, confirm, call it, read the result. If only the UI can do it (anything with a secret; environment import, OS builds and order-form trimming until those tools ship), give the `onb_ui_link` link, the non-secret values to enter, and the documentation link from [test-plan-map.md](references/test-plan-map.md). Then verify the outcome with a tool (`onb_verify_resource_handler`, `onb_status`, `fetch_environment_details`). -3. On failure, rule 2. Stop after three attempts at one step, record the item `pending` with what is known, and continue with steps that do not depend on it. -4. Record the phase's items with `onb_set_item_status`. -5. Close the phase with a short report: what is now configured, what was recorded (done, not applicable), what is pending, and the first step of the next phase. - -| Phase | Covers | Reference | -|---|---|---| -| 0 Bootstrap | MCP connection, admin check, toolkit install, prerequisites P1 to P12 | bootstrap.md | -| 1 Handlers | Up to two resource handlers, verified | resource-handlers.md | -| 2 Environments | One or two environments per handler, image, network, trimmed order form, hostname template | phases.md | -| 3 First order | Custom Server ordered through MCP in each environment, lifecycle actions | phases.md | -| 4 Self-service | Parameters, generated options, tags, cross-cloud visibility | phases.md | -| 5 RBAC and governance | Groups, roles, users, entitlements, approvals, quota | phases.md | -| 6 Authentication | LDAP, LDAP mapping, SSO, branded portal | phases.md | -| 7 Lifecycle | Power schedule, expiration, decommission, onboarding discovered servers | phases.md | -| 8 Extensibility | Content Library items, scripts, webhook, recurring job, rule, CIT | phases.md | -| 9 Wrap-up | Scorecard from recorded items and live evidence | phases.md | - -## Wrap-up report - -List every test-plan item with its weight and status (done, not applicable with reason, pending), group totals, and the prerequisites. Then the follow-ups the customer asked about that were out of scope. The score column is the customer's judgement; the agent supplies the evidence (order ids, job ids, object names) next to each item. diff --git a/.claude/skills/cb-poc-onboarding/references/bootstrap.md b/.claude/skills/cb-poc-onboarding/references/bootstrap.md deleted file mode 100644 index a86c3a90..00000000 --- a/.claude/skills/cb-poc-onboarding/references/bootstrap.md +++ /dev/null @@ -1,67 +0,0 @@ -# Phase 0: Bootstrap - -Goal: the agent is connected to the appliance as a CloudBolt admin with write scope, the POC Onboarding Toolkit is installed and synchronous, and the prerequisites sheet is reviewed. - -## 1. Connection - -1. Call `fetch_identity`. It must return a user with `superAdmin` or `cmpAdmin` true. If it fails, the client is not connected or not authenticated: the appliance's MCP endpoint is `https:///mcp` (no trailing slash), Streamable HTTP, OAuth 2.1 with browser login. In Claude Code: `claude mcp add --transport http cloudbolt https:///mcp`, then `/mcp`, choose the server, authenticate as the admin. Other clients: add the same URL as a remote MCP server and complete the OAuth login. -2. The token must carry `write` scope. If every write or custom tool fails with a scope error, the client requested `read` only; reconnect and grant write when the consent page asks. -3. The API token on the user profile page and the `/api/v3/cmp/apiToken/` token do not work for `/mcp`; only the OAuth login does. -4. `fetch_dashboard_link` gives the portal base URL; confirm with the user that it is the appliance they mean. - -## 2. Toolkit install (one-time manual step, then agent-driven) - -Call `fetch_mcp_tool_actions`. If `onb_status` is missing, the toolkit is not installed. The sync tool cannot install itself, so the user does one of these in the UI, once: - -**A. Content Package Manager** (when the extension is installed): Admin > Content Packages > Import from repository > repository `https://github.com/mbomb67/cloudbolt-as-code.git`, branch `main`, package **POC Onboarding Toolkit** (`PKG-8aaadefz`) > Sync. One step; every tool and its plugin arrives together. - -**B. Source Control Repository**: Admin > All Admin > CloudBolt > Source Code Repositories > Add: label of their choice, URL `https://github.com/mbomb67/cloudbolt-as-code.git`, auth method none (public repository), leave the path fields at their defaults. Then Actions > MCP Tool Actions > Create from Repository, branch `main`, and pick each metadata file under `mcp_tool_actions/`: - -| Tool | Folder | -|---|---| -| `onb_install` | `mcp_tool_actions/MTA-6zxrhdls` | -| `onb_status` | `mcp_tool_actions/MTA-1985b88g` | -| `onb_ui_link` | `mcp_tool_actions/MTA-zpohocjt` | -| `onb_recent_errors` | `mcp_tool_actions/MTA-hwg74btd` | -| `onb_failure_trace` | `mcp_tool_actions/MTA-jzscq0mk` | -| `onb_verify_resource_handler` | `mcp_tool_actions/MTA-r5v1eblg` | -| `onb_playbook` | `mcp_tool_actions/MTA-92b836jb` | -| `onb_set_item_status` | `mcp_tool_actions/MTA-p72v9y76` | -| `sync_from_source_control_repo` | `mcp_tool_actions/MTA-543b19sa` | -| `fetch_job_log` | `mcp_tool_actions/MTA-8j9c0tb0` | -| `manage_blueprint_permissions` | `mcp_tool_actions/MTA-ntmcnvv7` | - -The dialog takes one item at a time; the one-call REST alternative is in [docs/poc-onboarding-setup.md](../../../../docs/poc-onboarding-setup.md). - -**C. No internet from the appliance**: build one zip per tool with `python tools/package_zip.py mcp_tool_actions/MTA-...` from a clone and upload each at Actions > MCP Tool Actions > Import. - -After the import, the tools exist but every one is asynchronous (the importer leaves Synchronous Action off). Run `onb_install` (it is asynchronous itself, so it works now): `run_mcp_tool_action("onb_install", {})`, poll the job id with `fetch_job`, read `outputs.changed`, `outputs.missing`, `outputs.egress`. Then tell the user to reconnect the MCP client (tool lists are cached per session) and call `fetch_mcp_tool_actions` again: all eleven names must be present. Check: `run_mcp_tool_action("onb_status", {})` answers inline. - -Later toolkit updates: `sync_from_source_control_repo` with `sync_branch: main` and the folders above as `sync_paths`, then `onb_install`, then reconnect. - -## 3. First status - -Call `onb_status`. Read it to the user as a short inventory: licence and days left, SMTP and proxy, Content Library reachable or not, handlers and environments, Custom Server blueprint, groups and users, LDAP or SSO, and the toolkit. Then the `nextSteps`. - -## 4. Prerequisites review - -Walk the prerequisites with the user and record each with `onb_set_item_status` (`done`, or `not_applicable` with a reason): - -| Id | Prerequisite | Evidence or skip | -|---|---|---| -| P1 | CMP license key installed | `onb_status.license.installed` and `daysLeft` | -| P2 | Appliance deployed and initial configuration done | `fetch_identity` works; `setupWizard.hasResourceHandler` is not required yet | -| P3 | Up to two resource handlers, one or two environments each | Phases 1 and 2 | -| P4 | Custom Server deployed once in each environment | Phase 3 | -| P5 | Outbound 443 to content.cloudbolt.app | `onb_status.contentLibrary.reachable`; if false, `onb_install.egress` and the proxy link; skip only if the customer accepts no Content Library items (Phase 8 shrinks) | -| P6 | Web proxy configured if required | `preferences.proxy.configured`; not applicable when no proxy is needed | -| P7 | SMTP configured | `preferences.smtp.configured`; link `email_settings` (password entered there), test with link `email_test`; not applicable when the POC has no relay, which also makes 2.4.1 email notification and 4.2.3, 4.2.6 partial | -| P8 | DNS A record for the portal | Needed for 2.2.1 only; not applicable otherwise | -| P9 | SSO application and an SSO SME on the call | Needed for 2.1.3 only | -| P10 | AD or LDAP service account and the DN of a mapping group | Needed for 2.1.1 and 2.1.2 | -| P11 | Ansible or Ansible Automation Platform ready | Needed for 3.2.2 and 4.3.5 (both weight 0) | -| P12 | Terraform scripts in a git repository | Needed for 4.3.4 (weight 0) | - -Also confirm the two clouds for the POC (the Prerequisites sheet names POC Cloud 1 and 2) and that the user has the minimum-permission credentials for each ready, without asking what they are. - -Then start Phase 1 ([resource-handlers.md](resource-handlers.md)). diff --git a/.claude/skills/cb-poc-onboarding/references/phases.md b/.claude/skills/cb-poc-onboarding/references/phases.md deleted file mode 100644 index a2bec10d..00000000 --- a/.claude/skills/cb-poc-onboarding/references/phases.md +++ /dev/null @@ -1,86 +0,0 @@ -# Phases 2 to 9 - -Each phase: `onb_status` first, do the steps, record the items with `onb_set_item_status`, close with a short report. Where a step says "UI", give the user the `onb_ui_link` link and the documentation link, then verify with a tool. Steps marked **toolkit later** will become tools in later toolkit versions; until then they are UI steps. - -## Phase 2: Environments (P3, 1.1.4, 1.2.1) - -One or two environments per handler, each able to build the Custom Server with the fewest questions on the order form. - -1. **Import environments** (UI, toolkit later). Link `handler_import_locations:RH-...`. What an environment maps to: AWS a region plus one VPC (its subnets are imported with it); Azure a location inside the subscription (import subscriptions first on the handler page when the handler was created at tenant level); vCenter a cluster; SCVMM a host cluster; GCP a project; Nutanix a cluster; OpenStack a location. Pick one, two at most, per handler. Verify with `onb_status`: each handler lists its environments. -2. **Network** (UI). AWS and Azure: the environment's Networks tab, Sync subnets, then pick one subnet for NIC 1. vCenter: on the handler, sync networks, then on the environment add one network to NIC 1. Verify: `onb_status` env `networks` is at least 1. -3. **Image and OS build** (UI, toolkit later). On the handler's images (templates, AMIs) page, import one Linux and, if the POC uses Windows, one Windows image into an OS build, in the environment's region or location, and attach the OS build to the environment. For 1.2.1, use the same OS build name on both handlers (one "Windows 2022" or "Ubuntu 22.04" build with one image per handler) so one blueprint deploys to both clouds. Verify: env `osBuilds` is at least 1. -4. **Trim the order form** (UI, toolkit later). Environment > Parameters tab and the technology tab. A required parameter with exactly one option disappears from the order form; an optional one must be removed instead. Aim for the minimal form: - - | Technology | Show the user | Pin to one value | Remove | - |---|---|---|---| - | AWS | `instance_type` (2 or 3 sizes), the subnet only if more than one is wanted | `key_name`, `sec_groups`, `delete_ebs_volumes_on_termination`, `ebs_volume_type` | `aws_availability_zone`, `aws_elastic_ip`, `iops`, `aws_host`, `aws_host_group` | - | Azure | `node_size` (constrain to 2 or 3), `password_arm` for Windows | `resource_group_arm` (one POC group), `storage_account_type_arm`, `create_public_ip`, `availability_set_arm` or `availability_zone_arm` (none) | `spot_instance_arm`, eviction fields, `max_price_arm`, `platform_fault_domain_count`, `custom_storage_account_arm`, `storage_account_arm`, `encryption_at_host`, `security_type_arm`, `security_encryption_type_arm`, `os_disk_size_arm`, `resource_group_arm_template`, `enable_accelerated_networking` | - | vCenter | `cpu_cnt`, `mem_size` (short option lists) | `vmware_datastore`, `vmware_disk_type` | `vmware_resourcepool`, `nsx_scope`, `nsx_edge` | - - Keep every special field (`aws_region`, `vpc_id`, `node_location`, `vmware_cluster`) and the size field; provisioning fails without them. Azure Windows needs `password_arm` on the form. -5. **Hostname template** (UI) for 1.1.4: on the environment's Parameters tab add `hostname_template`, for example `poc-{{ group.name|slice:":3" }}-{{ os_build.os_family.name|slice:":3" }}-#` without the spaces the Markdown shows; the order form previews it. Documentation: [hostname specification](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/hostname-specification). -6. Record P3 `done` when every handler has a verified connection and at least one environment with an image and a network. - -## Phase 3: First order (P4, 1.1.1, 1.1.3, 1.2.3, 3.2.3) - -Fully through MCP. For each environment: - -1. `fetch_catalog_items` with `name: "Custom Server"`. If the blueprint is missing or not orderable, `onb_status.customServerBlueprint` has the restore link. -2. `fetch_orderable_groups` with the blueprint id. One group: use it. Several: ask. None: the user's group has no deploy permission; `manage_blueprint_permissions` with `grant_action: list` shows who has, and the user decides who should. -3. `fetch_blueprint_schema`. For the server item, `fetch_orderable_environments`, then `fetch_blueprint_item_parameters` for the chosen environment, then `fetch_blueprint_parameter_options` for each parameter with dynamic options. Choose the smallest size. -4. Echo the whole order verbatim (group, resource name, item slug, environment, OS build, every parameter) and wait for yes. -5. `order_catalog_item`. Poll `fetch_order`; if `PENDING`, the group requires approval: `approve_order` (or that is test 2.4.1). Then `fetch_job` on the provision job. -6. On `FAILURE`: `onb_failure_trace` with the order id, then [troubleshooting.md](troubleshooting.md). -7. Record P4 and 1.1.1 `done` with the order id. For 1.1.3, add a post-provision action first (Phase 8 brings the Hello World scripts; a Content Library action works too) and order once more. -8. `fetch_server_list` with `group_name` shows both clouds' servers in one list (1.2.3). `fetch_server_actions` on one server, then `run_server_action` for power off, on and reboot, polling each job (3.2.3; `set_server_power_schedule` is Phase 7). Documentation: [lifecycle actions](https://academy.university.cloudbolt.io/guides/019403d1-422e-7471-826c-4a6c12820e2a/tasks/0193e483-6d74-7c94-a8c4-464683bd3b51). - -## Phase 4: Self-service (1.1.2, 1.2.2, 2.5.1, 4.3.1) - -1. **A user-defined parameter** (UI, toolkit later): `onb_ui_link new_parameter`, create for example `application_tier` (single select: web, app, db), add it to the environment or the blueprint with those options, order again and check the value on the server (1.1.2). [Parameters](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/parameters). -2. **Generated options** (4.3.1): Phase 8 syncs a sample generated-options action from this repository; or write a three-line `generate_options_for_` orchestration action in the UI. [Generated options](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/options-generated-using-orchestration-actions). -3. **Tags** (1.2.2, 2.5.1): on each handler's Tags tab map `Group`, `Owner`, `OS Family` and a `cost_center` parameter to cloud tags; add `cost_center` to the group with a value; order; check the tags in both clouds. [Tags](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/tags). - -## Phase 5: RBAC and governance (2.3.1 to 2.3.4, 2.4.1, 2.4.2, 2.5.2) - -1. **Groups and users** (UI, toolkit later): `onb_ui_link groups` to add a POC group (and a child group); `new_user` for two local test users, a requestor and an approver, with roles on the group; the passwords are set on each user's `user_edit:USR-...` page by the admin, never in chat. `fetch_groups` and `fetch_group_details` confirm memberships. [Groups and permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/groups-permissions). -2. **Visibility** (2.3.1): the requestor logs in and sees only their own servers; change the role to Resource Admin and they see the group's. The user does the logins; the agent confirms the memberships. -3. **Blueprint entitlement** (2.3.2): `manage_blueprint_permissions` to grant one group DEPLOY on a blueprint and `fetch_orderable_groups` to prove the other group cannot order it. [Blueprint group permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/group-permissions-for-blueprints). -4. **Environment entitlement** (2.3.3): assign one environment to one group (UI, environment page); `fetch_orderable_environments` as each user proves it. [Ordering servers and environments](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ordering-servers-environments). -5. **Custom role** (2.3.4): `onb_ui_link roles`, create a role with a few permissions, assign it; the user logs in to check. [Custom roles](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/groups-permissions/a/h2__322854237). -6. **Approvals** (2.4.1, 2.4.2): the requestor orders (through the UI or `order_catalog_item` as that user); `fetch_orders_pending_my_approval` and `approve_order` as the approver. For the day-2 case, the Resize VM server action needs "Requires approval" ticked (UI, `server_actions`; toolkit later); `run_server_action` returns an order instead of a job. -7. **Quota** (2.5.2): `onb_ui_link group_quotas:GRP-...`, set 3 servers; the fourth order is refused. [Quotas](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/groups-permissions/a/h2_878037613). - -## Phase 6: Authentication (2.1.1, 2.1.2, 2.1.3, 2.2.1) - -1. **LDAP utility** (UI; the service-account password is entered there): `onb_ui_link new_ldap`; pre-brief server, port (389 or 636), protocol, base DN, bind account DN. After save, `ldap_verify:`; on failure `onb_recent_errors` with `onb_log: authentication`. The user logs in with an AD account (2.1.1). [LDAP authentication](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ldap-authentication). -2. **LDAP mapping** (UI, toolkit later): `ldap_mappings:`, map the AD group DN from P10 to the POC group with a role; an AD member logs in and lands in the group (2.1.2). [User permission synchronization](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/user-permission-and-attribute-synchronization/a/h2_1939259882). -3. **SSO** (2.1.3): UI only with the customer's SSO SME: `onb_ui_link sso`, metadata exchange, assign users, log in. Skip and record not applicable when P9 is not met. [SSO and SAML](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/single-sign-on-and-saml). -4. **Branded portal** (2.2.1): needs the DNS record from P8; `onb_ui_link portals`; logos and colours are a UI job. [Branded portals](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/branded-portals). - -## Phase 7: Lifecycle (3.1.1 to 3.1.4, 3.2.1) - -1. **Power schedule** (3.1.1): add the `power_schedule` parameter to an environment (UI, Parameters tab), order a server choosing a schedule, or set one directly with `set_server_power_schedule` and read it back with `fetch_server_power_schedule`. [Power scheduling](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/power-scheduling-servers/a/h2_1163015685). -2. **Expiration** (3.1.2): add `expiration_date` to the environment with a constraint (for example at most 30 days out), order with a date, and confirm the Expire Servers recurring job is enabled (`onb_ui_link recurring_jobs`). [Server expiration](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/server-expiration). -3. **Self-service decommission** (3.1.3): the owner deletes the server from the portal, or the agent runs the Delete action with `run_server_action` and polls the job. -4. **Onboard existing servers** (3.1.4): the handler's Servers tab shows discovered servers in Unassigned; `fetch_server_list` with `group_name: Unassigned`, then `run_server_action` with the Change Attributes action to set group and owner; a group member then sees them in `fetch_server_list`. -5. **Resize** (3.2.1): the Resize VM server action (Content Library if absent, Phase 8); `run_server_action`, poll, and confirm the size in the cloud console. - -## Phase 8: Extensibility (1.1.3, 4.1.2, 4.2.1 to 4.2.6, 4.3.1 to 4.3.3) - -All Content Library installs need P5. Installs are UI steps (`onb_ui_link content_library`; toolkit later). - -1. **Jupyter Notebooks UI extension** (4.2.1): Content Library > UI Extensions > install, then follow its documentation cell; Admin > Admin Extensions shows it. [Forge Jupyter XUI](https://cloudboltsoftware.github.io/cloudbolt-forge/sites/NewJupyterXUI/jupyter.html), [UI extensions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ui-extensions). -2. **Recurring job** (4.2.2): install "Cleanup zip files from tmp", create a zip under /var/tmp on the appliance, set the cron schedule, run it (the testing toolkit's `run_recurring_job` if installed). [Recurring jobs](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/recurring-jobs). -3. **Rules** (4.2.3): `onb_ui_link rules`, enable "Email Group Admins when quota usage over threshold", set a group quota below its server count, execute rules, check the email (needs P7). [Rules](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/rules). -4. **CIT** (4.2.4): `onb_ui_link cit_tests`, build a test from the successful Custom Server order, run it. [Continuous infrastructure testing](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/continuous-infrastructure-testing). -5. **Inbound webhook** (4.2.5): sync a sample echo webhook from this repository (`sync_from_source_control_repo` with the `webhooks/IWH-...` path) or create the documented sample; the user posts JSON with curl or Postman and gets it back. [Inbound webhooks](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/inbound-webhooks/). -6. **Email template** (4.2.6): `onb_ui_link email_templates`, edit Order Complete, order, read the email (needs P7). [Email templates](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/customizing-email-templates). -7. **Scripts** (1.1.3, 4.3.2, 4.3.3, 4.1.2): a Hello World Remote Script (PowerShell for Windows, Bash for Linux) as a build item on a copy of the Custom Server blueprint, ordered again; the Ad-Hoc Script server action from the Content Library for 4.1.2. Guest credentials live on the OS build or server (UI). [Remote scripts](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/remote-scripts). -8. **Generated options** (4.3.1): see Phase 4. -9. Terraform (4.3.4) and Ansible (3.2.2, 4.3.5) carry weight 0: do them only if P11 or P12 are met and time allows; otherwise record not applicable. - -## Phase 9: Wrap-up - -1. `onb_status` for live evidence (orders, handlers, environments, groups, LDAP). -2. For every item in [test-plan-map.md](test-plan-map.md), pair the recorded status (`onb_status.pocItems`) with the evidence. Items with no record and no evidence are `pending`. -3. Report the table by category with weights, the prerequisites, the pending items with their blocker and owner, and the follow-ups raised during the week. The customer fills the workbook's score column from it. diff --git a/.claude/skills/cb-poc-onboarding/references/resource-handlers.md b/.claude/skills/cb-poc-onboarding/references/resource-handlers.md deleted file mode 100644 index 65c183c9..00000000 --- a/.claude/skills/cb-poc-onboarding/references/resource-handlers.md +++ /dev/null @@ -1,49 +0,0 @@ -# Phase 1: Resource handlers - -Goal: up to two resource handlers (the POC clouds), each verified. Covers prerequisite P3 (first half). The user creates each handler in the UI because the form takes the credentials; the agent prepares, links, verifies and diagnoses. - -## Per handler - -1. **Pre-brief.** From the table below, tell the user the non-secret values to have ready, the minimum-permissions document to apply to the credential first, and the ports the appliance needs open. Do not ask for the secret values. -2. **Link.** `onb_ui_link` with `new_resource_handler:` and send the URL. The user fills the form, including the credential, and saves. The form runs Verify Connection itself and, on failure, shows only "Unable to connect to handler with the information provided." -3. **Verify.** Ask whether the save succeeded. - - Saved: `onb_status` to find the new `RH-` id, then `onb_verify_resource_handler` with `onb_handler` set to it; poll `fetch_job`. `verified: true` means done; record nothing yet (P3 completes with the environments). `verified: false`: read `error` and `hints`, explain the cause, send `links.edit` for the fix, and verify again after the user saves. - - Not saved (the form rejected it): `onb_recent_errors` with `onb_contains: "Failed to validate connection"` and `onb_minutes: 10`. The group's `traceback` and `hints` hold the cloud API's error. Explain it, then send the same `new_resource_handler:` link again. -4. **Repeat** for the second cloud. Stop at two handlers; the test plan needs no more. - -## Technologies - -| Technology | Page key | Non-secret values to prepare | Secret entered in the UI | Minimum permissions | Ports from the appliance | -|---|---|---|---|---|---| -| AWS | `new_resource_handler:aws` | Handler name; access key id; optionally an IAM role ARN to assume; the regions to use | Secret access key | [AWS minimum permissions](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/aws/a/h2__2010883827) (EC2 describe, run, terminate, tags, VPC and subnet describe, key pairs; S3 and IAM pass-role only if used) | 443 to the regional EC2, STS and SSM endpoints | -| Azure | `new_resource_handler:azure_arm` | Handler name; tenant id; application (client) id; subscription id or the choice to import subscriptions after; locations to use | Client secret value (not the secret id) | [Azure minimum permissions](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/azure-resource-manager/a/h3_736726059) (Reader on the subscription plus Virtual Machine Contributor and Network Contributor on the POC resource group, or Contributor on the subscription for a POC) | 443 to login.microsoftonline.com and management.azure.com | -| vCenter | `new_resource_handler:vmware` | Handler name; vCenter FQDN; port 443; username in user@domain form; whether to verify the vCenter certificate (off for a self-signed POC, or add the CA under Admin > SSL Certificates) | Password | [vCenter minimum permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/minimum-required-permissions-in-vcenter-vmware) on the datacenter, cluster, datastore, network and folder used | 443 to vCenter and to every ESX host (console and ISO uploads) | -| SCVMM | `new_resource_handler:scvmm` | Server FQDN, WinRM port (5985 or 5986), domain and username | Password | SCVMM administrator role | 5985 or 5986 to the SCVMM server | -| GCP | `new_resource_handler:gcp` | Handler name, project | Service-account JSON key file (uploaded) | Compute Admin and Service Account User on the project | 443 to googleapis.com | -| Nutanix | `new_resource_handler:acropolis` | Prism Element or Central address, port 9440, username | Password | Cluster admin | 9440 to Prism | -| OpenStack | `new_resource_handler:openstack` | Auth URL ending in /v3, domain, project, username | Password | Member role on the project | 5000 and the service endpoints | - -The POC test plan documents AWS, Azure and vCenter; the other rows are enough to get a handler created and verified, and the environment guidance in [phases.md](phases.md) is generic for them. - -## Reading verification errors - -`onb_verify_resource_handler.hints` and `onb_recent_errors.groups[].hints` already map the frequent errors to a fix. The pattern to explain to the user: - -| Error says | It means | Fix | -|---|---|---| -| `InvalidClientTokenId`, `SignatureDoesNotMatch`, `AuthFailure` (AWS) | The key id or secret is wrong, often a trailing space | Re-enter both on the edit link | -| `UnauthorizedOperation`, `AccessDenied` (AWS) | A permission is missing | Apply the minimum permissions policy to the IAM identity | -| `AADSTS7000215` (Azure) | The client secret is invalid or expired | New secret on the app registration; paste the value, not the id | -| `AADSTS700016`, `AADSTS90002` (Azure) | Application or tenant id is wrong | Check both ids on the app registration overview | -| `AuthorizationFailed`, `SubscriptionNotFound` (Azure) | No role on the subscription, or wrong subscription id | Assign Reader plus the roles in the permissions document | -| `Cannot complete login due to an incorrect user name or password` (vCenter) | Credentials | user@domain form; re-enter the password | -| `Permission to perform this operation was denied` (vCenter) | vCenter role lacks a privilege | Compare with the vCenter permissions document | -| `CERTIFICATE_VERIFY_FAILED`, `SSLError` | TLS inspection or a self-signed certificate | Add the CA under Admin > SSL Certificates (`onb_ui_link ssl_certificates`) or disable verification on the handler for the POC | -| `Name or service not known` | DNS on the appliance | Fix the appliance's resolver or use the IP | -| `Connection refused`, `timed out`, `EndpointConnectionError` | Firewall or proxy | Open 443 outbound to the endpoint, or set the web proxy (`onb_ui_link proxy`) | - -Hand the user the fix and the edit link, then verify again. After three failed rounds on one handler, record P3 as `pending` with the last error and continue with the other cloud. - -## Hand-off to Phase 2 - -Both handlers verified (or one, if the POC has one cloud): `onb_status` shows each with `lastVerify.ok: true`. Continue with the environments in [phases.md](phases.md). diff --git a/.claude/skills/cb-poc-onboarding/references/test-plan-map.md b/.claude/skills/cb-poc-onboarding/references/test-plan-map.md deleted file mode 100644 index 00becdf2..00000000 --- a/.claude/skills/cb-poc-onboarding/references/test-plan-map.md +++ /dev/null @@ -1,66 +0,0 @@ -# POC test plan map - -Every item of the CloudBolt CMP POC Test Plan with its weight (the workbook multiplies a 0 to 5 score by it), the phase that covers it, how the agent does or verifies it, the evidence to record, the documentation link, and whether the customer may record it as not applicable. Prerequisites are in [bootstrap.md](bootstrap.md). - -Status values for `onb_set_item_status`: `done`, `pending`, `skipped`, `not_applicable` (reason required for the last two). - -## Self-service (weights total 35) - -| Id | Item | Weight | Phase | How | Evidence | Docs | Skippable | -|---|---|---|---|---|---|---|---| -| 1.1.1 | Provision a blueprint from the catalog as a non-admin | 5 | 3, 5 | MCP order flow; the requestor user orders too | Order id, server | [Blueprints](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/blueprints) | No | -| 1.1.2 | User-defined parameter at order time | 5 | 4 | Parameter on env or blueprint (UI), order through MCP | Parameter name, order id, value on server | [Parameters](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/parameters) | No | -| 1.1.3 | Post-provisioning automation from the blueprint | 5 | 8 | Hello World build item, order again | Order id, job output | — | No | -| 1.1.4 | Hostname template with preview | 5 | 2 | `hostname_template` on the environment (UI) | Hostname of the built server | [Hostname specification](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/hostname-specification) | No | -| 1.2.1 | One blueprint deploys to two clouds | 5 | 2, 3 | Shared OS build with one image per handler; two orders | Two order ids, two servers | — | Yes, single-cloud POC | -| 1.2.2 | Cross-cloud tagging consistency | 5 | 4 | Tag mappings on both handlers (UI); order; check tags | Tags on both servers | [Tags](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/tags) | Yes, single-cloud POC | -| 1.2.3 | Unified visibility across clouds | 5 | 3 | `fetch_server_list` by group | The list | — | Yes, single-cloud POC | - -## RBAC and governance (weights total 39) - -| Id | Item | Weight | Phase | How | Evidence | Docs | Skippable | -|---|---|---|---|---|---|---|---| -| 2.1.1 | LDAP or AD authentication | 3 | 6 | LDAP utility (UI, password there), verify, AD login | Login in authentication log | [LDAP](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ldap-authentication) | Yes, when P10 unmet | -| 2.1.2 | Group and role from AD group membership | 3 | 6 | LDAP mapping (UI) | AD user's group and role | [User permission sync](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/user-permission-and-attribute-synchronization/a/h2_1939259882) | Yes, when P10 unmet | -| 2.1.3 | SAML2 SSO | 2 | 6 | UI with the SSO SME | SSO login | [SSO](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/single-sign-on-and-saml) | Yes, when P9 unmet | -| 2.2.1 | Branded portal per tenant | 3 | 6 | Portal (UI) on the DNS record | Portal URL loads branded | [Branded portals](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/branded-portals) | Yes, when P8 unmet | -| 2.3.1 | Visibility constrained by group role | 4 | 5 | Requestor vs Resource Admin logins | What each user sees | [Groups and permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/groups-permissions) | No | -| 2.3.2 | Blueprint entitlement by group | 4 | 5 | `manage_blueprint_permissions`, `fetch_orderable_groups` | Which group can order | [Blueprint permissions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/group-permissions-for-blueprints) | No | -| 2.3.3 | Environment entitlement by group | 4 | 5 | Environment group (UI), `fetch_orderable_environments` | Which group sees it | [Ordering environments](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ordering-servers-environments) | No | -| 2.3.4 | Custom role | 3 | 5 | Role (UI), assignment, login | Permissions seen | [Custom roles](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/groups-permissions/a/h2__322854237) | No | -| 2.4.1 | Order approval | 3 | 5 | Requestor orders, `approve_order` as approver | Order id, approval | — | No | -| 2.4.2 | Approval on a day-2 action | 3 | 5 | Resize VM requires approval (UI), `run_server_action` returns an order | Order id | — | No | -| 2.5.1 | Tagging policy from a parameter | 5 | 4 | `cost_center` parameter on the group, tag mapping | Tag in the cloud | [Tags](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/tags) | No | -| 2.5.2 | Group quota | 2 | 5 | Quota 3 servers (UI), fourth order refused | Refused order | [Quotas](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/groups-permissions/a/h2_878037613) | No | - -## Resource management (weights total 26) - -| Id | Item | Weight | Phase | How | Evidence | Docs | Skippable | -|---|---|---|---|---|---|---|---| -| 3.1.1 | Power schedules | 5 | 7 | `power_schedule` parameter, `set_server_power_schedule` | Schedule read back, power events | [Power scheduling](https://docs.cloudbolt.io/articles/cloudbolt-latest-docs/power-scheduling-servers/a/h2_1163015685) | No | -| 3.1.2 | Leases (expiration) | 5 | 7 | `expiration_date` with constraint, Expire Servers job | Expiration on server, job enabled | [Server expiration](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/server-expiration) | No | -| 3.1.3 | Self-service decommission | 4 | 7 | Owner deletes, or `run_server_action` Delete | Job id, server gone | — | No | -| 3.1.4 | Onboard existing cloud resources | 5 | 7 | Change Attributes on Unassigned servers | Servers in the group | — | Yes, when no existing VMs | -| 3.2.1 | Resize | 4 | 7 | Resize VM action | Job id, new size | — | No | -| 3.2.2 | Configuration update through Ansible | 0 | 8 | Ansible day-2 action | Job output | [Ansible](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ansible) | Yes, weight 0 | -| 3.2.3 | Lifecycle actions | 3 | 3 | `run_server_action` stop, start, reboot | Job ids | [Lifecycle actions](https://academy.university.cloudbolt.io/guides/019403d1-422e-7471-826c-4a6c12820e2a/tasks/0193e483-6d74-7c94-a8c4-464683bd3b51) | No | - -## Extensibility (weights total 42) - -| Id | Item | Weight | Phase | How | Evidence | Docs | Skippable | -|---|---|---|---|---|---|---|---| -| 4.1.1 | No in-guest agents | 5 | — | Architecture statement; the workbook pre-scores it | — | — | No | -| 4.1.2 | Agentless in-guest script | 5 | 8 | Ad-Hoc Script server action | Script output | — | No | -| 4.2.1 | UI extension from the Content Library | 5 | 8 | Jupyter XUI install (UI) | Extension launches | [UI extensions](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ui-extensions) | Yes, when P5 unmet | -| 4.2.2 | Recurring job on a schedule | 4 | 8 | Cleanup tmp job, cron, run | Job id, file gone | [Recurring jobs](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/recurring-jobs) | Yes, when P5 unmet | -| 4.2.3 | Rule-based automation | 3 | 8 | Quota rule enabled, executed | Email received | [Rules](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/rules) | Partial without P7 | -| 4.2.4 | Continuous infrastructure testing | 3 | 8 | CIT from a successful order | Test run | [CIT](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/continuous-infrastructure-testing) | No | -| 4.2.5 | Inbound webhook | 4 | 8 | Echo webhook, curl POST | Response JSON | [Inbound webhooks](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/inbound-webhooks/) | No | -| 4.2.6 | Customizable notification templates | 0 | 8 | Edit Order Complete template | Email body | [Email templates](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/customizing-email-templates) | Yes, without P7 | -| 4.3.1 | Python generated options | 5 | 4 | Generated-options action on a parameter | Dropdown contents | [Generated options](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/options-generated-using-orchestration-actions) | No | -| 4.3.2 | PowerShell build item | 4 | 8 | Hello World on a Windows blueprint | Job output | [Remote scripts](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/remote-scripts) | Yes, when no Windows image | -| 4.3.3 | Bash build item | 4 | 8 | Hello World on a Linux blueprint | Job output | [Remote scripts](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/remote-scripts) | Yes, when no Linux image | -| 4.3.4 | Terraform-backed blueprint | 0 | 8 | Terraform blueprint | Plan and apply logs | [Terraform](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/terraform-integration-through-cmp-blueprints) | Yes, weight 0 | -| 4.3.5 | Ansible Automation Platform | 0 | 8 | AAP configuration manager | Job template run | [AAP](https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/ansible-automation-platform) | Yes, weight 0 | - -Possible points per category are five times the weight total: 175, 195, 130, 210, for 710 in all. diff --git a/.claude/skills/cb-poc-onboarding/references/troubleshooting.md b/.claude/skills/cb-poc-onboarding/references/troubleshooting.md deleted file mode 100644 index c82ab40b..00000000 --- a/.claude/skills/cb-poc-onboarding/references/troubleshooting.md +++ /dev/null @@ -1,33 +0,0 @@ -# Troubleshooting: root cause before retry - -Order of investigation for any failure: - -1. The tool's own `error_message` and `outputs.error`. -2. An order or job: `onb_failure_trace` with the `ORD-` or `JOB-` id. Read `failedJobs[].errors`, `progressTail`, `hints`, then `fetch_job_log` with `log_job_id` set to the job it names and `log_file_tail: 200` for the traceback. -3. Anything that failed in the UI or with no job: `onb_recent_errors` with `onb_minutes: 10` (add `onb_contains` for a handler name, hostname or error text; `onb_log: jobengine` for provisioning, `authentication` for logins, `mcp` for tool calls). -4. The table below. -5. Explain the cause and the fix in two sentences, give the link, and only then let the user retry. - -| Symptom | First tool | Usual cause | Fix | -|---|---|---|---| -| Handler form: "Unable to connect to handler with the information provided" | `onb_recent_errors` with `onb_contains: Failed to validate connection` | Credentials, permissions, TLS, DNS, firewall or proxy; the traceback names which | See the error table in [resource-handlers.md](resource-handlers.md) | -| `onb_verify_resource_handler` returns `verified: false` | its `hints` | Same causes, for a handler that was saved | Edit link, verify again | -| Handler verified but no regions, locations or clusters offered | the import-locations page | Credentials can authenticate but not list (describe) resources; an Azure subscription not yet imported as a child handler | Apply the permissions document; import subscriptions first on Azure | -| Order form offers no OS build or no network for an environment | `fetch_environment_details`, `onb_status` env counts | The OS build's image is in another region or location; no subnet or network attached | Import an image for that region and attach the OS build; sync subnets or attach a network (sc_nic_0) | -| Order refused before submission with a missing deployment item | the schema | The order payload left out an item | Include every item from `fetch_blueprint_schema`, with `"parameters": {}` when it has none | -| Order `DENIED` or no orderable group or environment | `fetch_orderable_groups`, `fetch_orderable_environments` | Entitlement: the group cannot deploy the blueprint or use the environment | Fix the entitlement on the blueprint or environment, or `manage_blueprint_permissions` | -| Order `PENDING` for long | `fetch_order` | Awaiting approval | `approve_order` as an approver, or that is the test (2.4.1) | -| Provision job fails: `is required for Azure windows servers` | `onb_failure_trace` hints | Windows on Azure needs `password_arm` | Add the parameter to the environment or order form | -| `vmware_datastore parameter must be specified`, `Memory and CPU are required` | `onb_failure_trace` hints | vCenter environment missing pinned parameters | Set datastore, cpu_cnt, mem_size options on the environment | -| `InvalidKeyPair`, `key_name` | `onb_failure_trace` hints | AWS key pair named on the environment does not exist in the region | Pin an existing key pair | -| `InsufficientInstanceCapacity`, `QuotaExceeded` | `onb_failure_trace` hints | Cloud account quota or capacity | Smaller size or another region or zone | -| Guest script step fails (`WinRM`, `SSH`, refused, timed out) | `fetch_job_log` | Credentials on the OS build or server; port 22 or 5985/5986 blocked from the appliance | Fix credentials on the OS build; open the port | -| LDAP user cannot log in | `onb_recent_errors` with `onb_log: authentication` | Bind DN or password, base DN, port 389 vs 636, group DN typo in the mapping | Verify the utility (`onb_ui_link ldap_verify:`), fix the mapping | -| Content Library item install fails, library page empty | `onb_status.contentLibrary`, `onb_recent_errors` with `onb_contains: content.cloudbolt.app` | No egress to content.cloudbolt.app, proxy not set, SSL inspection | Set the proxy (`onb_ui_link proxy`), add the inspecting CA (`ssl_certificates`) | -| A `custom_onb_*` tool is missing from the client | `fetch_mcp_tool_actions` | Client cached the tool list; tool not synced; tool disabled; caller not admin; token without write scope | Reconnect the client; sync and `onb_install`; check the admin flag and scope | -| A toolkit tool answers `{"success": true, "ids": [...]}` | `fetch_job` on the id | Synchronous Action still off on that tool | Run `onb_install`, reconnect; meanwhile poll the job | -| `Parameters not allowed [name]` from `run_mcp_tool_action` | the tool's edit form | A stored default hides the input (every BOOL does after an edit-form save) | Clear the default on the edit form or re-sync the tool | -| `onb_playbook` fails | its `error` | No egress to raw.githubusercontent.com | Open the `browserUrl` in a browser and read the section there | -| Email never arrives (approval, completion, test) | `onb_ui_link email_test`, `onb_recent_errors` with `onb_contains: smtp` | SMTP host, port, TLS or credentials | Fix on `email_settings` (password entered there); or record P7 as not applicable | - -When the cause is outside CloudBolt (a cloud permission, a firewall rule, a DNS record), say so, name the owner on the customer side, and record the item `pending` with that note so the scorecard shows what is waiting on whom. diff --git a/CATALOG.md b/CATALOG.md index 3bca0f64..5bee81f4 100644 --- a/CATALOG.md +++ b/CATALOG.md @@ -6,14 +6,14 @@ Every piece of content in this repo, grouped by type. Names and descriptions com | Type | Count | |---|---| | [Packages](#packages) | 14 | -| [Blueprints](#blueprints) | 36 | +| [Blueprints](#blueprints) | 37 | | [Resource actions](#resource-actions) | 69 | | [Server actions](#server-actions) | 6 | -| [Orchestration actions](#orchestration-actions) | 24 | +| [Orchestration actions](#orchestration-actions) | 26 | | [Recurring jobs](#recurring-jobs) | 5 | -| [Webhooks](#webhooks) | 7 | -| [MCP tool actions](#mcp-tool-actions) | 34 | -| [Plugins](#plugins) | 255 | +| [Webhooks](#webhooks) | 8 | +| [MCP tool actions](#mcp-tool-actions) | 41 | +| [Plugins](#plugins) | 267 | | [Shared modules](#shared-modules) | 34 | | [UI extensions](#ui-extensions) | 19 | | [Parameters](#parameters) | 3 | @@ -37,8 +37,8 @@ Named sets of content that the Content Package Manager extension (`extensions/XU | Google GKE | [PKG-xev1ob4t](packages/PKG-xev1ob4t/README.md) | Provisions Google Kubernetes Engine clusters and namespace landing zones with their day-2 actions, the UI extension that adds cluster and namespace tabs, and the StormForge tabs for clusters running the StormForge agent. | 1.1.0 | [Google Kubernetes Engine](blueprints/BP-g8g8aecx/README.md) (blueprint), [GKE Namespace](blueprints/BP-c9ca1i3z/README.md) (blueprint), [Google GKE Cluster](extensions/XUI-8egdz3e9/README.md) (UI extension), [StormForge Optimize Live](extensions/XUI-wyauaxbl/README.md) (UI extension) | | HCP Terraform | [PKG-0bo7vlxp](packages/PKG-0bo7vlxp/README.md) | Provisions VMs and no-code modules through HCP Terraform in a workspace per deployment, optionally followed by Ansible job templates, with their day-2 actions, the form options webhook, and the UI extension that adds Terraform tabs. | 1.0.0 | [HCP Terraform VM](blueprints/BP-b0qm83lh/README.md) (blueprint), [HCP Terraform No-Code Module](blueprints/BP-00meiwwz/README.md) (blueprint), [HCP Terraform No-Code + Ansible](blueprints/BP-uh9v24v3/README.md) (blueprint), [Form Options](webhooks/IWH-yj93is5z/) (webhook), [HCP Terraform Workspace](extensions/XUI-ax1sluwi/README.md) (UI extension) | | IP Reservations | [PKG-g151nn7r](packages/PKG-g151nn7r/README.md) | Reserves IP addresses from CloudBolt IP pools for servers and devices CloudBolt does not build, through an order or an inbound webhook, and tracks each reservation as a resource. | 1.0.0 | [IP Reservations](webhooks/IWH-x82773zb/README.md) (webhook), [IP Address Reservation](blueprints/BP-j25t4xpv/README.md) (blueprint) | +| Onboarding Toolkit | [PKG-8aaadefz](packages/PKG-8aaadefz/README.md) | Installs the MCP tools the onboarding skill drives (appliance status with next steps, admin UI links, log and failure diagnosis, failed-server cleanup, resource handler verification, image cache sync and location import, environment creation, order-form trimming, OS build import, environment networks and their addressing (DHCP, static, IP pool, IPAM), Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, Content Library installs, CIT tests from orders, the scorecard, the playbook text, the install step and POC item tracking), the repository sync, job log and blueprint permission tools they reuse, and the echo webhook for the test plan's webhook item; the Standard Server blueprint is synced on its own after a parameter-name check. | 0.8.0 | [Onboarding: Tag Mapping](mcp_tool_actions/MTA-0689nxjy/README.md) (MCP tool action), [Onboarding: Import OS Build](mcp_tool_actions/MTA-0dr8xi4i/README.md) (MCP tool action), [Onboarding: Status](mcp_tool_actions/MTA-1985b88g/README.md) (MCP tool action), [Onboarding: Environment Networks](mcp_tool_actions/MTA-20u1ney4/README.md) (MCP tool action), [Onboarding: Failed Servers](mcp_tool_actions/MTA-36j661yp/README.md) (MCP tool action), [Sync From Source Control Repo](mcp_tool_actions/MTA-543b19sa/README.md) (MCP tool action), [Onboarding: Install](mcp_tool_actions/MTA-6zxrhdls/README.md) (MCP tool action), [Onboarding: Parameter](mcp_tool_actions/MTA-70aez9bm/README.md) (MCP tool action), [Onboarding: Handler Locations](mcp_tool_actions/MTA-89dxppus/README.md) (MCP tool action), [Onboarding: SMTP Settings](mcp_tool_actions/MTA-89w58iux/README.md) (MCP tool action), [Fetch Job Log](mcp_tool_actions/MTA-8j9c0tb0/README.md) (MCP tool action), [Onboarding: Playbook](mcp_tool_actions/MTA-92b836jb/README.md) (MCP tool action), [Onboarding: Action Approval](mcp_tool_actions/MTA-bp0rkcq9/README.md) (MCP tool action), [Onboarding: CIT Test from Order](mcp_tool_actions/MTA-ckumouj0/README.md) (MCP tool action), [Onboarding: Group](mcp_tool_actions/MTA-cpq7bvz4/README.md) (MCP tool action), [Onboarding: LDAP Mapping](mcp_tool_actions/MTA-e5qv0zay/README.md) (MCP tool action), [Run CIT Tests](mcp_tool_actions/MTA-gnx1ckno/README.md) (MCP tool action), [Onboarding: Recent Errors](mcp_tool_actions/MTA-hwg74btd/README.md) (MCP tool action), [Onboarding: Configure Custom Server](mcp_tool_actions/MTA-i1kmy5fd/README.md) (MCP tool action), [Onboarding: Import Environments](mcp_tool_actions/MTA-i6p4j2l7/README.md) (MCP tool action), [Onboarding: Trim Environment Order Form](mcp_tool_actions/MTA-iyknuxox/README.md) (MCP tool action), [Onboarding: Failure Trace](mcp_tool_actions/MTA-jzscq0mk/README.md) (MCP tool action), [Onboarding: Verify LDAP](mcp_tool_actions/MTA-kw8krevn/README.md) (MCP tool action), [Manage Blueprint Permissions](mcp_tool_actions/MTA-ntmcnvv7/README.md) (MCP tool action), [Onboarding: Set Item Status](mcp_tool_actions/MTA-p72v9y76/README.md) (MCP tool action), [Onboarding: Sync Images](mcp_tool_actions/MTA-po1gmnou/README.md) (MCP tool action), [Onboarding: Remove Environment](mcp_tool_actions/MTA-pz5o2gjl/README.md) (MCP tool action), [Onboarding: SMTP Test](mcp_tool_actions/MTA-qab6r2gk/README.md) (MCP tool action), [Onboarding: Verify Resource Handler](mcp_tool_actions/MTA-r5v1eblg/README.md) (MCP tool action), [Run Recurring Job](mcp_tool_actions/MTA-thkvyt0v/README.md) (MCP tool action), [Onboarding: User](mcp_tool_actions/MTA-tuzkb8h4/README.md) (MCP tool action), [Onboarding: Network Addressing](mcp_tool_actions/MTA-z3h0o9t3/README.md) (MCP tool action), [Onboarding: Scorecard](mcp_tool_actions/MTA-zfoxwh12/README.md) (MCP tool action), [Onboarding: Install Content Library Item](mcp_tool_actions/MTA-znqpide5/README.md) (MCP tool action), [Onboarding: UI Link](mcp_tool_actions/MTA-zpohocjt/README.md) (MCP tool action), [Echo](webhooks/IWH-f16qxnhm/) (webhook) | | OpenShift | [PKG-57ltvnbl](packages/PKG-57ltvnbl/README.md) | All OpenShift content: the project landing zone blueprint with its day-2 actions, the Connect and Workloads tabs on each project, the 3-tier web app blueprint on OpenShift Virtualization, the Monitoring and Compliance tabs on VMs and on the resources that hold them, and the Run Script server action that reaches VMs through the cluster API. | 1.3.2 | [OpenShift Project](extensions/XUI-y9bdnzxt/README.md) (UI extension), [Io Cloudbolt Prometheus](extensions/XUI-60382c9x/README.md) (UI extension), [Compliance](extensions/XUI-i4kzuy3y/README.md) (UI extension), [Run Script (OpenShift API tunnel)](server_actions/SVA-5vsp0tv6/) (server action), [OpenShift Project Landing Zone](blueprints/BP-tikkhf2y/README.md) (blueprint), [3-Tier Web App on OpenShift Virtualization](blueprints/BP-sy5pb325/README.md) (blueprint) | -| POC Onboarding Toolkit | [PKG-8aaadefz](packages/PKG-8aaadefz/README.md) | Installs the MCP tools the POC onboarding skill drives: appliance status with next steps, admin UI links, log and failure diagnosis, resource handler verification and location import, environment creation, order-form trimming, OS build import, Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, the playbook text, the install step and POC item tracking, plus the repository sync, job log and blueprint permission tools they reuse. | 0.3.0 | [POC Onboarding: Install](mcp_tool_actions/MTA-6zxrhdls/README.md) (MCP tool action), [POC Onboarding: Status](mcp_tool_actions/MTA-1985b88g/README.md) (MCP tool action), [POC Onboarding: UI Link](mcp_tool_actions/MTA-zpohocjt/README.md) (MCP tool action), [POC Onboarding: Recent Errors](mcp_tool_actions/MTA-hwg74btd/README.md) (MCP tool action), [POC Onboarding: Failure Trace](mcp_tool_actions/MTA-jzscq0mk/README.md) (MCP tool action), [POC Onboarding: Verify Resource Handler](mcp_tool_actions/MTA-r5v1eblg/README.md) (MCP tool action), [POC Onboarding: Playbook](mcp_tool_actions/MTA-92b836jb/README.md) (MCP tool action), [POC Onboarding: Set Item Status](mcp_tool_actions/MTA-p72v9y76/README.md) (MCP tool action), [POC Onboarding: Handler Locations](mcp_tool_actions/MTA-89dxppus/README.md) (MCP tool action), [POC Onboarding: Import Environments](mcp_tool_actions/MTA-i6p4j2l7/README.md) (MCP tool action), [POC Onboarding: Trim Environment Order Form](mcp_tool_actions/MTA-iyknuxox/README.md) (MCP tool action), [POC Onboarding: Import OS Build](mcp_tool_actions/MTA-0dr8xi4i/README.md) (MCP tool action), [POC Onboarding: Configure Custom Server](mcp_tool_actions/MTA-i1kmy5fd/README.md) (MCP tool action), [POC Onboarding: Remove Environment](mcp_tool_actions/MTA-pz5o2gjl/README.md) (MCP tool action), [POC Onboarding: Parameter](mcp_tool_actions/MTA-70aez9bm/README.md) (MCP tool action), [POC Onboarding: Group](mcp_tool_actions/MTA-cpq7bvz4/README.md) (MCP tool action), [POC Onboarding: User](mcp_tool_actions/MTA-tuzkb8h4/README.md) (MCP tool action), [POC Onboarding: Action Approval](mcp_tool_actions/MTA-bp0rkcq9/README.md) (MCP tool action), [POC Onboarding: Tag Mapping](mcp_tool_actions/MTA-0689nxjy/README.md) (MCP tool action), [POC Onboarding: LDAP Mapping](mcp_tool_actions/MTA-e5qv0zay/README.md) (MCP tool action), [POC Onboarding: Verify LDAP](mcp_tool_actions/MTA-kw8krevn/README.md) (MCP tool action), [POC Onboarding: SMTP Settings](mcp_tool_actions/MTA-89w58iux/README.md) (MCP tool action), [POC Onboarding: SMTP Test](mcp_tool_actions/MTA-qab6r2gk/README.md) (MCP tool action), [Sync From Source Control Repo](mcp_tool_actions/MTA-543b19sa/README.md) (MCP tool action), [Fetch Job Log](mcp_tool_actions/MTA-8j9c0tb0/README.md) (MCP tool action), [Manage Blueprint Permissions](mcp_tool_actions/MTA-ntmcnvv7/README.md) (MCP tool action) | | Runbooks | [PKG-v20qv308](packages/PKG-v20qv308/README.md) | Adds Run Task and Run Workflow, actions that run any Remote Script that fits a VM or an ordered workflow of CloudBolt actions on it, with base, example and installer task scripts, the Runbooks page for building workflows, base actions and file archives, example Linux and Windows workflows whose scripts read a config file from File Archives, and Linux and Windows blueprints that run a workflow. | 1.1.0 | [Runbook Task Template (Windows)](plugins/OHK-lhm2916o/) (plugin), [Runbook Task Template (Linux)](plugins/OHK-iub9a2jg/) (plugin), [Manage Windows Service](plugins/OHK-01kmavro/) (plugin), [Manage Linux Service](plugins/OHK-5yh12jiq/) (plugin), [Run Installer from File Archive (Linux)](plugins/OHK-hgv6wp65/) (plugin), [Run Installer from File Archive (Windows)](plugins/OHK-ow68kerl/) (plugin), [Runbook Tasks](webhooks/IWH-cdf543g3/) (webhook), [Runbook Workflows](webhooks/IWH-xjlrmvc8/) (webhook), [Run Task](server_actions/SVA-4sin3s0q/README.md) (server action), [Run Workflow](server_actions/SVA-j7rbsh39/README.md) (server action), [Runbooks](extensions/XUI-jbm5ac9e/README.md) (UI extension), [Linux VM with Workflow](blueprints/BP-vy9ytey6/README.md) (blueprint), [Windows VM with Workflow](blueprints/BP-6ddlyguv/README.md) (blueprint), [Prepare Linux app host](runbook_workflows/SWF-69r5mmdb/README.md) (Runbooks workflow), [Prepare Windows app host](runbook_workflows/SWF-7s01lyyk/README.md) (Runbooks workflow) | | Windows AD Domain Join | [PKG-nf407lm5](packages/PKG-nf407lm5/README.md) | Joins provisioned Windows servers to Active Directory in the OU picked from a type-ahead domain_ou parameter, optionally switching their CloudBolt credentials to a domain service account, and deletes the computer object at decommission. | 1.1.0 | [Delete Windows Computer Object from AD](orchestration_actions/HPA-q181uofy/README.md) (orchestration action), [Join Windows Server to AD Domain](orchestration_actions/HPA-jjp1vlfi/README.md) (orchestration action), [Suggest Domain OUs](orchestration_actions/HPA-0zcrvpwu/README.md) (orchestration action), [Generate Options for Domain Service Account](orchestration_actions/HPA-g8pqv6uv/README.md) (orchestration action), [Domain OU](parameters/CF-8pif9mbf/README.md) (parameter), [Domain Service Account](parameters/CF-yqmreb5m/README.md) (parameter) | @@ -81,6 +81,7 @@ Orderable resources. Each folder has a README with contents, prerequisites, and | Run an Azure PowerShell Script (Deployment Script) | [BP-qo1stxre](blueprints/BP-qo1stxre/README.md) | Runs one of a catalog of Azure PowerShell Remote Scripts against the Azure subscription of a chosen Environment in a Microsoft-managed container started per run through an ARM deployment script, with no server to maintain and the sign-in handled by CloudBolt from the environment's resource handler. | | Run Aria Orchestrator Workflow | [BP-f5y1fhe9](blueprints/BP-f5y1fhe9/README.md) | Runs an Aria Orchestrator workflow as a CloudBolt resource build, stores the workflow outputs on the resource, and runs it again with teardown parameters on delete. | | Server with Data Disks | [BP-g9zwqjoa](blueprints/BP-g9zwqjoa/README.md) | Deploys a Windows Server or Oracle Linux VM whose order form turns the environment's disk_map parameter into a table of data disks, which the disk map orchestration actions attach and prepare inside the guest. | +| Standard Server | [BP-x78p48gz](blueprints/BP-x78p48gz/README.md) | Deploys one server into any environment, runs a Hello World script inside the guest (Bash on Linux, PowerShell on Windows) and asks for the application and maintenance window, whose options come from Python. | | Windows File Server | [BP-psw7rclb](blueprints/BP-psw7rclb/README.md) | Deploys a Windows server and installs the File Server role. | | Windows Server with Data Disks | [BP-9ph7xcok](blueprints/BP-9ph7xcok/README.md) | Deploys a Windows Server 2025 VM with an order-time list of data disks, attaching each one and then matching it inside the guest by serial number or SCSI address to initialize, letter, label, and format it. | | Windows VM with Workflow | [BP-6ddlyguv](blueprints/BP-6ddlyguv/README.md) | Deploys a Windows VM and then runs a Windows workflow on it, either one the order form offers or one an admin pins on the Run Workflow build item. | @@ -191,7 +192,9 @@ Lifecycle hooks. Actions marked disabled ship that way on purpose; read the READ | Configure Data Disks from Disk Map (Oracle Linux) | [HPA-4ptcwgg4](orchestration_actions/HPA-4ptcwgg4/README.md) | At Post-Provision, turns the disks from each Oracle Linux server's disk_map into LVM volumes with XFS file systems mounted at their mount points inside the guest. | Post-Provision | yes | [Configure Data Disks from Disk Map (Oracle Linux)](plugins/OHK-9h9vphf5/) | | Configure Data Disks from Disk Map (Windows) | [HPA-42uy9dyo](orchestration_actions/HPA-42uy9dyo/README.md) | At Post-Provision, formats the disks from each Windows server's disk_map inside the guest with their drive letters and NTFS labels. | Post-Provision | yes | [Configure Data Disks from Disk Map (Windows)](plugins/OHK-pdwb3xso/) | | Delete Windows Computer Object from AD | [HPA-q181uofy](orchestration_actions/HPA-q181uofy/README.md) | Deletes the Active Directory computer object of each Windows server being deleted at Pre-Delete. | Pre-Delete | yes | [Delete Windows Computer Object from AD](plugins/OHK-bkoau0j8/) | +| Generate options for 'Application' | [HPA-2ud31gkx](orchestration_actions/HPA-2ud31gkx/README.md) | Fills the Application order-form parameter from Python with one list of business applications that every group sees. | Generated Parameter Options | yes | [Generate options for 'Application'](plugins/OHK-f1ol9j5k/) | | Generate options for 'Expiration Date' | [HPA-qb0w86mi](orchestration_actions/HPA-qb0w86mi/README.md) | Pre-fills the Expiration Date order-form parameter with a default of seven days from now. | Generated Parameter Options | yes | [Generate options for 'Expiration Date'](plugins/OHK-cfciy0fo/) | +| Generate options for 'Maintenance Window' | [HPA-onelxnkw](orchestration_actions/HPA-onelxnkw/README.md) | Fills the Maintenance Window order-form parameter from Python with weekly two-hour UTC windows. | Generated Parameter Options | yes | [Generate options for 'Maintenance Window'](plugins/OHK-vwpjfa9d/) | | Generate options for Ansible job template maps | [HPA-aualk6ei](orchestration_actions/HPA-aualk6ei/) | Lists the Variable Maps that are Ansible job template maps so an admin pins a blueprint's ansible_job_template_maps parameter from a dropdown. | Generated Parameter Options | yes | [Generate options for Ansible job template maps](plugins/OHK-7i1fk0l5/) | | Generate Options for Domain Service Account | [HPA-g8pqv6uv](orchestration_actions/HPA-g8pqv6uv/README.md) | Lists every connection info labeled domain_service_account as the choices for the domain_service_account parameter. | Generated Parameter Options | yes | [Generate Options for Domain Service Account](plugins/OHK-ww524a3e/) | | Generate options for HCP Terraform coordinates | [HPA-swe1kifa](orchestration_actions/HPA-swe1kifa/) | Lists HCP Terraform connections, organizations, projects and no-code modules so an admin pins a no-code blueprint's coordinates from dropdowns. | Generated Parameter Options | yes | [Generate options for HCP Terraform coordinates](plugins/OHK-529jjzli/) | @@ -225,6 +228,7 @@ Inbound REST endpoints. |---|---|---|---| | Aria Migration Form Options | [IWH-xr0508nf](webhooks/IWH-xr0508nf/) | GET endpoint the Aria migration order form calls to list Aria projects, an Aria cloud template's resources, a CloudBolt blueprint's tiers, and CloudBolt groups. | [Aria Migration Form Options](plugins/OHK-xhpq1rn3/) | | Azure PS Script Panel | [IWH-vfkvduxm](webhooks/IWH-vfkvduxm/) | GET endpoint the Run an Azure PowerShell Script order form calls to fetch the SurveyJS fields for the chosen catalog script's declared action inputs. | [Azure PS Script Panel](plugins/OHK-bvn2l7q1/) | +| Echo | [IWH-f16qxnhm](webhooks/IWH-f16qxnhm/) | Endpoint that returns the posted JSON with the calling user and the time, so an external system can prove a synchronous authenticated call into CloudBolt. | [Echo](plugins/OHK-w78lalkx/) | | Form Options | [IWH-yj93is5z](webhooks/IWH-yj93is5z/) | GET endpoint that custom forms call to fill dropdowns from a CloudBolt Environment (resource groups, subnets, images, sizes, any custom field), from an HCP Terraform no-code module's variable options, or to build a deployed resource's Terraform Update variables panel. | [Form Options](plugins/OHK-fx500o2r/) | | IP Reservations | [IWH-x82773zb](webhooks/IWH-x82773zb/README.md) | Endpoint external systems call to reserve the next free IP in a CloudBolt IP pool, release it, and check a pool's free count. | [IP Reservations](plugins/OHK-axepfitm/) | | Monitoring Alerts | [IWH-i7b44zvs](webhooks/IWH-i7b44zvs/README.md) | Endpoint a monitoring system posts Alertmanager alerts to; each firing alert starts the mapped remediation server action on the server it names. | [Monitoring Alerts](plugins/OHK-ogu8lqt2/) | @@ -241,30 +245,37 @@ Actions published as tools on CloudBolt's MCP server for AI agents to call. Each | Compare Azure List Prices | [MTA-ab0krash](mcp_tool_actions/MTA-ab0krash/README.md) | Looks up Azure public list prices for any service across the regions of the Azure environments the caller can order into, with monthly estimates and hints for refining the search. | `compare_azure_list_prices` | yes | [Compare Azure List Prices](plugins/OHK-r9cm4oar/) | | Fetch Job Log | [MTA-8j9c0tb0](mcp_tool_actions/MTA-8j9c0tb0/README.md) | Returns a job's status, output, errors, progress log, child jobs, failed descendants, and sync results in one call so a failed job can be diagnosed. | `fetch_job_log` | yes | [Fetch Job Log](plugins/OHK-2p0rhzup/) | | Manage Blueprint Permissions | [MTA-ntmcnvv7](mcp_tool_actions/MTA-ntmcnvv7/README.md) | Lists, grants, or revokes a group's DEPLOY or MANAGE permission on a blueprint, so a repository sync's loss of group permissions can be snapshotted and restored. | `manage_blueprint_permissions` | yes | [Manage Blueprint Permissions](plugins/OHK-mgta9oez/) | +| Onboarding: Action Approval | [MTA-bp0rkcq9](mcp_tool_actions/MTA-bp0rkcq9/README.md) | Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver. | `onb_action_approval` | yes | [Onboarding: Action Approval](plugins/OHK-ndsuxv0k/) | +| Onboarding: CIT Test from Order | [MTA-ckumouj0](mcp_tool_actions/MTA-ckumouj0/README.md) | Turns a finished blueprint order into a Continuous Infrastructure Testing test, the same as the order page's Add to CIT action. | `onb_cit_from_order` | yes | [Onboarding: CIT Test from Order](plugins/OHK-yjow1qql/) | +| Onboarding: Configure Custom Server | [MTA-i1kmy5fd](mcp_tool_actions/MTA-i1kmy5fd/README.md) | Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments. | `onb_configure_custom_server` | yes | [Onboarding: Configure Custom Server](plugins/OHK-ilstyopk/) | +| Onboarding: Environment Networks | [MTA-20u1ney4](mcp_tool_actions/MTA-20u1ney4/README.md) | Lists the networks an environment can offer on its first NIC and makes the chosen ones, up to five, its only NIC 1 choices, removing networks from every other NIC. | `onb_environment_networks` | yes | [Onboarding: Environment Networks](plugins/OHK-0u7aonmo/) | +| Onboarding: Failed Servers | [MTA-36j661yp](mcp_tool_actions/MTA-36j661yp/README.md) | Lists servers left in Provision Failed state by failed orders and deletes the ones named, removing their VMs from the cloud when they exist. | `onb_failed_servers` | yes | [Onboarding: Failed Servers](plugins/OHK-ep5vo2nu/) | +| Onboarding: Failure Trace | [MTA-jzscq0mk](mcp_tool_actions/MTA-jzscq0mk/README.md) | Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback. | `onb_failure_trace` | yes | [Onboarding: Failure Trace](plugins/OHK-y95w8ai0/) | +| Onboarding: Group | [MTA-cpq7bvz4](mcp_tool_actions/MTA-cpq7bvz4/README.md) | Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items. | `onb_group` | yes | [Onboarding: Group](plugins/OHK-efxm9m2b/) | +| Onboarding: Handler Locations | [MTA-89dxppus](mcp_tool_actions/MTA-89dxppus/README.md) | Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs. | `onb_handler_locations` | yes | [Onboarding: Handler Locations](plugins/OHK-0nuhjdxl/) | +| Onboarding: Import Environments | [MTA-i6p4j2l7](mcp_tool_actions/MTA-i6p4j2l7/README.md) | Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced; vCenter networks are chosen afterwards with onb_environment_networks), and reports existing environments instead of duplicating them. | `onb_import_environments` | yes | [Onboarding: Import Environments](plugins/OHK-8j06wtoe/) | +| Onboarding: Import OS Build | [MTA-0dr8xi4i](mcp_tool_actions/MTA-0dr8xi4i/README.md) | Lists a handler's cached images for a location or imports one (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing a build of the same name so one build spans handlers, refreshing an empty cache without the whitelist, and attaching the build to the environments. | `onb_import_os_build` | yes | [Onboarding: Import OS Build](plugins/OHK-k2p8ll4p/) | +| Onboarding: Install | [MTA-6zxrhdls](mcp_tool_actions/MTA-6zxrhdls/README.md) | Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version. | `onb_install` | yes | [Onboarding: Install](plugins/OHK-j60flmb3/) | +| Onboarding: Install Content Library Item | [MTA-znqpide5](mcp_tool_actions/MTA-znqpide5/README.md) | Lists a Content Library collection or downloads one item from content.cloudbolt.app and imports it the way the library page does, for UI extensions, recurring jobs, server and resource actions, rules and blueprints. | `onb_install_content_library_item` | yes | [Onboarding: Install Content Library Item](plugins/OHK-kst5rkhi/) | +| Onboarding: LDAP Mapping | [MTA-e5qv0zay](mcp_tool_actions/MTA-e5qv0zay/README.md) | Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login. | `onb_ldap_mapping` | yes | [Onboarding: LDAP Mapping](plugins/OHK-s76tknmk/) | +| Onboarding: Network Addressing | [MTA-z3h0o9t3](mcp_tool_actions/MTA-z3h0o9t3/README.md) | Sets how servers on a network get their IP address (DHCP, static with gateway and netmask, a CloudBolt IP pool, an IPAM endpoint, or an IP typed per order) and verifies it with the network's IP provider. | `onb_network_addressing` | yes | [Onboarding: Network Addressing](plugins/OHK-gjfc20pv/) | +| Onboarding: Parameter | [MTA-70aez9bm](mcp_tool_actions/MTA-70aez9bm/README.md) | Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease. | `onb_parameter` | yes | [Onboarding: Parameter](plugins/OHK-f6kqrklx/) | +| Onboarding: Playbook | [MTA-92b836jb](mcp_tool_actions/MTA-92b836jb/README.md) | Returns a section of the onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. | `onb_playbook` | yes | [Onboarding: Playbook](plugins/OHK-1am7i73s/) | +| Onboarding: Recent Errors | [MTA-hwg74btd](mcp_tool_actions/MTA-hwg74btd/README.md) | Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most. | `onb_recent_errors` | yes | [Onboarding: Recent Errors](plugins/OHK-4vwq70dg/) | +| Onboarding: Remove Environment | [MTA-pz5o2gjl](mcp_tool_actions/MTA-pz5o2gjl/README.md) | Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it. | `onb_remove_environment` | yes | [Onboarding: Remove Environment](plugins/OHK-1wmzl7sp/) | +| Onboarding: Scorecard | [MTA-zfoxwh12](mcp_tool_actions/MTA-zfoxwh12/README.md) | Builds the POC test plan scorecard from the recorded item statuses and live evidence on the appliance (orders, handlers, environments, groups, mappings, actions, jobs), per category with weights. | `onb_scorecard` | yes | [Onboarding: Scorecard](plugins/OHK-yqu8b25o/) | +| Onboarding: Set Item Status | [MTA-p72v9y76](mcp_tool_actions/MTA-p72v9y76/README.md) | Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read. | `onb_set_item_status` | yes | [Onboarding: Set Item Status](plugins/OHK-5885tete/) | +| Onboarding: SMTP Settings | [MTA-89w58iux](mcp_tool_actions/MTA-89w58iux/README.md) | Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings. | `onb_smtp` | yes | [Onboarding: SMTP Settings](plugins/OHK-be18kqal/) | +| Onboarding: SMTP Test | [MTA-qab6r2gk](mcp_tool_actions/MTA-qab6r2gk/README.md) | Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails. | `onb_smtp_test` | yes | [Onboarding: SMTP Test](plugins/OHK-jdyan3in/) | +| Onboarding: Status | [MTA-1985b88g](mcp_tool_actions/MTA-1985b88g/README.md) | Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links. | `onb_status` | yes | [Onboarding: Status](plugins/OHK-5zg1dkcr/) | +| Onboarding: Sync Images | [MTA-po1gmnou](mcp_tool_actions/MTA-po1gmnou/README.md) | Fills a resource handler's image cache now without the image whitelist and enables the recurring job and rule that keep it fresh, so the image pickers and onb_import_os_build see every image the credentials can. | `onb_sync_images` | yes | [Onboarding: Sync Images](plugins/OHK-bbhlwspa/) | +| Onboarding: Tag Mapping | [MTA-0689nxjy](mcp_tool_actions/MTA-0689nxjy/README.md) | Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag. | `onb_tag_mapping` | yes | [Onboarding: Tag Mapping](plugins/OHK-b8c90uok/) | +| Onboarding: Trim Environment Order Form | [MTA-iyknuxox](mcp_tool_actions/MTA-iyknuxox/README.md) | Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size, the NIC 1 networks chosen with onb_environment_networks and, where needed, the password; the report profile only lists the current form. | `onb_trim_environment` | yes | [Onboarding: Trim Environment Order Form](plugins/OHK-qn4k1pme/) | +| Onboarding: UI Link | [MTA-zpohocjt](mcp_tool_actions/MTA-zpohocjt/README.md) | Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. | `onb_ui_link` | yes | [Onboarding: UI Link](plugins/OHK-1gp25bmt/) | +| Onboarding: User | [MTA-tuzkb8h4](mcp_tool_actions/MTA-tuzkb8h4/README.md) | Assigns roles in a group to a local POC user; a user that does not exist yet is added by the admin on the Users list with its password, and the tool says how. | `onb_user` | yes | [Onboarding: User](plugins/OHK-8in52yhn/) | +| Onboarding: Verify LDAP | [MTA-kw8krevn](mcp_tool_actions/MTA-kw8krevn/README.md) | Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it. | `onb_verify_ldap` | yes | [Onboarding: Verify LDAP](plugins/OHK-j82f4ibp/) | +| Onboarding: Verify Resource Handler | [MTA-r5v1eblg](mcp_tool_actions/MTA-r5v1eblg/README.md) | Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool. | `onb_verify_resource_handler` | yes | [Onboarding: Verify Resource Handler](plugins/OHK-s7cdvkpr/) | | Order Counts by Blueprint | [MTA-lp8lgi7e](mcp_tool_actions/MTA-lp8lgi7e/) | Return the number of orders placed for each blueprint, optionally filtered by order status. | `order_counts_by_blueprint` | yes | [Order Counts by Blueprint](plugins/OHK-yjblxbwg/) | -| POC Onboarding: Action Approval | [MTA-bp0rkcq9](mcp_tool_actions/MTA-bp0rkcq9/README.md) | Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver. | `onb_action_approval` | yes | [POC Onboarding: Action Approval](plugins/OHK-ndsuxv0k/) | -| POC Onboarding: Configure Custom Server | [MTA-i1kmy5fd](mcp_tool_actions/MTA-i1kmy5fd/README.md) | Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments. | `onb_configure_custom_server` | yes | [POC Onboarding: Configure Custom Server](plugins/OHK-ilstyopk/) | -| POC Onboarding: Failure Trace | [MTA-jzscq0mk](mcp_tool_actions/MTA-jzscq0mk/README.md) | Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback. | `onb_failure_trace` | yes | [POC Onboarding: Failure Trace](plugins/OHK-y95w8ai0/) | -| POC Onboarding: Group | [MTA-cpq7bvz4](mcp_tool_actions/MTA-cpq7bvz4/README.md) | Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items. | `onb_group` | yes | [POC Onboarding: Group](plugins/OHK-efxm9m2b/) | -| POC Onboarding: Handler Locations | [MTA-89dxppus](mcp_tool_actions/MTA-89dxppus/README.md) | Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs. | `onb_handler_locations` | yes | [POC Onboarding: Handler Locations](plugins/OHK-0nuhjdxl/) | -| POC Onboarding: Import Environments | [MTA-i6p4j2l7](mcp_tool_actions/MTA-i6p4j2l7/README.md) | Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced, vCenter cluster networks attached to NIC 1), and reports existing environments instead of duplicating them. | `onb_import_environments` | yes | [POC Onboarding: Import Environments](plugins/OHK-8j06wtoe/) | -| POC Onboarding: Import OS Build | [MTA-0dr8xi4i](mcp_tool_actions/MTA-0dr8xi4i/README.md) | Imports one image (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing an existing build of the same name so one build spans handlers, and attaches the build to the handler's environments. | `onb_import_os_build` | yes | [POC Onboarding: Import OS Build](plugins/OHK-k2p8ll4p/) | -| POC Onboarding: Install | [MTA-6zxrhdls](mcp_tool_actions/MTA-6zxrhdls/README.md) | Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version. | `onb_install` | yes | [POC Onboarding: Install](plugins/OHK-j60flmb3/) | -| POC Onboarding: LDAP Mapping | [MTA-e5qv0zay](mcp_tool_actions/MTA-e5qv0zay/README.md) | Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login. | `onb_ldap_mapping` | yes | [POC Onboarding: LDAP Mapping](plugins/OHK-s76tknmk/) | -| POC Onboarding: Parameter | [MTA-70aez9bm](mcp_tool_actions/MTA-70aez9bm/README.md) | Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease. | `onb_parameter` | yes | [POC Onboarding: Parameter](plugins/OHK-f6kqrklx/) | -| POC Onboarding: Playbook | [MTA-92b836jb](mcp_tool_actions/MTA-92b836jb/README.md) | Returns a section of the POC onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. | `onb_playbook` | yes | [POC Onboarding: Playbook](plugins/OHK-1am7i73s/) | -| POC Onboarding: Recent Errors | [MTA-hwg74btd](mcp_tool_actions/MTA-hwg74btd/README.md) | Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most. | `onb_recent_errors` | yes | [POC Onboarding: Recent Errors](plugins/OHK-4vwq70dg/) | -| POC Onboarding: Remove Environment | [MTA-pz5o2gjl](mcp_tool_actions/MTA-pz5o2gjl/README.md) | Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it. | `onb_remove_environment` | yes | [POC Onboarding: Remove Environment](plugins/OHK-1wmzl7sp/) | -| POC Onboarding: Set Item Status | [MTA-p72v9y76](mcp_tool_actions/MTA-p72v9y76/README.md) | Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read. | `onb_set_item_status` | yes | [POC Onboarding: Set Item Status](plugins/OHK-5885tete/) | -| POC Onboarding: SMTP Settings | [MTA-89w58iux](mcp_tool_actions/MTA-89w58iux/README.md) | Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings. | `onb_smtp` | yes | [POC Onboarding: SMTP Settings](plugins/OHK-be18kqal/) | -| POC Onboarding: SMTP Test | [MTA-qab6r2gk](mcp_tool_actions/MTA-qab6r2gk/README.md) | Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails. | `onb_smtp_test` | yes | [POC Onboarding: SMTP Test](plugins/OHK-jdyan3in/) | -| POC Onboarding: Status | [MTA-1985b88g](mcp_tool_actions/MTA-1985b88g/README.md) | Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links. | `onb_status` | yes | [POC Onboarding: Status](plugins/OHK-5zg1dkcr/) | -| POC Onboarding: Tag Mapping | [MTA-0689nxjy](mcp_tool_actions/MTA-0689nxjy/README.md) | Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag. | `onb_tag_mapping` | yes | [POC Onboarding: Tag Mapping](plugins/OHK-b8c90uok/) | -| POC Onboarding: Trim Environment Order Form | [MTA-iyknuxox](mcp_tool_actions/MTA-iyknuxox/README.md) | Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size and, where needed, the network and password; the report profile only lists the current form. | `onb_trim_environment` | yes | [POC Onboarding: Trim Environment Order Form](plugins/OHK-qn4k1pme/) | -| POC Onboarding: UI Link | [MTA-zpohocjt](mcp_tool_actions/MTA-zpohocjt/README.md) | Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. | `onb_ui_link` | yes | [POC Onboarding: UI Link](plugins/OHK-1gp25bmt/) | -| POC Onboarding: User | [MTA-tuzkb8h4](mcp_tool_actions/MTA-tuzkb8h4/README.md) | Creates a local user with no usable password and assigns roles in a group, returning the edit link where the admin sets the password; an existing user only gets the roles. | `onb_user` | yes | [POC Onboarding: User](plugins/OHK-8in52yhn/) | -| POC Onboarding: Verify LDAP | [MTA-kw8krevn](mcp_tool_actions/MTA-kw8krevn/README.md) | Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it. | `onb_verify_ldap` | yes | [POC Onboarding: Verify LDAP](plugins/OHK-j82f4ibp/) | -| POC Onboarding: Verify Resource Handler | [MTA-r5v1eblg](mcp_tool_actions/MTA-r5v1eblg/README.md) | Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool. | `onb_verify_resource_handler` | yes | [POC Onboarding: Verify Resource Handler](plugins/OHK-s7cdvkpr/) | | Rerun Job | [MTA-zth0tjjg](mcp_tool_actions/MTA-zth0tjjg/README.md) | Reruns a finished CloudBolt job with its original parameters, or resumes a paused one, like the Rerun and Resume buttons on the job's page. | `rerun_job` | yes | [Rerun Job](plugins/OHK-ukp8n10w/) | | Restart Web Workers (Dev Appliances Only) | [MTA-8x7ay37f](mcp_tool_actions/MTA-8x7ay37f/README.md) | Recycles the mod_wsgi web worker processes on a development appliance, one at a time, so freshly synced extension routes and views load. | `dev_restart_web_workers` | yes | [Restart Web Workers (Dev Appliances Only)](plugins/OHK-26ozyhui/) | | Run Blueprint Discovery | [MTA-9oihpumd](mcp_tool_actions/MTA-9oihpumd/README.md) | Launches the Sync Resources job for one blueprint so its discovery plugin runs on demand. | `run_blueprint_discovery` | yes | [Run Blueprint Discovery](plugins/OHK-dwh5kqxq/) | @@ -365,6 +376,7 @@ Python and remote-script actions. Plugins that belong to a blueprint or action a | DNS Record - Discover | [OHK-dnsdsc01](plugins/OHK-dnsdsc01/) | Discovers AD-integrated DNS A records across all configured LDAP utilities. | CloudBolt Plug-in | [DNS A Record](blueprints/BP-dnsrec01/README.md) | | DNS Record - Teardown | [OHK-dnstrd01](plugins/OHK-dnstrd01/) | Tombstones the AD-integrated DNS A record created by the resource. | CloudBolt Plug-in | [DNS A Record](blueprints/BP-dnsrec01/README.md) | | Drift Check | [OHK-9n4wfasa](plugins/OHK-9n4wfasa/) | Reports drift between a Bicep deployment stack and its template with a read-only what-if. | CloudBolt Plug-in | [Drift Check](resource_actions/RSA-5jeixn92/) | +| Echo | [OHK-w78lalkx](plugins/OHK-w78lalkx/) | Returns the posted JSON or query fields with the calling user and the time, proving a synchronous authenticated call into CloudBolt. | CloudBolt Plug-in | [Echo](webhooks/IWH-f16qxnhm/) | | Enable Apache Down Alert | [OHK-ut5c0igl](plugins/OHK-ut5c0igl/) | Adds a TCP readiness probe on port 443 to an OpenShift Virtualization VM (restarting it once), creates a PrometheusRule that fires ApacheDown when the VM's pod goes not-ready, and routes the alert to the Monitoring Alerts webhook. | CloudBolt Plug-in | [Enable Apache Down Alert](server_actions/SVA-t1z9yt6d/README.md) | | Enable Apache Down Alert for Tier | [OHK-jjltp87s](plugins/OHK-jjltp87s/) | Sets up the ApacheDown alert for one tier's OpenShift Virtualization VM: a readiness probe, one restart, a PrometheusRule and delivery to the Monitoring Alerts webhook. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](blueprints/BP-sy5pb325/README.md) | | Expire Servers | [OHK-59t2apzf](plugins/OHK-59t2apzf/) | Finds expired servers and runs the configured expiration orchestration action on them. | CloudBolt Plug-in | [Expire Servers](recurring_jobs/RJB-nsx4v2s1/README.md) | @@ -375,7 +387,9 @@ Python and remote-script actions. Plugins that belong to a blueprint or action a | Extend GKE Namespace Expiration | [OHK-vtuzh4nh](plugins/OHK-vtuzh4nh/) | Extends a GKE namespace landing zone's expiration date on the resource and the namespace annotation. | CloudBolt Plug-in | [Extend GKE Namespace Expiration](resource_actions/RSA-1qdgexp2/) | | Fetch Job Log | [OHK-2p0rhzup](plugins/OHK-2p0rhzup/) | Returns a job's status, output, errors, progress log, child jobs, failed descendants, and sync results in one call so a failed job can be diagnosed. | CloudBolt Plug-in | [Fetch Job Log](mcp_tool_actions/MTA-8j9c0tb0/README.md) | | Form Options | [OHK-fx500o2r](plugins/OHK-fx500o2r/) | Serves custom-form dropdown options scoped to a CloudBolt Environment or an HCP Terraform no-code module, and builds a deployed resource's Terraform Update variables panel. | CloudBolt Plug-in | [Form Options](webhooks/IWH-yj93is5z/) | +| Generate options for 'Application' | [OHK-f1ol9j5k](plugins/OHK-f1ol9j5k/) | Fills the Application dropdown from Python with a list of business applications, to show Python-backed parameter options. | CloudBolt Plug-in | [Generate options for 'Application'](orchestration_actions/HPA-2ud31gkx/README.md) | | Generate options for 'Expiration Date' | [OHK-cfciy0fo](plugins/OHK-cfciy0fo/) | Returns an initial Expiration Date value of seven days from now. | CloudBolt Plug-in | [Generate options for 'Expiration Date'](orchestration_actions/HPA-qb0w86mi/README.md) | +| Generate options for 'Maintenance Window' | [OHK-vwpjfa9d](plugins/OHK-vwpjfa9d/) | Fills the Maintenance Window dropdown with weekly two-hour UTC windows computed in Python. | CloudBolt Plug-in | [Generate options for 'Maintenance Window'](orchestration_actions/HPA-onelxnkw/README.md) | | Generate options for Ansible job template maps | [OHK-7i1fk0l5](plugins/OHK-7i1fk0l5/) | Generates the dropdown choices an admin pins a blueprint's ansible_job_template_maps parameter from: every Variable Map on the instance whose JSON has a job_template key, labeled with the AAP job template it launches. | CloudBolt Plug-in | [Generate options for Ansible job template maps](orchestration_actions/HPA-aualk6ei/) | | Generate Options for Domain Service Account | [OHK-ww524a3e](plugins/OHK-ww524a3e/) | Lists every connection info labeled domain_service_account, by name and username, with its ID as the value, for the domain_service_account parameter. | CloudBolt Plug-in | [Generate Options for Domain Service Account](orchestration_actions/HPA-g8pqv6uv/README.md) | | Generate options for HCP Terraform coordinates | [OHK-529jjzli](plugins/OHK-529jjzli/) | Generates the dropdown choices an admin pins a no-code blueprint's HCP Terraform connection, organization, project and module from, each list narrowed by the pins before it. | CloudBolt Plug-in | [Generate options for HCP Terraform coordinates](orchestration_actions/HPA-swe1kifa/) | @@ -388,6 +402,8 @@ Python and remote-script actions. Plugins that belong to a blueprint or action a | Grant Restricted Contributor Access | [OHK-pr8q2szp](plugins/OHK-pr8q2szp/) | Grants a user the CloudBolt Restricted Contributor role on the subscription. | CloudBolt Plug-in | [Grant Access](resource_actions/RSA-1kpl3w0d/) | | HCP Terraform No-Code Module | [OHK-axtt0yqq](plugins/OHK-axtt0yqq/) | Provisions infrastructure from a pinned HCP Terraform no-code module into a chosen CloudBolt environment's Azure subscription through a workspace that HCP Terraform auto-applies. | CloudBolt Plug-in | [HCP Terraform No-Code + Ansible](blueprints/BP-uh9v24v3/README.md), [HCP Terraform No-Code Module](blueprints/BP-00meiwwz/README.md) | | HCP Terraform VM | [OHK-pvo05e24](plugins/OHK-pvo05e24/) | Provisions a VM through HCP Terraform into a chosen CloudBolt environment's Azure subscription, in a dedicated workspace with a plan-approval pause before apply. | CloudBolt Plug-in | [HCP Terraform VM](blueprints/BP-b0qm83lh/README.md) | +| Hello World (Linux) | [OHK-818zw61m](plugins/OHK-818zw61m/) | Prints a hello message, the host name and the user inside a Linux guest to prove agentless script execution. | Remote Script | [Standard Server](blueprints/BP-x78p48gz/README.md) | +| Hello World (Windows) | [OHK-u7j8o0vm](plugins/OHK-u7j8o0vm/) | Prints a hello message, the computer name and the user inside a Windows guest to prove agentless script execution. | Remote Script | [Standard Server](blueprints/BP-x78p48gz/README.md) | | Initialize Windows Disk | [OHK-2evtyysr](plugins/OHK-2evtyysr/) | Initializes, partitions, and formats newly attached raw disks in a Windows guest. | Remote Script | [Windows File Server](blueprints/BP-psw7rclb/README.md) | | Install Apache and PHP | [OHK-d9ujne9z](plugins/OHK-d9ujne9z/) | Installs Apache httpd and PHP on a blueprint's app tier through the OpenShift API tunnel, on the distribution's default PHP or a chosen stream. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](blueprints/BP-sy5pb325/README.md) | | Install Apache TLS Proxy | [OHK-lwhuaezv](plugins/OHK-lwhuaezv/) | Installs Apache httpd with mod_ssl on a blueprint's web tier through the OpenShift API tunnel, ready to act as a TLS reverse proxy. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](blueprints/BP-sy5pb325/README.md) | @@ -432,31 +448,38 @@ Python and remote-script actions. Plugins that belong to a blueprint or action a | Network Security Group Teardown | [OHK-9jouejv8](plugins/OHK-9jouejv8/) | Deletes the Azure network security group behind the resource. | CloudBolt Plug-in | [Azure Network Security Group](blueprints/BP-3fdhnw54/README.md) | | Node Size - Generate Options by OS Build Architecture | [OHK-9csbq3zd](plugins/OHK-9csbq3zd/README.md) | Generates node_size options limited to sizes matching the selected OS build's processor architecture. | CloudBolt Plug-in | standalone | | Node Size - Generate Options by Region, OS Image, Security, Networking and Storage (Azure SKU capabilities) | [OHK-kujhsds0](plugins/OHK-kujhsds0/README.md) | Generates node_size options filtered by live Azure SKU capabilities for the selected region, image, security, networking, and storage settings. | CloudBolt Plug-in | standalone | +| Onboarding: Action Approval | [OHK-ndsuxv0k](plugins/OHK-ndsuxv0k/) | Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver. | CloudBolt Plug-in | [Onboarding: Action Approval](mcp_tool_actions/MTA-bp0rkcq9/README.md) | +| Onboarding: CIT Test from Order | [OHK-yjow1qql](plugins/OHK-yjow1qql/) | Turns a finished blueprint order into a Continuous Infrastructure Testing test, the same as the order page's Add to CIT action. | CloudBolt Plug-in | [Onboarding: CIT Test from Order](mcp_tool_actions/MTA-ckumouj0/README.md) | +| Onboarding: Configure Custom Server | [OHK-ilstyopk](plugins/OHK-ilstyopk/) | Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments. | CloudBolt Plug-in | [Onboarding: Configure Custom Server](mcp_tool_actions/MTA-i1kmy5fd/README.md) | +| Onboarding: Environment Networks | [OHK-0u7aonmo](plugins/OHK-0u7aonmo/) | Lists the networks an environment can offer on its first NIC and makes the chosen ones, up to five, its only NIC 1 choices, removing networks from every other NIC. | CloudBolt Plug-in | [Onboarding: Environment Networks](mcp_tool_actions/MTA-20u1ney4/README.md) | +| Onboarding: Failed Servers | [OHK-ep5vo2nu](plugins/OHK-ep5vo2nu/) | Lists servers left in Provision Failed state by failed orders and deletes the ones named, removing their VMs from the cloud when they exist. | CloudBolt Plug-in | [Onboarding: Failed Servers](mcp_tool_actions/MTA-36j661yp/README.md) | +| Onboarding: Failure Trace | [OHK-y95w8ai0](plugins/OHK-y95w8ai0/) | Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback. | CloudBolt Plug-in | [Onboarding: Failure Trace](mcp_tool_actions/MTA-jzscq0mk/README.md) | +| Onboarding: Group | [OHK-efxm9m2b](plugins/OHK-efxm9m2b/) | Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items. | CloudBolt Plug-in | [Onboarding: Group](mcp_tool_actions/MTA-cpq7bvz4/README.md) | +| Onboarding: Handler Locations | [OHK-0nuhjdxl](plugins/OHK-0nuhjdxl/) | Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs. | CloudBolt Plug-in | [Onboarding: Handler Locations](mcp_tool_actions/MTA-89dxppus/README.md) | +| Onboarding: Import Environments | [OHK-8j06wtoe](plugins/OHK-8j06wtoe/) | Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced; vCenter networks are chosen afterwards with onb_environment_networks), and reports existing environments instead of duplicating them. | CloudBolt Plug-in | [Onboarding: Import Environments](mcp_tool_actions/MTA-i6p4j2l7/README.md) | +| Onboarding: Import OS Build | [OHK-k2p8ll4p](plugins/OHK-k2p8ll4p/) | Lists a handler's cached images for a location or imports one (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing a build of the same name so one build spans handlers, refreshing an empty cache without the whitelist, and attaching the build to the environments. | CloudBolt Plug-in | [Onboarding: Import OS Build](mcp_tool_actions/MTA-0dr8xi4i/README.md) | +| Onboarding: Install | [OHK-j60flmb3](plugins/OHK-j60flmb3/) | Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version. | CloudBolt Plug-in | [Onboarding: Install](mcp_tool_actions/MTA-6zxrhdls/README.md) | +| Onboarding: Install Content Library Item | [OHK-kst5rkhi](plugins/OHK-kst5rkhi/) | Lists a Content Library collection or downloads one item from content.cloudbolt.app and imports it the way the library page does, for UI extensions, recurring jobs, server and resource actions, rules and blueprints. | CloudBolt Plug-in | [Onboarding: Install Content Library Item](mcp_tool_actions/MTA-znqpide5/README.md) | +| Onboarding: LDAP Mapping | [OHK-s76tknmk](plugins/OHK-s76tknmk/) | Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login. | CloudBolt Plug-in | [Onboarding: LDAP Mapping](mcp_tool_actions/MTA-e5qv0zay/README.md) | +| Onboarding: Network Addressing | [OHK-gjfc20pv](plugins/OHK-gjfc20pv/) | Sets how servers on a network get their IP address (DHCP, static with gateway and netmask, a CloudBolt IP pool, an IPAM endpoint, or an IP typed per order) and verifies it with the network's IP provider. | CloudBolt Plug-in | [Onboarding: Network Addressing](mcp_tool_actions/MTA-z3h0o9t3/README.md) | +| Onboarding: Parameter | [OHK-f6kqrklx](plugins/OHK-f6kqrklx/) | Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease. | CloudBolt Plug-in | [Onboarding: Parameter](mcp_tool_actions/MTA-70aez9bm/README.md) | +| Onboarding: Playbook | [OHK-1am7i73s](plugins/OHK-1am7i73s/) | Returns a section of the onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. | CloudBolt Plug-in | [Onboarding: Playbook](mcp_tool_actions/MTA-92b836jb/README.md) | +| Onboarding: Recent Errors | [OHK-4vwq70dg](plugins/OHK-4vwq70dg/) | Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most. | CloudBolt Plug-in | [Onboarding: Recent Errors](mcp_tool_actions/MTA-hwg74btd/README.md) | +| Onboarding: Remove Environment | [OHK-1wmzl7sp](plugins/OHK-1wmzl7sp/) | Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it. | CloudBolt Plug-in | [Onboarding: Remove Environment](mcp_tool_actions/MTA-pz5o2gjl/README.md) | +| Onboarding: Scorecard | [OHK-yqu8b25o](plugins/OHK-yqu8b25o/) | Builds the POC test plan scorecard from the recorded item statuses and live evidence on the appliance (orders, handlers, environments, groups, mappings, actions, jobs), per category with weights. | CloudBolt Plug-in | [Onboarding: Scorecard](mcp_tool_actions/MTA-zfoxwh12/README.md) | +| Onboarding: Set Item Status | [OHK-5885tete](plugins/OHK-5885tete/) | Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read. | CloudBolt Plug-in | [Onboarding: Set Item Status](mcp_tool_actions/MTA-p72v9y76/README.md) | +| Onboarding: SMTP Settings | [OHK-be18kqal](plugins/OHK-be18kqal/) | Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings. | CloudBolt Plug-in | [Onboarding: SMTP Settings](mcp_tool_actions/MTA-89w58iux/README.md) | +| Onboarding: SMTP Test | [OHK-jdyan3in](plugins/OHK-jdyan3in/) | Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails. | CloudBolt Plug-in | [Onboarding: SMTP Test](mcp_tool_actions/MTA-qab6r2gk/README.md) | +| Onboarding: Status | [OHK-5zg1dkcr](plugins/OHK-5zg1dkcr/) | Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links. | CloudBolt Plug-in | [Onboarding: Status](mcp_tool_actions/MTA-1985b88g/README.md) | +| Onboarding: Sync Images | [OHK-bbhlwspa](plugins/OHK-bbhlwspa/) | Fills a resource handler's image cache now without the image whitelist and enables the recurring job and rule that keep it fresh, so the image pickers and onb_import_os_build see every image the credentials can. | CloudBolt Plug-in | [Onboarding: Sync Images](mcp_tool_actions/MTA-po1gmnou/README.md) | +| Onboarding: Tag Mapping | [OHK-b8c90uok](plugins/OHK-b8c90uok/) | Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag. | CloudBolt Plug-in | [Onboarding: Tag Mapping](mcp_tool_actions/MTA-0689nxjy/README.md) | +| Onboarding: Trim Environment Order Form | [OHK-qn4k1pme](plugins/OHK-qn4k1pme/) | Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size, the NIC 1 networks chosen with onb_environment_networks and, where needed, the password; the report profile only lists the current form. | CloudBolt Plug-in | [Onboarding: Trim Environment Order Form](mcp_tool_actions/MTA-iyknuxox/README.md) | +| Onboarding: UI Link | [OHK-1gp25bmt](plugins/OHK-1gp25bmt/) | Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. | CloudBolt Plug-in | [Onboarding: UI Link](mcp_tool_actions/MTA-zpohocjt/README.md) | +| Onboarding: User | [OHK-8in52yhn](plugins/OHK-8in52yhn/) | Assigns roles in a group to a local POC user; a user that does not exist yet is added by the admin on the Users list with its password, and the tool says how. | CloudBolt Plug-in | [Onboarding: User](mcp_tool_actions/MTA-tuzkb8h4/README.md) | +| Onboarding: Verify LDAP | [OHK-j82f4ibp](plugins/OHK-j82f4ibp/) | Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it. | CloudBolt Plug-in | [Onboarding: Verify LDAP](mcp_tool_actions/MTA-kw8krevn/README.md) | +| Onboarding: Verify Resource Handler | [OHK-s7cdvkpr](plugins/OHK-s7cdvkpr/) | Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool. | CloudBolt Plug-in | [Onboarding: Verify Resource Handler](mcp_tool_actions/MTA-r5v1eblg/README.md) | | OpenShift Project Landing Zone | [OHK-prew0osh](plugins/OHK-prew0osh/) | Creates an OpenShift project with quota, limits, network policies, and an optional role binding, then pins a CloudBolt environment to it. | CloudBolt Plug-in | [OpenShift Project Landing Zone](blueprints/BP-tikkhf2y/README.md) | | Order Counts by Blueprint | [OHK-yjblxbwg](plugins/OHK-yjblxbwg/) | | CloudBolt Plug-in | [Order Counts by Blueprint](mcp_tool_actions/MTA-lp8lgi7e/) | -| POC Onboarding: Action Approval | [OHK-ndsuxv0k](plugins/OHK-ndsuxv0k/) | Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver. | CloudBolt Plug-in | [POC Onboarding: Action Approval](mcp_tool_actions/MTA-bp0rkcq9/README.md) | -| POC Onboarding: Configure Custom Server | [OHK-ilstyopk](plugins/OHK-ilstyopk/) | Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments. | CloudBolt Plug-in | [POC Onboarding: Configure Custom Server](mcp_tool_actions/MTA-i1kmy5fd/README.md) | -| POC Onboarding: Failure Trace | [OHK-y95w8ai0](plugins/OHK-y95w8ai0/) | Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback. | CloudBolt Plug-in | [POC Onboarding: Failure Trace](mcp_tool_actions/MTA-jzscq0mk/README.md) | -| POC Onboarding: Group | [OHK-efxm9m2b](plugins/OHK-efxm9m2b/) | Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items. | CloudBolt Plug-in | [POC Onboarding: Group](mcp_tool_actions/MTA-cpq7bvz4/README.md) | -| POC Onboarding: Handler Locations | [OHK-0nuhjdxl](plugins/OHK-0nuhjdxl/) | Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs. | CloudBolt Plug-in | [POC Onboarding: Handler Locations](mcp_tool_actions/MTA-89dxppus/README.md) | -| POC Onboarding: Import Environments | [OHK-8j06wtoe](plugins/OHK-8j06wtoe/) | Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced, vCenter cluster networks attached to NIC 1), and reports existing environments instead of duplicating them. | CloudBolt Plug-in | [POC Onboarding: Import Environments](mcp_tool_actions/MTA-i6p4j2l7/README.md) | -| POC Onboarding: Import OS Build | [OHK-k2p8ll4p](plugins/OHK-k2p8ll4p/) | Imports one image (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing an existing build of the same name so one build spans handlers, and attaches the build to the handler's environments. | CloudBolt Plug-in | [POC Onboarding: Import OS Build](mcp_tool_actions/MTA-0dr8xi4i/README.md) | -| POC Onboarding: Install | [OHK-j60flmb3](plugins/OHK-j60flmb3/) | Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version. | CloudBolt Plug-in | [POC Onboarding: Install](mcp_tool_actions/MTA-6zxrhdls/README.md) | -| POC Onboarding: LDAP Mapping | [OHK-s76tknmk](plugins/OHK-s76tknmk/) | Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login. | CloudBolt Plug-in | [POC Onboarding: LDAP Mapping](mcp_tool_actions/MTA-e5qv0zay/README.md) | -| POC Onboarding: Parameter | [OHK-f6kqrklx](plugins/OHK-f6kqrklx/) | Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease. | CloudBolt Plug-in | [POC Onboarding: Parameter](mcp_tool_actions/MTA-70aez9bm/README.md) | -| POC Onboarding: Playbook | [OHK-1am7i73s](plugins/OHK-1am7i73s/) | Returns a section of the POC onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. | CloudBolt Plug-in | [POC Onboarding: Playbook](mcp_tool_actions/MTA-92b836jb/README.md) | -| POC Onboarding: Recent Errors | [OHK-4vwq70dg](plugins/OHK-4vwq70dg/) | Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most. | CloudBolt Plug-in | [POC Onboarding: Recent Errors](mcp_tool_actions/MTA-hwg74btd/README.md) | -| POC Onboarding: Remove Environment | [OHK-1wmzl7sp](plugins/OHK-1wmzl7sp/) | Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it. | CloudBolt Plug-in | [POC Onboarding: Remove Environment](mcp_tool_actions/MTA-pz5o2gjl/README.md) | -| POC Onboarding: Set Item Status | [OHK-5885tete](plugins/OHK-5885tete/) | Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read. | CloudBolt Plug-in | [POC Onboarding: Set Item Status](mcp_tool_actions/MTA-p72v9y76/README.md) | -| POC Onboarding: SMTP Settings | [OHK-be18kqal](plugins/OHK-be18kqal/) | Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings. | CloudBolt Plug-in | [POC Onboarding: SMTP Settings](mcp_tool_actions/MTA-89w58iux/README.md) | -| POC Onboarding: SMTP Test | [OHK-jdyan3in](plugins/OHK-jdyan3in/) | Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails. | CloudBolt Plug-in | [POC Onboarding: SMTP Test](mcp_tool_actions/MTA-qab6r2gk/README.md) | -| POC Onboarding: Status | [OHK-5zg1dkcr](plugins/OHK-5zg1dkcr/) | Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links. | CloudBolt Plug-in | [POC Onboarding: Status](mcp_tool_actions/MTA-1985b88g/README.md) | -| POC Onboarding: Tag Mapping | [OHK-b8c90uok](plugins/OHK-b8c90uok/) | Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag. | CloudBolt Plug-in | [POC Onboarding: Tag Mapping](mcp_tool_actions/MTA-0689nxjy/README.md) | -| POC Onboarding: Trim Environment Order Form | [OHK-qn4k1pme](plugins/OHK-qn4k1pme/) | Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size and, where needed, the network and password; the report profile only lists the current form. | CloudBolt Plug-in | [POC Onboarding: Trim Environment Order Form](mcp_tool_actions/MTA-iyknuxox/README.md) | -| POC Onboarding: UI Link | [OHK-1gp25bmt](plugins/OHK-1gp25bmt/) | Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. | CloudBolt Plug-in | [POC Onboarding: UI Link](mcp_tool_actions/MTA-zpohocjt/README.md) | -| POC Onboarding: User | [OHK-8in52yhn](plugins/OHK-8in52yhn/) | Creates a local user with no usable password and assigns roles in a group, returning the edit link where the admin sets the password; an existing user only gets the roles. | CloudBolt Plug-in | [POC Onboarding: User](mcp_tool_actions/MTA-tuzkb8h4/README.md) | -| POC Onboarding: Verify LDAP | [OHK-j82f4ibp](plugins/OHK-j82f4ibp/) | Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it. | CloudBolt Plug-in | [POC Onboarding: Verify LDAP](mcp_tool_actions/MTA-kw8krevn/README.md) | -| POC Onboarding: Verify Resource Handler | [OHK-s7cdvkpr](plugins/OHK-s7cdvkpr/) | Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool. | CloudBolt Plug-in | [POC Onboarding: Verify Resource Handler](mcp_tool_actions/MTA-r5v1eblg/README.md) | | Prepare OpenShift Pod Network | [OHK-zsv5qq15](plugins/OHK-zsv5qq15/) | Adds the Pod networking record CloudBolt looks up under the namespace of each OpenShift Virtualization environment in the order, so server builds outside the default namespace do not fail at Adjusting NICs. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](blueprints/BP-sy5pb325/README.md) | | Publish VM HTTPS Route | [OHK-njnsxqbf](plugins/OHK-njnsxqbf/) | Publishes an OpenShift Virtualization VM's HTTPS port outside the cluster with a re-encrypt Route and stores the URL on the resource. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](blueprints/BP-sy5pb325/README.md) | | Remove from StormForge | [OHK-vdr6oo2z](plugins/OHK-vdr6oo2z/) | After an EKS, AKS or GKE cluster is deleted, deletes the cluster in StormForge. | CloudBolt Plug-in | [AWS EKS](blueprints/BP-r5apcf7e/README.md), [Azure Kubernetes Service](blueprints/BP-20q58q9z/README.md), [Google Kubernetes Engine](blueprints/BP-g8g8aecx/README.md) | diff --git a/blueprints/BP-x78p48gz/BP-x78p48gz_metadata.json b/blueprints/BP-x78p48gz/BP-x78p48gz_metadata.json new file mode 100644 index 00000000..a3f6114c --- /dev/null +++ b/blueprints/BP-x78p48gz/BP-x78p48gz_metadata.json @@ -0,0 +1,134 @@ +{ + "any_group_can_deploy": true, + "auto_historical_resources": false, + "deployment_items": [ + { + "all_environments_enabled": true, + "allowed_os_families": [], + "applications": null, + "deploy_seq": 1, + "description": "", + "environment_selection_orchestration": null, + "execute_in_parallel": false, + "hostname_template": "srv-{{ group.name|lower|slice:\":3\" }}-{{ os_family.get_base_name|lower|first }}-00X", + "id": "BDI-on6ut7bd", + "name": "Server", + "os_build": null, + "rate": null, + "restrict_applications": false, + "show_on_order_form": false, + "tier_type": "server" + }, + { + "action_name": "Hello World (Linux)", + "continue_on_failure": true, + "dependencies": { + "hook": "plugins/OHK-818zw61m" + }, + "deploy_seq": 2, + "description": "", + "enabled": true, + "execute_in_parallel": false, + "id": "BDI-scs7x6ha", + "name": "Hello World (Linux)", + "rate": null, + "run_on_scale_up": true, + "show_on_order_form": false, + "tier_type": "script" + }, + { + "action_name": "Hello World (Windows)", + "continue_on_failure": true, + "dependencies": { + "hook": "plugins/OHK-u7j8o0vm" + }, + "deploy_seq": 3, + "description": "", + "enabled": true, + "execute_in_parallel": false, + "id": "BDI-jm8jq828", + "name": "Hello World (Windows)", + "rate": null, + "run_on_scale_up": true, + "show_on_order_form": false, + "tier_type": "script" + } + ], + "deployment_permissions": [], + "description": "Deploys one server into any environment, runs a Hello World script inside the guest (Bash on Linux, PowerShell on Windows) and asks for the application and maintenance window, whose options come from Python.", + "favorited": false, + "icon": "standard_server.png", + "id": "BP-x78p48gz", + "is_orderable": true, + "labels": [], + "last_updated": "2026-11-09", + "management_actions": [], + "metadata_version": "2026.1.0", + "name": "Standard Server", + "parameters": [ + { + "allow_multiple": false, + "available_all_servers": false, + "constraints": "Unconstrained", + "description": "Business application this server belongs to; the choices come from the Generate options for 'Application' action.", + "destination": "Build Items", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "gen_options_hooks": [ + { + "dependencies": { + "orchestration_hook": "orchestration_actions/HPA-2ud31gkx" + }, + "enabled": true, + "name": "Generate options for 'Application'" + } + ], + "global_options": [], + "id": "CF-15yw228m", + "label": "Application", + "name": "application", + "options": [], + "placeholder": null, + "relevant_osfamilies": [], + "required": true, + "show_as_attribute": true, + "show_on_servers": true, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "constraints": "Unconstrained", + "description": "Weekly window when the server may be patched and rebooted; the choices come from the Generate options for 'Maintenance Window' action.", + "destination": "Build Items", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "gen_options_hooks": [ + { + "dependencies": { + "orchestration_hook": "orchestration_actions/HPA-onelxnkw" + }, + "enabled": true, + "name": "Generate options for 'Maintenance Window'" + } + ], + "global_options": [], + "id": "CF-cei72k8x", + "label": "Maintenance Window", + "name": "maintenance_window", + "options": [], + "placeholder": null, + "relevant_osfamilies": [], + "required": true, + "show_as_attribute": true, + "show_on_servers": true, + "type": "STR", + "value_pattern_string": null + } + ], + "resource_name_template": null, + "sequence": 0, + "show_recipient_field_on_order_form": false, + "teardown_items": [] +} diff --git a/blueprints/BP-x78p48gz/README.md b/blueprints/BP-x78p48gz/README.md new file mode 100644 index 00000000..82b73bca --- /dev/null +++ b/blueprints/BP-x78p48gz/README.md @@ -0,0 +1,22 @@ +# Standard Server + +Deploys one server into any environment the ordering group may use, runs a Hello World script inside the guest (Bash on Linux, PowerShell on Windows; the script that does not match the OS family is skipped), and asks for the application and maintenance window, whose options Python actions generate. It covers the test plan's post-provisioning automation (1.1.3), in-guest scripts in PowerShell and Bash (4.3.2, 4.3.3) and Python-generated parameter options (4.3.1). + +## Contents +| Role | ID | Name | +|---|---|---| +| Blueprint | BP-x78p48gz | Standard Server | +| Remote Script (Linux) | [OHK-818zw61m](../../plugins/OHK-818zw61m/) | Hello World (Linux) | +| Remote Script (Windows) | [OHK-u7j8o0vm](../../plugins/OHK-u7j8o0vm/) | Hello World (Windows) | +| Generated options action | [HPA-2ud31gkx](../../orchestration_actions/HPA-2ud31gkx/README.md) | Generate options for 'Application' | +| Generated options action | [HPA-onelxnkw](../../orchestration_actions/HPA-onelxnkw/README.md) | Generate options for 'Maintenance Window' | + +## Prerequisites +- An environment with an OS build whose image has working guest credentials: CloudBolt reaches Linux over SSH (port 22) and Windows over WinRM (5985 or 5986) from the appliance. Set the credentials on the OS build or the server. +- The ordering group may deploy into the environment. The blueprint is open to every group. +- No other parameter named `application` or `maintenance_window` on the appliance, or agreement that the blueprint uses it: a sync reuses an existing parameter with the same name. `onb_status` lists such parameters under `parameterConflicts`. + +## Setup +1. Sync `blueprints/BP-x78p48gz` (the scripts and both generated-options actions come with it); the onboarding skill does this in its extensibility phase with `sync_from_source_control_repo`, after checking `parameterConflicts`. +2. Order it: pick the environment and OS build, an application and a maintenance window, submit. The job log of the Hello World item shows the message printed inside the guest. +3. The server carries `application` and `maintenance_window` as attributes; map them to cloud tags with `onb_tag_mapping` (`application=Application`, `maintenance_window=MaintenanceWindow`). diff --git a/blueprints/BP-x78p48gz/standard_server.png b/blueprints/BP-x78p48gz/standard_server.png new file mode 100644 index 00000000..55ede5f8 Binary files /dev/null and b/blueprints/BP-x78p48gz/standard_server.png differ diff --git a/blueprints/README.md b/blueprints/README.md index cb36e8c1..9a80198e 100644 --- a/blueprints/README.md +++ b/blueprints/README.md @@ -38,6 +38,7 @@ Orderable resources. Each folder has a README with contents, prerequisites, and | Run an Azure PowerShell Script (Deployment Script) | [BP-qo1stxre](BP-qo1stxre/README.md) | Runs one of a catalog of Azure PowerShell Remote Scripts against the Azure subscription of a chosen Environment in a Microsoft-managed container started per run through an ARM deployment script, with no server to maintain and the sign-in handled by CloudBolt from the environment's resource handler. | | Run Aria Orchestrator Workflow | [BP-f5y1fhe9](BP-f5y1fhe9/README.md) | Runs an Aria Orchestrator workflow as a CloudBolt resource build, stores the workflow outputs on the resource, and runs it again with teardown parameters on delete. | | Server with Data Disks | [BP-g9zwqjoa](BP-g9zwqjoa/README.md) | Deploys a Windows Server or Oracle Linux VM whose order form turns the environment's disk_map parameter into a table of data disks, which the disk map orchestration actions attach and prepare inside the guest. | +| Standard Server | [BP-x78p48gz](BP-x78p48gz/README.md) | Deploys one server into any environment, runs a Hello World script inside the guest (Bash on Linux, PowerShell on Windows) and asks for the application and maintenance window, whose options come from Python. | | Windows File Server | [BP-psw7rclb](BP-psw7rclb/README.md) | Deploys a Windows server and installs the File Server role. | | Windows Server with Data Disks | [BP-9ph7xcok](BP-9ph7xcok/README.md) | Deploys a Windows Server 2025 VM with an order-time list of data disks, attaching each one and then matching it inside the guest by serial number or SCSI address to initialize, letter, label, and format it. | | Windows VM with Workflow | [BP-6ddlyguv](BP-6ddlyguv/README.md) | Deploys a Windows VM and then runs a Windows workflow on it, either one the order form offers or one an admin pins on the Run Workflow build item. | diff --git a/catalog.json b/catalog.json index aa507106..1c7c85c6 100644 --- a/catalog.json +++ b/catalog.json @@ -637,6 +637,21 @@ "packages/PKG-v20qv308" ] }, + { + "id": "BP-x78p48gz", + "type": "blueprints", + "name": "Standard Server", + "description": "Deploys one server into any environment, runs a Hello World script inside the guest (Bash on Linux, PowerShell on Windows) and asks for the application and maintenance window, whose options come from Python.", + "path": "blueprints/BP-x78p48gz", + "readme": "blueprints/BP-x78p48gz/README.md", + "uses": [ + "orchestration_actions/HPA-2ud31gkx", + "orchestration_actions/HPA-onelxnkw", + "plugins/OHK-818zw61m", + "plugins/OHK-u7j8o0vm" + ], + "used_by": [] + }, { "id": "BP-zmeot1ff", "type": "blueprints", @@ -1211,7 +1226,7 @@ { "id": "MTA-0689nxjy", "type": "mcp_tool_actions", - "name": "POC Onboarding: Tag Mapping", + "name": "Onboarding: Tag Mapping", "description": "Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag.", "path": "mcp_tool_actions/MTA-0689nxjy", "readme": "mcp_tool_actions/MTA-0689nxjy/README.md", @@ -1228,8 +1243,8 @@ { "id": "MTA-0dr8xi4i", "type": "mcp_tool_actions", - "name": "POC Onboarding: Import OS Build", - "description": "Imports one image (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing an existing build of the same name so one build spans handlers, and attaches the build to the handler's environments.", + "name": "Onboarding: Import OS Build", + "description": "Lists a handler's cached images for a location or imports one (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing a build of the same name so one build spans handlers, refreshing an empty cache without the whitelist, and attaching the build to the environments.", "path": "mcp_tool_actions/MTA-0dr8xi4i", "readme": "mcp_tool_actions/MTA-0dr8xi4i/README.md", "uses": [ @@ -1245,7 +1260,7 @@ { "id": "MTA-1985b88g", "type": "mcp_tool_actions", - "name": "POC Onboarding: Status", + "name": "Onboarding: Status", "description": "Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links.", "path": "mcp_tool_actions/MTA-1985b88g", "readme": "mcp_tool_actions/MTA-1985b88g/README.md", @@ -1259,6 +1274,40 @@ "packages/PKG-8aaadefz" ] }, + { + "id": "MTA-20u1ney4", + "type": "mcp_tool_actions", + "name": "Onboarding: Environment Networks", + "description": "Lists the networks an environment can offer on its first NIC and makes the chosen ones, up to five, its only NIC 1 choices, removing networks from every other NIC.", + "path": "mcp_tool_actions/MTA-20u1ney4", + "readme": "mcp_tool_actions/MTA-20u1ney4/README.md", + "uses": [ + "plugins/OHK-0u7aonmo" + ], + "used_by": [], + "enabled": true, + "mcp_tool_name": "onb_environment_networks", + "packages": [ + "packages/PKG-8aaadefz" + ] + }, + { + "id": "MTA-36j661yp", + "type": "mcp_tool_actions", + "name": "Onboarding: Failed Servers", + "description": "Lists servers left in Provision Failed state by failed orders and deletes the ones named, removing their VMs from the cloud when they exist.", + "path": "mcp_tool_actions/MTA-36j661yp", + "readme": "mcp_tool_actions/MTA-36j661yp/README.md", + "uses": [ + "plugins/OHK-ep5vo2nu" + ], + "used_by": [], + "enabled": true, + "mcp_tool_name": "onb_failed_servers", + "packages": [ + "packages/PKG-8aaadefz" + ] + }, { "id": "MTA-543b19sa", "type": "mcp_tool_actions", @@ -1279,7 +1328,7 @@ { "id": "MTA-6zxrhdls", "type": "mcp_tool_actions", - "name": "POC Onboarding: Install", + "name": "Onboarding: Install", "description": "Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version.", "path": "mcp_tool_actions/MTA-6zxrhdls", "readme": "mcp_tool_actions/MTA-6zxrhdls/README.md", @@ -1296,7 +1345,7 @@ { "id": "MTA-70aez9bm", "type": "mcp_tool_actions", - "name": "POC Onboarding: Parameter", + "name": "Onboarding: Parameter", "description": "Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease.", "path": "mcp_tool_actions/MTA-70aez9bm", "readme": "mcp_tool_actions/MTA-70aez9bm/README.md", @@ -1313,7 +1362,7 @@ { "id": "MTA-89dxppus", "type": "mcp_tool_actions", - "name": "POC Onboarding: Handler Locations", + "name": "Onboarding: Handler Locations", "description": "Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs.", "path": "mcp_tool_actions/MTA-89dxppus", "readme": "mcp_tool_actions/MTA-89dxppus/README.md", @@ -1330,7 +1379,7 @@ { "id": "MTA-89w58iux", "type": "mcp_tool_actions", - "name": "POC Onboarding: SMTP Settings", + "name": "Onboarding: SMTP Settings", "description": "Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings.", "path": "mcp_tool_actions/MTA-89w58iux", "readme": "mcp_tool_actions/MTA-89w58iux/README.md", @@ -1378,8 +1427,8 @@ { "id": "MTA-92b836jb", "type": "mcp_tool_actions", - "name": "POC Onboarding: Playbook", - "description": "Returns a section of the POC onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure.", + "name": "Onboarding: Playbook", + "description": "Returns a section of the onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure.", "path": "mcp_tool_actions/MTA-92b836jb", "readme": "mcp_tool_actions/MTA-92b836jb/README.md", "uses": [ @@ -1423,7 +1472,7 @@ { "id": "MTA-bp0rkcq9", "type": "mcp_tool_actions", - "name": "POC Onboarding: Action Approval", + "name": "Onboarding: Action Approval", "description": "Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver.", "path": "mcp_tool_actions/MTA-bp0rkcq9", "readme": "mcp_tool_actions/MTA-bp0rkcq9/README.md", @@ -1437,10 +1486,27 @@ "packages/PKG-8aaadefz" ] }, + { + "id": "MTA-ckumouj0", + "type": "mcp_tool_actions", + "name": "Onboarding: CIT Test from Order", + "description": "Turns a finished blueprint order into a Continuous Infrastructure Testing test, the same as the order page's Add to CIT action.", + "path": "mcp_tool_actions/MTA-ckumouj0", + "readme": "mcp_tool_actions/MTA-ckumouj0/README.md", + "uses": [ + "plugins/OHK-yjow1qql" + ], + "used_by": [], + "enabled": true, + "mcp_tool_name": "onb_cit_from_order", + "packages": [ + "packages/PKG-8aaadefz" + ] + }, { "id": "MTA-cpq7bvz4", "type": "mcp_tool_actions", - "name": "POC Onboarding: Group", + "name": "Onboarding: Group", "description": "Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items.", "path": "mcp_tool_actions/MTA-cpq7bvz4", "readme": "mcp_tool_actions/MTA-cpq7bvz4/README.md", @@ -1457,7 +1523,7 @@ { "id": "MTA-e5qv0zay", "type": "mcp_tool_actions", - "name": "POC Onboarding: LDAP Mapping", + "name": "Onboarding: LDAP Mapping", "description": "Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login.", "path": "mcp_tool_actions/MTA-e5qv0zay", "readme": "mcp_tool_actions/MTA-e5qv0zay/README.md", @@ -1483,12 +1549,15 @@ ], "used_by": [], "enabled": true, - "mcp_tool_name": "run_cit_tests" + "mcp_tool_name": "run_cit_tests", + "packages": [ + "packages/PKG-8aaadefz" + ] }, { "id": "MTA-hwg74btd", "type": "mcp_tool_actions", - "name": "POC Onboarding: Recent Errors", + "name": "Onboarding: Recent Errors", "description": "Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most.", "path": "mcp_tool_actions/MTA-hwg74btd", "readme": "mcp_tool_actions/MTA-hwg74btd/README.md", @@ -1505,7 +1574,7 @@ { "id": "MTA-i1kmy5fd", "type": "mcp_tool_actions", - "name": "POC Onboarding: Configure Custom Server", + "name": "Onboarding: Configure Custom Server", "description": "Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments.", "path": "mcp_tool_actions/MTA-i1kmy5fd", "readme": "mcp_tool_actions/MTA-i1kmy5fd/README.md", @@ -1522,8 +1591,8 @@ { "id": "MTA-i6p4j2l7", "type": "mcp_tool_actions", - "name": "POC Onboarding: Import Environments", - "description": "Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced, vCenter cluster networks attached to NIC 1), and reports existing environments instead of duplicating them.", + "name": "Onboarding: Import Environments", + "description": "Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced; vCenter networks are chosen afterwards with onb_environment_networks), and reports existing environments instead of duplicating them.", "path": "mcp_tool_actions/MTA-i6p4j2l7", "readme": "mcp_tool_actions/MTA-i6p4j2l7/README.md", "uses": [ @@ -1539,8 +1608,8 @@ { "id": "MTA-iyknuxox", "type": "mcp_tool_actions", - "name": "POC Onboarding: Trim Environment Order Form", - "description": "Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size and, where needed, the network and password; the report profile only lists the current form.", + "name": "Onboarding: Trim Environment Order Form", + "description": "Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size, the NIC 1 networks chosen with onb_environment_networks and, where needed, the password; the report profile only lists the current form.", "path": "mcp_tool_actions/MTA-iyknuxox", "readme": "mcp_tool_actions/MTA-iyknuxox/README.md", "uses": [ @@ -1570,7 +1639,7 @@ { "id": "MTA-jzscq0mk", "type": "mcp_tool_actions", - "name": "POC Onboarding: Failure Trace", + "name": "Onboarding: Failure Trace", "description": "Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback.", "path": "mcp_tool_actions/MTA-jzscq0mk", "readme": "mcp_tool_actions/MTA-jzscq0mk/README.md", @@ -1587,7 +1656,7 @@ { "id": "MTA-kw8krevn", "type": "mcp_tool_actions", - "name": "POC Onboarding: Verify LDAP", + "name": "Onboarding: Verify LDAP", "description": "Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it.", "path": "mcp_tool_actions/MTA-kw8krevn", "readme": "mcp_tool_actions/MTA-kw8krevn/README.md", @@ -1635,7 +1704,7 @@ { "id": "MTA-p72v9y76", "type": "mcp_tool_actions", - "name": "POC Onboarding: Set Item Status", + "name": "Onboarding: Set Item Status", "description": "Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read.", "path": "mcp_tool_actions/MTA-p72v9y76", "readme": "mcp_tool_actions/MTA-p72v9y76/README.md", @@ -1649,10 +1718,27 @@ "packages/PKG-8aaadefz" ] }, + { + "id": "MTA-po1gmnou", + "type": "mcp_tool_actions", + "name": "Onboarding: Sync Images", + "description": "Fills a resource handler's image cache now without the image whitelist and enables the recurring job and rule that keep it fresh, so the image pickers and onb_import_os_build see every image the credentials can.", + "path": "mcp_tool_actions/MTA-po1gmnou", + "readme": "mcp_tool_actions/MTA-po1gmnou/README.md", + "uses": [ + "plugins/OHK-bbhlwspa" + ], + "used_by": [], + "enabled": true, + "mcp_tool_name": "onb_sync_images", + "packages": [ + "packages/PKG-8aaadefz" + ] + }, { "id": "MTA-pz5o2gjl", "type": "mcp_tool_actions", - "name": "POC Onboarding: Remove Environment", + "name": "Onboarding: Remove Environment", "description": "Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it.", "path": "mcp_tool_actions/MTA-pz5o2gjl", "readme": "mcp_tool_actions/MTA-pz5o2gjl/README.md", @@ -1669,7 +1755,7 @@ { "id": "MTA-qab6r2gk", "type": "mcp_tool_actions", - "name": "POC Onboarding: SMTP Test", + "name": "Onboarding: SMTP Test", "description": "Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails.", "path": "mcp_tool_actions/MTA-qab6r2gk", "readme": "mcp_tool_actions/MTA-qab6r2gk/README.md", @@ -1686,7 +1772,7 @@ { "id": "MTA-r5v1eblg", "type": "mcp_tool_actions", - "name": "POC Onboarding: Verify Resource Handler", + "name": "Onboarding: Verify Resource Handler", "description": "Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool.", "path": "mcp_tool_actions/MTA-r5v1eblg", "readme": "mcp_tool_actions/MTA-r5v1eblg/README.md", @@ -1712,13 +1798,16 @@ ], "used_by": [], "enabled": true, - "mcp_tool_name": "run_recurring_job" + "mcp_tool_name": "run_recurring_job", + "packages": [ + "packages/PKG-8aaadefz" + ] }, { "id": "MTA-tuzkb8h4", "type": "mcp_tool_actions", - "name": "POC Onboarding: User", - "description": "Creates a local user with no usable password and assigns roles in a group, returning the edit link where the admin sets the password; an existing user only gets the roles.", + "name": "Onboarding: User", + "description": "Assigns roles in a group to a local POC user; a user that does not exist yet is added by the admin on the Users list with its password, and the tool says how.", "path": "mcp_tool_actions/MTA-tuzkb8h4", "readme": "mcp_tool_actions/MTA-tuzkb8h4/README.md", "uses": [ @@ -1731,10 +1820,61 @@ "packages/PKG-8aaadefz" ] }, + { + "id": "MTA-z3h0o9t3", + "type": "mcp_tool_actions", + "name": "Onboarding: Network Addressing", + "description": "Sets how servers on a network get their IP address (DHCP, static with gateway and netmask, a CloudBolt IP pool, an IPAM endpoint, or an IP typed per order) and verifies it with the network's IP provider.", + "path": "mcp_tool_actions/MTA-z3h0o9t3", + "readme": "mcp_tool_actions/MTA-z3h0o9t3/README.md", + "uses": [ + "plugins/OHK-gjfc20pv" + ], + "used_by": [], + "enabled": true, + "mcp_tool_name": "onb_network_addressing", + "packages": [ + "packages/PKG-8aaadefz" + ] + }, + { + "id": "MTA-zfoxwh12", + "type": "mcp_tool_actions", + "name": "Onboarding: Scorecard", + "description": "Builds the POC test plan scorecard from the recorded item statuses and live evidence on the appliance (orders, handlers, environments, groups, mappings, actions, jobs), per category with weights.", + "path": "mcp_tool_actions/MTA-zfoxwh12", + "readme": "mcp_tool_actions/MTA-zfoxwh12/README.md", + "uses": [ + "plugins/OHK-yqu8b25o" + ], + "used_by": [], + "enabled": true, + "mcp_tool_name": "onb_scorecard", + "packages": [ + "packages/PKG-8aaadefz" + ] + }, + { + "id": "MTA-znqpide5", + "type": "mcp_tool_actions", + "name": "Onboarding: Install Content Library Item", + "description": "Lists a Content Library collection or downloads one item from content.cloudbolt.app and imports it the way the library page does, for UI extensions, recurring jobs, server and resource actions, rules and blueprints.", + "path": "mcp_tool_actions/MTA-znqpide5", + "readme": "mcp_tool_actions/MTA-znqpide5/README.md", + "uses": [ + "plugins/OHK-kst5rkhi" + ], + "used_by": [], + "enabled": true, + "mcp_tool_name": "onb_install_content_library_item", + "packages": [ + "packages/PKG-8aaadefz" + ] + }, { "id": "MTA-zpohocjt", "type": "mcp_tool_actions", - "name": "POC Onboarding: UI Link", + "name": "Onboarding: UI Link", "description": "Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited.", "path": "mcp_tool_actions/MTA-zpohocjt", "readme": "mcp_tool_actions/MTA-zpohocjt/README.md", @@ -1795,6 +1935,22 @@ "hook_point": "Post Group Creation", "enabled": true }, + { + "id": "HPA-2ud31gkx", + "type": "orchestration_actions", + "name": "Generate options for 'Application'", + "description": "Fills the Application order-form parameter from Python with one list of business applications that every group sees.", + "path": "orchestration_actions/HPA-2ud31gkx", + "readme": "orchestration_actions/HPA-2ud31gkx/README.md", + "uses": [ + "plugins/OHK-f1ol9j5k" + ], + "used_by": [ + "blueprints/BP-x78p48gz" + ], + "hook_point": "Generated Parameter Options", + "enabled": true + }, { "id": "HPA-42uy9dyo", "type": "orchestration_actions", @@ -2013,6 +2169,22 @@ "hook_point": "Post-Provision", "enabled": true }, + { + "id": "HPA-onelxnkw", + "type": "orchestration_actions", + "name": "Generate options for 'Maintenance Window'", + "description": "Fills the Maintenance Window order-form parameter from Python with weekly two-hour UTC windows.", + "path": "orchestration_actions/HPA-onelxnkw", + "readme": "orchestration_actions/HPA-onelxnkw/README.md", + "uses": [ + "plugins/OHK-vwpjfa9d" + ], + "used_by": [ + "blueprints/BP-x78p48gz" + ], + "hook_point": "Generated Parameter Options", + "enabled": true + }, { "id": "HPA-q181uofy", "type": "orchestration_actions", @@ -2186,40 +2358,50 @@ { "id": "PKG-8aaadefz", "type": "packages", - "name": "POC Onboarding Toolkit", - "description": "Installs the MCP tools the POC onboarding skill drives: appliance status with next steps, admin UI links, log and failure diagnosis, resource handler verification and location import, environment creation, order-form trimming, OS build import, Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, the playbook text, the install step and POC item tracking, plus the repository sync, job log and blueprint permission tools they reuse.", + "name": "Onboarding Toolkit", + "description": "Installs the MCP tools the onboarding skill drives (appliance status with next steps, admin UI links, log and failure diagnosis, failed-server cleanup, resource handler verification, image cache sync and location import, environment creation, order-form trimming, OS build import, environment networks and their addressing (DHCP, static, IP pool, IPAM), Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, Content Library installs, CIT tests from orders, the scorecard, the playbook text, the install step and POC item tracking), the repository sync, job log and blueprint permission tools they reuse, and the echo webhook for the test plan's webhook item; the Standard Server blueprint is synced on its own after a parameter-name check.", "path": "packages/PKG-8aaadefz", "readme": "packages/PKG-8aaadefz/README.md", "uses": [], "used_by": [], - "version": "0.3.0", + "version": "0.8.0", "contents": [ - "mcp_tool_actions/MTA-6zxrhdls", - "mcp_tool_actions/MTA-1985b88g", - "mcp_tool_actions/MTA-zpohocjt", - "mcp_tool_actions/MTA-hwg74btd", - "mcp_tool_actions/MTA-jzscq0mk", - "mcp_tool_actions/MTA-r5v1eblg", - "mcp_tool_actions/MTA-92b836jb", - "mcp_tool_actions/MTA-p72v9y76", - "mcp_tool_actions/MTA-89dxppus", - "mcp_tool_actions/MTA-i6p4j2l7", - "mcp_tool_actions/MTA-iyknuxox", + "mcp_tool_actions/MTA-0689nxjy", "mcp_tool_actions/MTA-0dr8xi4i", - "mcp_tool_actions/MTA-i1kmy5fd", - "mcp_tool_actions/MTA-pz5o2gjl", + "mcp_tool_actions/MTA-1985b88g", + "mcp_tool_actions/MTA-20u1ney4", + "mcp_tool_actions/MTA-36j661yp", + "mcp_tool_actions/MTA-543b19sa", + "mcp_tool_actions/MTA-6zxrhdls", "mcp_tool_actions/MTA-70aez9bm", - "mcp_tool_actions/MTA-cpq7bvz4", - "mcp_tool_actions/MTA-tuzkb8h4", + "mcp_tool_actions/MTA-89dxppus", + "mcp_tool_actions/MTA-89w58iux", + "mcp_tool_actions/MTA-8j9c0tb0", + "mcp_tool_actions/MTA-92b836jb", "mcp_tool_actions/MTA-bp0rkcq9", - "mcp_tool_actions/MTA-0689nxjy", + "mcp_tool_actions/MTA-ckumouj0", + "mcp_tool_actions/MTA-cpq7bvz4", "mcp_tool_actions/MTA-e5qv0zay", + "mcp_tool_actions/MTA-gnx1ckno", + "mcp_tool_actions/MTA-hwg74btd", + "mcp_tool_actions/MTA-i1kmy5fd", + "mcp_tool_actions/MTA-i6p4j2l7", + "mcp_tool_actions/MTA-iyknuxox", + "mcp_tool_actions/MTA-jzscq0mk", "mcp_tool_actions/MTA-kw8krevn", - "mcp_tool_actions/MTA-89w58iux", + "mcp_tool_actions/MTA-ntmcnvv7", + "mcp_tool_actions/MTA-p72v9y76", + "mcp_tool_actions/MTA-po1gmnou", + "mcp_tool_actions/MTA-pz5o2gjl", "mcp_tool_actions/MTA-qab6r2gk", - "mcp_tool_actions/MTA-543b19sa", - "mcp_tool_actions/MTA-8j9c0tb0", - "mcp_tool_actions/MTA-ntmcnvv7" + "mcp_tool_actions/MTA-r5v1eblg", + "mcp_tool_actions/MTA-thkvyt0v", + "mcp_tool_actions/MTA-tuzkb8h4", + "mcp_tool_actions/MTA-z3h0o9t3", + "mcp_tool_actions/MTA-zfoxwh12", + "mcp_tool_actions/MTA-znqpide5", + "mcp_tool_actions/MTA-zpohocjt", + "webhooks/IWH-f16qxnhm" ] }, { @@ -2501,7 +2683,7 @@ { "id": "OHK-0nuhjdxl", "type": "plugins", - "name": "POC Onboarding: Handler Locations", + "name": "Onboarding: Handler Locations", "description": "Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs.", "path": "plugins/OHK-0nuhjdxl", "readme": null, @@ -2541,6 +2723,19 @@ ], "plugin_type": "Remote Script" }, + { + "id": "OHK-0u7aonmo", + "type": "plugins", + "name": "Onboarding: Environment Networks", + "description": "Lists the networks an environment can offer on its first NIC and makes the chosen ones, up to five, its only NIC 1 choices, removing networks from every other NIC.", + "path": "plugins/OHK-0u7aonmo", + "readme": null, + "uses": [], + "used_by": [ + "mcp_tool_actions/MTA-20u1ney4" + ], + "plugin_type": "CloudBolt Plug-in" + }, { "id": "OHK-0wtrj2wb", "type": "plugins", @@ -2557,8 +2752,8 @@ { "id": "OHK-1am7i73s", "type": "plugins", - "name": "POC Onboarding: Playbook", - "description": "Returns a section of the POC onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure.", + "name": "Onboarding: Playbook", + "description": "Returns a section of the onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure.", "path": "plugins/OHK-1am7i73s", "readme": null, "uses": [], @@ -2570,7 +2765,7 @@ { "id": "OHK-1gp25bmt", "type": "plugins", - "name": "POC Onboarding: UI Link", + "name": "Onboarding: UI Link", "description": "Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited.", "path": "plugins/OHK-1gp25bmt", "readme": null, @@ -2612,7 +2807,7 @@ { "id": "OHK-1wmzl7sp", "type": "plugins", - "name": "POC Onboarding: Remove Environment", + "name": "Onboarding: Remove Environment", "description": "Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it.", "path": "plugins/OHK-1wmzl7sp", "readme": null, @@ -2893,7 +3088,7 @@ { "id": "OHK-4vwq70dg", "type": "plugins", - "name": "POC Onboarding: Recent Errors", + "name": "Onboarding: Recent Errors", "description": "Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most.", "path": "plugins/OHK-4vwq70dg", "readme": null, @@ -2979,7 +3174,7 @@ { "id": "OHK-5885tete", "type": "plugins", - "name": "POC Onboarding: Set Item Status", + "name": "Onboarding: Set Item Status", "description": "Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read.", "path": "plugins/OHK-5885tete", "readme": null, @@ -3076,7 +3271,7 @@ { "id": "OHK-5zg1dkcr", "type": "plugins", - "name": "POC Onboarding: Status", + "name": "Onboarding: Status", "description": "Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links.", "path": "plugins/OHK-5zg1dkcr", "readme": null, @@ -3272,11 +3467,24 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-818zw61m", + "type": "plugins", + "name": "Hello World (Linux)", + "description": "Prints a hello message, the host name and the user inside a Linux guest to prove agentless script execution.", + "path": "plugins/OHK-818zw61m", + "readme": null, + "uses": [], + "used_by": [ + "blueprints/BP-x78p48gz" + ], + "plugin_type": "Remote Script" + }, { "id": "OHK-8in52yhn", "type": "plugins", - "name": "POC Onboarding: User", - "description": "Creates a local user with no usable password and assigns roles in a group, returning the edit link where the admin sets the password; an existing user only gets the roles.", + "name": "Onboarding: User", + "description": "Assigns roles in a group to a local POC user; a user that does not exist yet is added by the admin on the Users list with its password, and the tool says how.", "path": "plugins/OHK-8in52yhn", "readme": null, "uses": [], @@ -3288,8 +3496,8 @@ { "id": "OHK-8j06wtoe", "type": "plugins", - "name": "POC Onboarding: Import Environments", - "description": "Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced, vCenter cluster networks attached to NIC 1), and reports existing environments instead of duplicating them.", + "name": "Onboarding: Import Environments", + "description": "Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced; vCenter networks are chosen afterwards with onb_environment_networks), and reports existing environments instead of duplicating them.", "path": "plugins/OHK-8j06wtoe", "readme": null, "uses": [], @@ -3686,7 +3894,7 @@ { "id": "OHK-b8c90uok", "type": "plugins", - "name": "POC Onboarding: Tag Mapping", + "name": "Onboarding: Tag Mapping", "description": "Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag.", "path": "plugins/OHK-b8c90uok", "readme": null, @@ -3696,10 +3904,23 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-bbhlwspa", + "type": "plugins", + "name": "Onboarding: Sync Images", + "description": "Fills a resource handler's image cache now without the image whitelist and enables the recurring job and rule that keep it fresh, so the image pickers and onb_import_os_build see every image the credentials can.", + "path": "plugins/OHK-bbhlwspa", + "readme": null, + "uses": [], + "used_by": [ + "mcp_tool_actions/MTA-po1gmnou" + ], + "plugin_type": "CloudBolt Plug-in" + }, { "id": "OHK-be18kqal", "type": "plugins", - "name": "POC Onboarding: SMTP Settings", + "name": "Onboarding: SMTP Settings", "description": "Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings.", "path": "plugins/OHK-be18kqal", "readme": null, @@ -4115,7 +4336,7 @@ { "id": "OHK-efxm9m2b", "type": "plugins", - "name": "POC Onboarding: Group", + "name": "Onboarding: Group", "description": "Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items.", "path": "plugins/OHK-efxm9m2b", "readme": null, @@ -4154,6 +4375,19 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-ep5vo2nu", + "type": "plugins", + "name": "Onboarding: Failed Servers", + "description": "Lists servers left in Provision Failed state by failed orders and deletes the ones named, removing their VMs from the cloud when they exist.", + "path": "plugins/OHK-ep5vo2nu", + "readme": null, + "uses": [], + "used_by": [ + "mcp_tool_actions/MTA-36j661yp" + ], + "plugin_type": "CloudBolt Plug-in" + }, { "id": "OHK-exqmrl0e", "type": "plugins", @@ -4180,10 +4414,23 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-f1ol9j5k", + "type": "plugins", + "name": "Generate options for 'Application'", + "description": "Fills the Application dropdown from Python with a list of business applications, to show Python-backed parameter options.", + "path": "plugins/OHK-f1ol9j5k", + "readme": null, + "uses": [], + "used_by": [ + "orchestration_actions/HPA-2ud31gkx" + ], + "plugin_type": "CloudBolt Plug-in" + }, { "id": "OHK-f6kqrklx", "type": "plugins", - "name": "POC Onboarding: Parameter", + "name": "Onboarding: Parameter", "description": "Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease.", "path": "plugins/OHK-f6kqrklx", "readme": null, @@ -4251,6 +4498,19 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-gjfc20pv", + "type": "plugins", + "name": "Onboarding: Network Addressing", + "description": "Sets how servers on a network get their IP address (DHCP, static with gateway and netmask, a CloudBolt IP pool, an IPAM endpoint, or an IP typed per order) and verifies it with the network's IP provider.", + "path": "plugins/OHK-gjfc20pv", + "readme": null, + "uses": [], + "used_by": [ + "mcp_tool_actions/MTA-z3h0o9t3" + ], + "plugin_type": "CloudBolt Plug-in" + }, { "id": "OHK-gqvi9kv4", "type": "plugins", @@ -4369,7 +4629,7 @@ { "id": "OHK-ilstyopk", "type": "plugins", - "name": "POC Onboarding: Configure Custom Server", + "name": "Onboarding: Configure Custom Server", "description": "Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments.", "path": "plugins/OHK-ilstyopk", "readme": null, @@ -4409,7 +4669,7 @@ { "id": "OHK-j60flmb3", "type": "plugins", - "name": "POC Onboarding: Install", + "name": "Onboarding: Install", "description": "Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version.", "path": "plugins/OHK-j60flmb3", "readme": null, @@ -4422,7 +4682,7 @@ { "id": "OHK-j82f4ibp", "type": "plugins", - "name": "POC Onboarding: Verify LDAP", + "name": "Onboarding: Verify LDAP", "description": "Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it.", "path": "plugins/OHK-j82f4ibp", "readme": null, @@ -4448,7 +4708,7 @@ { "id": "OHK-jdyan3in", "type": "plugins", - "name": "POC Onboarding: SMTP Test", + "name": "Onboarding: SMTP Test", "description": "Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails.", "path": "plugins/OHK-jdyan3in", "readme": null, @@ -4544,8 +4804,8 @@ { "id": "OHK-k2p8ll4p", "type": "plugins", - "name": "POC Onboarding: Import OS Build", - "description": "Imports one image (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing an existing build of the same name so one build spans handlers, and attaches the build to the handler's environments.", + "name": "Onboarding: Import OS Build", + "description": "Lists a handler's cached images for a location or imports one (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing a build of the same name so one build spans handlers, refreshing an empty cache without the whitelist, and attaching the build to the environments.", "path": "plugins/OHK-k2p8ll4p", "readme": null, "uses": [], @@ -4583,6 +4843,19 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-kst5rkhi", + "type": "plugins", + "name": "Onboarding: Install Content Library Item", + "description": "Lists a Content Library collection or downloads one item from content.cloudbolt.app and imports it the way the library page does, for UI extensions, recurring jobs, server and resource actions, rules and blueprints.", + "path": "plugins/OHK-kst5rkhi", + "readme": null, + "uses": [], + "used_by": [ + "mcp_tool_actions/MTA-znqpide5" + ], + "plugin_type": "CloudBolt Plug-in" + }, { "id": "OHK-kujhsds0", "type": "plugins", @@ -4854,7 +5127,7 @@ { "id": "OHK-ndsuxv0k", "type": "plugins", - "name": "POC Onboarding: Action Approval", + "name": "Onboarding: Action Approval", "description": "Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver.", "path": "plugins/OHK-ndsuxv0k", "readme": null, @@ -5276,8 +5549,8 @@ { "id": "OHK-qn4k1pme", "type": "plugins", - "name": "POC Onboarding: Trim Environment Order Form", - "description": "Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size and, where needed, the network and password; the report profile only lists the current form.", + "name": "Onboarding: Trim Environment Order Form", + "description": "Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size, the NIC 1 networks chosen with onb_environment_networks and, where needed, the password; the report profile only lists the current form.", "path": "plugins/OHK-qn4k1pme", "readme": null, "uses": [], @@ -5345,7 +5618,7 @@ { "id": "OHK-s76tknmk", "type": "plugins", - "name": "POC Onboarding: LDAP Mapping", + "name": "Onboarding: LDAP Mapping", "description": "Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login.", "path": "plugins/OHK-s76tknmk", "readme": null, @@ -5358,7 +5631,7 @@ { "id": "OHK-s7cdvkpr", "type": "plugins", - "name": "POC Onboarding: Verify Resource Handler", + "name": "Onboarding: Verify Resource Handler", "description": "Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool.", "path": "plugins/OHK-s7cdvkpr", "readme": null, @@ -5541,6 +5814,19 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-u7j8o0vm", + "type": "plugins", + "name": "Hello World (Windows)", + "description": "Prints a hello message, the computer name and the user inside a Windows guest to prove agentless script execution.", + "path": "plugins/OHK-u7j8o0vm", + "readme": null, + "uses": [], + "used_by": [ + "blueprints/BP-x78p48gz" + ], + "plugin_type": "Remote Script" + }, { "id": "OHK-u9jm7p8h", "type": "plugins", @@ -5800,6 +6086,32 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-vwpjfa9d", + "type": "plugins", + "name": "Generate options for 'Maintenance Window'", + "description": "Fills the Maintenance Window dropdown with weekly two-hour UTC windows computed in Python.", + "path": "plugins/OHK-vwpjfa9d", + "readme": null, + "uses": [], + "used_by": [ + "orchestration_actions/HPA-onelxnkw" + ], + "plugin_type": "CloudBolt Plug-in" + }, + { + "id": "OHK-w78lalkx", + "type": "plugins", + "name": "Echo", + "description": "Returns the posted JSON or query fields with the calling user and the time, proving a synchronous authenticated call into CloudBolt.", + "path": "plugins/OHK-w78lalkx", + "readme": null, + "uses": [], + "used_by": [ + "webhooks/IWH-f16qxnhm" + ], + "plugin_type": "CloudBolt Plug-in" + }, { "id": "OHK-w8exctx7", "type": "plugins", @@ -5958,7 +6270,7 @@ { "id": "OHK-y95w8ai0", "type": "plugins", - "name": "POC Onboarding: Failure Trace", + "name": "Onboarding: Failure Trace", "description": "Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback.", "path": "plugins/OHK-y95w8ai0", "readme": null, @@ -6058,6 +6370,19 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-yjow1qql", + "type": "plugins", + "name": "Onboarding: CIT Test from Order", + "description": "Turns a finished blueprint order into a Continuous Infrastructure Testing test, the same as the order page's Add to CIT action.", + "path": "plugins/OHK-yjow1qql", + "readme": null, + "uses": [], + "used_by": [ + "mcp_tool_actions/MTA-ckumouj0" + ], + "plugin_type": "CloudBolt Plug-in" + }, { "id": "OHK-yqrralqk", "type": "plugins", @@ -6073,6 +6398,19 @@ ], "plugin_type": "CloudBolt Plug-in" }, + { + "id": "OHK-yqu8b25o", + "type": "plugins", + "name": "Onboarding: Scorecard", + "description": "Builds the POC test plan scorecard from the recorded item statuses and live evidence on the appliance (orders, handlers, environments, groups, mappings, actions, jobs), per category with weights.", + "path": "plugins/OHK-yqu8b25o", + "readme": null, + "uses": [], + "used_by": [ + "mcp_tool_actions/MTA-zfoxwh12" + ], + "plugin_type": "CloudBolt Plug-in" + }, { "id": "OHK-ys68wsmf", "type": "plugins", @@ -8030,6 +8368,22 @@ "packages/PKG-v20qv308" ] }, + { + "id": "IWH-f16qxnhm", + "type": "webhooks", + "name": "Echo", + "description": "Endpoint that returns the posted JSON with the calling user and the time, so an external system can prove a synchronous authenticated call into CloudBolt.", + "path": "webhooks/IWH-f16qxnhm", + "readme": null, + "uses": [ + "plugins/OHK-w78lalkx" + ], + "used_by": [], + "enabled": true, + "packages": [ + "packages/PKG-8aaadefz" + ] + }, { "id": "IWH-i7b44zvs", "type": "webhooks", diff --git a/docs/onboarding-setup.md b/docs/onboarding-setup.md new file mode 100644 index 00000000..69e85d98 --- /dev/null +++ b/docs/onboarding-setup.md @@ -0,0 +1,148 @@ +# Onboarding — Setup + +Get an AI agent ready to take a new CloudBolt appliance through the POC Test Plan. After these steps the agent does the rest: it reads what is configured, sends you a link for every step that needs a password or key, verifies each resource handler, reads the appliance's own logs when something fails, orders the Custom Server blueprint through MCP, and keeps the scorecard. The procedure the agent follows is [.claude/skills/cb-onboarding/SKILL.md](../.claude/skills/cb-onboarding/SKILL.md); agents without skill support fetch the same text with the `onb_playbook` tool. + +## 1. Appliance + +1. CloudBolt 2026.2.48 or later, licensed, reachable at `https://`. The MCP server is on by default at `https:///mcp`. +2. An account that is a CloudBolt admin (super admin or CB admin). Every onboarding tool refuses other callers. +3. Outbound HTTPS from the appliance to `github.com` and `raw.githubusercontent.com` (to fetch the toolkit and the playbook) and to `content.cloudbolt.app` (Content Library). Set the web proxy under Admin > Miscellaneous Settings if one is required. +4. Root access to the appliance's shell, for the certificate (section 2) and one web server restart (section 4). + +## 2. Appliance certificate + +The appliance ships with a self-signed certificate created when the image was built. It names the build host, not your appliance, so MCP clients refuse it with `self signed certificate in certificate chain`, and with a hostname mismatch once it is trusted. Replace it before connecting, then trust it in Claude. + +### Option 1: self-signed certificate for the appliance's address + +The usual choice for a POC. As root on the appliance, with the IP users connect to: + +```bash +IP= +cp -p /etc/pki/tls/certs/localhost.crt /root/localhost.crt.bak +cp -p /etc/pki/tls/private/localhost.key /root/localhost.key.bak +openssl req -x509 -newkey rsa:2048 -sha256 -days 825 -nodes -subj "/CN=$IP" -addext "subjectAltName=IP:$IP" -keyout /etc/pki/tls/private/localhost.key -out /etc/pki/tls/certs/localhost.crt +chown --reference=/root/localhost.crt.bak /etc/pki/tls/certs/localhost.crt /etc/pki/tls/private/localhost.key +chmod 400 /etc/pki/tls/certs/localhost.crt /etc/pki/tls/private/localhost.key +systemctl restart httpd +openssl x509 -noout -fingerprint -sha256 -in /etc/pki/tls/certs/localhost.crt +``` + +When users reach the appliance by a DNS name, use `subjectAltName=IP:$IP,DNS:`. Note the printed SHA-256 fingerprint for the trust step. The original files stay in `/root`. + +### Option 2: the customer's certificate for a DNS name + +Create a DNS record for the appliance and request a certificate for that name from the customer's CA or a public CA. Put the certificate, followed by any intermediate certificates, in `/etc/pki/tls/certs/localhost.crt` and its key in `/etc/pki/tls/private/localhost.key`, then run the `chown`, `chmod` and `systemctl` lines above. Connect with `https:///mcp`. Claude Code reads the operating system's certificate store (native install, or npm with Node 22.15 or later), so a PC that already trusts the customer's CA skips the next step. Otherwise trust the CA's root certificate as below. + +### Trust the certificate in Claude + +Claude Code, in a terminal or in the Claude desktop app's Code tab, trusts the certificates in the file named by `NODE_EXTRA_CA_CERTS` and reads the variable at startup. Each block downloads the appliance's certificate, prints its SHA-256 fingerprint, and sets the variable. Compare the fingerprint with the one the appliance printed before you rely on it. + +Windows (PowerShell): + +```powershell +$appliance = "" +New-Item -ItemType Directory -Force "$HOME\certs" | Out-Null +$tcp = New-Object Net.Sockets.TcpClient($appliance, 443) +$ssl = New-Object Net.Security.SslStream($tcp.GetStream(), $false, ({ $true } -as [Net.Security.RemoteCertificateValidationCallback])) +$ssl.AuthenticateAsClient($appliance) +$cert = New-Object Security.Cryptography.X509Certificates.X509Certificate2($ssl.RemoteCertificate) +$ssl.Dispose(); $tcp.Dispose() +$b64 = [Convert]::ToBase64String($cert.RawData) -replace '(.{64})', "`$1`n" +"-----BEGIN CERTIFICATE-----`n$($b64.TrimEnd())`n-----END CERTIFICATE-----" | Set-Content -Encoding ascii "$HOME\certs\cloudbolt.crt" +[BitConverter]::ToString([Security.Cryptography.SHA256]::Create().ComputeHash($cert.RawData)) -replace '-', ':' +setx NODE_EXTRA_CA_CERTS "$HOME\certs\cloudbolt.crt" +# Optional: Edge and Chrome stop warning too (Windows asks you to confirm) +certutil -user -addstore Root "$HOME\certs\cloudbolt.crt" +``` + +macOS and Linux: + +```bash +APPLIANCE="" +PROFILE=~/.zshrc # ~/.bashrc for bash +mkdir -p ~/certs +openssl s_client -connect "$APPLIANCE:443" /dev/null | openssl x509 -out ~/certs/cloudbolt.crt +openssl x509 -in ~/certs/cloudbolt.crt -noout -fingerprint -sha256 +echo 'export NODE_EXTRA_CA_CERTS="$HOME/certs/cloudbolt.crt"' >> "$PROFILE" +``` + +Then quit and reopen the terminal running Claude Code, or the Claude desktop app. Apps started from the Dock or a launcher may not read the shell profile; for the desktop app, or on any system, the variable can go in the `env` block of `~/.claude/settings.json` instead: + +```json +{ "env": { "NODE_EXTRA_CA_CERTS": "C:/Users//certs/cloudbolt.crt" } } +``` + +If `NODE_EXTRA_CA_CERTS` is already set, for example for a corporate proxy, append the appliance certificate to that file instead of replacing the variable. With option 2, skip the download and point the variable at the customer's root CA certificate, and only when the PC does not already trust it. Check: `claude --debug` logs `CA certs: Appended extra certificates from NODE_EXTRA_CA_CERTS`, and `/mcp` > the server > Authenticate no longer reports a certificate error. + +Other MCP clients: add the certificate to the client's trusted certificates as its documentation describes. Connectors added on claude.ai or in Claude Desktop's chat settings reach the server from Anthropic's cloud, so they need an appliance reachable from the internet with a publicly trusted certificate; use Claude Code for an appliance on a private network. + +## 3. Connect the agent + +1. **Get the skill.** Clone the repository and open a terminal in it. Claude Code loads the onboarding skill from the folder it starts in. + + ```bash + git clone https://github.com/mbomb67/cloudbolt-as-code + cd cloudbolt-as-code + ``` + +2. **Add the MCP server** with the address the certificate from section 2 names. `--scope user` makes it available from every folder; without it the server is tied to the folder you ran the command in. + + ```bash + claude mcp add --transport http --scope user cloudbolt https:///mcp + ``` + +3. **Sign in.** Start `claude` in the `cloudbolt-as-code` folder (in the Claude desktop app, choose that folder for the Code session). Run `/mcp`, choose `cloudbolt`, **Authenticate**, and sign in to CloudBolt in the browser window as the admin. Grant the `write` scope when asked; without it no custom tool runs. + +Check: ask "Who am I according to CloudBolt?" and the answer names your admin user. Any Streamable HTTP MCP client with OAuth support connects with the same URL. + +## 4. Install the toolkit (once) + +The toolkit installs through the Content Package Manager, a UI extension from the same repository. In the CloudBolt UI, signed in as the admin: + +1. **Add the repository.** Admin > Source Code Repositories > **Add** > **GitHub**, then enter: + - Label: `CloudBolt as Code` + - Repository URL: `https://github.com/mbomb67/cloudbolt-as-code` + - Auth method: Personal Access Token, with Username and Password or Token left empty, because the repository is public + + Leave the other fields at their defaults and save. +2. **Add the Content Package Manager.** Admin > Manage UI Extensions > **Add** > **Add package from Repository**. Repository `CloudBolt as Code`, branch `main`, extension JSON file `extensions/XUI-iq65xgvr/XUI-iq65xgvr_metadata.json` (the `content_packages` extension). Save. +3. **Restart the web server** as root on the appliance. The extension adds URL paths that the web server loads only at startup. + + ```bash + systemctl restart httpd + ``` + +4. **Import the package.** Admin > Admin Extensions > **Content Packages** > **Import from repository**. Choose `CloudBolt as Code` and branch `main`, select **Onboarding Toolkit** (`PKG-8aaadefz`) under Packages on this branch, then **Import**. +5. **Sync it.** The Sync dialog opens next. Keep the same repository and branch, check **Refresh content that already exists**, and click **Sync**. Each member syncs as its own job: the MCP tools, the Standard Server blueprint and the Echo webhook. The package's Last sync shows the result. + +## 5. Finish the install + +Ask the agent: "Run onb_install and tell me what changed." The importer leaves Synchronous Action off on every tool; `onb_install` turns it on where it belongs, enables every tool, checks outbound access, and reports. Then reconnect the MCP client (tool lists are cached per session). Check: "Run onb_status" answers inline with the appliance inventory. + +## 6. Start + +In Claude Code, started in the `cloudbolt-as-code` folder, run `/cb-onboarding` or say "Onboard CloudBolt for a POC". Have the [POC Test Plan](https://docs.cloudbolt.io) prerequisites at hand: the licence, the two clouds you will connect, credentials with the minimum permissions for each (the agent never asks for them; it sends you to the page where they are entered), and whether SMTP, LDAP, SSO or a DNS record for a branded portal are available. Anything that is not available is recorded as not applicable, not as a failure. + +## 7. Updating the toolkit + +Sync uses the member list saved at import, so import the package again first; that picks up tools added since. + +1. Admin > Admin Extensions > Content Packages > **Import from repository**. Choose `CloudBolt as Code` and branch `main`, select **Onboarding Toolkit**, then **Import**. The message says the package was updated from the repository. +2. The Sync dialog opens next. Keep the same repository and branch, check **Refresh content that already exists**, and click **Sync**. +3. Ask the agent to run `onb_install`, then reconnect the MCP client so it lists the new tools. + +## Troubleshooting + +| Symptom | Cause | Fix | +|---|---|---| +| `self signed certificate in certificate chain` when connecting | Claude does not trust the appliance's certificate | Section 2: replace it, set `NODE_EXTRA_CA_CERTS`, restart Claude | +| `does not match certificate's altnames` or `ERR_TLS_CERT_ALTNAME_INVALID` | The address in the MCP URL is not in the certificate | Regenerate it with that IP or DNS name (section 2, option 1), or connect with the name the certificate carries | +| `/mcp` does not list `cloudbolt` | The server was added without `--scope user`, from another folder | `claude mcp remove cloudbolt` in that folder, then add it again with `--scope user` (section 3) | +| `/cb-onboarding` is not available | Claude Code was started outside the repository folder | Start `claude` in the `cloudbolt-as-code` folder | +| A tool is missing from the agent's list | Cached tool list, or not imported | Reconnect the client; check Actions > MCP Tool Actions | +| Content Packages page missing or returns an error after the extension sync | The web server has not loaded the extension's URL paths | `systemctl restart httpd` as root on the appliance | +| Every custom tool fails with a scope error | Token has `read` only | Reconnect and grant `write` | +| A tool answers with a job id instead of a result | Synchronous Action off | Run `onb_install`, reconnect | +| `onb_playbook` fails | No egress to raw.githubusercontent.com | Open the `browserUrl` it returns | +| Tools refuse with "Only CloudBolt admins" | The signed-in user is not an admin | Sign in as a super admin or CB admin | diff --git a/docs/poc-onboarding-setup.md b/docs/poc-onboarding-setup.md deleted file mode 100644 index 08377d29..00000000 --- a/docs/poc-onboarding-setup.md +++ /dev/null @@ -1,69 +0,0 @@ -# POC Onboarding — Setup - -Get an AI agent ready to take a new CloudBolt appliance through the POC Test Plan. After these steps the agent does the rest: it reads what is configured, sends you a link for every step that needs a password or key, verifies each resource handler, reads the appliance's own logs when something fails, orders the Custom Server blueprint through MCP, and keeps the scorecard. The procedure the agent follows is [.claude/skills/cb-poc-onboarding/SKILL.md](../.claude/skills/cb-poc-onboarding/SKILL.md); agents without skill support fetch the same text with the `onb_playbook` tool. - -## 1. Appliance - -1. CloudBolt 2026.2.48 or later, licensed, reachable at `https://`. The MCP server is on by default at `https:///mcp`. -2. An account that is a CloudBolt admin (super admin or CB admin). Every onboarding tool refuses other callers. -3. Outbound HTTPS from the appliance to `github.com` and `raw.githubusercontent.com` (to fetch the toolkit and the playbook) and to `content.cloudbolt.app` (Content Library). Set the web proxy under Admin > Miscellaneous Settings if one is required. - -## 2. Connect the agent - -Claude Code: - -```bash -claude mcp add --transport http cloudbolt https:///mcp -``` - -Then `/mcp`, choose the server, and sign in to CloudBolt in the browser window as the admin. Grant the `write` scope when asked; without it no custom tool runs. Any Streamable HTTP MCP client with OAuth support connects the same way with the same URL. Check: ask "Who am I according to CloudBolt?" and the answer names your admin user. - -## 3. Install the toolkit (once) - -Pick one: - -**A. Content Package Manager** (when the extension from this repository is installed): Admin > Content Packages > Import from repository > `https://github.com/mbomb67/cloudbolt-as-code.git`, branch `main`, package **POC Onboarding Toolkit** > Sync. - -**B. Source Code Repository plus one API call.** Admin > All Admin > CloudBolt > Source Code Repositories > Add: any label, URL `https://github.com/mbomb67/cloudbolt-as-code.git`, no authentication (public repository), default paths. Note its `SCR-` id (`GET https:///api/v3/cmp/sourceCodeRepos/`). Then: - -```bash -CB_API_TOKEN=$(curl -sS -X POST "https:///api/v3/cmp/apiToken/" \ - -H "Content-Type: application/json" \ - -d '{"username": "", "password": ""}' | python -c "import json,sys; print(json.load(sys.stdin)['token'])") - -curl -sS -X POST "https:///api/v3/cmp/sourceCodeRepos//syncFromRepo/" \ - -H "Authorization: Bearer $CB_API_TOKEN" -H "Content-Type: application/json" \ - -d '{"branch": "main", "refreshIfExists": true, "objectsToSync": {"mcp_tool_actions": [ - "MTA-6zxrhdls/MTA-6zxrhdls_metadata.json", "MTA-1985b88g/MTA-1985b88g_metadata.json", - "MTA-zpohocjt/MTA-zpohocjt_metadata.json", "MTA-hwg74btd/MTA-hwg74btd_metadata.json", - "MTA-jzscq0mk/MTA-jzscq0mk_metadata.json", "MTA-r5v1eblg/MTA-r5v1eblg_metadata.json", - "MTA-92b836jb/MTA-92b836jb_metadata.json", "MTA-p72v9y76/MTA-p72v9y76_metadata.json", - "MTA-543b19sa/MTA-543b19sa_metadata.json", "MTA-8j9c0tb0/MTA-8j9c0tb0_metadata.json", - "MTA-ntmcnvv7/MTA-ntmcnvv7_metadata.json"]}}' -``` - -The response is a sync job; `GET /api/v3/cmp/jobs//` lists each tool with `success` after a few seconds. The UI alternative is Actions > MCP Tool Actions > Create from Repository, one tool at a time. - -**C. No internet from the appliance.** From a clone, `python tools/package_zip.py mcp_tool_actions/MTA-6zxrhdls` and the other ten folders, then Actions > MCP Tool Actions > Import for each zip. - -## 4. Finish the install - -Ask the agent: "Run onb_install and tell me what changed." The importer leaves Synchronous Action off on every tool; `onb_install` turns it on where it belongs, enables every tool, checks outbound access, and reports. Then reconnect the MCP client (tool lists are cached per session). Check: "Run onb_status" answers inline with the appliance inventory. - -## 5. Start - -Say "Onboard CloudBolt for a POC" (in Claude Code with this repository open, `/cb-poc-onboarding`). Have the [POC Test Plan](https://docs.cloudbolt.io) prerequisites at hand: the licence, the two clouds you will connect, credentials with the minimum permissions for each (the agent never asks for them; it sends you to the page where they are entered), and whether SMTP, LDAP, SSO or a DNS record for a branded portal are available. Anything that is not available is recorded as not applicable, not as a failure. - -## 6. Updating the toolkit - -Ask the agent to sync the `mcp_tool_actions/` folders above from `main` (`sync_from_source_control_repo`), run `onb_install`, and reconnect. With the Content Package Manager, Sync the package instead. - -## Troubleshooting - -| Symptom | Cause | Fix | -|---|---|---| -| A tool is missing from the agent's list | Cached tool list, or not imported | Reconnect the client; check Actions > MCP Tool Actions | -| Every custom tool fails with a scope error | Token has `read` only | Reconnect and grant `write` | -| A tool answers with a job id instead of a result | Synchronous Action off | Run `onb_install`, reconnect | -| `onb_playbook` fails | No egress to raw.githubusercontent.com | Open the `browserUrl` it returns | -| Tools refuse with "Only CloudBolt admins" | The signed-in user is not an admin | Sign in as a super admin or CB admin | diff --git a/mcp_tool_actions/MTA-0689nxjy/MTA-0689nxjy_metadata.json b/mcp_tool_actions/MTA-0689nxjy/MTA-0689nxjy_metadata.json index d8ef61e1..3b0301eb 100644 --- a/mcp_tool_actions/MTA-0689nxjy/MTA-0689nxjy_metadata.json +++ b/mcp_tool_actions/MTA-0689nxjy/MTA-0689nxjy_metadata.json @@ -65,7 +65,7 @@ "enabled": true, "id": "MTA-0689nxjy", "is_synchronous": true, - "label": "POC Onboarding: Tag Mapping", + "label": "Onboarding: Tag Mapping", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, diff --git a/mcp_tool_actions/MTA-0689nxjy/README.md b/mcp_tool_actions/MTA-0689nxjy/README.md index f218b2bf..f0f38bcc 100644 --- a/mcp_tool_actions/MTA-0689nxjy/README.md +++ b/mcp_tool_actions/MTA-0689nxjy/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Tag Mapping +# Onboarding: Tag Mapping MCP Tool Action published to agents as `custom_onb_tag_mapping`. Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-0689nxjy | POC Onboarding: Tag Mapping | -| Plugin | [OHK-b8c90uok](../../plugins/OHK-b8c90uok/) | POC Onboarding: Tag Mapping | +| MCP Tool Action | MTA-0689nxjy | Onboarding: Tag Mapping | +| Plugin | [OHK-b8c90uok](../../plugins/OHK-b8c90uok/) | Onboarding: Tag Mapping | ## Inputs | Input | Type | Meaning | diff --git a/mcp_tool_actions/MTA-0dr8xi4i/MTA-0dr8xi4i_metadata.json b/mcp_tool_actions/MTA-0dr8xi4i/MTA-0dr8xi4i_metadata.json index e530607b..5f408982 100644 --- a/mcp_tool_actions/MTA-0dr8xi4i/MTA-0dr8xi4i_metadata.json +++ b/mcp_tool_actions/MTA-0dr8xi4i/MTA-0dr8xi4i_metadata.json @@ -42,17 +42,17 @@ { "allow-multiple": false, "available-all-servers": false, - "description": "AWS AMI id or exact name; Azure template name or publisher:offer:sku[:version]; vCenter template name.", + "description": "AMI id or part of an AMI name; Azure template name or publisher:offer:sku[:version]; vCenter template name. Empty lists the cached images for the location.", "field-dependency-controlling-set": [], "field-dependency-dependent-set": [], "global-options": [], "hide-if-default-value": true, "id": "CF-fdogpsml", - "label": "Image: AMI id/name, Azure urn, template name", + "label": "Image (empty lists the cache)", "name": "onb_image", "placeholder": "ami-0123456789abcdef0", "relevant-osfamilies": [], - "required": true, + "required": false, "show-as-attribute": false, "show-on-servers": false, "type": "STR", @@ -61,7 +61,7 @@ { "allow-multiple": false, "available-all-servers": false, - "description": "Name of the OS build to create or reuse.", + "description": "Name of the OS build to create or reuse; required when onb_image names an image.", "field-dependency-controlling-set": [], "field-dependency-dependent-set": [], "global-options": [], @@ -71,7 +71,7 @@ "name": "onb_os_build_name", "placeholder": "Ubuntu 22.04", "relevant-osfamilies": [], - "required": true, + "required": false, "show-as-attribute": false, "show-on-servers": false, "type": "STR", @@ -95,6 +95,25 @@ "show-on-servers": false, "type": "STR", "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "true replaces this handler's other image in the OS build (CloudBolt allows one per handler, per region on AWS and Azure); the tool asks for this confirmation first.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-jlhhvju6", + "label": "Replace existing image (true/false)", + "name": "onb_replace_existing", + "placeholder": "false", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null } ], "dependencies": { @@ -103,13 +122,13 @@ "enabled": true, "id": "MTA-0dr8xi4i", "is_synchronous": false, - "label": "POC Onboarding: Import OS Build", + "label": "Onboarding: Import OS Build", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": true, "mcp_read_only_hint": false, - "mcp_tool_description": "Import one image into an OS build and attach the build to the handler's environments, as the handler's images page does. onb_image is an AMI id or exact AMI name (AWS), a template name or publisher:offer:sku[:version] (Azure; the images must be cached, run Sync Images on the handler page if none are), or a template name (vCenter; cached by the 'Fetch and Cache available VMWare template' recurring job). An existing OS build with onb_os_build_name is reused, so call it once per handler with the same name and one blueprint deploys to both clouds. onb_environments limits the attachment (default: every environment of the handler); onb_region names the image's region or location when it cannot be read from the environments. Runs as a job: poll the returned id with fetch_job. Requires a CloudBolt admin caller.", + "mcp_tool_description": "Import one image into an OS build and attach the build to the handler's environments, as the handler's images page does. Leave onb_image empty to list the cached images for the location (AMI ids and names; Azure template names and publisher:offer:sku:version; vCenter template names); a partial name narrows the list and imports when exactly one matches. The caches are filled by onb_sync_images; an AMI id that is not cached is fetched on the spot, and an empty Azure or vCenter cache is refreshed without the whitelist first. An existing OS build with onb_os_build_name is reused, so call it once per handler with the same name and one blueprint deploys to both clouds; when CloudBolt attaches the image to a build of another name the response says so. onb_environments limits the attachment (default: every environment of the handler); onb_region names the region or location when it cannot be read from the environments. Runs as a job: poll the returned id with fetch_job. Requires a CloudBolt admin caller. CloudBolt allows one image per OS build per handler (per region on AWS, per location on Azure): when the build already holds another image of the handler, nothing changes and the answer has confirmationRequired with existingImages; ask the user, then call again with onb_replace_existing=true to remove the old image and add the new one. After an import, or a re-run on an existing build, credentials has one entry per image the environments resolve: booleans for username, password and key (never the values), missing, imagesUrl, click, suggested values, steps and why. When anything is missing, next puts that step first: send the user to imagesUrl and never ask for the password in chat.", "mcp_tool_name": "onb_import_os_build", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-0dr8xi4i/README.md b/mcp_tool_actions/MTA-0dr8xi4i/README.md index cf815b42..83c9a31c 100644 --- a/mcp_tool_actions/MTA-0dr8xi4i/README.md +++ b/mcp_tool_actions/MTA-0dr8xi4i/README.md @@ -1,27 +1,31 @@ -# POC Onboarding: Import OS Build +# Onboarding: Import OS Build -MCP Tool Action published to agents as `custom_onb_import_os_build`. Imports one image (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing an existing build of the same name so one build spans handlers, and attaches the build to the handler's environments. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +MCP Tool Action published to agents as `custom_onb_import_os_build`. Lists a handler's cached images for a location or imports one (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing a build of the same name so one build spans handlers, refreshing an empty cache without the whitelist, and attaching the build to the environments. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-0dr8xi4i | POC Onboarding: Import OS Build | -| Plugin | [OHK-k2p8ll4p](../../plugins/OHK-k2p8ll4p/) | POC Onboarding: Import OS Build | +| MCP Tool Action | MTA-0dr8xi4i | Onboarding: Import OS Build | +| Plugin | [OHK-k2p8ll4p](../../plugins/OHK-k2p8ll4p/) | Onboarding: Import OS Build | ## Inputs | Input | Type | Meaning | |---|---|---| | `onb_handler` | string, required | The handler, by global id or name. | -| `onb_image` | string, required | AWS AMI id or exact name; Azure template name or publisher:offer:sku[:version]; vCenter template name. | -| `onb_os_build_name` | string, required | Name of the OS build to create or reuse. | +| `onb_image` | string | AMI id or part of an AMI name; Azure template name or publisher:offer:sku[:version]; vCenter template name. Empty lists the cached images for the location. | +| `onb_os_build_name` | string | Name of the OS build to create or reuse; required when onb_image names an image. | | `onb_environments` | text | ENV- ids or names, one per line; default every environment of the handler. | | `onb_region` | string | Region or location of the image when it cannot be read from the environments. | +| `onb_replace_existing` | string | `true` replaces the handler's other image in the OS build after the user confirms; CloudBolt allows one per handler (per region on AWS and Azure). | ## Output -osBuild (id, name, osFamily, reused, url), image, location, attachedToEnvironments[], next. +When listing: images[] (ids, names, OS). When importing: osBuild (id, name, requestedName, osFamily, reused, url), image, location, attachedToEnvironments[], credentials[], replacedImages[], verified, unresolved[], notes[], next. + +credentials[] has one entry per image the environments resolve: osBuild, environments[], image (IMG- id, name), whether username, password and key are set (booleans only; username only on AWS, where the key pair is checked by onb_trim_environment and onb_status), missing[], imagesUrl, click, values (suggested username), steps, why. A vCenter Windows entry adds newPassword (environments with and without new_password, and the remedy). CloudBolt copies an image's credentials onto each server built from it, so set them before the first order. When the build already holds another image of the handler: confirmationRequired, existingImages[], next, and nothing is changed. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. - Asynchronous: the call returns a job id; poll it with `fetch_job` and read `outputs`. - Asynchronous by design: the lookup calls the cloud API. +- Run onb_sync_images first on a new appliance so the caches hold the customer's images. diff --git a/mcp_tool_actions/MTA-1985b88g/MTA-1985b88g_metadata.json b/mcp_tool_actions/MTA-1985b88g/MTA-1985b88g_metadata.json index 19577d32..d5e3d783 100644 --- a/mcp_tool_actions/MTA-1985b88g/MTA-1985b88g_metadata.json +++ b/mcp_tool_actions/MTA-1985b88g/MTA-1985b88g_metadata.json @@ -7,13 +7,13 @@ "enabled": true, "id": "MTA-1985b88g", "is_synchronous": true, - "label": "POC Onboarding: Status", + "label": "Onboarding: Status", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": true, - "mcp_tool_description": "Report what the appliance has configured for a proof of concept in one call: licence, portal URL, SMTP, proxy, Content Library reachability, Setup Wizard step states, every resource handler with its environments (OS builds, networks, groups, lifecycle parameters, last verify result), the Custom Server blueprint and its orders, groups and users, LDAP and SSO, which onboarding tools are installed and synchronous, the POC items recorded as done or not applicable, and nextSteps with a UI link for each. Call it at the start of every onboarding phase and after any change, before deciding what to do next. Read-only; requires a CloudBolt admin caller.", + "mcp_tool_description": "Report what the appliance has configured for a proof of concept in one call, as a summary: licence, portal URL, SMTP, proxy, Content Library reachability, Setup Wizard step states, every resource handler with its environments (OS builds and whether each image has guest credentials, networks, groups, lifecycle parameters, last verify result, the key pairs each environment offers and whether their private key is uploaded, and on vCenter whether New Password is set), the Expire Servers job, the Custom Server blueprint and its orders, servers left in Provision Failed state, parameters the onboarding content would reuse because one of that name already exists (parameterConflicts), groups and users (each local user's own page and whether its password is set), LDAP and SSO, the onboarding tools that are missing, disabled or not synchronous, each POC item's status (onb_scorecard has the notes), whether the install record predates the last toolkit sync, and nextSteps with a UI link for each. Credentials are reported as true or false only. Call it at the start of every onboarding phase and after any change, before deciding what to do next. Read-only; requires a CloudBolt admin caller.", "mcp_tool_name": "onb_status", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-1985b88g/README.md b/mcp_tool_actions/MTA-1985b88g/README.md index ed153144..c2b57486 100644 --- a/mcp_tool_actions/MTA-1985b88g/README.md +++ b/mcp_tool_actions/MTA-1985b88g/README.md @@ -1,19 +1,19 @@ -# POC Onboarding: Status +# Onboarding: Status MCP Tool Action published to agents as `custom_onb_status`. Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-1985b88g | POC Onboarding: Status | -| Plugin | [OHK-5zg1dkcr](../../plugins/OHK-5zg1dkcr/) | POC Onboarding: Status | +| MCP Tool Action | MTA-1985b88g | Onboarding: Status | +| Plugin | [OHK-5zg1dkcr](../../plugins/OHK-5zg1dkcr/) | Onboarding: Status | ## Inputs None. ## Output -One report: appliance, license, preferences (smtp, proxy), contentLibrary, setupWizard, resourceHandlers[] with environments[], customServerBlueprint, groupsAndUsers, authentication, toolkit, pocItems, install, nextSteps[]. +A summary report: appliance, license, preferences (smtp, proxy), contentLibrary, setupWizard, resourceHandlers[] (imagesUrl, sshKeysUrl, compact lastVerify) with environments[] (osBuildProblems, guestCredentials[]: per image whether a username, password and key are set, AWS username only; newPasswordSet on vCenter; sshKeys[] with materialUploaded), customServerBlueprint, failedServers (count, newest servers[]), parameterConflicts[], groupsAndUsers (users[] with roles, passwordSet, passwordNeeded and url), authentication, lifecycleJobs.expireServers (enabled, url), toolkit (count, missing, disabled, notSynchronous, lastSync, listUrl), pocItems (id: status; onb_scorecard has the notes), install (with olderThanToolkitSync), nextSteps[]. Credentials are booleans only. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/MTA-20u1ney4/MTA-20u1ney4_metadata.json b/mcp_tool_actions/MTA-20u1ney4/MTA-20u1ney4_metadata.json new file mode 100644 index 00000000..4db19e3f --- /dev/null +++ b/mcp_tool_actions/MTA-20u1ney4/MTA-20u1ney4_metadata.json @@ -0,0 +1,77 @@ +{ + "action_input_default_values": [], + "action_inputs": [ + { + "allow-multiple": false, + "available-all-servers": false, + "description": "The environment, by global id or name.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-y593kq80", + "label": "Environment (ENV- id or name)", + "name": "onb_environment", + "placeholder": "ENV-abc12345", + "relevant-osfamilies": [], + "required": true, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "NET- ids or names, one per line, at most five; empty lists the networks.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-afwsgkyz", + "label": "Networks for NIC 1 (up to 5, one per line)", + "name": "onb_networks", + "placeholder": "NET-abc12345", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "TXT", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "true syncs the handler's networks or the environment's subnets before listing or setting.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-nd3aybhb", + "label": "Sync networks first (true/false)", + "name": "onb_refresh", + "placeholder": "false", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + } + ], + "dependencies": { + "hook": "plugins/OHK-0u7aonmo" + }, + "enabled": true, + "id": "MTA-20u1ney4", + "is_synchronous": false, + "label": "Onboarding: Environment Networks", + "last_updated": null, + "mcp_destructive_hint": false, + "mcp_idempotent_hint": true, + "mcp_open_world_hint": true, + "mcp_read_only_hint": false, + "mcp_tool_description": "List or set the networks an environment offers on NIC 1 of the order form. With only onb_environment it returns nic1 (the networks on NIC 1 now) and available (the networks the environment could use), each with its addressing: schema, ipProvider (dhcp, user_static, user_static_or_dhcp, pool, ipam), gateway, netmask, DNS and IP pool or IPAM link. With onb_networks (up to five NET- ids or names, one per line) it makes exactly those the NIC 1 choices, removes the others from NIC 1, removes networks from every other NIC so servers get one NIC, and verifies the result against the environment's possible networks. onb_refresh=true syncs first: the handler's networks (vCenter, SCVMM, Hyper-V, Nutanix, H3C CAS, OpenStack) or the environment's subnets (AWS, Azure, Azure Local, OLVM, OpenShift Virtualization, vCloud Director, Outscale); a subnet sync puts every subnet back on NIC 1, so pass onb_networks with it to re-apply the choice. category tells the next step: addressing (configure each network with onb_network_addressing), cloud_assigns or no_effect (the cloud assigns IPs), none (the technology has no networks). Runs as a job: poll the returned id with fetch_job. Requires a CloudBolt admin caller.", + "mcp_tool_name": "onb_environment_networks", + "mcp_tool_title": "" +} diff --git a/mcp_tool_actions/MTA-20u1ney4/README.md b/mcp_tool_actions/MTA-20u1ney4/README.md new file mode 100644 index 00000000..cb1d6147 --- /dev/null +++ b/mcp_tool_actions/MTA-20u1ney4/README.md @@ -0,0 +1,27 @@ +# Onboarding: Environment Networks + +MCP Tool Action published to agents as `custom_onb_environment_networks`. Lists the networks an environment can offer on its first NIC and makes the chosen ones, up to five, its only NIC 1 choices, removing networks from every other NIC. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). + +## Contents +| Role | ID | Name | +|---|---|---| +| MCP Tool Action | MTA-20u1ney4 | Onboarding: Environment Networks | +| Plugin | [OHK-0u7aonmo](../../plugins/OHK-0u7aonmo/) | Onboarding: Environment Networks | + +## Inputs +| Input | Type | Meaning | +|---|---|---| +| `onb_environment` | string, required | The environment, by global id or name. | +| `onb_networks` | text | NET- ids or names, one per line, at most five; empty lists the networks. | +| `onb_refresh` | string | true syncs the handler's networks or the environment's subnets before listing or setting. | + +## Output +environment, handler, category (addressing, cloud_assigns, no_effect, none); listing: nic1[], available[] (id, name, network, vlan, addressing, ipProvider, gateway, netmask, dns1, dns2, dnsDomain, ipPool, ipamNetwork), otherNics[]; setting: nic1[], added[], removedFromNic1[], removedFromOtherNics[], verified, problems[], next. + +## Notes +- Admin only: the plugin refuses callers who are not CloudBolt admins. +- Asynchronous: the call returns a job id; poll it with `fetch_job` and read `outputs`. +- Asynchronous: a refresh calls the cloud or vCenter. +- Keeps servers on one NIC: networks on NIC 2 and up are removed when NIC 1 is set. +- Azure offers only subnets already on the environment; onb_refresh=true re-imports them all, so pass onb_networks with it. diff --git a/mcp_tool_actions/MTA-36j661yp/MTA-36j661yp_metadata.json b/mcp_tool_actions/MTA-36j661yp/MTA-36j661yp_metadata.json new file mode 100644 index 00000000..2b893ad2 --- /dev/null +++ b/mcp_tool_actions/MTA-36j661yp/MTA-36j661yp_metadata.json @@ -0,0 +1,39 @@ +{ + "action_input_default_values": [], + "action_inputs": [ + { + "allow-multiple": false, + "available-all-servers": false, + "description": "SVR- ids to delete, separated by commas or spaces; only servers in Provision Failed state. Empty lists the failed servers.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-qemldj3g", + "label": "Servers to delete (SVR- ids)", + "name": "onb_delete_servers", + "placeholder": "SVR-abc12345, SVR-def67890", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + } + ], + "dependencies": { + "hook": "plugins/OHK-ep5vo2nu" + }, + "enabled": true, + "id": "MTA-36j661yp", + "is_synchronous": true, + "label": "Onboarding: Failed Servers", + "last_updated": null, + "mcp_destructive_hint": true, + "mcp_idempotent_hint": false, + "mcp_open_world_hint": true, + "mcp_read_only_hint": false, + "mcp_tool_description": "List the servers left in Provision Failed state by orders that failed (fetch_server_list shows only active servers, so they are invisible otherwise), or delete the ones named in onb_delete_servers. Each listed server has its hostname, environment, group, owner, created date, provision job, order and inCloud (true when a VM was created, so the delete also removes it from the cloud). Call it after a failed order once the cause is known, and before the wrap-up. Show the user the servers and get explicit agreement before deleting: the delete cannot be undone. A delete runs CloudBolt's own decommission; each deleted row has deleteJob, deleteOrder and its own next. Poll deleteJob with fetch_job when it is set. When it is null (fast-track decommission off and the order not approved yet), the deletion waits on deleteOrder: check it with fetch_order; it may need approval (approve_order). Only Provision Failed servers are accepted. Requires a CloudBolt admin caller.", + "mcp_tool_name": "onb_failed_servers", + "mcp_tool_title": "" +} diff --git a/mcp_tool_actions/MTA-36j661yp/README.md b/mcp_tool_actions/MTA-36j661yp/README.md new file mode 100644 index 00000000..ceaeb9d2 --- /dev/null +++ b/mcp_tool_actions/MTA-36j661yp/README.md @@ -0,0 +1,25 @@ +# Onboarding: Failed Servers + +MCP Tool Action published to agents as `custom_onb_failed_servers`. Lists servers left in Provision Failed state by failed orders and deletes the ones named, removing their VMs from the cloud when they exist. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). + +## Contents +| Role | ID | Name | +|---|---|---| +| MCP Tool Action | MTA-36j661yp | Onboarding: Failed Servers | +| Plugin | [OHK-ep5vo2nu](../../plugins/OHK-ep5vo2nu/) | Onboarding: Failed Servers | + +## Inputs +| Input | Type | Meaning | +|---|---|---| +| `onb_delete_servers` | string | SVR- ids to delete, separated by commas or spaces; only servers in Provision Failed state. Empty lists the failed servers. | + +## Output +List: failedServerCount, failedServers[] (id, hostname, environment, group, owner, created, provisionJob, order, inCloud, locked, url), next. +Delete: deleted[] (the same fields plus deleteJob, deleteOrder, deleteOrderStatus and next), skipped[] (id, reason), next. Poll deleteJob with `fetch_job` when it is set; when it is null the deletion waits on deleteOrder, which `fetch_order` shows and which may need approval. + +## Notes +- Admin only: the plugin refuses callers who are not CloudBolt admins. +- Synchronous: the result comes back inline; each delete runs as its own decommission job. +- The delete is CloudBolt's own decommission, as from the server's Delete button: with fast-track decommission off it is an order that may need approval. +- Destructive; the skill confirms with the user first. diff --git a/mcp_tool_actions/MTA-6zxrhdls/MTA-6zxrhdls_metadata.json b/mcp_tool_actions/MTA-6zxrhdls/MTA-6zxrhdls_metadata.json index 27bf573b..4f9aca5b 100644 --- a/mcp_tool_actions/MTA-6zxrhdls/MTA-6zxrhdls_metadata.json +++ b/mcp_tool_actions/MTA-6zxrhdls/MTA-6zxrhdls_metadata.json @@ -27,13 +27,13 @@ "enabled": true, "id": "MTA-6zxrhdls", "is_synchronous": false, - "label": "POC Onboarding: Install", + "label": "Onboarding: Install", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": true, "mcp_read_only_hint": false, - "mcp_tool_description": "Finish installing the POC onboarding toolkit after its folders were synced or its content package imported: turn Synchronous Action on for the tools that answer inline (the importer leaves it off and the API cannot set it), enable every tool, check outbound access to the Content Library and to GitHub, and record the toolkit version. Idempotent; run it after every toolkit sync, then reconnect the MCP client because tool lists are cached per session. Runs as a job: poll the returned id with fetch_job. onb_action=status reports without changing anything. Requires a CloudBolt admin caller.", + "mcp_tool_description": "Finish installing the onboarding toolkit after its folders were synced or its content package imported: turn Synchronous Action on for the tools that answer inline (the importer leaves it off and the API cannot set it), enable every tool, check outbound access to the Content Library and to GitHub, and record the toolkit version. Idempotent; run it after every toolkit sync, then reconnect the MCP client because tool lists are cached per session. Runs as a job: poll the returned id with fetch_job. The outputs hold counts, only the tools it changed (changed) and the missing ones (missing), and egress. onb_action=status changes nothing and lists the tools install would change as needsChange. Requires a CloudBolt admin caller.", "mcp_tool_name": "onb_install", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-6zxrhdls/README.md b/mcp_tool_actions/MTA-6zxrhdls/README.md index 26e4bca6..d6b6083c 100644 --- a/mcp_tool_actions/MTA-6zxrhdls/README.md +++ b/mcp_tool_actions/MTA-6zxrhdls/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Install +# Onboarding: Install MCP Tool Action published to agents as `custom_onb_install`. Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-6zxrhdls | POC Onboarding: Install | -| Plugin | [OHK-j60flmb3](../../plugins/OHK-j60flmb3/) | POC Onboarding: Install | +| MCP Tool Action | MTA-6zxrhdls | Onboarding: Install | +| Plugin | [OHK-j60flmb3](../../plugins/OHK-j60flmb3/) | Onboarding: Install | ## Inputs | Input | Type | Meaning | @@ -15,7 +15,7 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_action` | string | install applies the flags; status only reports. | ## Output -tools{} (present, enabled, isSynchronous, wantsSynchronous, before), missing[], changed[], egress (contentLibrary, playbook), notes[]. +counts (expected, present, missing, changed), missing[], changed[] (tool, id, changes, editUrl) for the tools it enabled or made synchronous or asynchronous, egress (contentLibrary, playbook), notes[]. With `onb_action=status` nothing changes and the same rows come back as needsChange[]. Tools already in the wanted state are only counted. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/MTA-70aez9bm/MTA-70aez9bm_metadata.json b/mcp_tool_actions/MTA-70aez9bm/MTA-70aez9bm_metadata.json index 503e23d1..ffba46fe 100644 --- a/mcp_tool_actions/MTA-70aez9bm/MTA-70aez9bm_metadata.json +++ b/mcp_tool_actions/MTA-70aez9bm/MTA-70aez9bm_metadata.json @@ -1,6 +1,25 @@ { "action_input_default_values": [], "action_inputs": [ + { + "allow-multiple": false, + "available-all-servers": false, + "description": "true confirms a required change that also reaches environments or groups outside the targets; set it only after the user agreed to the alsoAffects list.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-n8nzjeld", + "label": "Confirm global required change (true/false)", + "name": "onb_param_confirm_global", + "placeholder": "false", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, { "allow-multiple": false, "available-all-servers": false, @@ -12,7 +31,7 @@ "id": "CF-ga0mjyn1", "label": "Description (optional)", "name": "onb_param_description", - "placeholder": "Tier of the application this server belongs to", + "placeholder": "How often this server is backed up", "relevant-osfamilies": [], "required": false, "show-as-attribute": false, @@ -31,7 +50,7 @@ "id": "CF-tokwenv4", "label": "Label shown on forms (optional)", "name": "onb_param_label", - "placeholder": "Application Tier", + "placeholder": "Backup Policy", "relevant-osfamilies": [], "required": false, "show-as-attribute": false, @@ -88,7 +107,7 @@ "id": "CF-09lnu50c", "label": "Parameter name (internal, snake_case)", "name": "onb_param_name", - "placeholder": "application_tier", + "placeholder": "backup_policy", "relevant-osfamilies": [], "required": true, "show-as-attribute": false, @@ -107,7 +126,7 @@ "id": "CF-6lyylf4j", "label": "Options, one per line (optional)", "name": "onb_param_options", - "placeholder": "web\napp\ndb", + "placeholder": "Gold\nSilver\nBronze\nNone", "relevant-osfamilies": [], "required": false, "show-as-attribute": false, @@ -118,7 +137,7 @@ { "allow-multiple": false, "available-all-servers": false, - "description": "Whether a value is mandatory on the targets.", + "description": "true makes the parameter required, false optional. CloudBolt has one required flag per parameter, so this applies everywhere it is offered, not only on the targets.", "field-dependency-controlling-set": [], "field-dependency-dependent-set": [], "global-options": [], @@ -190,6 +209,25 @@ "show-on-servers": false, "type": "STR", "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "true uses a parameter of that name that already exists and was not created by the onboarding toolkit; set it only after the user agreed.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-zmjb0uot", + "label": "Use the existing parameter (true/false)", + "name": "onb_param_use_existing", + "placeholder": "false", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null } ], "dependencies": { @@ -198,13 +236,13 @@ "enabled": true, "id": "MTA-70aez9bm", "is_synchronous": true, - "label": "POC Onboarding: Parameter", + "label": "Onboarding: Parameter", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": false, - "mcp_tool_description": "Create or update a parameter (CustomField) and attach it to environments or groups with options and constraints, as the Parameters admin page and an environment's Parameters tab do. onb_param_name is the internal name (application_tier, cost_center, expiration_date, power_schedule); a new parameter gets onb_param_type (STR default; INT, DEC, BOOL, TXT, DT for a date) and onb_param_label. onb_param_targets lists ENV- or GRP- ids or names, one per line; onb_param_options the choices to offer there, one per line; onb_param_max and onb_param_min constrain numbers, or days from today for a date (expiration_date with onb_param_max=30 caps leases at 30 days). onb_param_required true makes it mandatory on those targets. Test plan 1.1.2, 2.5.1, 3.1.1, 3.1.2. Requires a CloudBolt admin caller.", + "mcp_tool_description": "Create or update a parameter (CustomField) and attach it to environments or groups with options and constraints, as the Parameters admin page and an environment's Parameters tab do. onb_param_name is the internal name (backup_policy, cost_center, expiration_date, power_schedule); a new parameter gets onb_param_type (STR default; INT, DEC, BOOL, TXT, DT for a date) and onb_param_label. onb_param_targets lists ENV- or GRP- ids or names, one per line; onb_param_options the choices to offer there, one per line; onb_param_max and onb_param_min constrain numbers, or days from today for a date (expiration_date with onb_param_max=30 caps leases at 30 days). Attaching expiration_date to a target also enables CloudBolt's Expire Servers recurring job, which acts on the dates, and reports it as lifecycleJob (name, enabled, changed, schedule, url). onb_param_required true makes it required and false optional: CloudBolt has one required flag per parameter, honoured by the order form and by API and MCP orders (which fill a single option in automatically only for a required parameter), so it applies everywhere the parameter is offered. When that reaches environments or groups outside onb_param_targets, nothing changes and the result has confirmationRequired with alsoAffects; ask the user, then call again with onb_param_confirm_global=true. A name that already exists but is not the toolkit's own changes nothing: the result has existingParameter with usedBy; ask the user whether to use it, then call again with onb_param_use_existing=true. Test plan 1.1.2, 2.5.1, 3.1.1, 3.1.2. Requires a CloudBolt admin caller.", "mcp_tool_name": "onb_parameter", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-70aez9bm/README.md b/mcp_tool_actions/MTA-70aez9bm/README.md index fd44e0fa..f9837179 100644 --- a/mcp_tool_actions/MTA-70aez9bm/README.md +++ b/mcp_tool_actions/MTA-70aez9bm/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Parameter +# Onboarding: Parameter MCP Tool Action published to agents as `custom_onb_parameter`. Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-70aez9bm | POC Onboarding: Parameter | -| Plugin | [OHK-f6kqrklx](../../plugins/OHK-f6kqrklx/) | POC Onboarding: Parameter | +| MCP Tool Action | MTA-70aez9bm | Onboarding: Parameter | +| Plugin | [OHK-f6kqrklx](../../plugins/OHK-f6kqrklx/) | Onboarding: Parameter | ## Inputs | Input | Type | Meaning | @@ -16,7 +16,9 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_param_label` | string | Display label; defaults to the name in title case. | | `onb_param_type` | string | Type for a new parameter; an existing parameter keeps its type. | | `onb_param_options` | text | Choices offered on the targets; replaces the current options there. | -| `onb_param_required` | string | Whether a value is mandatory on the targets. | +| `onb_param_required` | string | true makes the parameter required, false optional. CloudBolt has one required flag per parameter, so this applies everywhere it is offered, not only on the targets. | +| `onb_param_confirm_global` | string | true confirms a required change that also reaches environments or groups outside the targets. | +| `onb_param_use_existing` | string | true uses a parameter of that name that already exists and was not created by the onboarding toolkit. | | `onb_param_targets` | text | Environments and groups to attach the parameter to. | | `onb_param_description` | string | Help text shown under the field. | | `onb_param_max` | integer | Upper bound on the targets; for DT parameters the number of days from today. | @@ -24,9 +26,10 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_param_show_on_servers` | string | Whether the value appears on the server and can be mapped to a cloud tag. | ## Output -parameter (id, name, type, created, changes, url), attached[] per target with options, constraints and status, notes[]. +parameter (id, name, type, required, created, changes, url), attached[] per target with options, constraints and status, notes[]. For expiration_date, lifecycleJob (name, id, enabled, changed, schedule, url): the Expire Servers recurring job, enabled when expiration_date is attached to a target. A required change that reaches beyond the targets returns confirmationRequired, alsoAffectsCount and alsoAffects[] instead, and changes nothing; so does a name that exists but is not the toolkit's own, with existingParameter and usedBy[]. A parameter counts as the toolkit's own when onb_parameter created it (or the user agreed to use it), or when it is one the Standard Server blueprint brings with the global id the sync gave it. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. - Synchronous: the result comes back inline. +- Required is global: the order form and the API read the parameter's own flag and ignore a per-environment one, and API and MCP orders fill a single option in automatically only when the parameter is required. - Options on a group are shared by every environment the group orders into; options on an environment apply to that environment only. diff --git a/mcp_tool_actions/MTA-89dxppus/MTA-89dxppus_metadata.json b/mcp_tool_actions/MTA-89dxppus/MTA-89dxppus_metadata.json index 4ce31cc8..79a70610 100644 --- a/mcp_tool_actions/MTA-89dxppus/MTA-89dxppus_metadata.json +++ b/mcp_tool_actions/MTA-89dxppus/MTA-89dxppus_metadata.json @@ -23,7 +23,7 @@ { "allow-multiple": false, "available-all-servers": false, - "description": "AWS only: also list the VPCs of this region, with the default VPC flagged.", + "description": "AWS only: also list the VPCs of this region with their CIDR, subnet count and default flag.", "field-dependency-controlling-set": [], "field-dependency-dependent-set": [], "global-options": [], @@ -46,13 +46,13 @@ "enabled": true, "id": "MTA-89dxppus", "is_synchronous": false, - "label": "POC Onboarding: Handler Locations", + "label": "Onboarding: Handler Locations", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": true, "mcp_read_only_hint": true, - "mcp_tool_description": "List what a resource handler can turn into environments: AWS regions (pass onb_region to also list that region's VPCs), Azure locations, vCenter, SCVMM or Nutanix clusters, GCP projects, OpenStack locations. Each entry says whether an environment already exists for it, and the handler's existing environments are listed with their location. Call it after the handler is verified, before onb_import_environments, and let the user pick one or two locations. Runs as a job: poll the returned id with fetch_job and read outputs. Read-only on the appliance; requires a CloudBolt admin caller.", + "mcp_tool_description": "List what a resource handler can turn into environments: AWS regions (pass onb_region to also list that region's VPCs with CIDR, subnet count, default flag and recommendedVpc), Azure locations, vCenter, SCVMM or Nutanix clusters, GCP projects, OpenStack locations. Each entry says whether an environment already exists for it, and the handler's existing environments are listed with their location. Call it after the handler is verified, before onb_import_environments, and let the user pick the one location the POC needs; for AWS, ask which VPC when the region has several, because each VPC becomes its own environment. Runs as a job: poll the returned id with fetch_job and read outputs. Read-only on the appliance; requires a CloudBolt admin caller.", "mcp_tool_name": "onb_handler_locations", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-89dxppus/README.md b/mcp_tool_actions/MTA-89dxppus/README.md index 430ce93f..464a5038 100644 --- a/mcp_tool_actions/MTA-89dxppus/README.md +++ b/mcp_tool_actions/MTA-89dxppus/README.md @@ -1,22 +1,22 @@ -# POC Onboarding: Handler Locations +# Onboarding: Handler Locations MCP Tool Action published to agents as `custom_onb_handler_locations`. Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-89dxppus | POC Onboarding: Handler Locations | -| Plugin | [OHK-0nuhjdxl](../../plugins/OHK-0nuhjdxl/) | POC Onboarding: Handler Locations | +| MCP Tool Action | MTA-89dxppus | Onboarding: Handler Locations | +| Plugin | [OHK-0nuhjdxl](../../plugins/OHK-0nuhjdxl/) | Onboarding: Handler Locations | ## Inputs | Input | Type | Meaning | |---|---|---| | `onb_handler` | string, required | The handler, by global id or name. | -| `onb_region` | string | AWS only: also list the VPCs of this region, with the default VPC flagged. | +| `onb_region` | string | AWS only: also list the VPCs of this region with their CIDR, subnet count and default flag. | ## Output -locationKind, locations[] (name, display, imported), existingEnvironments[], vpcs[] for an AWS region, subscriptions[] for a tenant-level Azure handler, next. +locationKind, locations[] (name, display, imported), existingEnvironments[], vpcs[] (id, name, cidr, subnets, isDefault) and recommendedVpc for an AWS region, subscriptions[] for a tenant-level Azure handler, next. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/MTA-89w58iux/MTA-89w58iux_metadata.json b/mcp_tool_actions/MTA-89w58iux/MTA-89w58iux_metadata.json index 67bcc2a3..9bc6bd4e 100644 --- a/mcp_tool_actions/MTA-89w58iux/MTA-89w58iux_metadata.json +++ b/mcp_tool_actions/MTA-89w58iux/MTA-89w58iux_metadata.json @@ -122,7 +122,7 @@ "enabled": true, "id": "MTA-89w58iux", "is_synchronous": true, - "label": "POC Onboarding: SMTP Settings", + "label": "Onboarding: SMTP Settings", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, diff --git a/mcp_tool_actions/MTA-89w58iux/README.md b/mcp_tool_actions/MTA-89w58iux/README.md index 8cffb344..e72ea556 100644 --- a/mcp_tool_actions/MTA-89w58iux/README.md +++ b/mcp_tool_actions/MTA-89w58iux/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: SMTP Settings +# Onboarding: SMTP Settings MCP Tool Action published to agents as `custom_onb_smtp`. Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-89w58iux | POC Onboarding: SMTP Settings | -| Plugin | [OHK-be18kqal](../../plugins/OHK-be18kqal/) | POC Onboarding: SMTP Settings | +| MCP Tool Action | MTA-89w58iux | Onboarding: SMTP Settings | +| Plugin | [OHK-be18kqal](../../plugins/OHK-be18kqal/) | Onboarding: SMTP Settings | ## Inputs | Input | Type | Meaning | @@ -20,7 +20,7 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_smtp_admin_email` | string | Where test emails and admin notifications go. | ## Output -settings (host, port, user, useTls, fromAddress, adminEmail, passwordSet), changes[], editUrl, testUrl, next. +settings (host, port, user, useTls, fromAddress, adminEmail, passwordSet), changes[], editUrl with editClick (the button that opens the form), next. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/MTA-92b836jb/MTA-92b836jb_metadata.json b/mcp_tool_actions/MTA-92b836jb/MTA-92b836jb_metadata.json index 81daf05e..a6d5fd4c 100644 --- a/mcp_tool_actions/MTA-92b836jb/MTA-92b836jb_metadata.json +++ b/mcp_tool_actions/MTA-92b836jb/MTA-92b836jb_metadata.json @@ -23,7 +23,7 @@ { "allow-multiple": false, "available-all-servers": false, - "description": "index, bootstrap, resource-handlers, phases, troubleshooting or test-plan-map.", + "description": "index, bootstrap, resource-handlers, handler-forms, phases, troubleshooting or test-plan-map.", "field-dependency-controlling-set": [], "field-dependency-dependent-set": [], "global-options": [], @@ -46,13 +46,13 @@ "enabled": true, "id": "MTA-92b836jb", "is_synchronous": true, - "label": "POC Onboarding: Playbook", + "label": "Onboarding: Playbook", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": true, "mcp_read_only_hint": true, - "mcp_tool_description": "Return the POC onboarding playbook text: the procedure an agent follows to take a fresh CloudBolt appliance through a proof of concept with these tools. Sections: index (the skill: hard rules and the phase loop), bootstrap, resource-handlers, phases, troubleshooting, test-plan-map. Call it first when you have no cb-poc-onboarding skill loaded and the user asks to onboard, set up or POC CloudBolt; follow the text it returns. The text is fetched from GitHub through the appliance's proxy settings; when that fails the response gives the URL to open in a browser. Read-only.", + "mcp_tool_description": "Return the onboarding playbook text: the procedure an agent follows to take a fresh CloudBolt appliance through a proof of concept with these tools. Sections: index (the skill: hard rules and the phase loop), bootstrap, resource-handlers, handler-forms (each technology's handler form), phases, troubleshooting, test-plan-map. Call it first when you have no cb-onboarding skill loaded and the user asks to onboard, set up or POC CloudBolt; follow the text it returns. The text is fetched from GitHub through the appliance's proxy settings; when that fails the response gives the URL to open in a browser. Read-only.", "mcp_tool_name": "onb_playbook", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-92b836jb/README.md b/mcp_tool_actions/MTA-92b836jb/README.md index d2a1d56e..445943c1 100644 --- a/mcp_tool_actions/MTA-92b836jb/README.md +++ b/mcp_tool_actions/MTA-92b836jb/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Playbook +# Onboarding: Playbook -MCP Tool Action published to agents as `custom_onb_playbook`. Returns a section of the POC onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +MCP Tool Action published to agents as `custom_onb_playbook`. Returns a section of the onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-92b836jb | POC Onboarding: Playbook | -| Plugin | [OHK-1am7i73s](../../plugins/OHK-1am7i73s/) | POC Onboarding: Playbook | +| MCP Tool Action | MTA-92b836jb | Onboarding: Playbook | +| Plugin | [OHK-1am7i73s](../../plugins/OHK-1am7i73s/) | Onboarding: Playbook | ## Inputs | Input | Type | Meaning | diff --git a/mcp_tool_actions/MTA-bp0rkcq9/MTA-bp0rkcq9_metadata.json b/mcp_tool_actions/MTA-bp0rkcq9/MTA-bp0rkcq9_metadata.json index 19477988..c92989d0 100644 --- a/mcp_tool_actions/MTA-bp0rkcq9/MTA-bp0rkcq9_metadata.json +++ b/mcp_tool_actions/MTA-bp0rkcq9/MTA-bp0rkcq9_metadata.json @@ -12,7 +12,7 @@ "id": "CF-5jkupf06", "label": "Server or resource action (id or label)", "name": "onb_action", - "placeholder": "Resize VM", + "placeholder": "Change Resources", "relevant-osfamilies": [], "required": true, "show-as-attribute": false, @@ -46,13 +46,13 @@ "enabled": true, "id": "MTA-bp0rkcq9", "is_synchronous": true, - "label": "POC Onboarding: Action Approval", + "label": "Onboarding: Action Approval", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": false, - "mcp_tool_description": "Turn 'Requires approval' on or off for a server action or resource action by global id (SVA-, RSA-) or label, for example Resize VM, so a requestor's day-2 action pauses as an order for an approver (test plan 2.4.2). The v3 API cannot change this flag. Requires a CloudBolt admin caller.", + "mcp_tool_description": "Turn 'Requires approval' on or off for a server action or resource action by global id (SVA-, RSA-) or label, for example Change Resources, so a requestor's day-2 action pauses as an order for an approver (test plan 2.4.2). The v3 API cannot change this flag. Requires a CloudBolt admin caller.", "mcp_tool_name": "onb_action_approval", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-bp0rkcq9/README.md b/mcp_tool_actions/MTA-bp0rkcq9/README.md index 58e49883..a62d59d0 100644 --- a/mcp_tool_actions/MTA-bp0rkcq9/README.md +++ b/mcp_tool_actions/MTA-bp0rkcq9/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Action Approval +# Onboarding: Action Approval MCP Tool Action published to agents as `custom_onb_action_approval`. Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-bp0rkcq9 | POC Onboarding: Action Approval | -| Plugin | [OHK-ndsuxv0k](../../plugins/OHK-ndsuxv0k/) | POC Onboarding: Action Approval | +| MCP Tool Action | MTA-bp0rkcq9 | Onboarding: Action Approval | +| Plugin | [OHK-ndsuxv0k](../../plugins/OHK-ndsuxv0k/) | Onboarding: Action Approval | ## Inputs | Input | Type | Meaning | diff --git a/mcp_tool_actions/MTA-ckumouj0/MTA-ckumouj0_metadata.json b/mcp_tool_actions/MTA-ckumouj0/MTA-ckumouj0_metadata.json new file mode 100644 index 00000000..784435e3 --- /dev/null +++ b/mcp_tool_actions/MTA-ckumouj0/MTA-ckumouj0_metadata.json @@ -0,0 +1,58 @@ +{ + "action_input_default_values": [], + "action_inputs": [ + { + "allow-multiple": false, + "available-all-servers": false, + "description": "Name of the CIT test; defaults to the order's name.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-frgip09z", + "label": "Test name (optional)", + "name": "onb_cit_name", + "placeholder": "POC: Custom Server in AWS", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "The finished blueprint order to replay.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-an75eqvs", + "label": "Order (ORD- global id)", + "name": "onb_cit_order", + "placeholder": "ORD-abc12345", + "relevant-osfamilies": [], + "required": true, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + } + ], + "dependencies": { + "hook": "plugins/OHK-yjow1qql" + }, + "enabled": true, + "id": "MTA-ckumouj0", + "is_synchronous": true, + "label": "Onboarding: CIT Test from Order", + "last_updated": null, + "mcp_destructive_hint": false, + "mcp_idempotent_hint": true, + "mcp_open_world_hint": false, + "mcp_read_only_hint": false, + "mcp_tool_description": "Turn a finished blueprint order (ORD- id, status SUCCESS, FAILURE or WARNING) into a Continuous Infrastructure Testing test, the same as the order page's Add to CIT action: CloudBolt replays the order on each test run and compares the result with the original status (test plan 4.2.4). An order that is already a test is reported, not duplicated. Run the test afterwards with run_cit_tests; each run provisions and decommissions a server. Requires a CloudBolt admin caller.", + "mcp_tool_name": "onb_cit_from_order", + "mcp_tool_title": "" +} diff --git a/mcp_tool_actions/MTA-ckumouj0/README.md b/mcp_tool_actions/MTA-ckumouj0/README.md new file mode 100644 index 00000000..b008d752 --- /dev/null +++ b/mcp_tool_actions/MTA-ckumouj0/README.md @@ -0,0 +1,23 @@ +# Onboarding: CIT Test from Order + +MCP Tool Action published to agents as `custom_onb_cit_from_order`. Turns a finished blueprint order into a Continuous Infrastructure Testing test, the same as the order page's Add to CIT action. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). + +## Contents +| Role | ID | Name | +|---|---|---| +| MCP Tool Action | MTA-ckumouj0 | Onboarding: CIT Test from Order | +| Plugin | [OHK-yjow1qql](../../plugins/OHK-yjow1qql/) | Onboarding: CIT Test from Order | + +## Inputs +| Input | Type | Meaning | +|---|---|---| +| `onb_cit_order` | string, required | The finished blueprint order to replay. | +| `onb_cit_name` | string | Name of the CIT test; defaults to the order's name. | + +## Output +test (id, name, expectedStatus, enabled, url), order, created, citUrl, next. + +## Notes +- Admin only: the plugin refuses callers who are not CloudBolt admins. +- Synchronous: the result comes back inline. diff --git a/mcp_tool_actions/MTA-cpq7bvz4/MTA-cpq7bvz4_metadata.json b/mcp_tool_actions/MTA-cpq7bvz4/MTA-cpq7bvz4_metadata.json index bbf8efdd..241986de 100644 --- a/mcp_tool_actions/MTA-cpq7bvz4/MTA-cpq7bvz4_metadata.json +++ b/mcp_tool_actions/MTA-cpq7bvz4/MTA-cpq7bvz4_metadata.json @@ -122,13 +122,13 @@ "enabled": true, "id": "MTA-cpq7bvz4", "is_synchronous": true, - "label": "POC Onboarding: Group", + "label": "Onboarding: Group", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": false, - "mcp_tool_description": "Create or update a group for the POC: parent (onb_group_parent), environments the group may order into (onb_group_environments, ENV- ids or names one per line), whether members' orders skip approval (onb_group_auto_approval true/false) and a server-count quota (onb_group_quota_servers, -1 for unlimited). An existing group of that name is updated. Test plan 2.3.2, 2.3.3, 2.4.1, 2.5.2. Echo the plan and confirm before calling. Requires a CloudBolt admin caller.", + "mcp_tool_description": "Create or update a group for the POC: parent (onb_group_parent), environments the group may order into (onb_group_environments, ENV- ids or names one per line), whether members' orders skip approval (onb_group_auto_approval true/false) and a server-count quota (onb_group_quota_servers, -1 for unlimited). An existing group of that name is updated; empty inputs leave its values alone, and environments are only added. Every result reports the group as it now stands: environments (its own entitlements), inheritedEnvironments and unconstrainedEnvironments when there are any, members with their roles, serverQuota (limit, used) and allowAutoApproval. fetch_group_details shows neither environments nor members, so use this as the proof. With only onb_group_name it changes nothing and reports an existing group; it never creates a group from a name alone. Test plan 2.3.2, 2.3.3, 2.4.1, 2.5.2. Echo the plan and confirm before any call that changes something. Requires a CloudBolt admin caller.", "mcp_tool_name": "onb_group", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-cpq7bvz4/README.md b/mcp_tool_actions/MTA-cpq7bvz4/README.md index 7962bb37..0f6b6e23 100644 --- a/mcp_tool_actions/MTA-cpq7bvz4/README.md +++ b/mcp_tool_actions/MTA-cpq7bvz4/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Group +# Onboarding: Group MCP Tool Action published to agents as `custom_onb_group`. Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-cpq7bvz4 | POC Onboarding: Group | -| Plugin | [OHK-efxm9m2b](../../plugins/OHK-efxm9m2b/) | POC Onboarding: Group | +| MCP Tool Action | MTA-cpq7bvz4 | Onboarding: Group | +| Plugin | [OHK-efxm9m2b](../../plugins/OHK-efxm9m2b/) | Onboarding: Group | ## Inputs | Input | Type | Meaning | @@ -20,8 +20,9 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_group_description` | string | Group description. | ## Output -group (id, name, type, parent, allowAutoApproval, created, url, quotasUrl), environments[], serverQuota, changes[], next. +group (id, name, type, parent, allowAutoApproval, created, url, quotasUrl, quotasClick); the group as it now stands: environments[] (its own entitlements), inheritedEnvironments[] and unconstrainedEnvironments[] when there are any, memberCount, members[] (username, email, roles), serverQuota (limit, unlimited, used); changes[], next. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. - Synchronous: the result comes back inline. +- Empty inputs change nothing. With only `onb_group_name` it reports an existing group and refuses to create a new one. diff --git a/mcp_tool_actions/MTA-e5qv0zay/MTA-e5qv0zay_metadata.json b/mcp_tool_actions/MTA-e5qv0zay/MTA-e5qv0zay_metadata.json index e757c597..3ad447e7 100644 --- a/mcp_tool_actions/MTA-e5qv0zay/MTA-e5qv0zay_metadata.json +++ b/mcp_tool_actions/MTA-e5qv0zay/MTA-e5qv0zay_metadata.json @@ -84,7 +84,7 @@ "enabled": true, "id": "MTA-e5qv0zay", "is_synchronous": true, - "label": "POC Onboarding: LDAP Mapping", + "label": "Onboarding: LDAP Mapping", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, diff --git a/mcp_tool_actions/MTA-e5qv0zay/README.md b/mcp_tool_actions/MTA-e5qv0zay/README.md index 066c806d..24992485 100644 --- a/mcp_tool_actions/MTA-e5qv0zay/README.md +++ b/mcp_tool_actions/MTA-e5qv0zay/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: LDAP Mapping +# Onboarding: LDAP Mapping MCP Tool Action published to agents as `custom_onb_ldap_mapping`. Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-e5qv0zay | POC Onboarding: LDAP Mapping | -| Plugin | [OHK-s76tknmk](../../plugins/OHK-s76tknmk/) | POC Onboarding: LDAP Mapping | +| MCP Tool Action | MTA-e5qv0zay | Onboarding: LDAP Mapping | +| Plugin | [OHK-s76tknmk](../../plugins/OHK-s76tknmk/) | Onboarding: LDAP Mapping | ## Inputs | Input | Type | Meaning | diff --git a/mcp_tool_actions/MTA-hwg74btd/MTA-hwg74btd_metadata.json b/mcp_tool_actions/MTA-hwg74btd/MTA-hwg74btd_metadata.json index 36a36ae7..8f788a40 100644 --- a/mcp_tool_actions/MTA-hwg74btd/MTA-hwg74btd_metadata.json +++ b/mcp_tool_actions/MTA-hwg74btd/MTA-hwg74btd_metadata.json @@ -103,13 +103,13 @@ "enabled": true, "id": "MTA-hwg74btd", "is_synchronous": true, - "label": "POC Onboarding: Recent Errors", + "label": "Onboarding: Recent Errors", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": true, - "mcp_tool_description": "Read the last minutes of a CloudBolt log (application by default; also jobengine, authentication, mcp, saml2) and return the WARNING-and-above entries grouped by exception and message, newest first, with tracebacks, secrets redacted, and a hint for each known pattern (failed handler verification, missing egress, proxy, SSL inspection, LDAP bind, missing image, subnet or key pair). Call it right after something failed in the UI: the resource handler form hides the real error but logs it under 'Failed to validate connection'. Use onb_log=jobengine for provisioning jobs and onb_contains to narrow by handler name or text. Only the last 8 MB of the file are read. Read-only; requires a CloudBolt admin caller.", + "mcp_tool_description": "Read the last minutes of a CloudBolt log (application by default; also jobengine, authentication, mcp, saml2) and return the WARNING-and-above entries grouped by exception and message, newest first, with tracebacks, secrets redacted, and a hint for each known pattern (failed handler verification, missing egress, proxy, SSL inspection, LDAP bind, missing image, guest credentials on a vCenter template, vCenter Windows password, ESXi hosts unreachable for VMware Tools scripts, a key pair's private key). Call it right after something failed in the UI: the resource handler form hides the real error but logs it under 'Failed to validate connection'. Use onb_log=jobengine for provisioning jobs and onb_contains to narrow by handler name or text. Only the last 8 MB of the file are read. Read-only; requires a CloudBolt admin caller.", "mcp_tool_name": "onb_recent_errors", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-hwg74btd/README.md b/mcp_tool_actions/MTA-hwg74btd/README.md index 3d08849a..5a31c95e 100644 --- a/mcp_tool_actions/MTA-hwg74btd/README.md +++ b/mcp_tool_actions/MTA-hwg74btd/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Recent Errors +# Onboarding: Recent Errors MCP Tool Action published to agents as `custom_onb_recent_errors`. Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-hwg74btd | POC Onboarding: Recent Errors | -| Plugin | [OHK-4vwq70dg](../../plugins/OHK-4vwq70dg/) | POC Onboarding: Recent Errors | +| MCP Tool Action | MTA-hwg74btd | Onboarding: Recent Errors | +| Plugin | [OHK-4vwq70dg](../../plugins/OHK-4vwq70dg/) | Onboarding: Recent Errors | ## Inputs | Input | Type | Meaning | diff --git a/mcp_tool_actions/MTA-i1kmy5fd/MTA-i1kmy5fd_metadata.json b/mcp_tool_actions/MTA-i1kmy5fd/MTA-i1kmy5fd_metadata.json index 6aa09a7e..06ff347c 100644 --- a/mcp_tool_actions/MTA-i1kmy5fd/MTA-i1kmy5fd_metadata.json +++ b/mcp_tool_actions/MTA-i1kmy5fd/MTA-i1kmy5fd_metadata.json @@ -42,7 +42,7 @@ { "allow-multiple": false, "available-all-servers": false, - "description": "CloudBolt hostname template, for example poc-# or a template using group and OS build names; see the hostname specification documentation.", + "description": "CloudBolt hostname template with a sequence: zeros followed by X, for example poc-00X (becomes poc-001, poc-002). A template with '#' or without a sequence is refused.", "field-dependency-controlling-set": [], "field-dependency-dependent-set": [], "global-options": [], @@ -50,7 +50,7 @@ "id": "CF-4ciiaerz", "label": "Hostname template (optional)", "name": "onb_hostname_template", - "placeholder": "poc-#", + "placeholder": "poc-00X", "relevant-osfamilies": [], "required": false, "show-as-attribute": false, @@ -65,7 +65,7 @@ "enabled": true, "id": "MTA-i1kmy5fd", "is_synchronous": true, - "label": "POC Onboarding: Configure Custom Server", + "label": "Onboarding: Configure Custom Server", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, diff --git a/mcp_tool_actions/MTA-i1kmy5fd/README.md b/mcp_tool_actions/MTA-i1kmy5fd/README.md index 83c87bc2..b9b50b81 100644 --- a/mcp_tool_actions/MTA-i1kmy5fd/README.md +++ b/mcp_tool_actions/MTA-i1kmy5fd/README.md @@ -1,19 +1,19 @@ -# POC Onboarding: Configure Custom Server +# Onboarding: Configure Custom Server MCP Tool Action published to agents as `custom_onb_configure_custom_server`. Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-i1kmy5fd | POC Onboarding: Configure Custom Server | -| Plugin | [OHK-ilstyopk](../../plugins/OHK-ilstyopk/) | POC Onboarding: Configure Custom Server | +| MCP Tool Action | MTA-i1kmy5fd | Onboarding: Configure Custom Server | +| Plugin | [OHK-ilstyopk](../../plugins/OHK-ilstyopk/) | Onboarding: Configure Custom Server | ## Inputs | Input | Type | Meaning | |---|---|---| | `onb_environments` | text | ENV- ids or names, one per line, that receive the hostname template; left empty the template goes on the server tier. | -| `onb_hostname_template` | string | CloudBolt hostname template, for example poc-# or a template using group and OS build names; see the hostname specification documentation. | +| `onb_hostname_template` | string | CloudBolt hostname template with a sequence: zeros followed by X, for example `poc-00X` (becomes poc-001, poc-002). A template with `#` or without a sequence is refused. | | `onb_all_environments` | string | true enables every environment on the server tier; false leaves the tier's environment setting unchanged. | ## Output diff --git a/mcp_tool_actions/MTA-i6p4j2l7/MTA-i6p4j2l7_metadata.json b/mcp_tool_actions/MTA-i6p4j2l7/MTA-i6p4j2l7_metadata.json index 03af3c29..5ed03413 100644 --- a/mcp_tool_actions/MTA-i6p4j2l7/MTA-i6p4j2l7_metadata.json +++ b/mcp_tool_actions/MTA-i6p4j2l7/MTA-i6p4j2l7_metadata.json @@ -42,7 +42,7 @@ { "allow-multiple": false, "available-all-servers": false, - "description": "One location per line: AWS or |; Azure location name; vCenter, SCVMM or Nutanix cluster name; GCP project id.", + "description": "One location per line: AWS | (the region alone only when it has one VPC); Azure location name; vCenter, SCVMM or Nutanix cluster name; GCP project id.", "field-dependency-controlling-set": [], "field-dependency-dependent-set": [], "global-options": [], @@ -65,13 +65,13 @@ "enabled": true, "id": "MTA-i6p4j2l7", "is_synchronous": false, - "label": "POC Onboarding: Import Environments", + "label": "Onboarding: Import Environments", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": true, "mcp_read_only_hint": false, - "mcp_tool_description": "Create one environment per location on a resource handler, exactly as the handler page's Import locations dialog does: one AWS region plus VPC (pass for the region's default VPC or |), one Azure location, one vCenter, SCVMM or Nutanix cluster, one GCP project. Networks come with it: AWS subnets are imported with the environment, Azure subnets are synced, vCenter networks of the cluster are attached to NIC 1. A location that already has an environment is reported as existing. At most four locations per call; a POC needs one or two per handler. Echo the locations to the user and confirm before calling. Runs as a job: poll the returned id with fetch_job. Requires a CloudBolt admin caller.", + "mcp_tool_description": "Create one environment per location on a resource handler, exactly as the handler page's Import locations dialog does: one AWS VPC (pass |; the region alone works only when it has one VPC, and a VPC without subnets is refused), one Azure location, one vCenter, SCVMM or Nutanix cluster, one GCP project. AWS subnets are imported with the environment and Azure subnets are synced; for every technology, choose the NIC 1 networks next with onb_environment_networks. A handler's first AWS environment also adds the Name and Annotation tags that the handler form's Done would add. A location that already has an environment is reported as existing. At most four locations per call; a POC needs one per handler. Echo the locations to the user and confirm before calling. Runs as a job: poll the returned id with fetch_job. Requires a CloudBolt admin caller.", "mcp_tool_name": "onb_import_environments", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-i6p4j2l7/README.md b/mcp_tool_actions/MTA-i6p4j2l7/README.md index 78d43bc5..f9fae028 100644 --- a/mcp_tool_actions/MTA-i6p4j2l7/README.md +++ b/mcp_tool_actions/MTA-i6p4j2l7/README.md @@ -1,23 +1,23 @@ -# POC Onboarding: Import Environments +# Onboarding: Import Environments -MCP Tool Action published to agents as `custom_onb_import_environments`. Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced, vCenter cluster networks attached to NIC 1), and reports existing environments instead of duplicating them. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +MCP Tool Action published to agents as `custom_onb_import_environments`. Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced; vCenter networks are chosen afterwards with onb_environment_networks), and reports existing environments instead of duplicating them. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-i6p4j2l7 | POC Onboarding: Import Environments | -| Plugin | [OHK-8j06wtoe](../../plugins/OHK-8j06wtoe/) | POC Onboarding: Import Environments | +| MCP Tool Action | MTA-i6p4j2l7 | Onboarding: Import Environments | +| Plugin | [OHK-8j06wtoe](../../plugins/OHK-8j06wtoe/) | Onboarding: Import Environments | ## Inputs | Input | Type | Meaning | |---|---|---| | `onb_handler` | string, required | The handler, by global id or name. | -| `onb_locations` | text, required | One location per line: AWS or |; Azure location name; vCenter, SCVMM or Nutanix cluster name; GCP project id. | +| `onb_locations` | text, required | One location per line: AWS | (the region alone only when it has one VPC); Azure location name; vCenter, SCVMM or Nutanix cluster name; GCP project id. | | `onb_env_name` | string | Prefix for the new environments' names; left empty, CloudBolt's default '(handler) location' name is used. | ## Output -results[] per location: status created, existing or failed; environmentId, name, networks, osBuilds, url, parametersUrl, and for Azure the subnet counts; next. +results[] per location: status created, existing or failed; environmentId, name, networks, osBuilds, url, parametersUrl, for AWS the vpc and vpcCidr (and tagsAdded on the handler's first environment), for Azure the subnet counts; next. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/MTA-iyknuxox/MTA-iyknuxox_metadata.json b/mcp_tool_actions/MTA-iyknuxox/MTA-iyknuxox_metadata.json index 25e4179b..55fecffd 100644 --- a/mcp_tool_actions/MTA-iyknuxox/MTA-iyknuxox_metadata.json +++ b/mcp_tool_actions/MTA-iyknuxox/MTA-iyknuxox_metadata.json @@ -103,13 +103,13 @@ "enabled": true, "id": "MTA-iyknuxox", "is_synchronous": true, - "label": "POC Onboarding: Trim Environment Order Form", + "label": "Onboarding: Trim Environment Order Form", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": false, - "mcp_tool_description": "Shorten an environment's order form to what a POC user needs. CloudBolt hides a required parameter that has exactly one option, so the poc_minimal profile pins infrastructure choices to one value (AWS key pair, security group, EBS type; Azure resource group, storage type, public IP; vCenter datastore, disk type; the subnet) and removes the optional technology parameters a POC never touches, leaving the size (and on Azure the Windows password) visible. onb_profile=report changes nothing and lists every parameter with whether it shows on the form. onb_keep names fields to leave visible, onb_pin lines field=value choose the pinned value, onb_remove names extra fields to remove. Pinned fields are protected from the handler's sync jobs. Echo the plan to the user and confirm before calling. Requires a CloudBolt admin caller.", + "mcp_tool_description": "Shorten an environment's order form to what a POC user needs. CloudBolt hides a required parameter that has exactly one option, so the poc_minimal profile pins infrastructure choices to one value (AWS key pair, security group, EBS type; Azure resource group, storage type, public IP; vCenter datastore, disk type; never NIC 1, whose choices onb_environment_networks sets) and removes the optional technology parameters a POC never touches, leaving the size (and on Azure the Windows password) visible. On vCenter it never pins or removes new_password, the Windows Administrator password customization uses when the template has no credentials (one value hides it); both profiles return newPasswordSet and, when it is false, newPassword with the steps for the admin to enter the value in CloudBolt or set the template's credentials instead. Password values are never returned and never accepted through onb_pin. onb_profile=report changes nothing and lists every parameter with whether it shows on the form. onb_keep names fields to leave visible, onb_pin lines field=value choose the pinned value, onb_remove names extra fields to remove. Pinned fields are protected from the handler's sync jobs. Echo the plan to the user and confirm before calling. Requires a CloudBolt admin caller.", "mcp_tool_name": "onb_trim_environment", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-iyknuxox/README.md b/mcp_tool_actions/MTA-iyknuxox/README.md index de6f7937..4211ad56 100644 --- a/mcp_tool_actions/MTA-iyknuxox/README.md +++ b/mcp_tool_actions/MTA-iyknuxox/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Trim Environment Order Form +# Onboarding: Trim Environment Order Form -MCP Tool Action published to agents as `custom_onb_trim_environment`. Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size and, where needed, the network and password; the report profile only lists the current form. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +MCP Tool Action published to agents as `custom_onb_trim_environment`. Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size, the NIC 1 networks chosen with onb_environment_networks and, where needed, the password; the report profile only lists the current form. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-iyknuxox | POC Onboarding: Trim Environment Order Form | -| Plugin | [OHK-qn4k1pme](../../plugins/OHK-qn4k1pme/) | POC Onboarding: Trim Environment Order Form | +| MCP Tool Action | MTA-iyknuxox | Onboarding: Trim Environment Order Form | +| Plugin | [OHK-qn4k1pme](../../plugins/OHK-qn4k1pme/) | Onboarding: Trim Environment Order Form | ## Inputs | Input | Type | Meaning | @@ -19,10 +19,11 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_remove` | text | Field names to remove from the environment in addition to the profile's list. | ## Output -before[] and after[] (every parameter with options, required, hiddenOnOrderForm), actions[] (pinned, removed, left with reason), protectedFromSync[], visibleNow[], next. +before[] and after[] (every parameter with options, required, hiddenOnOrderForm), actions[] (pinned, removed, left with reason), protectedFromSync[], visibleNow[], keyMaterial (keys[] with materialUploaded, uploadUrl, steps, why) when the environment offers key pairs, newPasswordSet on vCenter (plus newPassword with parametersUrl, steps, whatToEnter, why, alternative when false), next. Password values show as asterisks. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. - Synchronous: the result comes back inline. - Handler-level fields cannot be removed from one environment; they are pinned instead. - On Azure node_size, availability_set_arm and azure_authentication_type never hide. +- On vCenter new_password is never pinned or removed: Windows customization fails when the server has neither it nor the template's password. The admin enters either in CloudBolt; onb_pin refuses password fields. diff --git a/mcp_tool_actions/MTA-jzscq0mk/MTA-jzscq0mk_metadata.json b/mcp_tool_actions/MTA-jzscq0mk/MTA-jzscq0mk_metadata.json index 347a0328..e5f89dc9 100644 --- a/mcp_tool_actions/MTA-jzscq0mk/MTA-jzscq0mk_metadata.json +++ b/mcp_tool_actions/MTA-jzscq0mk/MTA-jzscq0mk_metadata.json @@ -27,13 +27,13 @@ "enabled": true, "id": "MTA-jzscq0mk", "is_synchronous": true, - "label": "POC Onboarding: Failure Trace", + "label": "Onboarding: Failure Trace", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": true, - "mcp_tool_description": "Given an order (ORD-) or job (JOB-) global id, return every failed job under it with its errors, output, the tail of its progress messages, its failed children and a hint for the provisioning failures a new appliance hits most (no image in the region, no subnet, missing key pair, Windows password, datastore not pinned, permissions, TLS, connectivity). Call it when fetch_order or fetch_job reports FAILURE; then pass the job id it names to fetch_job_log with log_file_tail for the full traceback. Read-only; requires a CloudBolt admin caller.", + "mcp_tool_description": "Given an order (ORD-) or job (JOB-) global id, return every failed job under it with its errors, output, the tail of its progress messages, its failed children and a hint for the provisioning failures a new appliance hits most (no image in the region, no subnet, missing key pair or its private key, Windows password, guest credentials on the template, ESXi hosts unreachable for VMware Tools scripts, datastore not pinned, permissions, TLS, connectivity). When a failed job's errors are empty, the hints also come from the error lines at the end of its log file (logTailChecked). Call it when fetch_order or fetch_job reports FAILURE; then pass the job id it names to fetch_job_log with log_file_tail for the full traceback. failedServers lists the servers the order left in Provision Failed state; once the cause is explained, offer to delete them with onb_failed_servers. Read-only; requires a CloudBolt admin caller.", "mcp_tool_name": "onb_failure_trace", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-jzscq0mk/README.md b/mcp_tool_actions/MTA-jzscq0mk/README.md index e226b45e..3039ecf2 100644 --- a/mcp_tool_actions/MTA-jzscq0mk/README.md +++ b/mcp_tool_actions/MTA-jzscq0mk/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Failure Trace +# Onboarding: Failure Trace MCP Tool Action published to agents as `custom_onb_failure_trace`. Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-jzscq0mk | POC Onboarding: Failure Trace | -| Plugin | [OHK-y95w8ai0](../../plugins/OHK-y95w8ai0/) | POC Onboarding: Failure Trace | +| MCP Tool Action | MTA-jzscq0mk | Onboarding: Failure Trace | +| Plugin | [OHK-y95w8ai0](../../plugins/OHK-y95w8ai0/) | Onboarding: Failure Trace | ## Inputs | Input | Type | Meaning | @@ -15,8 +15,9 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_target_id` | string, required | The order or job to trace. | ## Output -target, failedJobs[] (errors, output, progressTail, hints, url), hints[], next. +target, failedJobs[] (errors, output, progressTail, hints, logTailChecked, url), failedServers[] (id, hostname, environment, inCloud, url) left in Provision Failed state, hints[], next. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. - Synchronous: the result comes back inline. +- A failed job with empty errors gets its hints from the ERROR lines in the last 256 KB of its log file; logTailChecked marks it. diff --git a/mcp_tool_actions/MTA-kw8krevn/MTA-kw8krevn_metadata.json b/mcp_tool_actions/MTA-kw8krevn/MTA-kw8krevn_metadata.json index b0999772..1b4f4b72 100644 --- a/mcp_tool_actions/MTA-kw8krevn/MTA-kw8krevn_metadata.json +++ b/mcp_tool_actions/MTA-kw8krevn/MTA-kw8krevn_metadata.json @@ -27,7 +27,7 @@ "enabled": true, "id": "MTA-kw8krevn", "is_synchronous": false, - "label": "POC Onboarding: Verify LDAP", + "label": "Onboarding: Verify LDAP", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, diff --git a/mcp_tool_actions/MTA-kw8krevn/README.md b/mcp_tool_actions/MTA-kw8krevn/README.md index 757edd19..3dcabbce 100644 --- a/mcp_tool_actions/MTA-kw8krevn/README.md +++ b/mcp_tool_actions/MTA-kw8krevn/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Verify LDAP +# Onboarding: Verify LDAP MCP Tool Action published to agents as `custom_onb_verify_ldap`. Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-kw8krevn | POC Onboarding: Verify LDAP | -| Plugin | [OHK-j82f4ibp](../../plugins/OHK-j82f4ibp/) | POC Onboarding: Verify LDAP | +| MCP Tool Action | MTA-kw8krevn | Onboarding: Verify LDAP | +| Plugin | [OHK-j82f4ibp](../../plugins/OHK-j82f4ibp/) | Onboarding: Verify LDAP | ## Inputs | Input | Type | Meaning | @@ -15,7 +15,7 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_ldap` | string | Which LDAP utility; optional when only one exists. | ## Output -ldapUtility (server, port, protocol, serviceAccount), verified, error, hints[], links (detail, edit, verifyDialog, mappings), next. +ldapUtility (server, port, protocol, serviceAccount), verified, error, hints[], links (detail, edit, mappings), click (the button for each form), next. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/MTA-ntmcnvv7/MTA-ntmcnvv7_metadata.json b/mcp_tool_actions/MTA-ntmcnvv7/MTA-ntmcnvv7_metadata.json index 1623183b..e4c43dab 100644 --- a/mcp_tool_actions/MTA-ntmcnvv7/MTA-ntmcnvv7_metadata.json +++ b/mcp_tool_actions/MTA-ntmcnvv7/MTA-ntmcnvv7_metadata.json @@ -4,13 +4,13 @@ { "allow-multiple": false, "available-all-servers": false, - "description": "grant (default) adds the permission, revoke removes it, list only reports the blueprint's current permissions.", + "description": "grant (default) adds the permission, revoke removes it, list only reports the blueprint's current permissions; open turns Any group can deploy on, restrict turns it off (with grant_group it also grants that group DEPLOY).", "field-dependency-controlling-set": [], "field-dependency-dependent-set": [], "global-options": [], "hide-if-default-value": true, "id": "CF-gb9r1qil", - "label": "Action: grant (default), revoke, or list", + "label": "Action: grant, revoke, list, open, restrict", "name": "grant_action", "placeholder": "grant", "relevant-osfamilies": [], @@ -42,7 +42,7 @@ { "allow-multiple": false, "available-all-servers": false, - "description": "Group global id (GRP-...) or exact group name. Required for grant and revoke, ignored for list.", + "description": "Group global id (GRP-...) or exact group name. Required for grant and revoke, optional for restrict (granted DEPLOY first), ignored for list and open.", "field-dependency-controlling-set": [], "field-dependency-dependent-set": [], "global-options": [], @@ -90,7 +90,7 @@ "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": false, - "mcp_tool_description": "List, grant, or revoke a group's DEPLOY (default) or MANAGE permission on a blueprint, the same rows the blueprint's Permissions tab manages. grant_action list returns anyGroupCanDeploy and the groups that can deploy and manage, for every group (fetch_orderable_groups shows only the caller's). Use list before syncing a blueprint from a Source Control Repository and grant the same groups back afterwards: the importer keeps only the groups named in the metadata and repo exports name none, so a sync of a blueprint whose any_group_can_deploy is false removes every group's permission. Revoke what you granted when a test is over. Give the blueprint's global id (BP-...) or exact name and, for grant and revoke, the group's global id (GRP-...) or exact name. Idempotent. Requires a CloudBolt admin caller.", + "mcp_tool_description": "List, grant, or revoke a group's DEPLOY (default) or MANAGE permission on a blueprint, the same rows the blueprint's Permissions tab manages. grant_action list returns anyGroupCanDeploy and the groups that can deploy and manage, for every group (fetch_orderable_groups shows only the caller's). Use list before syncing a blueprint from a Source Control Repository and grant the same groups back afterwards: the importer keeps only the groups named in the metadata and repo exports name none, so a sync of a blueprint whose any_group_can_deploy is false removes every group's permission. Revoke what you granted when a test is over. grant_action open turns the blueprint's Any group can deploy checkbox on, so every group may order it whatever the DEPLOY rows say; restrict turns it off, leaving only the groups with DEPLOY (pass grant_group to grant one in the same call; it refuses when no group would be left). Give the blueprint's global id (BP-...) or exact name and, for grant, revoke and restrict, the group's global id (GRP-...) or exact name. Idempotent. Requires a CloudBolt admin caller.", "mcp_tool_name": "manage_blueprint_permissions", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-ntmcnvv7/README.md b/mcp_tool_actions/MTA-ntmcnvv7/README.md index 089a9196..b4512540 100644 --- a/mcp_tool_actions/MTA-ntmcnvv7/README.md +++ b/mcp_tool_actions/MTA-ntmcnvv7/README.md @@ -1,6 +1,6 @@ # Manage Blueprint Permissions -MCP Tool Action published to agents as `custom_manage_blueprint_permissions`. Lists, grants, or revokes a group's DEPLOY (default) or MANAGE permission on a blueprint, the same rows the blueprint's Permissions tab manages. A Source Control Repos sync of a blueprint whose metadata has `any_group_can_deploy: false` removes every group's deploy and manage permission, because the importer keeps only the groups the metadata names and repo exports name none; the testing loop lists before the sync, restores afterwards, and revokes any grant it added once the test is over. Part of [docs/agents/testing-loop.md](../../docs/agents/testing-loop.md). +MCP Tool Action published to agents as `custom_manage_blueprint_permissions`. Lists, grants, or revokes a group's DEPLOY (default) or MANAGE permission on a blueprint, the same rows the blueprint's Permissions tab manages, and turns its Any group can deploy checkbox on (`open`) or off (`restrict`). A Source Control Repos sync of a blueprint whose metadata has `any_group_can_deploy: false` removes every group's deploy and manage permission, because the importer keeps only the groups the metadata names and repo exports name none; the testing loop lists before the sync, restores afterwards, and revokes any grant it added once the test is over. Part of [docs/agents/testing-loop.md](../../docs/agents/testing-loop.md). ## Contents | Role | ID | Name | @@ -11,13 +11,13 @@ MCP Tool Action published to agents as `custom_manage_blueprint_permissions`. Li ## Inputs | Input | Type | Meaning | |---|---|---| -| `grant_action` | string | `grant` (default), `revoke`, or `list` | +| `grant_action` | string | `grant` (default), `revoke`, `list`, `open` (Any group can deploy on) or `restrict` (off; refuses when no group has DEPLOY) | | `grant_blueprint` | string, required | `BP-` global id or the exact blueprint name | -| `grant_group` | string | `GRP-` global id or the exact group name; required for grant and revoke | +| `grant_group` | string | `GRP-` global id or the exact group name; required for grant and revoke, optional for restrict (granted DEPLOY first) | | `grant_permission` | string | `DEPLOY` (default) or `MANAGE` | ## Output -`anyGroupCanDeploy`, `groupsThatCanDeploy` and `groupsThatCanManage` (id and name, every group), plus `changed` for grant and revoke. +`anyGroupCanDeploy`, `groupsThatCanDeploy` and `groupsThatCanManage` (id and name, every group), plus `changed` for grant, revoke, open and restrict, and `granted` when restrict granted a group. ## Notes - Admin only. Idempotent. diff --git a/mcp_tool_actions/MTA-p72v9y76/MTA-p72v9y76_metadata.json b/mcp_tool_actions/MTA-p72v9y76/MTA-p72v9y76_metadata.json index ff4a65d1..cda41c28 100644 --- a/mcp_tool_actions/MTA-p72v9y76/MTA-p72v9y76_metadata.json +++ b/mcp_tool_actions/MTA-p72v9y76/MTA-p72v9y76_metadata.json @@ -65,13 +65,13 @@ "enabled": true, "id": "MTA-p72v9y76", "is_synchronous": true, - "label": "POC Onboarding: Set Item Status", + "label": "Onboarding: Set Item Status", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": false, - "mcp_tool_description": "Record the state of one POC test plan item (1.1.1 to 4.3.5) or prerequisite (P1 to P12): done, skipped, not_applicable or pending, with a note. Use not_applicable, with the reason, when the customer cannot or does not want to exercise an item in this POC (no SMTP, no LDAP, no SSO, no DNS record for a branded portal, no Terraform or Ansible); the scorecard then reports it as not applicable instead of failed. Returns every recorded item and a summary. Requires a CloudBolt admin caller.", + "mcp_tool_description": "Record the state of one POC test plan item (1.1.1 to 4.3.5) or prerequisite (P1 to P12): done, skipped, not_applicable or pending, with a note. Use not_applicable, with the reason, when the customer cannot or does not want to exercise an item in this POC (no SMTP, no LDAP, no SSO, no DNS record for a branded portal, no Terraform or Ansible); the scorecard then reports it as not applicable instead of failed. A note may be up to 2000 characters; a longer one is refused, not cut. Returns the item just recorded with its note, counts per status (summary) and the item ids per status (byStatus), without the other items' notes; onb_status and onb_scorecard show every item's note. Requires a CloudBolt admin caller.", "mcp_tool_name": "onb_set_item_status", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-p72v9y76/README.md b/mcp_tool_actions/MTA-p72v9y76/README.md index 754be319..45ece93b 100644 --- a/mcp_tool_actions/MTA-p72v9y76/README.md +++ b/mcp_tool_actions/MTA-p72v9y76/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Set Item Status +# Onboarding: Set Item Status MCP Tool Action published to agents as `custom_onb_set_item_status`. Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-p72v9y76 | POC Onboarding: Set Item Status | -| Plugin | [OHK-5885tete](../../plugins/OHK-5885tete/) | POC Onboarding: Set Item Status | +| MCP Tool Action | MTA-p72v9y76 | Onboarding: Set Item Status | +| Plugin | [OHK-5885tete](../../plugins/OHK-5885tete/) | Onboarding: Set Item Status | ## Inputs | Input | Type | Meaning | @@ -17,9 +17,10 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_item_note` | string | Why the item is skipped or not applicable, or any note; the scorecard prints it. | ## Output -item, status, note, items{} (every recorded item), summary. +item, title, weight, status, note, recordedAt for the item just recorded; summary (counts per status) and byStatus (item ids per status, without notes). onb_status and onb_scorecard return every item's note. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. - Synchronous: the result comes back inline. +- A note longer than 2000 characters is refused with its length; nothing is cut. - State lives in the poc_onboarding_state parameter (namespace poc_onboarding), created on first use. diff --git a/mcp_tool_actions/MTA-po1gmnou/MTA-po1gmnou_metadata.json b/mcp_tool_actions/MTA-po1gmnou/MTA-po1gmnou_metadata.json new file mode 100644 index 00000000..4b6e5dbb --- /dev/null +++ b/mcp_tool_actions/MTA-po1gmnou/MTA-po1gmnou_metadata.json @@ -0,0 +1,77 @@ +{ + "action_input_default_values": [], + "action_inputs": [ + { + "allow-multiple": false, + "available-all-servers": false, + "description": "true also enables the technology's Fetch and Cache recurring job and rule plus Execute all Rules, with their use_whitelist input mapped to false.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-pek0ruuv", + "label": "Enable the cache jobs (true/false, default true)", + "name": "onb_enable_jobs", + "placeholder": "true", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "The handler, by global id or name.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-7f2q5v3a", + "label": "Resource handler (RH- id or name)", + "name": "onb_handler", + "placeholder": "RH-abc12345", + "relevant-osfamilies": [], + "required": true, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "Regions (AWS) or locations (Azure) to refresh; default the handler's environments' locations.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-piv7p0wi", + "label": "Locations, one per line", + "name": "onb_locations", + "placeholder": "us-east-1", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "TXT", + "value-pattern-string": null + } + ], + "dependencies": { + "hook": "plugins/OHK-bbhlwspa" + }, + "enabled": true, + "id": "MTA-po1gmnou", + "is_synchronous": false, + "label": "Onboarding: Sync Images", + "last_updated": null, + "mcp_destructive_hint": false, + "mcp_idempotent_hint": true, + "mcp_open_world_hint": true, + "mcp_read_only_hint": false, + "mcp_tool_description": "Fill a resource handler's image cache now, without the image whitelist, and turn on the recurring job and rule that keep it fresh (Fetch and Cache available AWS AMIs, Fetch and Cache available VMWare template, the Azure images rule and Execute all Rules), mapping their use_whitelist input to false so the scheduled refreshes stay complete. CloudBolt's image pickers and onb_import_os_build read these caches; on a new appliance they are empty, and the default whitelist skips images customers often want. Call it right after onb_verify_resource_handler succeeds, then continue with environments while it runs: an AWS region without a whitelist can take ten minutes or more, Azure a location a minute or two, vCenter a few minutes. onb_locations limits the refresh to those regions or locations (default: the handler's environments, else every imported region). Runs as a job: poll the returned id with fetch_job. Requires a CloudBolt admin caller.", + "mcp_tool_name": "onb_sync_images", + "mcp_tool_title": "" +} diff --git a/mcp_tool_actions/MTA-po1gmnou/README.md b/mcp_tool_actions/MTA-po1gmnou/README.md new file mode 100644 index 00000000..98ff1f32 --- /dev/null +++ b/mcp_tool_actions/MTA-po1gmnou/README.md @@ -0,0 +1,26 @@ +# Onboarding: Sync Images + +MCP Tool Action published to agents as `custom_onb_sync_images`. Fills a resource handler's image cache now without the image whitelist and enables the recurring job and rule that keep it fresh, so the image pickers and onb_import_os_build see every image the credentials can. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). + +## Contents +| Role | ID | Name | +|---|---|---| +| MCP Tool Action | MTA-po1gmnou | Onboarding: Sync Images | +| Plugin | [OHK-bbhlwspa](../../plugins/OHK-bbhlwspa/) | Onboarding: Sync Images | + +## Inputs +| Input | Type | Meaning | +|---|---|---| +| `onb_handler` | string, required | The handler, by global id or name. | +| `onb_locations` | text | Regions (AWS) or locations (Azure) to refresh; default the handler's environments' locations. | +| `onb_enable_jobs` | string | true also enables the technology's Fetch and Cache recurring job and rule, and Execute all Rules. | + +## Output +refresh (scope), cachedImages (before, after), secondsTaken, scheduledRefresh[] (recurring job and rule rows with status and schedule), next. + +## Notes +- Admin only: the plugin refuses callers who are not CloudBolt admins. +- Asynchronous: the call returns a job id; poll it with `fetch_job` and read `outputs`. +- Asynchronous by design; AWS without a whitelist is slow, start it early and continue. +- Per Mike's direction (2026-10-19) the whitelist is never applied here. diff --git a/mcp_tool_actions/MTA-pz5o2gjl/MTA-pz5o2gjl_metadata.json b/mcp_tool_actions/MTA-pz5o2gjl/MTA-pz5o2gjl_metadata.json index f938eaf5..6d8e88b1 100644 --- a/mcp_tool_actions/MTA-pz5o2gjl/MTA-pz5o2gjl_metadata.json +++ b/mcp_tool_actions/MTA-pz5o2gjl/MTA-pz5o2gjl_metadata.json @@ -27,7 +27,7 @@ "enabled": true, "id": "MTA-pz5o2gjl", "is_synchronous": true, - "label": "POC Onboarding: Remove Environment", + "label": "Onboarding: Remove Environment", "last_updated": null, "mcp_destructive_hint": true, "mcp_idempotent_hint": true, diff --git a/mcp_tool_actions/MTA-pz5o2gjl/README.md b/mcp_tool_actions/MTA-pz5o2gjl/README.md index 395709fc..4b2e3a11 100644 --- a/mcp_tool_actions/MTA-pz5o2gjl/README.md +++ b/mcp_tool_actions/MTA-pz5o2gjl/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Remove Environment +# Onboarding: Remove Environment MCP Tool Action published to agents as `custom_onb_remove_environment`. Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-pz5o2gjl | POC Onboarding: Remove Environment | -| Plugin | [OHK-1wmzl7sp](../../plugins/OHK-1wmzl7sp/) | POC Onboarding: Remove Environment | +| MCP Tool Action | MTA-pz5o2gjl | Onboarding: Remove Environment | +| Plugin | [OHK-1wmzl7sp](../../plugins/OHK-1wmzl7sp/) | Onboarding: Remove Environment | ## Inputs | Input | Type | Meaning | diff --git a/mcp_tool_actions/MTA-qab6r2gk/MTA-qab6r2gk_metadata.json b/mcp_tool_actions/MTA-qab6r2gk/MTA-qab6r2gk_metadata.json index 1c797ea7..41a12efd 100644 --- a/mcp_tool_actions/MTA-qab6r2gk/MTA-qab6r2gk_metadata.json +++ b/mcp_tool_actions/MTA-qab6r2gk/MTA-qab6r2gk_metadata.json @@ -27,7 +27,7 @@ "enabled": true, "id": "MTA-qab6r2gk", "is_synchronous": false, - "label": "POC Onboarding: SMTP Test", + "label": "Onboarding: SMTP Test", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, diff --git a/mcp_tool_actions/MTA-qab6r2gk/README.md b/mcp_tool_actions/MTA-qab6r2gk/README.md index 974decd5..6b1f3a76 100644 --- a/mcp_tool_actions/MTA-qab6r2gk/README.md +++ b/mcp_tool_actions/MTA-qab6r2gk/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: SMTP Test +# Onboarding: SMTP Test MCP Tool Action published to agents as `custom_onb_smtp_test`. Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-qab6r2gk | POC Onboarding: SMTP Test | -| Plugin | [OHK-jdyan3in](../../plugins/OHK-jdyan3in/) | POC Onboarding: SMTP Test | +| MCP Tool Action | MTA-qab6r2gk | Onboarding: SMTP Test | +| Plugin | [OHK-jdyan3in](../../plugins/OHK-jdyan3in/) | Onboarding: SMTP Test | ## Inputs | Input | Type | Meaning | @@ -15,7 +15,7 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_smtp_to` | string | Address to send the test to; defaults to the CloudBolt admin email. | ## Output -recipient, settings, sent, error, hints[], editUrl. +recipient, settings, sent, error, hints[], editUrl with editClick. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/MTA-r5v1eblg/MTA-r5v1eblg_metadata.json b/mcp_tool_actions/MTA-r5v1eblg/MTA-r5v1eblg_metadata.json index e6ec83f9..ed069ace 100644 --- a/mcp_tool_actions/MTA-r5v1eblg/MTA-r5v1eblg_metadata.json +++ b/mcp_tool_actions/MTA-r5v1eblg/MTA-r5v1eblg_metadata.json @@ -27,7 +27,7 @@ "enabled": true, "id": "MTA-r5v1eblg", "is_synchronous": false, - "label": "POC Onboarding: Verify Resource Handler", + "label": "Onboarding: Verify Resource Handler", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, diff --git a/mcp_tool_actions/MTA-r5v1eblg/README.md b/mcp_tool_actions/MTA-r5v1eblg/README.md index b56a292c..52a50473 100644 --- a/mcp_tool_actions/MTA-r5v1eblg/README.md +++ b/mcp_tool_actions/MTA-r5v1eblg/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: Verify Resource Handler +# Onboarding: Verify Resource Handler MCP Tool Action published to agents as `custom_onb_verify_resource_handler`. Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-r5v1eblg | POC Onboarding: Verify Resource Handler | -| Plugin | [OHK-s7cdvkpr](../../plugins/OHK-s7cdvkpr/) | POC Onboarding: Verify Resource Handler | +| MCP Tool Action | MTA-r5v1eblg | Onboarding: Verify Resource Handler | +| Plugin | [OHK-s7cdvkpr](../../plugins/OHK-s7cdvkpr/) | Onboarding: Verify Resource Handler | ## Inputs | Input | Type | Meaning | @@ -15,7 +15,7 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_handler` | string, required | The handler to verify, by global id or name. | ## Output -verified (true/false), error, hints[], links (detail, edit, verifyDialog, importLocations, permissionsDoc), next. +verified (true/false), error, hints[], links (detail, edit with editClick, importLocations with importLocationsClick, permissionsDoc), next. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/MTA-tuzkb8h4/MTA-tuzkb8h4_metadata.json b/mcp_tool_actions/MTA-tuzkb8h4/MTA-tuzkb8h4_metadata.json index 2af5ce04..ba1b4d2e 100644 --- a/mcp_tool_actions/MTA-tuzkb8h4/MTA-tuzkb8h4_metadata.json +++ b/mcp_tool_actions/MTA-tuzkb8h4/MTA-tuzkb8h4_metadata.json @@ -141,13 +141,13 @@ "enabled": true, "id": "MTA-tuzkb8h4", "is_synchronous": true, - "label": "POC Onboarding: User", + "label": "Onboarding: User", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": false, - "mcp_tool_description": "Create a local test user (a requestor, an approver, a resource admin) and assign roles in a group. The user is created with no usable password; the response's setPasswordUrl is where the admin sets one in the UI, so no password ever passes through the agent. An existing user only receives the role assignments. onb_user_roles are role names one per line (requestor, approver, resource_admin, viewer, or a custom role). Test plan 2.3.1, 2.3.4, 2.4.1, 2.4.2. Requires a CloudBolt admin caller.", + "mcp_tool_description": "Assign roles in a group to a local test user (a requestor, an approver, a resource admin). When the user does not exist yet, nothing is created: createInUi gives the Users list link, the button (Add) and the values for the admin to type, the password included, because CloudBolt cannot add a password to a user later without the current one. Give the admin that one step, wait until they say it is created, then call again with the same inputs to assign the roles. passwordFix appears for a user an earlier version created without a password. onb_user_roles are role names one per line (requestor, approver, resource_admin, viewer, or a custom role). Test plan 2.3.1, 2.3.4, 2.4.1, 2.4.2. Requires a CloudBolt admin caller.", "mcp_tool_name": "onb_user", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-tuzkb8h4/README.md b/mcp_tool_actions/MTA-tuzkb8h4/README.md index 2427e467..0479b530 100644 --- a/mcp_tool_actions/MTA-tuzkb8h4/README.md +++ b/mcp_tool_actions/MTA-tuzkb8h4/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: User +# Onboarding: User -MCP Tool Action published to agents as `custom_onb_user`. Creates a local user with no usable password and assigns roles in a group, returning the edit link where the admin sets the password; an existing user only gets the roles. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +MCP Tool Action published to agents as `custom_onb_user`. Assigns roles in a group to a local POC user. A user that does not exist yet is added by the admin on the Users list, password included; the tool returns the link, button and values, and assigns the roles when called again. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-tuzkb8h4 | POC Onboarding: User | -| Plugin | [OHK-8in52yhn](../../plugins/OHK-8in52yhn/) | POC Onboarding: User | +| MCP Tool Action | MTA-tuzkb8h4 | Onboarding: User | +| Plugin | [OHK-8in52yhn](../../plugins/OHK-8in52yhn/) | Onboarding: User | ## Inputs | Input | Type | Meaning | @@ -21,7 +21,7 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_user_super_admin` | string | Grant or remove the super admin flag. | ## Output -user (id, username, created, url, setPasswordUrl), memberships[], changes[], next. +user (id, username, url, passwordSet), memberships[], changes[], next; passwordFix (url, steps) for a user with no password. For a user that does not exist: createInUi (url, click, values, steps), next. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/MTA-z3h0o9t3/MTA-z3h0o9t3_metadata.json b/mcp_tool_actions/MTA-z3h0o9t3/MTA-z3h0o9t3_metadata.json new file mode 100644 index 00000000..1645e9ab --- /dev/null +++ b/mcp_tool_actions/MTA-z3h0o9t3/MTA-z3h0o9t3_metadata.json @@ -0,0 +1,210 @@ +{ + "action_input_default_values": [], + "action_inputs": [ + { + "allow-multiple": false, + "available-all-servers": false, + "description": "dhcp, static, or both (the requester chooses per order); empty keeps the current schema.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-jqyfgjxw", + "label": "Addressing: dhcp, static or both", + "name": "onb_addressing", + "placeholder": "static", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "Primary DNS server, optional.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-yqnbsuas", + "label": "DNS 1", + "name": "onb_dns1", + "placeholder": "10.0.0.2", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "Secondary DNS server, optional.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-fjca3t12", + "label": "DNS 2", + "name": "onb_dns2", + "placeholder": "10.0.0.3", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "DNS domain, optional; Infoblox needs it for host records.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-758bt1zt", + "label": "DNS domain", + "name": "onb_dns_domain", + "placeholder": "poc.example", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "Gateway IPv4 address; required for static and both.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-3x75gdvn", + "label": "Gateway", + "name": "onb_gateway", + "placeholder": "10.0.5.1", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "For static: pool (CloudBolt IP pool), ipam (an IPAM endpoint) or manual (typed on each order).", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-2403wsao", + "label": "Static IP source: pool, ipam or manual", + "name": "onb_ip_source", + "placeholder": "pool", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "For ipam: the IPAM endpoint the user added in the UI.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-w3dn769p", + "label": "IPAM endpoint (name or id)", + "name": "onb_ipam", + "placeholder": "Infoblox", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "Netmask, dotted or as a prefix length; required for static and both.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-8af9jixx", + "label": "Netmask", + "name": "onb_netmask", + "placeholder": "255.255.255.0", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "The network, by global id or name; onb_environment_networks lists them.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-8dud29ch", + "label": "Network (NET- id or name)", + "name": "onb_network", + "placeholder": "NET-abc12345", + "relevant-osfamilies": [], + "required": true, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "For pool: a range such as 10.0.5.10-10.0.5.60, or addresses separated by commas or new lines.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-9zp2bjoo", + "label": "IP pool range or addresses", + "name": "onb_pool_range", + "placeholder": "10.0.5.10-10.0.5.60", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "TXT", + "value-pattern-string": null + } + ], + "dependencies": { + "hook": "plugins/OHK-gjfc20pv" + }, + "enabled": true, + "id": "MTA-z3h0o9t3", + "is_synchronous": false, + "label": "Onboarding: Network Addressing", + "last_updated": null, + "mcp_destructive_hint": false, + "mcp_idempotent_hint": true, + "mcp_open_world_hint": true, + "mcp_read_only_hint": false, + "mcp_tool_description": "Set how servers on one network get their IP address, then verify it with determine_ip_provider, the call the order form and provisioning use. onb_addressing: dhcp, static, or both (the requester picks DHCP or a typed IP per order). static and both need onb_gateway and onb_netmask (255.255.255.0 or 24); onb_dns1, onb_dns2 and onb_dns_domain are optional. For static, onb_ip_source says where addresses come from: pool (a CloudBolt IP pool on the network, from onb_pool_range such as 10.0.5.10-10.0.5.60 or a list; checked for free addresses), ipam (onb_ipam names an IPAM endpoint the user added in the UI at /setup/add-ipam/; the tool checks its connection, enables its orchestration action, and when the network is not yet mapped returns needsUiStep with the IPAM Networks tab link), or manual (the requester types sc_nic_0_ip on each order). Only one source stays on the network: choosing dhcp, both, manual or ipam removes an unused IP pool, and anything but ipam clears an IPAM link. With only onb_network it returns the current settings and the IPAM endpoints. Runs as a job: poll the returned id with fetch_job. Requires a CloudBolt admin caller.", + "mcp_tool_name": "onb_network_addressing", + "mcp_tool_title": "" +} diff --git a/mcp_tool_actions/MTA-z3h0o9t3/README.md b/mcp_tool_actions/MTA-z3h0o9t3/README.md new file mode 100644 index 00000000..6fbc3020 --- /dev/null +++ b/mcp_tool_actions/MTA-z3h0o9t3/README.md @@ -0,0 +1,35 @@ +# Onboarding: Network Addressing + +MCP Tool Action published to agents as `custom_onb_network_addressing`. Sets how servers on a network get their IP address (DHCP, static with gateway and netmask, a CloudBolt IP pool, an IPAM endpoint, or an IP typed per order) and verifies it with the network's IP provider. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). + +## Contents +| Role | ID | Name | +|---|---|---| +| MCP Tool Action | MTA-z3h0o9t3 | Onboarding: Network Addressing | +| Plugin | [OHK-gjfc20pv](../../plugins/OHK-gjfc20pv/) | Onboarding: Network Addressing | + +## Inputs +| Input | Type | Meaning | +|---|---|---| +| `onb_network` | string, required | The network, by global id or name; onb_environment_networks lists them. | +| `onb_addressing` | string | dhcp, static, or both (the requester chooses per order); empty keeps the current schema. | +| `onb_gateway` | string | Gateway IPv4 address; required for static and both. | +| `onb_netmask` | string | Netmask, dotted or as a prefix length; required for static and both. | +| `onb_dns1` | string | Primary DNS server, optional. | +| `onb_dns2` | string | Secondary DNS server, optional. | +| `onb_dns_domain` | string | DNS domain, optional; Infoblox needs it for host records. | +| `onb_ip_source` | string | For static: pool (CloudBolt IP pool), ipam (an IPAM endpoint) or manual (typed on each order). | +| `onb_pool_range` | text | For pool: a range such as 10.0.5.10-10.0.5.60, or addresses separated by commas or new lines. | +| `onb_ipam` | string | For ipam: the IPAM endpoint the user added in the UI. | + +## Output +network (id, name, url, addressing, ipProvider, gateway, netmask, dns1, dns2, dnsDomain, ipPool {name, total, free, url}, ipamNetwork), changes[], verified, problems[], notes[]; for IPAM before the mapping: needsUiStep, ipamUrl, next; with only onb_network: network and ipamEndpoints[]. + +## Notes +- Admin only: the plugin refuses callers who are not CloudBolt admins. +- Asynchronous: the call returns a job id; poll it with `fetch_job` and read `outputs`. +- Asynchronous: the IPAM check calls the IPAM endpoint. +- IPAM credentials are entered in the UI (/setup/add-ipam/); the tool never takes them. +- Enabling an IPAM orchestration action applies to every endpoint of that IPAM technology. +- Static addressing without gateway and netmask fails at provisioning on vCenter, so the tool requires both. diff --git a/mcp_tool_actions/MTA-zfoxwh12/MTA-zfoxwh12_metadata.json b/mcp_tool_actions/MTA-zfoxwh12/MTA-zfoxwh12_metadata.json new file mode 100644 index 00000000..d7aa489e --- /dev/null +++ b/mcp_tool_actions/MTA-zfoxwh12/MTA-zfoxwh12_metadata.json @@ -0,0 +1,39 @@ +{ + "action_input_default_values": [], + "action_inputs": [ + { + "allow-multiple": false, + "available-all-servers": false, + "description": "all (default), self-service, rbac, resource-management or extensibility.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-k29swycy", + "label": "Section (optional): all, self-service, rbac, ...", + "name": "onb_score_section", + "placeholder": "all", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + } + ], + "dependencies": { + "hook": "plugins/OHK-yqu8b25o" + }, + "enabled": true, + "id": "MTA-zfoxwh12", + "is_synchronous": true, + "label": "Onboarding: Scorecard", + "last_updated": null, + "mcp_destructive_hint": false, + "mcp_idempotent_hint": true, + "mcp_open_world_hint": false, + "mcp_read_only_hint": true, + "mcp_tool_description": "Build the POC Test Plan scorecard: every item (1.1.1 to 4.3.5) with its weight, the status recorded with onb_set_item_status, and the live evidence found on the appliance (successful orders, blueprint-provisioned servers per cloud, parameters, tag and LDAP mappings, custom roles, approved orders, quotas, lifecycle parameters, non-stock recurring jobs and rules, CIT tests, webhooks, Content Library extensions), grouped by category with the points possible. Any recorded status wins, pending included; evidence suggests done or pending only for unrecorded items. recordedPendingWithEvidence lists items recorded pending whose evidence is now found: ask the user whether to record them done. Evidence is strict, so a missing item can still be done. onb_score_section limits the report to self-service, rbac, resource-management or extensibility. Call it in the wrap-up phase and whenever the user asks how the POC stands. Read-only; requires a CloudBolt admin caller.", + "mcp_tool_name": "onb_scorecard", + "mcp_tool_title": "" +} diff --git a/mcp_tool_actions/MTA-zfoxwh12/README.md b/mcp_tool_actions/MTA-zfoxwh12/README.md new file mode 100644 index 00000000..acda71b2 --- /dev/null +++ b/mcp_tool_actions/MTA-zfoxwh12/README.md @@ -0,0 +1,24 @@ +# Onboarding: Scorecard + +MCP Tool Action published to agents as `custom_onb_scorecard`. Builds the POC test plan scorecard from the recorded item statuses and live evidence on the appliance (orders, handlers, environments, groups, mappings, actions, jobs), per category with weights. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). + +## Contents +| Role | ID | Name | +|---|---|---| +| MCP Tool Action | MTA-zfoxwh12 | Onboarding: Scorecard | +| Plugin | [OHK-yqu8b25o](../../plugins/OHK-yqu8b25o/) | Onboarding: Scorecard | + +## Inputs +| Input | Type | Meaning | +|---|---|---| +| `onb_score_section` | string | all (default), self-service, rbac, resource-management or extensibility. | + +## Output +categories[] with items[] (id, title, weight, recorded, recordedNote, evidence, evidenceFound, suggested), pointsPossible per category, totals, prerequisites[], recordedPendingWithEvidence[]. + +## Notes +- Admin only: the plugin refuses callers who are not CloudBolt admins. +- Synchronous: the result comes back inline. +- Any recorded status wins, pending included; evidence only suggests a status for unrecorded items. +- Evidence is strict and indicative; the customer's score column is their judgement. Built-in roles, stock recurring jobs and stock rules are excluded using CloudBolt's seed definitions (`initialize.cb_minimal`); 4.2.1 needs the Content Library index cache. diff --git a/mcp_tool_actions/MTA-znqpide5/MTA-znqpide5_metadata.json b/mcp_tool_actions/MTA-znqpide5/MTA-znqpide5_metadata.json new file mode 100644 index 00000000..73679e81 --- /dev/null +++ b/mcp_tool_actions/MTA-znqpide5/MTA-znqpide5_metadata.json @@ -0,0 +1,77 @@ +{ + "action_input_default_values": [], + "action_inputs": [ + { + "allow-multiple": false, + "available-all-servers": false, + "description": "blueprints, server-actions, resource-actions, orchestration-actions, rules, recurring-jobs, ui-extension-packages or cb-applets.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-jaxai79k", + "label": "Collection", + "name": "onb_cl_collection", + "placeholder": "server-actions", + "relevant-osfamilies": [], + "required": true, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "Display name or id of the item to install; empty returns the collection's items.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-rbunxfpb", + "label": "Item name or id (empty lists the collection)", + "name": "onb_cl_item", + "placeholder": "Resize Instance", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + }, + { + "allow-multiple": false, + "available-all-servers": false, + "description": "true refreshes an item that already exists on the appliance.", + "field-dependency-controlling-set": [], + "field-dependency-dependent-set": [], + "global-options": [], + "hide-if-default-value": true, + "id": "CF-m9dqp260", + "label": "Replace existing (true/false, default false)", + "name": "onb_cl_replace", + "placeholder": "false", + "relevant-osfamilies": [], + "required": false, + "show-as-attribute": false, + "show-on-servers": false, + "type": "STR", + "value-pattern-string": null + } + ], + "dependencies": { + "hook": "plugins/OHK-kst5rkhi" + }, + "enabled": true, + "id": "MTA-znqpide5", + "is_synchronous": false, + "label": "Onboarding: Install Content Library Item", + "last_updated": null, + "mcp_destructive_hint": false, + "mcp_idempotent_hint": true, + "mcp_open_world_hint": true, + "mcp_read_only_hint": false, + "mcp_tool_description": "Install an item from CloudBolt's Content Library (content.cloudbolt.app) the way the library page does: onb_cl_collection is one of blueprints, server-actions, resource-actions, orchestration-actions, rules, recurring-jobs, ui-extension-packages, cb-applets; onb_cl_item the item's display name or id (leave it empty to list the collection). Used for the Jupyter Notebooks UI extension (4.2.1), the tmp cleanup recurring job (4.2.2), Resize VM (3.2.1) and the Ad-Hoc Script action (4.1.2). onb_cl_replace=true refreshes an item that already exists. Needs outbound HTTPS from the appliance (prerequisite P5). Runs as a job: poll the returned id with fetch_job. Requires a CloudBolt admin caller.", + "mcp_tool_name": "onb_install_content_library_item", + "mcp_tool_title": "" +} diff --git a/mcp_tool_actions/MTA-znqpide5/README.md b/mcp_tool_actions/MTA-znqpide5/README.md new file mode 100644 index 00000000..37cf7651 --- /dev/null +++ b/mcp_tool_actions/MTA-znqpide5/README.md @@ -0,0 +1,26 @@ +# Onboarding: Install Content Library Item + +MCP Tool Action published to agents as `custom_onb_install_content_library_item`. Lists a Content Library collection or downloads one item from content.cloudbolt.app and imports it the way the library page does, for UI extensions, recurring jobs, server and resource actions, rules and blueprints. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). + +## Contents +| Role | ID | Name | +|---|---|---| +| MCP Tool Action | MTA-znqpide5 | Onboarding: Install Content Library Item | +| Plugin | [OHK-kst5rkhi](../../plugins/OHK-kst5rkhi/) | Onboarding: Install Content Library Item | + +## Inputs +| Input | Type | Meaning | +|---|---|---| +| `onb_cl_collection` | string, required | blueprints, server-actions, resource-actions, orchestration-actions, rules, recurring-jobs, ui-extension-packages or cb-applets. | +| `onb_cl_item` | string | Display name or id of the item to install; empty returns the collection's items. | +| `onb_cl_replace` | string | true refreshes an item that already exists on the appliance. | + +## Output +items[] when listing; otherwise collection, item (name, id, version), imported (model, global id, url), next. + +## Notes +- Admin only: the plugin refuses callers who are not CloudBolt admins. +- Asynchronous: the call returns a job id; poll it with `fetch_job` and read `outputs`. +- Asynchronous by design: the download comes from the internet. +- UI extensions need a web server restart before their pages open. diff --git a/mcp_tool_actions/MTA-zpohocjt/MTA-zpohocjt_metadata.json b/mcp_tool_actions/MTA-zpohocjt/MTA-zpohocjt_metadata.json index 53dfa5ef..a3b90f7f 100644 --- a/mcp_tool_actions/MTA-zpohocjt/MTA-zpohocjt_metadata.json +++ b/mcp_tool_actions/MTA-zpohocjt/MTA-zpohocjt_metadata.json @@ -27,13 +27,13 @@ "enabled": true, "id": "MTA-zpohocjt", "is_synchronous": true, - "label": "POC Onboarding: UI Link", + "label": "Onboarding: UI Link", "last_updated": null, "mcp_destructive_hint": false, "mcp_idempotent_hint": true, "mcp_open_world_hint": false, "mcp_read_only_hint": true, - "mcp_tool_description": "Return the absolute CloudBolt UI link for a global id (RH-, ENV-, GRP-, USR-, BP-, ORD-, JOB-, SVR-, RSC-, MTA-, CF-, SCR-, IDD-) or for a named admin page, optionally with an argument after a colon: new_resource_handler:aws (also azure_arm, vmware, scvmm, gcp, acropolis, openstack), handler_edit:RH-id, handler_verify:RH-id, handler_import_locations:RH-id, environment_parameters:ENV-id, new_ldap, ldap_verify:id, ldap_mappings:id, email_settings, email_test, proxy, ssl_certificates, parameters, new_parameter, os_builds, groups, group_quotas:GRP-id, users, new_user, user_edit:USR-id, roles, portals, catalog, content_library, source_code_repos, mcp_tool_actions, rules, recurring_jobs, cit_tests, inbound_webhooks, ui_extensions, application_log, setup_wizard, dashboard. Use it whenever the user must do something in the UI, above all when a password, key or secret has to be entered: never ask for secrets in chat, send the link. Read-only; requires a CloudBolt admin caller.", + "mcp_tool_description": "Return the absolute CloudBolt UI link for a global id (RH-, ENV-, GRP-, USR-, BP-, ORD-, JOB-, SVR-, RSC-, MTA-, CF-, SCR-, IDD-) or for a named admin page, optionally with an argument after a colon: new_resource_handler:aws (also azure_arm, vmware, scvmm, gcp, acropolis, openstack), handler_edit:RH-id, handler_verify:RH-id, handler_import_locations:RH-id, handler_images:RH-id (an image's guest credentials), environment_parameters:ENV-id, new_ldap, ldap_verify:id, ldap_mappings:id, email_settings, email_test, proxy, ssl_certificates, parameters, new_parameter, os_builds, groups, group_quotas:GRP-id, users, new_user, user_edit:USR-id, roles, portals, catalog, content_library, source_code_repos, mcp_tool_actions, rules, recurring_jobs, cit_tests, inbound_webhooks, ui_extensions, application_log, setup_wizard, dashboard. A page whose form CloudBolt opens as a dialog returns click, the button that opens it; tell the user to click it. Use it whenever the user must do something in the UI, above all when a password, key or secret has to be entered: never ask for secrets in chat, send the link. Read-only; requires a CloudBolt admin caller.", "mcp_tool_name": "onb_ui_link", "mcp_tool_title": "" } diff --git a/mcp_tool_actions/MTA-zpohocjt/README.md b/mcp_tool_actions/MTA-zpohocjt/README.md index ca464c6c..687268b2 100644 --- a/mcp_tool_actions/MTA-zpohocjt/README.md +++ b/mcp_tool_actions/MTA-zpohocjt/README.md @@ -1,13 +1,13 @@ -# POC Onboarding: UI Link +# Onboarding: UI Link -MCP Tool Action published to agents as `custom_onb_ui_link`. Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. -Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-poc-onboarding` skill drives; procedure in [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +MCP Tool Action published to agents as `custom_onb_ui_link`. Turns a CloudBolt global id or a named admin page (new resource handler per technology, a handler's images and their guest credentials, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. +Part of the Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8aaadefz/README.md)) that the `cb-onboarding` skill drives; procedure in [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). ## Contents | Role | ID | Name | |---|---|---| -| MCP Tool Action | MTA-zpohocjt | POC Onboarding: UI Link | -| Plugin | [OHK-1gp25bmt](../../plugins/OHK-1gp25bmt/) | POC Onboarding: UI Link | +| MCP Tool Action | MTA-zpohocjt | Onboarding: UI Link | +| Plugin | [OHK-1gp25bmt](../../plugins/OHK-1gp25bmt/) | Onboarding: UI Link | ## Inputs | Input | Type | Meaning | @@ -15,7 +15,7 @@ Part of the POC Onboarding Toolkit ([packages/PKG-8aaadefz](../../packages/PKG-8 | `onb_link_target` | string, required | A global id such as RH-abc12345, or a page key such as email_settings or user_edit:USR-abc12345. An unknown key returns the list of pages. | ## Output -url (absolute when the default portal has a domain), plus model/pk/label for an object or page/meaning for a named page. +url (absolute when the default portal has a domain), plus model/pk/label for an object or page/meaning for a named page, and click (the button that opens the form) when the form is a dialog. ## Notes - Admin only: the plugin refuses callers who are not CloudBolt admins. diff --git a/mcp_tool_actions/README.md b/mcp_tool_actions/README.md index bf48867f..42897244 100644 --- a/mcp_tool_actions/README.md +++ b/mcp_tool_actions/README.md @@ -9,30 +9,37 @@ Actions published as tools on CloudBolt's MCP server for AI agents to call. Each | Compare Azure List Prices | [MTA-ab0krash](MTA-ab0krash/README.md) | Looks up Azure public list prices for any service across the regions of the Azure environments the caller can order into, with monthly estimates and hints for refining the search. | `compare_azure_list_prices` | yes | [Compare Azure List Prices](../plugins/OHK-r9cm4oar/) | | Fetch Job Log | [MTA-8j9c0tb0](MTA-8j9c0tb0/README.md) | Returns a job's status, output, errors, progress log, child jobs, failed descendants, and sync results in one call so a failed job can be diagnosed. | `fetch_job_log` | yes | [Fetch Job Log](../plugins/OHK-2p0rhzup/) | | Manage Blueprint Permissions | [MTA-ntmcnvv7](MTA-ntmcnvv7/README.md) | Lists, grants, or revokes a group's DEPLOY or MANAGE permission on a blueprint, so a repository sync's loss of group permissions can be snapshotted and restored. | `manage_blueprint_permissions` | yes | [Manage Blueprint Permissions](../plugins/OHK-mgta9oez/) | +| Onboarding: Action Approval | [MTA-bp0rkcq9](MTA-bp0rkcq9/README.md) | Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver. | `onb_action_approval` | yes | [Onboarding: Action Approval](../plugins/OHK-ndsuxv0k/) | +| Onboarding: CIT Test from Order | [MTA-ckumouj0](MTA-ckumouj0/README.md) | Turns a finished blueprint order into a Continuous Infrastructure Testing test, the same as the order page's Add to CIT action. | `onb_cit_from_order` | yes | [Onboarding: CIT Test from Order](../plugins/OHK-yjow1qql/) | +| Onboarding: Configure Custom Server | [MTA-i1kmy5fd](MTA-i1kmy5fd/README.md) | Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments. | `onb_configure_custom_server` | yes | [Onboarding: Configure Custom Server](../plugins/OHK-ilstyopk/) | +| Onboarding: Environment Networks | [MTA-20u1ney4](MTA-20u1ney4/README.md) | Lists the networks an environment can offer on its first NIC and makes the chosen ones, up to five, its only NIC 1 choices, removing networks from every other NIC. | `onb_environment_networks` | yes | [Onboarding: Environment Networks](../plugins/OHK-0u7aonmo/) | +| Onboarding: Failed Servers | [MTA-36j661yp](MTA-36j661yp/README.md) | Lists servers left in Provision Failed state by failed orders and deletes the ones named, removing their VMs from the cloud when they exist. | `onb_failed_servers` | yes | [Onboarding: Failed Servers](../plugins/OHK-ep5vo2nu/) | +| Onboarding: Failure Trace | [MTA-jzscq0mk](MTA-jzscq0mk/README.md) | Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback. | `onb_failure_trace` | yes | [Onboarding: Failure Trace](../plugins/OHK-y95w8ai0/) | +| Onboarding: Group | [MTA-cpq7bvz4](MTA-cpq7bvz4/README.md) | Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items. | `onb_group` | yes | [Onboarding: Group](../plugins/OHK-efxm9m2b/) | +| Onboarding: Handler Locations | [MTA-89dxppus](MTA-89dxppus/README.md) | Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs. | `onb_handler_locations` | yes | [Onboarding: Handler Locations](../plugins/OHK-0nuhjdxl/) | +| Onboarding: Import Environments | [MTA-i6p4j2l7](MTA-i6p4j2l7/README.md) | Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced; vCenter networks are chosen afterwards with onb_environment_networks), and reports existing environments instead of duplicating them. | `onb_import_environments` | yes | [Onboarding: Import Environments](../plugins/OHK-8j06wtoe/) | +| Onboarding: Import OS Build | [MTA-0dr8xi4i](MTA-0dr8xi4i/README.md) | Lists a handler's cached images for a location or imports one (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing a build of the same name so one build spans handlers, refreshing an empty cache without the whitelist, and attaching the build to the environments. | `onb_import_os_build` | yes | [Onboarding: Import OS Build](../plugins/OHK-k2p8ll4p/) | +| Onboarding: Install | [MTA-6zxrhdls](MTA-6zxrhdls/README.md) | Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version. | `onb_install` | yes | [Onboarding: Install](../plugins/OHK-j60flmb3/) | +| Onboarding: Install Content Library Item | [MTA-znqpide5](MTA-znqpide5/README.md) | Lists a Content Library collection or downloads one item from content.cloudbolt.app and imports it the way the library page does, for UI extensions, recurring jobs, server and resource actions, rules and blueprints. | `onb_install_content_library_item` | yes | [Onboarding: Install Content Library Item](../plugins/OHK-kst5rkhi/) | +| Onboarding: LDAP Mapping | [MTA-e5qv0zay](MTA-e5qv0zay/README.md) | Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login. | `onb_ldap_mapping` | yes | [Onboarding: LDAP Mapping](../plugins/OHK-s76tknmk/) | +| Onboarding: Network Addressing | [MTA-z3h0o9t3](MTA-z3h0o9t3/README.md) | Sets how servers on a network get their IP address (DHCP, static with gateway and netmask, a CloudBolt IP pool, an IPAM endpoint, or an IP typed per order) and verifies it with the network's IP provider. | `onb_network_addressing` | yes | [Onboarding: Network Addressing](../plugins/OHK-gjfc20pv/) | +| Onboarding: Parameter | [MTA-70aez9bm](MTA-70aez9bm/README.md) | Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease. | `onb_parameter` | yes | [Onboarding: Parameter](../plugins/OHK-f6kqrklx/) | +| Onboarding: Playbook | [MTA-92b836jb](MTA-92b836jb/README.md) | Returns a section of the onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. | `onb_playbook` | yes | [Onboarding: Playbook](../plugins/OHK-1am7i73s/) | +| Onboarding: Recent Errors | [MTA-hwg74btd](MTA-hwg74btd/README.md) | Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most. | `onb_recent_errors` | yes | [Onboarding: Recent Errors](../plugins/OHK-4vwq70dg/) | +| Onboarding: Remove Environment | [MTA-pz5o2gjl](MTA-pz5o2gjl/README.md) | Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it. | `onb_remove_environment` | yes | [Onboarding: Remove Environment](../plugins/OHK-1wmzl7sp/) | +| Onboarding: Scorecard | [MTA-zfoxwh12](MTA-zfoxwh12/README.md) | Builds the POC test plan scorecard from the recorded item statuses and live evidence on the appliance (orders, handlers, environments, groups, mappings, actions, jobs), per category with weights. | `onb_scorecard` | yes | [Onboarding: Scorecard](../plugins/OHK-yqu8b25o/) | +| Onboarding: Set Item Status | [MTA-p72v9y76](MTA-p72v9y76/README.md) | Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read. | `onb_set_item_status` | yes | [Onboarding: Set Item Status](../plugins/OHK-5885tete/) | +| Onboarding: SMTP Settings | [MTA-89w58iux](MTA-89w58iux/README.md) | Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings. | `onb_smtp` | yes | [Onboarding: SMTP Settings](../plugins/OHK-be18kqal/) | +| Onboarding: SMTP Test | [MTA-qab6r2gk](MTA-qab6r2gk/README.md) | Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails. | `onb_smtp_test` | yes | [Onboarding: SMTP Test](../plugins/OHK-jdyan3in/) | +| Onboarding: Status | [MTA-1985b88g](MTA-1985b88g/README.md) | Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links. | `onb_status` | yes | [Onboarding: Status](../plugins/OHK-5zg1dkcr/) | +| Onboarding: Sync Images | [MTA-po1gmnou](MTA-po1gmnou/README.md) | Fills a resource handler's image cache now without the image whitelist and enables the recurring job and rule that keep it fresh, so the image pickers and onb_import_os_build see every image the credentials can. | `onb_sync_images` | yes | [Onboarding: Sync Images](../plugins/OHK-bbhlwspa/) | +| Onboarding: Tag Mapping | [MTA-0689nxjy](MTA-0689nxjy/README.md) | Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag. | `onb_tag_mapping` | yes | [Onboarding: Tag Mapping](../plugins/OHK-b8c90uok/) | +| Onboarding: Trim Environment Order Form | [MTA-iyknuxox](MTA-iyknuxox/README.md) | Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size, the NIC 1 networks chosen with onb_environment_networks and, where needed, the password; the report profile only lists the current form. | `onb_trim_environment` | yes | [Onboarding: Trim Environment Order Form](../plugins/OHK-qn4k1pme/) | +| Onboarding: UI Link | [MTA-zpohocjt](MTA-zpohocjt/README.md) | Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. | `onb_ui_link` | yes | [Onboarding: UI Link](../plugins/OHK-1gp25bmt/) | +| Onboarding: User | [MTA-tuzkb8h4](MTA-tuzkb8h4/README.md) | Assigns roles in a group to a local POC user; a user that does not exist yet is added by the admin on the Users list with its password, and the tool says how. | `onb_user` | yes | [Onboarding: User](../plugins/OHK-8in52yhn/) | +| Onboarding: Verify LDAP | [MTA-kw8krevn](MTA-kw8krevn/README.md) | Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it. | `onb_verify_ldap` | yes | [Onboarding: Verify LDAP](../plugins/OHK-j82f4ibp/) | +| Onboarding: Verify Resource Handler | [MTA-r5v1eblg](MTA-r5v1eblg/README.md) | Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool. | `onb_verify_resource_handler` | yes | [Onboarding: Verify Resource Handler](../plugins/OHK-s7cdvkpr/) | | Order Counts by Blueprint | [MTA-lp8lgi7e](MTA-lp8lgi7e/) | Return the number of orders placed for each blueprint, optionally filtered by order status. | `order_counts_by_blueprint` | yes | [Order Counts by Blueprint](../plugins/OHK-yjblxbwg/) | -| POC Onboarding: Action Approval | [MTA-bp0rkcq9](MTA-bp0rkcq9/README.md) | Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver. | `onb_action_approval` | yes | [POC Onboarding: Action Approval](../plugins/OHK-ndsuxv0k/) | -| POC Onboarding: Configure Custom Server | [MTA-i1kmy5fd](MTA-i1kmy5fd/README.md) | Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments. | `onb_configure_custom_server` | yes | [POC Onboarding: Configure Custom Server](../plugins/OHK-ilstyopk/) | -| POC Onboarding: Failure Trace | [MTA-jzscq0mk](MTA-jzscq0mk/README.md) | Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback. | `onb_failure_trace` | yes | [POC Onboarding: Failure Trace](../plugins/OHK-y95w8ai0/) | -| POC Onboarding: Group | [MTA-cpq7bvz4](MTA-cpq7bvz4/README.md) | Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items. | `onb_group` | yes | [POC Onboarding: Group](../plugins/OHK-efxm9m2b/) | -| POC Onboarding: Handler Locations | [MTA-89dxppus](MTA-89dxppus/README.md) | Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs. | `onb_handler_locations` | yes | [POC Onboarding: Handler Locations](../plugins/OHK-0nuhjdxl/) | -| POC Onboarding: Import Environments | [MTA-i6p4j2l7](MTA-i6p4j2l7/README.md) | Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced, vCenter cluster networks attached to NIC 1), and reports existing environments instead of duplicating them. | `onb_import_environments` | yes | [POC Onboarding: Import Environments](../plugins/OHK-8j06wtoe/) | -| POC Onboarding: Import OS Build | [MTA-0dr8xi4i](MTA-0dr8xi4i/README.md) | Imports one image (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing an existing build of the same name so one build spans handlers, and attaches the build to the handler's environments. | `onb_import_os_build` | yes | [POC Onboarding: Import OS Build](../plugins/OHK-k2p8ll4p/) | -| POC Onboarding: Install | [MTA-6zxrhdls](MTA-6zxrhdls/README.md) | Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version. | `onb_install` | yes | [POC Onboarding: Install](../plugins/OHK-j60flmb3/) | -| POC Onboarding: LDAP Mapping | [MTA-e5qv0zay](MTA-e5qv0zay/README.md) | Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login. | `onb_ldap_mapping` | yes | [POC Onboarding: LDAP Mapping](../plugins/OHK-s76tknmk/) | -| POC Onboarding: Parameter | [MTA-70aez9bm](MTA-70aez9bm/README.md) | Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease. | `onb_parameter` | yes | [POC Onboarding: Parameter](../plugins/OHK-f6kqrklx/) | -| POC Onboarding: Playbook | [MTA-92b836jb](MTA-92b836jb/README.md) | Returns a section of the POC onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. | `onb_playbook` | yes | [POC Onboarding: Playbook](../plugins/OHK-1am7i73s/) | -| POC Onboarding: Recent Errors | [MTA-hwg74btd](MTA-hwg74btd/README.md) | Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most. | `onb_recent_errors` | yes | [POC Onboarding: Recent Errors](../plugins/OHK-4vwq70dg/) | -| POC Onboarding: Remove Environment | [MTA-pz5o2gjl](MTA-pz5o2gjl/README.md) | Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it. | `onb_remove_environment` | yes | [POC Onboarding: Remove Environment](../plugins/OHK-1wmzl7sp/) | -| POC Onboarding: Set Item Status | [MTA-p72v9y76](MTA-p72v9y76/README.md) | Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read. | `onb_set_item_status` | yes | [POC Onboarding: Set Item Status](../plugins/OHK-5885tete/) | -| POC Onboarding: SMTP Settings | [MTA-89w58iux](MTA-89w58iux/README.md) | Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings. | `onb_smtp` | yes | [POC Onboarding: SMTP Settings](../plugins/OHK-be18kqal/) | -| POC Onboarding: SMTP Test | [MTA-qab6r2gk](MTA-qab6r2gk/README.md) | Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails. | `onb_smtp_test` | yes | [POC Onboarding: SMTP Test](../plugins/OHK-jdyan3in/) | -| POC Onboarding: Status | [MTA-1985b88g](MTA-1985b88g/README.md) | Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links. | `onb_status` | yes | [POC Onboarding: Status](../plugins/OHK-5zg1dkcr/) | -| POC Onboarding: Tag Mapping | [MTA-0689nxjy](MTA-0689nxjy/README.md) | Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag. | `onb_tag_mapping` | yes | [POC Onboarding: Tag Mapping](../plugins/OHK-b8c90uok/) | -| POC Onboarding: Trim Environment Order Form | [MTA-iyknuxox](MTA-iyknuxox/README.md) | Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size and, where needed, the network and password; the report profile only lists the current form. | `onb_trim_environment` | yes | [POC Onboarding: Trim Environment Order Form](../plugins/OHK-qn4k1pme/) | -| POC Onboarding: UI Link | [MTA-zpohocjt](MTA-zpohocjt/README.md) | Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. | `onb_ui_link` | yes | [POC Onboarding: UI Link](../plugins/OHK-1gp25bmt/) | -| POC Onboarding: User | [MTA-tuzkb8h4](MTA-tuzkb8h4/README.md) | Creates a local user with no usable password and assigns roles in a group, returning the edit link where the admin sets the password; an existing user only gets the roles. | `onb_user` | yes | [POC Onboarding: User](../plugins/OHK-8in52yhn/) | -| POC Onboarding: Verify LDAP | [MTA-kw8krevn](MTA-kw8krevn/README.md) | Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it. | `onb_verify_ldap` | yes | [POC Onboarding: Verify LDAP](../plugins/OHK-j82f4ibp/) | -| POC Onboarding: Verify Resource Handler | [MTA-r5v1eblg](MTA-r5v1eblg/README.md) | Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool. | `onb_verify_resource_handler` | yes | [POC Onboarding: Verify Resource Handler](../plugins/OHK-s7cdvkpr/) | | Rerun Job | [MTA-zth0tjjg](MTA-zth0tjjg/README.md) | Reruns a finished CloudBolt job with its original parameters, or resumes a paused one, like the Rerun and Resume buttons on the job's page. | `rerun_job` | yes | [Rerun Job](../plugins/OHK-ukp8n10w/) | | Restart Web Workers (Dev Appliances Only) | [MTA-8x7ay37f](MTA-8x7ay37f/README.md) | Recycles the mod_wsgi web worker processes on a development appliance, one at a time, so freshly synced extension routes and views load. | `dev_restart_web_workers` | yes | [Restart Web Workers (Dev Appliances Only)](../plugins/OHK-26ozyhui/) | | Run Blueprint Discovery | [MTA-9oihpumd](MTA-9oihpumd/README.md) | Launches the Sync Resources job for one blueprint so its discovery plugin runs on demand. | `run_blueprint_discovery` | yes | [Run Blueprint Discovery](../plugins/OHK-dwh5kqxq/) | diff --git a/orchestration_actions/HPA-2ud31gkx/HPA-2ud31gkx_metadata.json b/orchestration_actions/HPA-2ud31gkx/HPA-2ud31gkx_metadata.json new file mode 100644 index 00000000..101877ba --- /dev/null +++ b/orchestration_actions/HPA-2ud31gkx/HPA-2ud31gkx_metadata.json @@ -0,0 +1,15 @@ +{ + "action_input_default_values": [], + "continue_on_failure": false, + "dependencies": { + "hook": "plugins/OHK-f1ol9j5k" + }, + "description": "Fills the Application order-form parameter from Python with one list of business applications that every group sees.", + "enabled": true, + "hook_point": "Generated Parameter Options", + "id": "HPA-2ud31gkx", + "last_updated": null, + "name": "Generate options for 'Application'", + "run_on_statuses": "", + "run_seq": 1 +} diff --git a/orchestration_actions/HPA-2ud31gkx/README.md b/orchestration_actions/HPA-2ud31gkx/README.md new file mode 100644 index 00000000..5f7424eb --- /dev/null +++ b/orchestration_actions/HPA-2ud31gkx/README.md @@ -0,0 +1,12 @@ +# Generate options for 'Application' + +Generated Parameter Options action for the `application` parameter of the [Standard Server](../../blueprints/BP-x78p48gz/README.md) blueprint. The plugin returns one list of business applications from Python that every group sees, which is the test plan's Python-backed parameter options item (4.3.1); replace the list with a CMDB lookup to show live options. + +## Contents +| Role | ID | Name | +|---|---|---| +| Orchestration action | HPA-2ud31gkx | Generate options for 'Application' | +| Plugin | [OHK-f1ol9j5k](../../plugins/OHK-f1ol9j5k/) | Generate options for 'Application' | + +## Setup +Syncs with the Standard Server blueprint, whose `application` parameter names this action in `gen_options_hooks`. To use it elsewhere, add the parameter to an environment or blueprint and pick this action under the parameter's Generated Options. diff --git a/orchestration_actions/HPA-onelxnkw/HPA-onelxnkw_metadata.json b/orchestration_actions/HPA-onelxnkw/HPA-onelxnkw_metadata.json new file mode 100644 index 00000000..e2c2e7f8 --- /dev/null +++ b/orchestration_actions/HPA-onelxnkw/HPA-onelxnkw_metadata.json @@ -0,0 +1,15 @@ +{ + "action_input_default_values": [], + "continue_on_failure": false, + "dependencies": { + "hook": "plugins/OHK-vwpjfa9d" + }, + "description": "Fills the Maintenance Window order-form parameter from Python with weekly two-hour UTC windows.", + "enabled": true, + "hook_point": "Generated Parameter Options", + "id": "HPA-onelxnkw", + "last_updated": null, + "name": "Generate options for 'Maintenance Window'", + "run_on_statuses": "", + "run_seq": 1 +} diff --git a/orchestration_actions/HPA-onelxnkw/README.md b/orchestration_actions/HPA-onelxnkw/README.md new file mode 100644 index 00000000..baa34113 --- /dev/null +++ b/orchestration_actions/HPA-onelxnkw/README.md @@ -0,0 +1,12 @@ +# Generate options for 'Maintenance Window' + +Generated Parameter Options action for the `maintenance_window` parameter of the [Standard Server](../../blueprints/BP-x78p48gz/README.md) blueprint. The plugin computes weekly two-hour windows in UTC (02:00 and 22:00 starts on each day), so the options come from code rather than a fixed list (4.3.1). + +## Contents +| Role | ID | Name | +|---|---|---| +| Orchestration action | HPA-onelxnkw | Generate options for 'Maintenance Window' | +| Plugin | [OHK-vwpjfa9d](../../plugins/OHK-vwpjfa9d/) | Generate options for 'Maintenance Window' | + +## Setup +Syncs with the Standard Server blueprint, whose `maintenance_window` parameter names this action in `gen_options_hooks`. Edit `DAYS`, `START_HOURS` or `LENGTH_HOURS` in the plugin to match the change calendar. diff --git a/orchestration_actions/README.md b/orchestration_actions/README.md index bb57afa0..5ea2cb18 100644 --- a/orchestration_actions/README.md +++ b/orchestration_actions/README.md @@ -16,7 +16,9 @@ Lifecycle hooks. Actions marked disabled ship that way on purpose; read the READ | Configure Data Disks from Disk Map (Oracle Linux) | [HPA-4ptcwgg4](HPA-4ptcwgg4/README.md) | At Post-Provision, turns the disks from each Oracle Linux server's disk_map into LVM volumes with XFS file systems mounted at their mount points inside the guest. | Post-Provision | yes | [Configure Data Disks from Disk Map (Oracle Linux)](../plugins/OHK-9h9vphf5/) | | Configure Data Disks from Disk Map (Windows) | [HPA-42uy9dyo](HPA-42uy9dyo/README.md) | At Post-Provision, formats the disks from each Windows server's disk_map inside the guest with their drive letters and NTFS labels. | Post-Provision | yes | [Configure Data Disks from Disk Map (Windows)](../plugins/OHK-pdwb3xso/) | | Delete Windows Computer Object from AD | [HPA-q181uofy](HPA-q181uofy/README.md) | Deletes the Active Directory computer object of each Windows server being deleted at Pre-Delete. | Pre-Delete | yes | [Delete Windows Computer Object from AD](../plugins/OHK-bkoau0j8/) | +| Generate options for 'Application' | [HPA-2ud31gkx](HPA-2ud31gkx/README.md) | Fills the Application order-form parameter from Python with one list of business applications that every group sees. | Generated Parameter Options | yes | [Generate options for 'Application'](../plugins/OHK-f1ol9j5k/) | | Generate options for 'Expiration Date' | [HPA-qb0w86mi](HPA-qb0w86mi/README.md) | Pre-fills the Expiration Date order-form parameter with a default of seven days from now. | Generated Parameter Options | yes | [Generate options for 'Expiration Date'](../plugins/OHK-cfciy0fo/) | +| Generate options for 'Maintenance Window' | [HPA-onelxnkw](HPA-onelxnkw/README.md) | Fills the Maintenance Window order-form parameter from Python with weekly two-hour UTC windows. | Generated Parameter Options | yes | [Generate options for 'Maintenance Window'](../plugins/OHK-vwpjfa9d/) | | Generate options for Ansible job template maps | [HPA-aualk6ei](HPA-aualk6ei/) | Lists the Variable Maps that are Ansible job template maps so an admin pins a blueprint's ansible_job_template_maps parameter from a dropdown. | Generated Parameter Options | yes | [Generate options for Ansible job template maps](../plugins/OHK-7i1fk0l5/) | | Generate Options for Domain Service Account | [HPA-g8pqv6uv](HPA-g8pqv6uv/README.md) | Lists every connection info labeled domain_service_account as the choices for the domain_service_account parameter. | Generated Parameter Options | yes | [Generate Options for Domain Service Account](../plugins/OHK-ww524a3e/) | | Generate options for HCP Terraform coordinates | [HPA-swe1kifa](HPA-swe1kifa/) | Lists HCP Terraform connections, organizations, projects and no-code modules so an admin pins a no-code blueprint's coordinates from dropdowns. | Generated Parameter Options | yes | [Generate options for HCP Terraform coordinates](../plugins/OHK-529jjzli/) | diff --git a/packages/PKG-8aaadefz/PKG-8aaadefz_metadata.json b/packages/PKG-8aaadefz/PKG-8aaadefz_metadata.json index eb121075..8849d70e 100644 --- a/packages/PKG-8aaadefz/PKG-8aaadefz_metadata.json +++ b/packages/PKG-8aaadefz/PKG-8aaadefz_metadata.json @@ -1,37 +1,47 @@ { "contents": [ - "mcp_tool_actions/MTA-6zxrhdls", - "mcp_tool_actions/MTA-1985b88g", - "mcp_tool_actions/MTA-zpohocjt", - "mcp_tool_actions/MTA-hwg74btd", - "mcp_tool_actions/MTA-jzscq0mk", - "mcp_tool_actions/MTA-r5v1eblg", - "mcp_tool_actions/MTA-92b836jb", - "mcp_tool_actions/MTA-p72v9y76", - "mcp_tool_actions/MTA-89dxppus", - "mcp_tool_actions/MTA-i6p4j2l7", - "mcp_tool_actions/MTA-iyknuxox", + "mcp_tool_actions/MTA-0689nxjy", "mcp_tool_actions/MTA-0dr8xi4i", - "mcp_tool_actions/MTA-i1kmy5fd", - "mcp_tool_actions/MTA-pz5o2gjl", + "mcp_tool_actions/MTA-1985b88g", + "mcp_tool_actions/MTA-20u1ney4", + "mcp_tool_actions/MTA-36j661yp", + "mcp_tool_actions/MTA-543b19sa", + "mcp_tool_actions/MTA-6zxrhdls", "mcp_tool_actions/MTA-70aez9bm", - "mcp_tool_actions/MTA-cpq7bvz4", - "mcp_tool_actions/MTA-tuzkb8h4", + "mcp_tool_actions/MTA-89dxppus", + "mcp_tool_actions/MTA-89w58iux", + "mcp_tool_actions/MTA-8j9c0tb0", + "mcp_tool_actions/MTA-92b836jb", "mcp_tool_actions/MTA-bp0rkcq9", - "mcp_tool_actions/MTA-0689nxjy", + "mcp_tool_actions/MTA-ckumouj0", + "mcp_tool_actions/MTA-cpq7bvz4", "mcp_tool_actions/MTA-e5qv0zay", + "mcp_tool_actions/MTA-gnx1ckno", + "mcp_tool_actions/MTA-hwg74btd", + "mcp_tool_actions/MTA-i1kmy5fd", + "mcp_tool_actions/MTA-i6p4j2l7", + "mcp_tool_actions/MTA-iyknuxox", + "mcp_tool_actions/MTA-jzscq0mk", "mcp_tool_actions/MTA-kw8krevn", - "mcp_tool_actions/MTA-89w58iux", + "mcp_tool_actions/MTA-ntmcnvv7", + "mcp_tool_actions/MTA-p72v9y76", + "mcp_tool_actions/MTA-po1gmnou", + "mcp_tool_actions/MTA-pz5o2gjl", "mcp_tool_actions/MTA-qab6r2gk", - "mcp_tool_actions/MTA-543b19sa", - "mcp_tool_actions/MTA-8j9c0tb0", - "mcp_tool_actions/MTA-ntmcnvv7" + "mcp_tool_actions/MTA-r5v1eblg", + "mcp_tool_actions/MTA-thkvyt0v", + "mcp_tool_actions/MTA-tuzkb8h4", + "mcp_tool_actions/MTA-z3h0o9t3", + "mcp_tool_actions/MTA-zfoxwh12", + "mcp_tool_actions/MTA-znqpide5", + "mcp_tool_actions/MTA-zpohocjt", + "webhooks/IWH-f16qxnhm" ], - "description": "Installs the MCP tools the POC onboarding skill drives: appliance status with next steps, admin UI links, log and failure diagnosis, resource handler verification and location import, environment creation, order-form trimming, OS build import, Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, the playbook text, the install step and POC item tracking, plus the repository sync, job log and blueprint permission tools they reuse.", + "description": "Installs the MCP tools the onboarding skill drives (appliance status with next steps, admin UI links, log and failure diagnosis, failed-server cleanup, resource handler verification, image cache sync and location import, environment creation, order-form trimming, OS build import, environment networks and their addressing (DHCP, static, IP pool, IPAM), Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, Content Library installs, CIT tests from orders, the scorecard, the playbook text, the install step and POC item tracking), the repository sync, job log and blueprint permission tools they reuse, and the echo webhook for the test plan's webhook item; the Standard Server blueprint is synced on its own after a parameter-name check.", "id": "PKG-8aaadefz", - "last_updated": "2026-10-19", + "last_updated": "2026-10-29", "metadata_version": "2026.1.0", "minimum_version_required": "", - "name": "POC Onboarding Toolkit", - "version": "0.3.0" + "name": "Onboarding Toolkit", + "version": "0.8.0" } diff --git a/packages/PKG-8aaadefz/README.md b/packages/PKG-8aaadefz/README.md index a7f91129..6be17b8c 100644 --- a/packages/PKG-8aaadefz/README.md +++ b/packages/PKG-8aaadefz/README.md @@ -1,34 +1,44 @@ -# POC Onboarding Toolkit +# Onboarding Toolkit -Installs the MCP tools the POC onboarding skill drives: appliance status with next steps, admin UI links, log and failure diagnosis, resource handler verification and location import, environment creation, order-form trimming, OS build import, Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, the playbook text, the install step and POC item tracking, plus the repository sync, job log and blueprint permission tools they reuse. +Installs the MCP tools the onboarding skill drives (appliance status with next steps, admin UI links, log and failure diagnosis, failed-server cleanup, resource handler verification, image cache sync and location import, environment creation, order-form trimming, OS build import, Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, Content Library installs, CIT tests from orders, the scorecard, the playbook text, the install step and POC item tracking), the repository sync, job log and blueprint permission tools they reuse, and the echo webhook for the test plan's webhook item. The Standard Server blueprint ([blueprints/BP-x78p48gz](../../blueprints/BP-x78p48gz/README.md)) is not a member: the skill syncs it in the extensibility phase after checking that its parameter names are free. -Content package `PKG-8aaadefz`, version 0.3.0. Sync it from the Content Packages admin page (Content Package Manager UI extension). After the first import run the `onb_install` tool (asynchronous; poll the job) to turn Synchronous Action on for the inline tools, then reconnect the MCP client. Setup for a customer appliance: [docs/poc-onboarding-setup.md](../../docs/poc-onboarding-setup.md); the procedure the agent follows: [.claude/skills/cb-poc-onboarding/SKILL.md](../../.claude/skills/cb-poc-onboarding/SKILL.md). +Content package `PKG-8aaadefz`, version 0.8.0. Sync it from the Content Packages admin page (Content Package Manager UI extension); for an update, run Import from repository again first, because Sync uses the member list saved at import. After the first import run the `onb_install` tool (asynchronous; poll the job) to turn Synchronous Action on for the inline tools, then reconnect the MCP client. Setup for a customer appliance: [docs/onboarding-setup.md](../../docs/onboarding-setup.md); the procedure the agent follows: [.claude/skills/cb-onboarding/SKILL.md](../../.claude/skills/cb-onboarding/SKILL.md). | Type | Name | Folder | |---|---|---| -| MCP tool action | POC Onboarding: Install | [mcp_tool_actions/MTA-6zxrhdls](../../mcp_tool_actions/MTA-6zxrhdls/) | -| MCP tool action | POC Onboarding: Status | [mcp_tool_actions/MTA-1985b88g](../../mcp_tool_actions/MTA-1985b88g/) | -| MCP tool action | POC Onboarding: UI Link | [mcp_tool_actions/MTA-zpohocjt](../../mcp_tool_actions/MTA-zpohocjt/) | -| MCP tool action | POC Onboarding: Recent Errors | [mcp_tool_actions/MTA-hwg74btd](../../mcp_tool_actions/MTA-hwg74btd/) | -| MCP tool action | POC Onboarding: Failure Trace | [mcp_tool_actions/MTA-jzscq0mk](../../mcp_tool_actions/MTA-jzscq0mk/) | -| MCP tool action | POC Onboarding: Verify Resource Handler | [mcp_tool_actions/MTA-r5v1eblg](../../mcp_tool_actions/MTA-r5v1eblg/) | -| MCP tool action | POC Onboarding: Playbook | [mcp_tool_actions/MTA-92b836jb](../../mcp_tool_actions/MTA-92b836jb/) | -| MCP tool action | POC Onboarding: Set Item Status | [mcp_tool_actions/MTA-p72v9y76](../../mcp_tool_actions/MTA-p72v9y76/) | -| MCP tool action | POC Onboarding: Handler Locations | [mcp_tool_actions/MTA-89dxppus](../../mcp_tool_actions/MTA-89dxppus/) | -| MCP tool action | POC Onboarding: Import Environments | [mcp_tool_actions/MTA-i6p4j2l7](../../mcp_tool_actions/MTA-i6p4j2l7/) | -| MCP tool action | POC Onboarding: Trim Environment Order Form | [mcp_tool_actions/MTA-iyknuxox](../../mcp_tool_actions/MTA-iyknuxox/) | -| MCP tool action | POC Onboarding: Import OS Build | [mcp_tool_actions/MTA-0dr8xi4i](../../mcp_tool_actions/MTA-0dr8xi4i/) | -| MCP tool action | POC Onboarding: Configure Custom Server | [mcp_tool_actions/MTA-i1kmy5fd](../../mcp_tool_actions/MTA-i1kmy5fd/) | -| MCP tool action | POC Onboarding: Remove Environment | [mcp_tool_actions/MTA-pz5o2gjl](../../mcp_tool_actions/MTA-pz5o2gjl/) | -| MCP tool action | POC Onboarding: Parameter | [mcp_tool_actions/MTA-70aez9bm](../../mcp_tool_actions/MTA-70aez9bm/) | -| MCP tool action | POC Onboarding: Group | [mcp_tool_actions/MTA-cpq7bvz4](../../mcp_tool_actions/MTA-cpq7bvz4/) | -| MCP tool action | POC Onboarding: User | [mcp_tool_actions/MTA-tuzkb8h4](../../mcp_tool_actions/MTA-tuzkb8h4/) | -| MCP tool action | POC Onboarding: Action Approval | [mcp_tool_actions/MTA-bp0rkcq9](../../mcp_tool_actions/MTA-bp0rkcq9/) | -| MCP tool action | POC Onboarding: Tag Mapping | [mcp_tool_actions/MTA-0689nxjy](../../mcp_tool_actions/MTA-0689nxjy/) | -| MCP tool action | POC Onboarding: LDAP Mapping | [mcp_tool_actions/MTA-e5qv0zay](../../mcp_tool_actions/MTA-e5qv0zay/) | -| MCP tool action | POC Onboarding: Verify LDAP | [mcp_tool_actions/MTA-kw8krevn](../../mcp_tool_actions/MTA-kw8krevn/) | -| MCP tool action | POC Onboarding: SMTP Settings | [mcp_tool_actions/MTA-89w58iux](../../mcp_tool_actions/MTA-89w58iux/) | -| MCP tool action | POC Onboarding: SMTP Test | [mcp_tool_actions/MTA-qab6r2gk](../../mcp_tool_actions/MTA-qab6r2gk/) | +| MCP tool action | Onboarding: Install | [mcp_tool_actions/MTA-6zxrhdls](../../mcp_tool_actions/MTA-6zxrhdls/) | +| MCP tool action | Onboarding: Status | [mcp_tool_actions/MTA-1985b88g](../../mcp_tool_actions/MTA-1985b88g/) | +| MCP tool action | Onboarding: UI Link | [mcp_tool_actions/MTA-zpohocjt](../../mcp_tool_actions/MTA-zpohocjt/) | +| MCP tool action | Onboarding: Recent Errors | [mcp_tool_actions/MTA-hwg74btd](../../mcp_tool_actions/MTA-hwg74btd/) | +| MCP tool action | Onboarding: Failure Trace | [mcp_tool_actions/MTA-jzscq0mk](../../mcp_tool_actions/MTA-jzscq0mk/) | +| MCP tool action | Onboarding: Verify Resource Handler | [mcp_tool_actions/MTA-r5v1eblg](../../mcp_tool_actions/MTA-r5v1eblg/) | +| MCP tool action | Onboarding: Playbook | [mcp_tool_actions/MTA-92b836jb](../../mcp_tool_actions/MTA-92b836jb/) | +| MCP tool action | Onboarding: Set Item Status | [mcp_tool_actions/MTA-p72v9y76](../../mcp_tool_actions/MTA-p72v9y76/) | +| MCP tool action | Onboarding: Sync Images | [mcp_tool_actions/MTA-po1gmnou](../../mcp_tool_actions/MTA-po1gmnou/) | +| MCP tool action | Onboarding: Environment Networks | [mcp_tool_actions/MTA-20u1ney4](../../mcp_tool_actions/MTA-20u1ney4/) | +| MCP tool action | Onboarding: Network Addressing | [mcp_tool_actions/MTA-z3h0o9t3](../../mcp_tool_actions/MTA-z3h0o9t3/) | +| MCP tool action | Onboarding: Handler Locations | [mcp_tool_actions/MTA-89dxppus](../../mcp_tool_actions/MTA-89dxppus/) | +| MCP tool action | Onboarding: Import Environments | [mcp_tool_actions/MTA-i6p4j2l7](../../mcp_tool_actions/MTA-i6p4j2l7/) | +| MCP tool action | Onboarding: Trim Environment Order Form | [mcp_tool_actions/MTA-iyknuxox](../../mcp_tool_actions/MTA-iyknuxox/) | +| MCP tool action | Onboarding: Import OS Build | [mcp_tool_actions/MTA-0dr8xi4i](../../mcp_tool_actions/MTA-0dr8xi4i/) | +| MCP tool action | Onboarding: Configure Custom Server | [mcp_tool_actions/MTA-i1kmy5fd](../../mcp_tool_actions/MTA-i1kmy5fd/) | +| MCP tool action | Onboarding: Remove Environment | [mcp_tool_actions/MTA-pz5o2gjl](../../mcp_tool_actions/MTA-pz5o2gjl/) | +| MCP tool action | Onboarding: Failed Servers | [mcp_tool_actions/MTA-36j661yp](../../mcp_tool_actions/MTA-36j661yp/) | +| MCP tool action | Onboarding: Parameter | [mcp_tool_actions/MTA-70aez9bm](../../mcp_tool_actions/MTA-70aez9bm/) | +| MCP tool action | Onboarding: Group | [mcp_tool_actions/MTA-cpq7bvz4](../../mcp_tool_actions/MTA-cpq7bvz4/) | +| MCP tool action | Onboarding: User | [mcp_tool_actions/MTA-tuzkb8h4](../../mcp_tool_actions/MTA-tuzkb8h4/) | +| MCP tool action | Onboarding: Action Approval | [mcp_tool_actions/MTA-bp0rkcq9](../../mcp_tool_actions/MTA-bp0rkcq9/) | +| MCP tool action | Onboarding: Tag Mapping | [mcp_tool_actions/MTA-0689nxjy](../../mcp_tool_actions/MTA-0689nxjy/) | +| MCP tool action | Onboarding: LDAP Mapping | [mcp_tool_actions/MTA-e5qv0zay](../../mcp_tool_actions/MTA-e5qv0zay/) | +| MCP tool action | Onboarding: Verify LDAP | [mcp_tool_actions/MTA-kw8krevn](../../mcp_tool_actions/MTA-kw8krevn/) | +| MCP tool action | Onboarding: SMTP Settings | [mcp_tool_actions/MTA-89w58iux](../../mcp_tool_actions/MTA-89w58iux/) | +| MCP tool action | Onboarding: SMTP Test | [mcp_tool_actions/MTA-qab6r2gk](../../mcp_tool_actions/MTA-qab6r2gk/) | +| MCP tool action | Onboarding: Install Content Library Item | [mcp_tool_actions/MTA-znqpide5](../../mcp_tool_actions/MTA-znqpide5/) | +| MCP tool action | Onboarding: CIT Test from Order | [mcp_tool_actions/MTA-ckumouj0](../../mcp_tool_actions/MTA-ckumouj0/) | +| MCP tool action | Onboarding: Scorecard | [mcp_tool_actions/MTA-zfoxwh12](../../mcp_tool_actions/MTA-zfoxwh12/) | | MCP tool action | Sync From Source Control Repo | [mcp_tool_actions/MTA-543b19sa](../../mcp_tool_actions/MTA-543b19sa/) | | MCP tool action | Fetch Job Log | [mcp_tool_actions/MTA-8j9c0tb0](../../mcp_tool_actions/MTA-8j9c0tb0/) | | MCP tool action | Manage Blueprint Permissions | [mcp_tool_actions/MTA-ntmcnvv7](../../mcp_tool_actions/MTA-ntmcnvv7/) | +| MCP tool action | Run Recurring Job | [mcp_tool_actions/MTA-thkvyt0v](../../mcp_tool_actions/MTA-thkvyt0v/) | +| MCP tool action | Run CIT Tests | [mcp_tool_actions/MTA-gnx1ckno](../../mcp_tool_actions/MTA-gnx1ckno/) | +| Inbound webhook | Echo | [webhooks/IWH-f16qxnhm](../../webhooks/IWH-f16qxnhm/) | diff --git a/packages/README.md b/packages/README.md index 55d2959c..bee6aa96 100644 --- a/packages/README.md +++ b/packages/README.md @@ -15,7 +15,7 @@ Named sets of content that the Content Package Manager extension (`extensions/XU | Google GKE | [PKG-xev1ob4t](PKG-xev1ob4t/README.md) | Provisions Google Kubernetes Engine clusters and namespace landing zones with their day-2 actions, the UI extension that adds cluster and namespace tabs, and the StormForge tabs for clusters running the StormForge agent. | 1.1.0 | [Google Kubernetes Engine](../blueprints/BP-g8g8aecx/README.md) (blueprint), [GKE Namespace](../blueprints/BP-c9ca1i3z/README.md) (blueprint), [Google GKE Cluster](../extensions/XUI-8egdz3e9/README.md) (UI extension), [StormForge Optimize Live](../extensions/XUI-wyauaxbl/README.md) (UI extension) | | HCP Terraform | [PKG-0bo7vlxp](PKG-0bo7vlxp/README.md) | Provisions VMs and no-code modules through HCP Terraform in a workspace per deployment, optionally followed by Ansible job templates, with their day-2 actions, the form options webhook, and the UI extension that adds Terraform tabs. | 1.0.0 | [HCP Terraform VM](../blueprints/BP-b0qm83lh/README.md) (blueprint), [HCP Terraform No-Code Module](../blueprints/BP-00meiwwz/README.md) (blueprint), [HCP Terraform No-Code + Ansible](../blueprints/BP-uh9v24v3/README.md) (blueprint), [Form Options](../webhooks/IWH-yj93is5z/) (webhook), [HCP Terraform Workspace](../extensions/XUI-ax1sluwi/README.md) (UI extension) | | IP Reservations | [PKG-g151nn7r](PKG-g151nn7r/README.md) | Reserves IP addresses from CloudBolt IP pools for servers and devices CloudBolt does not build, through an order or an inbound webhook, and tracks each reservation as a resource. | 1.0.0 | [IP Reservations](../webhooks/IWH-x82773zb/README.md) (webhook), [IP Address Reservation](../blueprints/BP-j25t4xpv/README.md) (blueprint) | +| Onboarding Toolkit | [PKG-8aaadefz](PKG-8aaadefz/README.md) | Installs the MCP tools the onboarding skill drives (appliance status with next steps, admin UI links, log and failure diagnosis, failed-server cleanup, resource handler verification, image cache sync and location import, environment creation, order-form trimming, OS build import, environment networks and their addressing (DHCP, static, IP pool, IPAM), Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, Content Library installs, CIT tests from orders, the scorecard, the playbook text, the install step and POC item tracking), the repository sync, job log and blueprint permission tools they reuse, and the echo webhook for the test plan's webhook item; the Standard Server blueprint is synced on its own after a parameter-name check. | 0.8.0 | [Onboarding: Tag Mapping](../mcp_tool_actions/MTA-0689nxjy/README.md) (MCP tool action), [Onboarding: Import OS Build](../mcp_tool_actions/MTA-0dr8xi4i/README.md) (MCP tool action), [Onboarding: Status](../mcp_tool_actions/MTA-1985b88g/README.md) (MCP tool action), [Onboarding: Environment Networks](../mcp_tool_actions/MTA-20u1ney4/README.md) (MCP tool action), [Onboarding: Failed Servers](../mcp_tool_actions/MTA-36j661yp/README.md) (MCP tool action), [Sync From Source Control Repo](../mcp_tool_actions/MTA-543b19sa/README.md) (MCP tool action), [Onboarding: Install](../mcp_tool_actions/MTA-6zxrhdls/README.md) (MCP tool action), [Onboarding: Parameter](../mcp_tool_actions/MTA-70aez9bm/README.md) (MCP tool action), [Onboarding: Handler Locations](../mcp_tool_actions/MTA-89dxppus/README.md) (MCP tool action), [Onboarding: SMTP Settings](../mcp_tool_actions/MTA-89w58iux/README.md) (MCP tool action), [Fetch Job Log](../mcp_tool_actions/MTA-8j9c0tb0/README.md) (MCP tool action), [Onboarding: Playbook](../mcp_tool_actions/MTA-92b836jb/README.md) (MCP tool action), [Onboarding: Action Approval](../mcp_tool_actions/MTA-bp0rkcq9/README.md) (MCP tool action), [Onboarding: CIT Test from Order](../mcp_tool_actions/MTA-ckumouj0/README.md) (MCP tool action), [Onboarding: Group](../mcp_tool_actions/MTA-cpq7bvz4/README.md) (MCP tool action), [Onboarding: LDAP Mapping](../mcp_tool_actions/MTA-e5qv0zay/README.md) (MCP tool action), [Run CIT Tests](../mcp_tool_actions/MTA-gnx1ckno/README.md) (MCP tool action), [Onboarding: Recent Errors](../mcp_tool_actions/MTA-hwg74btd/README.md) (MCP tool action), [Onboarding: Configure Custom Server](../mcp_tool_actions/MTA-i1kmy5fd/README.md) (MCP tool action), [Onboarding: Import Environments](../mcp_tool_actions/MTA-i6p4j2l7/README.md) (MCP tool action), [Onboarding: Trim Environment Order Form](../mcp_tool_actions/MTA-iyknuxox/README.md) (MCP tool action), [Onboarding: Failure Trace](../mcp_tool_actions/MTA-jzscq0mk/README.md) (MCP tool action), [Onboarding: Verify LDAP](../mcp_tool_actions/MTA-kw8krevn/README.md) (MCP tool action), [Manage Blueprint Permissions](../mcp_tool_actions/MTA-ntmcnvv7/README.md) (MCP tool action), [Onboarding: Set Item Status](../mcp_tool_actions/MTA-p72v9y76/README.md) (MCP tool action), [Onboarding: Sync Images](../mcp_tool_actions/MTA-po1gmnou/README.md) (MCP tool action), [Onboarding: Remove Environment](../mcp_tool_actions/MTA-pz5o2gjl/README.md) (MCP tool action), [Onboarding: SMTP Test](../mcp_tool_actions/MTA-qab6r2gk/README.md) (MCP tool action), [Onboarding: Verify Resource Handler](../mcp_tool_actions/MTA-r5v1eblg/README.md) (MCP tool action), [Run Recurring Job](../mcp_tool_actions/MTA-thkvyt0v/README.md) (MCP tool action), [Onboarding: User](../mcp_tool_actions/MTA-tuzkb8h4/README.md) (MCP tool action), [Onboarding: Network Addressing](../mcp_tool_actions/MTA-z3h0o9t3/README.md) (MCP tool action), [Onboarding: Scorecard](../mcp_tool_actions/MTA-zfoxwh12/README.md) (MCP tool action), [Onboarding: Install Content Library Item](../mcp_tool_actions/MTA-znqpide5/README.md) (MCP tool action), [Onboarding: UI Link](../mcp_tool_actions/MTA-zpohocjt/README.md) (MCP tool action), [Echo](../webhooks/IWH-f16qxnhm/) (webhook) | | OpenShift | [PKG-57ltvnbl](PKG-57ltvnbl/README.md) | All OpenShift content: the project landing zone blueprint with its day-2 actions, the Connect and Workloads tabs on each project, the 3-tier web app blueprint on OpenShift Virtualization, the Monitoring and Compliance tabs on VMs and on the resources that hold them, and the Run Script server action that reaches VMs through the cluster API. | 1.3.2 | [OpenShift Project](../extensions/XUI-y9bdnzxt/README.md) (UI extension), [Io Cloudbolt Prometheus](../extensions/XUI-60382c9x/README.md) (UI extension), [Compliance](../extensions/XUI-i4kzuy3y/README.md) (UI extension), [Run Script (OpenShift API tunnel)](../server_actions/SVA-5vsp0tv6/) (server action), [OpenShift Project Landing Zone](../blueprints/BP-tikkhf2y/README.md) (blueprint), [3-Tier Web App on OpenShift Virtualization](../blueprints/BP-sy5pb325/README.md) (blueprint) | -| POC Onboarding Toolkit | [PKG-8aaadefz](PKG-8aaadefz/README.md) | Installs the MCP tools the POC onboarding skill drives: appliance status with next steps, admin UI links, log and failure diagnosis, resource handler verification and location import, environment creation, order-form trimming, OS build import, Custom Server setup, parameters, groups, users, action approval, tag and LDAP mappings, SMTP, the playbook text, the install step and POC item tracking, plus the repository sync, job log and blueprint permission tools they reuse. | 0.3.0 | [POC Onboarding: Install](../mcp_tool_actions/MTA-6zxrhdls/README.md) (MCP tool action), [POC Onboarding: Status](../mcp_tool_actions/MTA-1985b88g/README.md) (MCP tool action), [POC Onboarding: UI Link](../mcp_tool_actions/MTA-zpohocjt/README.md) (MCP tool action), [POC Onboarding: Recent Errors](../mcp_tool_actions/MTA-hwg74btd/README.md) (MCP tool action), [POC Onboarding: Failure Trace](../mcp_tool_actions/MTA-jzscq0mk/README.md) (MCP tool action), [POC Onboarding: Verify Resource Handler](../mcp_tool_actions/MTA-r5v1eblg/README.md) (MCP tool action), [POC Onboarding: Playbook](../mcp_tool_actions/MTA-92b836jb/README.md) (MCP tool action), [POC Onboarding: Set Item Status](../mcp_tool_actions/MTA-p72v9y76/README.md) (MCP tool action), [POC Onboarding: Handler Locations](../mcp_tool_actions/MTA-89dxppus/README.md) (MCP tool action), [POC Onboarding: Import Environments](../mcp_tool_actions/MTA-i6p4j2l7/README.md) (MCP tool action), [POC Onboarding: Trim Environment Order Form](../mcp_tool_actions/MTA-iyknuxox/README.md) (MCP tool action), [POC Onboarding: Import OS Build](../mcp_tool_actions/MTA-0dr8xi4i/README.md) (MCP tool action), [POC Onboarding: Configure Custom Server](../mcp_tool_actions/MTA-i1kmy5fd/README.md) (MCP tool action), [POC Onboarding: Remove Environment](../mcp_tool_actions/MTA-pz5o2gjl/README.md) (MCP tool action), [POC Onboarding: Parameter](../mcp_tool_actions/MTA-70aez9bm/README.md) (MCP tool action), [POC Onboarding: Group](../mcp_tool_actions/MTA-cpq7bvz4/README.md) (MCP tool action), [POC Onboarding: User](../mcp_tool_actions/MTA-tuzkb8h4/README.md) (MCP tool action), [POC Onboarding: Action Approval](../mcp_tool_actions/MTA-bp0rkcq9/README.md) (MCP tool action), [POC Onboarding: Tag Mapping](../mcp_tool_actions/MTA-0689nxjy/README.md) (MCP tool action), [POC Onboarding: LDAP Mapping](../mcp_tool_actions/MTA-e5qv0zay/README.md) (MCP tool action), [POC Onboarding: Verify LDAP](../mcp_tool_actions/MTA-kw8krevn/README.md) (MCP tool action), [POC Onboarding: SMTP Settings](../mcp_tool_actions/MTA-89w58iux/README.md) (MCP tool action), [POC Onboarding: SMTP Test](../mcp_tool_actions/MTA-qab6r2gk/README.md) (MCP tool action), [Sync From Source Control Repo](../mcp_tool_actions/MTA-543b19sa/README.md) (MCP tool action), [Fetch Job Log](../mcp_tool_actions/MTA-8j9c0tb0/README.md) (MCP tool action), [Manage Blueprint Permissions](../mcp_tool_actions/MTA-ntmcnvv7/README.md) (MCP tool action) | | Runbooks | [PKG-v20qv308](PKG-v20qv308/README.md) | Adds Run Task and Run Workflow, actions that run any Remote Script that fits a VM or an ordered workflow of CloudBolt actions on it, with base, example and installer task scripts, the Runbooks page for building workflows, base actions and file archives, example Linux and Windows workflows whose scripts read a config file from File Archives, and Linux and Windows blueprints that run a workflow. | 1.1.0 | [Runbook Task Template (Windows)](../plugins/OHK-lhm2916o/) (plugin), [Runbook Task Template (Linux)](../plugins/OHK-iub9a2jg/) (plugin), [Manage Windows Service](../plugins/OHK-01kmavro/) (plugin), [Manage Linux Service](../plugins/OHK-5yh12jiq/) (plugin), [Run Installer from File Archive (Linux)](../plugins/OHK-hgv6wp65/) (plugin), [Run Installer from File Archive (Windows)](../plugins/OHK-ow68kerl/) (plugin), [Runbook Tasks](../webhooks/IWH-cdf543g3/) (webhook), [Runbook Workflows](../webhooks/IWH-xjlrmvc8/) (webhook), [Run Task](../server_actions/SVA-4sin3s0q/README.md) (server action), [Run Workflow](../server_actions/SVA-j7rbsh39/README.md) (server action), [Runbooks](../extensions/XUI-jbm5ac9e/README.md) (UI extension), [Linux VM with Workflow](../blueprints/BP-vy9ytey6/README.md) (blueprint), [Windows VM with Workflow](../blueprints/BP-6ddlyguv/README.md) (blueprint), [Prepare Linux app host](../runbook_workflows/SWF-69r5mmdb/README.md) (Runbooks workflow), [Prepare Windows app host](../runbook_workflows/SWF-7s01lyyk/README.md) (Runbooks workflow) | | Windows AD Domain Join | [PKG-nf407lm5](PKG-nf407lm5/README.md) | Joins provisioned Windows servers to Active Directory in the OU picked from a type-ahead domain_ou parameter, optionally switching their CloudBolt credentials to a domain service account, and deletes the computer object at decommission. | 1.1.0 | [Delete Windows Computer Object from AD](../orchestration_actions/HPA-q181uofy/README.md) (orchestration action), [Join Windows Server to AD Domain](../orchestration_actions/HPA-jjp1vlfi/README.md) (orchestration action), [Suggest Domain OUs](../orchestration_actions/HPA-0zcrvpwu/README.md) (orchestration action), [Generate Options for Domain Service Account](../orchestration_actions/HPA-g8pqv6uv/README.md) (orchestration action), [Domain OU](../parameters/CF-8pif9mbf/README.md) (parameter), [Domain Service Account](../parameters/CF-yqmreb5m/README.md) (parameter) | diff --git a/plugins/OHK-0nuhjdxl/OHK-0nuhjdxl_metadata.json b/plugins/OHK-0nuhjdxl/OHK-0nuhjdxl_metadata.json index 401a2d92..9f39351c 100644 --- a/plugins/OHK-0nuhjdxl/OHK-0nuhjdxl_metadata.json +++ b/plugins/OHK-0nuhjdxl/OHK-0nuhjdxl_metadata.json @@ -22,7 +22,7 @@ { "allow_multiple": false, "available_all_servers": false, - "description": "AWS only: also list the VPCs of this region, with the default VPC flagged.", + "description": "AWS only: also list the VPCs of this region with their CIDR, subnet count and default flag.", "field_dependency_controlling_set": [], "field_dependency_dependent_set": [], "global_options": [], @@ -46,7 +46,7 @@ "description": "Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs.", "id": "OHK-0nuhjdxl", "max_retries": 0, - "name": "POC Onboarding: Handler Locations", + "name": "Onboarding: Handler Locations", "resource_technologies": [], "script_filename": "OHK-0nuhjdxl_script.py", "shared": false, diff --git a/plugins/OHK-0nuhjdxl/OHK-0nuhjdxl_script.py b/plugins/OHK-0nuhjdxl/OHK-0nuhjdxl_script.py index c3d622bf..f81a2cb4 100644 --- a/plugins/OHK-0nuhjdxl/OHK-0nuhjdxl_script.py +++ b/plugins/OHK-0nuhjdxl/OHK-0nuhjdxl_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: Handler Locations (MCP Tool Action plugin). +Onboarding: Handler Locations (MCP Tool Action plugin). Lists what a resource handler can turn into environments: AWS regions (and the VPCs of one region when onb_region is given), Azure locations, vCenter @@ -157,21 +157,49 @@ def _rows(total, not_in_cb): def _vpcs(handler, region): - vpcs = handler.get_vpc_dicts_for_region(region) - rows = [] - for vpc in list(vpcs)[:MAX_VPCS]: - if not isinstance(vpc, dict): - rows.append({"id": str(vpc)}) - continue - rows.append( - { - "id": vpc.get("id") or vpc.get("VpcId") or vpc.get("vpc_id"), - "name": vpc.get("name") or vpc.get("Name") or "", - "cidr": vpc.get("cidr") or vpc.get("CidrBlock"), - "isDefault": bool(vpc.get("is_default") or vpc.get("IsDefault") or vpc.get("default")), - } + """ + The region's VPCs with their default flag, CIDR and subnet count. + get_vpc_dicts_for_region returns only id and name, so read the EC2 Vpc + resources through the handler's own boto3 helper, the same call it makes. + Vpc attributes: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/vpc/index.html + """ + try: + handler.connect(region_name=region) + ec2 = handler.resource_technology.work_class.get_boto3_resource( + handler.serviceaccount, handler.servicepasswd, region ) - return rows + rows = [] + for vpc in list(ec2.vpcs.all())[:MAX_VPCS]: + name = "" + for tag in vpc.tags or []: + if tag.get("Key") == "Name": + name = tag.get("Value") or "" + try: + subnets = len(list(vpc.subnets.all())) + except Exception: + subnets = None + rows.append( + {"id": vpc.id, "name": name, "cidr": vpc.cidr_block, "isDefault": bool(vpc.is_default), "subnets": subnets} + ) + return rows + except Exception: + return [ + {"id": v.get("id"), "name": v.get("name") if v.get("name") != v.get("id") else "", "cidr": None, + "isDefault": False, "subnets": None} + for v in list(handler.get_vpc_dicts_for_region(region))[:MAX_VPCS] + if isinstance(v, dict) + ] + + +def _recommended_vpc(rows): + """The VPC to offer first: the only one with subnets, else the default VPC when it has subnets.""" + usable = [r for r in rows if r.get("subnets") != 0] + if len(usable) == 1: + return usable[0]["id"] + for row in usable: + if row.get("isDefault"): + return row["id"] + return None def run(job, *args, **kwargs): @@ -204,15 +232,23 @@ def run(job, *args, **kwargs): outputs["locations"] = _rows(total, not_in_cb) if inputs["region"]: outputs["region"] = inputs["region"] - outputs["vpcs"] = _vpcs(handler, inputs["region"]) - outputs["next"] = ( - "Call onb_import_environments with onb_locations lines of the form |; " - "without a VPC the default VPC of the region is used." - ) + vpcs = _vpcs(handler, inputs["region"]) + outputs["vpcs"] = vpcs + outputs["recommendedVpc"] = _recommended_vpc(vpcs) + if len(vpcs) == 1: + outputs["next"] = ( + "The region has one VPC: call onb_import_environments with onb_locations {}|{}.".format( + inputs["region"], vpcs[0]["id"]) + ) + else: + outputs["next"] = ( + "Ask the user which one VPC the POC uses (offer recommendedVpc first; a VPC with no subnets " + "cannot build servers), then call onb_import_environments with | for that VPC only." + ) else: outputs["next"] = ( - "Pick one or two regions. Call this tool again with onb_region to list that region's VPCs, or call " - "onb_import_environments with the region alone to use its default VPC." + "Pick one region. Call this tool again with onb_region to list that region's VPCs, then import the " + "one VPC the POC uses with onb_import_environments (|)." ) elif slug == "azure_arm": total, not_in_cb, _only = handler.import_locations_helper() diff --git a/plugins/OHK-0u7aonmo/OHK-0u7aonmo_metadata.json b/plugins/OHK-0u7aonmo/OHK-0u7aonmo_metadata.json new file mode 100644 index 00000000..f9e9babe --- /dev/null +++ b/plugins/OHK-0u7aonmo/OHK-0u7aonmo_metadata.json @@ -0,0 +1,75 @@ +{ + "action_inputs": [ + { + "allow_multiple": false, + "available_all_servers": false, + "description": "The environment, by global id or name.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-y593kq80", + "label": "Environment (ENV- id or name)", + "name": "onb_environment", + "placeholder": "ENV-abc12345", + "relevant_osfamilies": [], + "required": true, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "NET- ids or names, one per line, at most five; empty lists the networks.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-afwsgkyz", + "label": "Networks for NIC 1 (up to 5, one per line)", + "name": "onb_networks", + "placeholder": "NET-abc12345", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "TXT", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "true syncs the handler's networks or the environment's subnets before listing or setting.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-nd3aybhb", + "label": "Sync networks first (true/false)", + "name": "onb_refresh", + "placeholder": "false", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + } + ], + "action_inputs_sequence": [ + "onb_environment", + "onb_networks", + "onb_refresh" + ], + "description": "Lists the networks an environment can offer on its first NIC and makes the chosen ones, up to five, its only NIC 1 choices, removing networks from every other NIC.", + "id": "OHK-0u7aonmo", + "max_retries": 0, + "name": "Onboarding: Environment Networks", + "resource_technologies": [], + "script_filename": "OHK-0u7aonmo_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-0u7aonmo/OHK-0u7aonmo_script.py b/plugins/OHK-0u7aonmo/OHK-0u7aonmo_script.py new file mode 100644 index 00000000..55ceac4a --- /dev/null +++ b/plugins/OHK-0u7aonmo/OHK-0u7aonmo_script.py @@ -0,0 +1,354 @@ +""" +Onboarding: Environment Networks (MCP Tool Action plugin). + +Lists the networks an environment can offer on its first NIC and, when +onb_networks names up to five, makes exactly those the NIC 1 choices on the +order form: it adds the chosen ones, removes the others from NIC 1, and +removes networks from every other NIC so servers get one NIC. Each network +row shows its addressing (DHCP, static, IP pool, IPAM) so the next step can +configure it with onb_network_addressing. Admin only. + +Networks are synced at the handler level for vCenter, SCVMM, Hyper-V, +Nutanix, H3C CAS and OpenStack, and per environment for AWS, Azure, Azure +Local, OLVM, OpenShift Virtualization, vCloud Director and Outscale +(Environment.get_possible_networks and the handler's sync methods). A subnet +re-sync puts every subnet back on NIC 1, so onb_refresh re-applies the +selection afterwards when onb_networks is given. + +Every declared input is read from its rendered template token in +_read_inputs(); keep each one referenced that way or CloudBolt's token scan +deletes the input when the script is saved. +""" +import html +import re + +GLOBAL_ID_RE = re.compile(r"^[A-Z]{2,4}-[A-Za-z0-9]{6,16}$") +MAX_NETWORKS = 5 +MAX_LIST = 200 + +# What addressing means per technology (from the CloudBolt source of each handler). +NO_NETWORKS = {"proxmox", "metalsoft", "orka", "ipmi"} +ADDRESSING = {"vmware", "vmc_aws", "scvmm", "hyperv", "acropolis", "h3ccas", "vcloud_director", "azurelocal"} +CLOUD_ASSIGNS = {"aws", "aws_govcloud", "aws_china", "awsjit", "azure_arm", "oci", "openstack"} +NO_EFFECT = {"gcp", "alibaba", "outscale", "ibm_cloud", "ibm_gov", "slayer", "maas", "ovirt", "olvm"} + + +def _text(value): + return html.unescape(value or "").strip() + + +def _lines(value): + return [line.strip() for line in re.split(r"[\r\n]+", _text(value)) if line.strip()] + + +def _failure(message): + return {"status": "FAILURE", "output_message": "", "error_message": message, "outputs": {"error": message}} + + +def _success(message, outputs): + return {"status": "SUCCESS", "output_message": message, "error_message": "", "outputs": outputs} + + +def _caller(job, kwargs): + profile = kwargs.get("profile") + if profile is None and job is not None: + profile = job.owner + return profile + + +def _progress(job, message): + if job is None: + return + try: + from common.methods import set_progress + + set_progress(message) + except Exception: + pass + + +def _portal_url(): + try: + from portals.models import PortalConfig + + portal = PortalConfig.get_current_portal() + url = portal.site_url if portal else None + except Exception: + url = None + return (url or "").rstrip("/") + + +def _read_inputs(): + raw = { + "onb_environment": """{{ onb_environment }}""", + "onb_networks": """{{ onb_networks }}""", + "onb_refresh": """{{ onb_refresh }}""", + } + return { + "environment": _text(raw["onb_environment"]), + "networks": _lines(raw["onb_networks"]), + "refresh": _text(raw["onb_refresh"]).lower() in ("true", "1", "yes", "y"), + } + + +def _resolve_env(ref): + from infrastructure.models import Environment + + env = None + if GLOBAL_ID_RE.match(ref): + env = Environment.objects.filter(global_id=ref).first() + elif ref.isdigit(): + env = Environment.objects.filter(id=int(ref)).first() + if env is None: + matches = list(Environment.objects.filter(name__iexact=ref)) + if len(matches) > 1: + return None, "Several environments are named '{}'; pass the ENV- global id.".format(ref) + env = matches[0] if matches else None + if env is None: + return None, "No environment matches '{}'.".format(ref) + return env, None + + +def _tech_slug(handler): + tech = getattr(handler, "resource_technology", None) + if tech is None: + return "" + return (getattr(tech, "slug", None) or getattr(tech, "type_slug", "") or "").strip() + + +def _category(slug): + if slug in NO_NETWORKS: + return "none" + if slug in ADDRESSING: + return "addressing" + if slug in CLOUD_ASSIGNS: + return "cloud_assigns" + if slug in NO_EFFECT: + return "no_effect" + return "addressing" + + +def _nic_networks(env, position): + """Networks on NIC (1-based) of the environment, cast to their subclass.""" + field = "sc_nic_{}".format(position - 1) + rows = [] + for cfv in env.custom_field_options.filter(field__name=field).select_related("network_value"): + net = cfv.network_value + if net is None: + continue + try: + net = net.cast() + except Exception: + pass + rows.append(net) + return rows + + +def _other_nic_positions(env): + positions = set() + for name in env.custom_field_options.filter(field__name__regex=r"^sc_nic_[0-9]+$").values_list("field__name", flat=True): + index = int(name.rsplit("_", 1)[1]) + if index >= 1: + positions.add(index + 1) + return sorted(positions) + + +def _network_row(net): + try: + provider = net.determine_ip_provider() + except Exception: + provider = None + row = { + "id": getattr(net, "global_id", None), + "pk": net.pk, + "name": net.name, + "network": getattr(net, "network", None), + "vlan": getattr(net, "vlan", None), + "addressing": getattr(net, "addressing_schema", None), + "ipProvider": provider, + "gateway": getattr(net, "gateway", None), + "netmask": getattr(net, "netmask", None), + "dns1": getattr(net, "dns1", None), + "dns2": getattr(net, "dns2", None), + "dnsDomain": getattr(net, "dns_domain", None), + } + try: + pool = net.ip_pool_string + if pool: + row["ipPool"] = pool + except Exception: + pass + if getattr(net, "ipam_network_id", None): + row["ipamNetwork"] = str(net.ipam_network) + return row + + +def _refresh(handler, env, job): + """Re-sync networks: per environment where the technology imports subnets there, else per handler.""" + try: + per_env = bool(handler.can_import_subnets_on_environments(env)) + except Exception: + per_env = False + if per_env and hasattr(handler, "sync_subnets"): + _progress(job, "Syncing the environment's subnets") + handler.sync_subnets(env) + return "environment subnets synced" + if hasattr(handler, "sync_networks"): + _progress(job, "Syncing the handler's networks") + handler.sync_networks() + return "handler networks synced" + return "this technology has no network sync" + + +def _match(ref, candidates): + ref_l = ref.lower() + for net in candidates: + if ref == (getattr(net, "global_id", None) or "") or ref == str(net.pk): + return net + exact = [n for n in candidates if (n.name or "").lower() == ref_l] + if len(exact) == 1: + return exact[0] + ident = [n for n in candidates if (getattr(n, "network", "") or "").lower() == ref_l] + if len(ident) == 1: + return ident[0] + if len(exact) > 1 or len(ident) > 1: + raise ValueError("Several networks match '{}'; pass the NET- id.".format(ref)) + return None + + +def _next_step(category): + if category == "addressing": + return ("For each NIC 1 network, set how servers get their IP with onb_network_addressing: DHCP, or static " + "with gateway and netmask (and DNS), then an IP pool, an IPAM or an IP typed on each order.") + if category == "cloud_assigns": + return "The cloud assigns the IP on these networks; no addressing setup is needed. An order may still pass a static private IP in sc_nic_0_ip." + if category == "no_effect": + return "The cloud assigns the IP on these networks and CloudBolt sends no addressing; no addressing setup is needed." + return "" + + +def run(job, *args, **kwargs): + profile = _caller(job, kwargs) + if profile is None: + return _failure("No calling user profile was supplied. Run this tool through the MCP server as an authenticated user.") + if not profile.is_cbadmin: + return _failure("Only CloudBolt admins may change environment networks.") + + inputs = _read_inputs() + if not inputs["environment"]: + return _failure("onb_environment is required: the ENV- global id or the environment name.") + env, error = _resolve_env(inputs["environment"]) + if error: + return _failure(error) + handler = env.resource_handler.cast() if env.resource_handler else None + if handler is None: + return _failure("Environment '{}' has no resource handler.".format(env.name)) + slug = _tech_slug(handler) + category = _category(slug) + base = _portal_url() + outputs = { + "environment": {"id": env.global_id, "name": env.name, "url": base + "/environments/{}/".format(env.id)}, + "handler": {"id": handler.global_id, "name": handler.name, "technologySlug": slug}, + "category": category, + } + if category == "none": + outputs["note"] = "This technology has no CloudBolt networks; there is nothing to choose or configure." + return _success("{}: no networks for this technology.".format(env.name), outputs) + + if len(inputs["networks"]) > MAX_NETWORKS: + return _failure("Choose at most {} networks for NIC 1; {} were given.".format(MAX_NETWORKS, len(inputs["networks"]))) + + if inputs["refresh"]: + try: + outputs["refresh"] = _refresh(handler, env, job) + except Exception as exc: + return _failure("Refreshing the networks of '{}' failed: {}: {}".format(env.name, type(exc).__name__, str(exc)[:400])) + + from resourcehandlers.models import ResourceNetwork + + nic1 = _nic_networks(env, 1) + nic1_ids = {n.pk for n in nic1} + possible_ids = set(env.get_possible_networks().values_list("pk", flat=True)) + candidates = list(nic1) + for net in ResourceNetwork.objects.filter(pk__in=possible_ids - nic1_ids).order_by("name")[:MAX_LIST]: + try: + candidates.append(net.cast()) + except Exception: + candidates.append(net) + + if not inputs["networks"]: + available = [_network_row(n) for n in candidates if n.pk not in nic1_ids] + outputs.update( + { + "nic1": [_network_row(n) for n in nic1], + "available": available, + "otherNics": _other_nic_positions(env), + "next": "Ask which networks (up to {}) servers in this environment should use, then call again with onb_networks.".format(MAX_NETWORKS), + } + ) + if slug == "azure_arm" and not available: + outputs["note"] = ("Azure offers only subnets already on the environment. To get others back, call with " + "onb_refresh=true (it re-imports every subnet of the region) and onb_networks set.") + if not nic1 and not available: + outputs["note"] = "No networks are known for this environment yet; call again with onb_refresh=true to sync them." + return _success("{}: {} network(s) on NIC 1, {} more available.".format(env.name, len(nic1), len(available)), outputs) + + chosen = [] + for ref in inputs["networks"]: + try: + net = _match(ref, candidates) + except ValueError as exc: + return _failure(str(exc)) + if net is None: + return _failure("Network '{}' is not available to environment '{}'. Call without onb_networks to list them{}.".format( + ref, env.name, ", or with onb_refresh=true to sync them first" if not inputs["refresh"] else "")) + if net.pk not in possible_ids and net.pk not in nic1_ids: + return _failure("Network '{}' cannot be used by environment '{}'.".format(net.name, env.name)) + if net.pk not in {c.pk for c in chosen}: + chosen.append(net) + + chosen_ids = {n.pk for n in chosen} + added, removed, other_removed = [], [], [] + for net in chosen: + if net.pk not in nic1_ids: + env.add_network(net, nic_position=1) + added.append(net.name) + for net in nic1: + if net.pk not in chosen_ids: + env.remove_network(net, nic_position=1) + removed.append(net.name) + for position in _other_nic_positions(env): + for net in _nic_networks(env, position): + env.remove_network(net, nic_position=position) + other_removed.append("NIC {}: {}".format(position, net.name)) + + after = _nic_networks(env, 1) + after_ids = {n.pk for n in after} + problems = [] + if after_ids != chosen_ids: + problems.append("NIC 1 holds {} instead of the chosen networks.".format(", ".join(n.name for n in after) or "nothing")) + possible_after = set(env.get_possible_networks().values_list("pk", flat=True)) + for net in after: + if net.pk not in possible_after: + problems.append("'{}' is on NIC 1 but the environment cannot use it; the order form would reject it.".format(net.name)) + if _other_nic_positions(env): + problems.append("Networks remain on another NIC.") + + outputs.update( + { + "nic1": [_network_row(n) for n in after], + "added": added, + "removedFromNic1": removed, + "removedFromOtherNics": other_removed, + "verified": not problems, + "next": _next_step(category), + } + ) + if problems: + outputs["problems"] = problems + return {"status": "FAILURE", "output_message": "", "error_message": " ".join(problems), "outputs": outputs} + return _success( + "{}: NIC 1 now offers {} ({} added, {} removed); verified.".format( + env.name, ", ".join(n.name for n in after), len(added), len(removed) + len(other_removed)), + outputs, + ) diff --git a/plugins/OHK-1am7i73s/OHK-1am7i73s_metadata.json b/plugins/OHK-1am7i73s/OHK-1am7i73s_metadata.json index dcd43391..2a27365b 100644 --- a/plugins/OHK-1am7i73s/OHK-1am7i73s_metadata.json +++ b/plugins/OHK-1am7i73s/OHK-1am7i73s_metadata.json @@ -22,7 +22,7 @@ { "allow_multiple": false, "available_all_servers": false, - "description": "index, bootstrap, resource-handlers, phases, troubleshooting or test-plan-map.", + "description": "index, bootstrap, resource-handlers, handler-forms, phases, troubleshooting or test-plan-map.", "field_dependency_controlling_set": [], "field_dependency_dependent_set": [], "global_options": [], @@ -43,10 +43,10 @@ "onb_section", "onb_ref" ], - "description": "Returns a section of the POC onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure.", + "description": "Returns a section of the onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure.", "id": "OHK-1am7i73s", "max_retries": 0, - "name": "POC Onboarding: Playbook", + "name": "Onboarding: Playbook", "resource_technologies": [], "script_filename": "OHK-1am7i73s_script.py", "shared": false, diff --git a/plugins/OHK-1am7i73s/OHK-1am7i73s_script.py b/plugins/OHK-1am7i73s/OHK-1am7i73s_script.py index 27323e09..e887df45 100644 --- a/plugins/OHK-1am7i73s/OHK-1am7i73s_script.py +++ b/plugins/OHK-1am7i73s/OHK-1am7i73s_script.py @@ -1,7 +1,7 @@ """ -POC Onboarding: Playbook (MCP Tool Action plugin). +Onboarding: Playbook (MCP Tool Action plugin). -Returns the POC onboarding skill text (the SKILL.md and its reference +Returns the onboarding skill text (the SKILL.md and its reference sections) from the public cloudbolt-as-code repository, so an MCP client with no skill support (a desktop chat app, a web UI) receives the same procedure the Claude Code skill follows. The appliance fetches the Markdown @@ -18,11 +18,12 @@ PLAYBOOK_REPO = "mbomb67/cloudbolt-as-code" PLAYBOOK_REF = "main" -PLAYBOOK_DIR = ".claude/skills/cb-poc-onboarding" +PLAYBOOK_DIR = ".claude/skills/cb-onboarding" SECTIONS = { "index": ("SKILL.md", "The skill itself: hard rules, the phase loop, when to call which tool"), "bootstrap": ("references/bootstrap.md", "Phase 0: connect the MCP client, install the toolkit, first status"), "resource-handlers": ("references/resource-handlers.md", "Phase 1: per-technology handler creation, verification and diagnosis"), + "handler-forms": ("references/handler-forms.md", "Phase 1: what each technology's Add resource handler form asks on both screens"), "phases": ("references/phases.md", "Phases 2 to 9: environments, first order, self-service, RBAC, lifecycle, extensibility, wrap-up"), "troubleshooting": ("references/troubleshooting.md", "Root-cause playbook: which tool for which failure, common causes and fixes"), "test-plan-map": ("references/test-plan-map.md", "Every POC test plan item with its phase, evidence, documentation link and whether it can be skipped"), diff --git a/plugins/OHK-1gp25bmt/OHK-1gp25bmt_metadata.json b/plugins/OHK-1gp25bmt/OHK-1gp25bmt_metadata.json index 4c6ce400..a98c363b 100644 --- a/plugins/OHK-1gp25bmt/OHK-1gp25bmt_metadata.json +++ b/plugins/OHK-1gp25bmt/OHK-1gp25bmt_metadata.json @@ -26,7 +26,7 @@ "description": "Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited.", "id": "OHK-1gp25bmt", "max_retries": 0, - "name": "POC Onboarding: UI Link", + "name": "Onboarding: UI Link", "resource_technologies": [], "script_filename": "OHK-1gp25bmt_script.py", "shared": false, diff --git a/plugins/OHK-1gp25bmt/OHK-1gp25bmt_script.py b/plugins/OHK-1gp25bmt/OHK-1gp25bmt_script.py index f37557c6..090f3118 100644 --- a/plugins/OHK-1gp25bmt/OHK-1gp25bmt_script.py +++ b/plugins/OHK-1gp25bmt/OHK-1gp25bmt_script.py @@ -1,12 +1,16 @@ """ -POC Onboarding: UI Link (MCP Tool Action plugin). +Onboarding: UI Link (MCP Tool Action plugin). Turns a CloudBolt global id (RH-, ENV-, GRP-, USR-, BP-, ORD-, JOB-, SVR-, RSC-, MTA-, ...) or a named admin page into an absolute UI link, so the agent can send the user to the exact page where a secret must be entered or a -handler, environment, group or parameter is edited. Named pages take an -optional argument after a colon, for example new_resource_handler:aws or -group_quotas:GRP-abc12345. Read-only, synchronous. Admin only. +handler, environment, group or parameter is edited. Forms that CloudBolt +opens as a dialog (edit a user, SMTP settings, handler credentials) render +without any page around them when opened directly, so their links go to the +page that holds the button, and the result names the button in click. +Named pages take an optional argument after a colon, for example +new_resource_handler:aws or group_quotas:GRP-abc12345. Read-only, +synchronous. Admin only. Every declared input is read from its rendered template token in _read_inputs(); keep each one referenced that way or CloudBolt's token scan @@ -61,43 +65,60 @@ "MCPToolAction": "/actions/mcp_tool_action/{pk}/", "CustomField": "/admin/customfields/{pk}/", "SourceCodeRepo": "/source_code_repos/{pk}/", - "ConnectionInfo": "/admin/connectioninfo/{pk}/edit/", + "ConnectionInfo": "/admin/connectioninfo/{pk}/", } +# The Setup Wizard's Add infrastructure page: the resource handler list with the technology +# chooser opened on load. The list page's add_by_tech// URL is meant to open the +# technology's form directly, but its auto-open script does not fire, so new handlers start +# here and the user clicks the technology. Older releases without the Setup Wizard page get +# the add_by_tech URL instead (_handler_chooser). +SETUP_ADD_HANDLER = "/setup/add-resource-handler/" + # Named pages. {arg} is the text after the colon in the target. PAGES = { "dashboard": ("/dashboard/", "CloudBolt dashboard"), "setup_wizard": ("/setup/", "First-run Setup Wizard"), "resource_handlers": ("/admin/resourcehandlers/", "Resource handler list"), - "new_resource_handler": ("/admin/resourcehandlers/add/", "Add a resource handler (pick the technology)"), + "new_resource_handler": (SETUP_ADD_HANDLER, "Resource handler list with the technology chooser open"), "new_resource_handler:{arg}": ( - "/admin/resourcehandlers/add_by_tech/{arg}/", - "Add a resource handler of one technology (aws, azure_arm, vmware, scvmm, gcp, acropolis, openstack)", + SETUP_ADD_HANDLER, + "Technology chooser for a new handler; the user clicks the technology in clickTechnology " + "(aws, azure_arm, vmware, scvmm, gcp, acropolis, openstack)", + ), + "handler_verify:{arg}": ("/admin/resourcehandlers/{pk}/", "A handler's page, to run Verify Connection (RH- id)"), + "handler_edit:{arg}": ("/admin/resourcehandlers/{pk}/", "A handler's page, to edit its credentials (RH- id)"), + "handler_import_locations:{arg}": ("/admin/resourcehandlers/{pk}/#tab-locations", "A handler's Locations tab, to import locations or clusters as environments (RH- id)"), + "handler_ssh_keys:{arg}": ("/admin/resourcehandlers/{pk}/#tab-ssh-keys", "A handler's SSH Keys tab, to upload a key pair's private key (RH- id)"), + "handler_images:{arg}": ( + "/admin/resourcehandlers/{pk}/#tab-images", + "A handler's images tab (AMIs on AWS, Templates on vCenter), to set an image's guest credentials (RH- id)", ), - "handler_verify:{arg}": ("/admin/resourcehandlers/{pk}/verify_connection/", "Verify Connection dialog of a handler (RH- id)"), - "handler_edit:{arg}": ("/admin/resourcehandlers/{pk}/edit/", "Edit a handler, including its credentials (RH- id)"), - "handler_import_locations:{arg}": ("/admin/resourcehandlers/{pk}/import_locations/", "Import locations, regions or clusters as environments (RH- id)"), "environments": ("/environments/", "Environment list"), + "new_ipam": ("/setup/add-ipam/", "Add an IPAM endpoint (Infoblox, BlueCat, phpIPAM, SolarWinds); credentials are entered there"), + "ipam_list": ("/ipam/", "IPAM endpoints"), + "ipam:{arg}": ("/ipam/{pk}/#tab-networks", "An IPAM endpoint's Networks tab, to import and map networks (numeric IPAM id)"), + "network:{arg}": ("/networks/{pk}/", "A network's page with its addressing and IP Pool tab (NET- id or numeric id)"), "environment_parameters:{arg}": ("/environments/{pk}/#tab-parameters", "An environment's Parameters tab (ENV- id)"), "ldap": ("/admin/ldap_settings/", "LDAP utilities"), - "new_ldap": ("/admin/ldap_settings/add/", "Add an LDAP utility (service account password is entered here)"), - "ldap_verify:{arg}": ("/admin/ldap_settings/{pk}/verify_connection/", "Verify an LDAP utility (IDD- id or pk)"), - "ldap_mappings:{arg}": ("/admin/ldap_settings/{pk}/group_mappings/add/", "Add an LDAP group mapping (IDD- id or pk)"), + "new_ldap": ("/admin/ldap_settings/", "LDAP utilities, to add one (the service account password is entered there)"), + "ldap_verify:{arg}": ("/admin/ldap_settings/{pk}/", "An LDAP utility's page, to verify it (IDD- id or pk)"), + "ldap_mappings:{arg}": ("/admin/ldap_settings/{pk}/#tab-group-mappings", "An LDAP utility's Group Mappings tab (IDD- id or pk)"), "sso": ("/admin/sso/", "SSO providers"), - "email_settings": ("/admin/email_settings/edit/", "SMTP settings (password is entered here)"), - "email_test": ("/admin/email_test/", "Send a test email"), + "email_settings": ("/admin/email_settings/", "SMTP settings (password is entered there)"), + "email_test": ("/admin/email_settings/", "SMTP settings, to send a test email"), "email_templates": ("/admin/email/", "Email templates"), - "proxy": ("/admin/edit_web_proxy/", "Outbound web proxy"), + "proxy": ("/admin/misc_settings/#web-proxy-pane", "Outbound web proxy (Miscellaneous settings, Web Proxy tab)"), "misc_settings": ("/admin/misc_settings/", "Miscellaneous settings"), "ssl_certificates": ("/admin/ssl_certificates/", "Trusted SSL certificates"), "parameters": ("/admin/customfields/", "Parameters (custom fields)"), - "new_parameter": ("/admin/customfields/add/", "Add a parameter"), + "new_parameter": ("/admin/customfields/", "Parameters, to add one"), "os_builds": ("/externalcontent/osbuilds/", "OS builds"), "groups": ("/groups/", "Groups (add a group from here)"), - "group_quotas:{arg}": ("/groups/{pk}/quotas/edit/", "Edit a group's quotas (GRP- id)"), + "group_quotas:{arg}": ("/groups/{pk}/#tab-quotas", "A group's Quotas tab (GRP- id)"), "users": ("/users/", "Users"), - "new_user": ("/users/create/", "Create a local user"), - "user_edit:{arg}": ("/users/{pk}/edit/", "Edit a user, including setting a password (USR- id)"), + "new_user": ("/users/", "Users, to add a local user with its password"), + "user_edit:{arg}": ("/users/{pk}/", "A user's page, to edit or delete the user (USR- id)"), "roles": ("/roles/", "Roles"), "portals": ("/portals/", "Branded portals"), "catalog": ("/catalog/", "Service catalog"), @@ -117,6 +138,28 @@ "orders": ("/orders/", "Order list"), } +# The button that opens the page's form as a dialog, by page key. +CLICKS = { + "handler_verify": "Verify Connection on the Overview tab", + "handler_edit": "Edit Credentials on the Overview tab", + "handler_import_locations": "Import Locations on the Locations tab", + "handler_ssh_keys": "the pencil in the Actions column of the key's row", + "handler_images": ( + "the + next to None configured (Add credentials), or the pencil (Edit credentials) when some are set, " + "in the Credentials column of the image's row" + ), + "new_ldap": "Add", + "ldap_verify": "Verify Connection on the Overview tab", + "ldap_mappings": "New LDAP Mapping on the Group Mappings tab", + "email_settings": "Edit on the Overview tab", + "email_test": "Send Test Email on the Overview tab", + "proxy": "Edit next to Settings on the Web Proxy tab", + "new_parameter": "Add", + "group_quotas": "Edit on the Quotas tab", + "new_user": "Add", + "user_edit": "Edit on the Overview tab", +} + def _text(value): return html.unescape(value or "").strip() @@ -197,8 +240,68 @@ def _pk_for(arg): return None, "'{}' is neither a global id nor a numeric id.".format(arg) +def _handler_chooser(arg, outputs): + """Point a new-handler link at the Setup Wizard chooser, or at add_by_tech on older releases. + + Returns the path to use. With a technology slug, adds clickTechnology: the name the + chooser shows for that technology, so the agent can tell the user which tile to click. + """ + from django.urls import NoReverseMatch, reverse + from resourcehandlers.models import ResourceTechnology + + try: + path = reverse("quick_setup_add_resource_handler") + except NoReverseMatch: + path = "/admin/resourcehandlers/" + outputs["note"] = "This release has no Setup Wizard handler page; the link goes to the Resource Handlers list, where the handler is added." + if not arg: + return path + name = None + for tech in ResourceTechnology.objects.all(): + try: + if tech.type_slug == arg: + name = tech.name + break + except Exception: + continue + if name: + outputs["clickTechnology"] = name + outputs.setdefault("note", "The link opens the technology chooser; click {}.".format(name)) + else: + outputs.setdefault("note", "No technology has the slug '{}'; the user picks it in the chooser.".format(arg)) + return path + + +def _handler_images_path(pk): + """The handler page with its images tab open; the tab's slug differs by technology. + + resourcehandlers/aws/views.py names the tab amis; vmware/views.py (and proxmox) use the + title-cased plural of template_label (Templates); every other handler uses images + (ResourceHandler.get_templates_tab_as_tuple). + """ + from django.template.defaultfilters import title + from resourcehandlers.models import ResourceHandler + + slug = "images" + handler = ResourceHandler.objects.filter(pk=pk).first() + if handler is not None: + module = handler.type_slug + if module == "aws": + slug = "amis" + elif module in ("vmware", "proxmox"): + slug = title("{}s".format(handler.cast().template_label)) + return "/admin/resourcehandlers/{}/#tab-{}".format(pk, slug) + + def _pages_help(): - return [{"page": key, "meaning": meaning} for key, (_path, meaning) in PAGES.items()] + rows = [] + for key, (_path, meaning) in PAGES.items(): + row = {"page": key, "meaning": meaning} + click = CLICKS.get(key.split(":")[0]) + if click: + row["click"] = click + rows.append(row) + return rows def run(job, *args, **kwargs): @@ -235,6 +338,7 @@ def run(job, *args, **kwargs): key, _sep, arg = target.partition(":") key = key.strip().lower() arg = arg.strip() + pk = None if arg and (key + ":{arg}") in PAGES: path, meaning = PAGES[key + ":{arg}"] if "{pk}" in path: @@ -252,7 +356,14 @@ def run(job, *args, **kwargs): return _failure( "Unknown page '{}'. Pass a global id or one of: {}.".format(target, ", ".join(PAGES)) ) + if key == "new_resource_handler": + path = _handler_chooser(arg, outputs) + elif key == "handler_images" and pk is not None: + path = _handler_images_path(pk) outputs.update({"page": key, "argument": arg or None, "meaning": meaning, "url": base + path}) + if key in CLICKS: + outputs["click"] = CLICKS[key] + outputs["note"] = "The form opens as a dialog over this page: tell the user to click {}.".format(CLICKS[key]) if not base: - outputs["note"] = "The default portal has no domain, so the URL is relative; prefix it with the appliance's https address." + outputs["relativeNote"] = "The default portal has no domain, so the URL is relative; prefix it with the appliance's https address." return _success("{} -> {}".format(target, outputs["url"]), outputs) diff --git a/plugins/OHK-1wmzl7sp/OHK-1wmzl7sp_metadata.json b/plugins/OHK-1wmzl7sp/OHK-1wmzl7sp_metadata.json index 989d9ce7..0fc771a3 100644 --- a/plugins/OHK-1wmzl7sp/OHK-1wmzl7sp_metadata.json +++ b/plugins/OHK-1wmzl7sp/OHK-1wmzl7sp_metadata.json @@ -26,7 +26,7 @@ "description": "Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it.", "id": "OHK-1wmzl7sp", "max_retries": 0, - "name": "POC Onboarding: Remove Environment", + "name": "Onboarding: Remove Environment", "resource_technologies": [], "script_filename": "OHK-1wmzl7sp_script.py", "shared": false, diff --git a/plugins/OHK-1wmzl7sp/OHK-1wmzl7sp_script.py b/plugins/OHK-1wmzl7sp/OHK-1wmzl7sp_script.py index 167cc4da..f0ed046e 100644 --- a/plugins/OHK-1wmzl7sp/OHK-1wmzl7sp_script.py +++ b/plugins/OHK-1wmzl7sp/OHK-1wmzl7sp_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: Remove Environment (MCP Tool Action plugin). +Onboarding: Remove Environment (MCP Tool Action plugin). Deletes an environment that was imported by mistake (wrong region, wrong cluster, a duplicate) so the POC can start over cleanly. Refuses when any @@ -71,11 +71,18 @@ def run(job, *args, **kwargs): if error: return _failure(error) - active = env.server_set.exclude(status="HISTORICAL").count() + servers = env.server_set.exclude(status="HISTORICAL") + active = servers.count() if active: + failed = servers.filter(status="PROVFAILED").count() return _failure( - "Environment '{}' still has {} active server(s); decommission them first (Delete server action), " - "then remove the environment.".format(env.name, active) + "Environment '{}' still has {} server(s); delete them first ({}), then remove the environment.".format( + env.name, + active, + "{} failed to provision: onb_failed_servers deletes those; the others with the Delete server action".format(failed) + if failed + else "Delete server action", + ) ) if env.name.lower() == "unassigned": return _failure("The Unassigned environment is built in and cannot be removed.") @@ -85,7 +92,7 @@ def run(job, *args, **kwargs): "name": env.name, "handler": env.resource_handler.name if env.resource_handler else None, "osBuildsDetached": env.os_builds.count(), - "groupsDetached": env.groups_served.count(), + "groupsDetached": env.group_set.exclude(name="Unassigned").count(), } env.delete() return _success("Environment '{}' removed.".format(info["name"]), info) diff --git a/plugins/OHK-4vwq70dg/OHK-4vwq70dg_metadata.json b/plugins/OHK-4vwq70dg/OHK-4vwq70dg_metadata.json index 04087183..88e1619a 100644 --- a/plugins/OHK-4vwq70dg/OHK-4vwq70dg_metadata.json +++ b/plugins/OHK-4vwq70dg/OHK-4vwq70dg_metadata.json @@ -106,7 +106,7 @@ "description": "Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most.", "id": "OHK-4vwq70dg", "max_retries": 0, - "name": "POC Onboarding: Recent Errors", + "name": "Onboarding: Recent Errors", "resource_technologies": [], "script_filename": "OHK-4vwq70dg_script.py", "shared": false, diff --git a/plugins/OHK-4vwq70dg/OHK-4vwq70dg_script.py b/plugins/OHK-4vwq70dg/OHK-4vwq70dg_script.py index e371bb7c..c7281242 100644 --- a/plugins/OHK-4vwq70dg/OHK-4vwq70dg_script.py +++ b/plugins/OHK-4vwq70dg/OHK-4vwq70dg_script.py @@ -1,11 +1,13 @@ """ -POC Onboarding: Recent Errors (MCP Tool Action plugin). +Onboarding: Recent Errors (MCP Tool Action plugin). Reads the tail of a CloudBolt log (application, jobengine, authentication, mcp, saml2) and returns the WARNING-and-above entries of the last N minutes grouped by exception and message, newest first, with secrets redacted and a hint for the patterns a new appliance hits most (failed handler -verification, missing egress, proxy, SSL inspection, LDAP bind). The agent +verification, missing egress, proxy, SSL inspection, LDAP bind, guest +credentials, Windows password, unreachable ESXi hosts, a key pair's private +key). The agent calls it right after something failed in the UI, since the handler form masks the real error but logs it. Read-only, synchronous. Admin only. @@ -67,6 +69,12 @@ (re.compile(r"vmware_datastore parameter must be specified", re.I), "Pin a vmware_datastore value on the vCenter environment."), (re.compile(r"Memory and CPU are required", re.I), "The vCenter environment needs cpu_cnt and mem_size options."), (re.compile(r"No (image|template|AMI).*(region|location)|not available in", re.I), "The OS build has no image in this environment's region or location; import one for that region."), + (re.compile(r"server's password is unknown", re.I), "The vCenter template has no guest credentials, so CloudBolt cannot run scripts on the server. Set them with onb_ui_link handler_images: (the handler's Templates tab): in the template's Credentials column click + (Add credentials to template) or the pencil, enter the guest username and password, and Save."), + (re.compile(r"No password parameter set|cannot set the Administrator password", re.I), "vCenter Windows customization had no Administrator password. Set the Windows template's credentials with onb_ui_link handler_images: (the handler's Templates tab): + (Add credentials to template) or the pencil in the Credentials column, enter Administrator and its password, Save. Alternative: new_password on the environment (onb_trim_environment shows the steps)."), + (re.compile(r"guestFile[\s\S]{0,800}?(ConnectTimeout|NewConnectionError|timed out|Connection refused|No route to host|unreachable)|failed to make the HTTP PUT request to the VMware API", re.I), "The appliance cannot reach the VM's ESXi host (443, or the port in the error) to upload a script (VMware Tools file transfer skips vCenter), common with hosted vCenter. Set tech_specific_script_execution to False on the environment: onb_parameter onb_param_name=tech_specific_script_execution, onb_param_targets=, onb_param_options=False. Scripts then use SSH (22) and WinRM (5985/5986) from the appliance; never pass the parameter in orders."), + (re.compile(r"ssh_config: line \d+: Bad configuration option|Bad configuration option: \w+[\s\S]{0,200}?terminating", re.I), "The appliance's own SSH client configuration is invalid (the error names /etc/ssh/ssh_config and the line), so no SSH remote script can run from this appliance; nothing on the guest is wrong. A server-side option such as PermitRootLogin in the client file causes it: on the appliance, as root, remove or comment out the named line, then run the script again."), + (re.compile(r"port=5986[\s\S]{0,400}?(ConnectTimeout|timed out|Connection refused|NewConnectionError)|wsman[\s\S]{0,400}?(ConnectTimeout|timed out)", re.I), "WinRM from the appliance to the Windows server timed out on 5986: CloudBolt uses WinRM over HTTPS unless the server's winrm_protocol is http. Either enable the WinRM HTTPS listener and a firewall rule for 5986 on the Windows image, or set winrm_protocol to http on the environment (onb_parameter onb_param_name=winrm_protocol, onb_param_targets=, onb_param_options=http), and then 5985 must be open. The appliance needs that port open to the guest network."), + (re.compile(r"Could not find required key material|no matching key material uploaded|key pair has not been added", re.I), "CloudBolt holds no private key for the key pair named in the message. Upload it with onb_ui_link handler_ssh_keys: (the handler's SSH Keys tab): the pencil in the Actions column of the key's row, paste it into Key material, Save. Never in chat."), ] diff --git a/plugins/OHK-5885tete/OHK-5885tete_metadata.json b/plugins/OHK-5885tete/OHK-5885tete_metadata.json index 8a67de4a..5518f91d 100644 --- a/plugins/OHK-5885tete/OHK-5885tete_metadata.json +++ b/plugins/OHK-5885tete/OHK-5885tete_metadata.json @@ -66,7 +66,7 @@ "description": "Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read.", "id": "OHK-5885tete", "max_retries": 0, - "name": "POC Onboarding: Set Item Status", + "name": "Onboarding: Set Item Status", "resource_technologies": [], "script_filename": "OHK-5885tete_script.py", "shared": false, diff --git a/plugins/OHK-5885tete/OHK-5885tete_script.py b/plugins/OHK-5885tete/OHK-5885tete_script.py index 66df7b78..d0298ca8 100644 --- a/plugins/OHK-5885tete/OHK-5885tete_script.py +++ b/plugins/OHK-5885tete/OHK-5885tete_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: Set Item Status (MCP Tool Action plugin). +Onboarding: Set Item Status (MCP Tool Action plugin). Records the state of one POC test plan item or prerequisite: done, skipped, not_applicable or pending, with a note saying why. A customer who cannot use @@ -10,6 +10,10 @@ survives client reconnects and is visible to onb_status. Synchronous. Admin only. +The result carries only the item just recorded, with its note, plus counts +and ids per status; onb_status and onb_scorecard return every item with its +note. A note longer than NOTE_MAX is refused, never cut. + Every declared input is read from its rendered template token in _read_inputs(); keep each one referenced that way or CloudBolt's token scan deletes the input when the script is saved. @@ -23,6 +27,7 @@ STATE_FIELD = "poc_onboarding_state" STATUSES = ("pending", "done", "skipped", "not_applicable") ITEM_RE = re.compile(r"^(P\d{1,2}|\d\.\d\.\d)$") +NOTE_MAX = 2000 # Test plan items and prerequisites, with the weight the scorecard applies. KNOWN_ITEMS = { @@ -113,7 +118,7 @@ def _read_inputs(): return { "item": _text(raw["onb_item_id"]).upper(), "status": _text(raw["onb_item_status"]).lower().replace("-", "_").replace(" ", "_"), - "note": _text(raw["onb_item_note"])[:1000], + "note": _text(raw["onb_item_note"]), } @@ -126,8 +131,8 @@ def _state_field(create=False): field, _ = CustomField.objects.get_or_create( name=STATE_FIELD, defaults=dict( - label="POC Onboarding State", - description="State recorded by the POC onboarding MCP tools: item statuses, handler verify results, install details.", + label="Onboarding State", + description="State recorded by the onboarding MCP tools: item statuses, handler verify results, install details.", type="TXT", namespace=namespace, ), @@ -160,13 +165,23 @@ def _update_state(mutate): return state +def _item_order(item): + """Prerequisites P1 to P12 first, then test plan items in numeric order.""" + if item.startswith("P"): + return (0, int(item[1:]) if item[1:].isdigit() else 0) + return (1,) + tuple(int(part) if part.isdigit() else 0 for part in item.split(".")) + + def _summary(items): + """Counts per status and the item ids per status, without notes.""" counts = {status: 0 for status in STATUSES} - for entry in items.values(): - status = (entry or {}).get("status") + by_status = {status: [] for status in STATUSES} + for item_id in sorted(items, key=_item_order): + status = (items[item_id] or {}).get("status") if status in counts: counts[status] += 1 - return counts + by_status[status].append(item_id) + return counts, by_status def run(job, *args, **kwargs): @@ -187,6 +202,11 @@ def run(job, *args, **kwargs): return _failure("onb_item_status must be one of: {}.".format(", ".join(STATUSES))) if status in ("skipped", "not_applicable") and not inputs["note"]: return _failure("Give onb_item_note a short reason when an item is skipped or not applicable; the scorecard prints it.") + if len(inputs["note"]) > NOTE_MAX: + return _failure( + "onb_item_note is {} characters; the limit is {}. Nothing was recorded: shorten the note and call again.".format( + len(inputs["note"]), NOTE_MAX) + ) title, weight = KNOWN_ITEMS.get(item, (None, None)) when = datetime.now(timezone.utc).isoformat() @@ -204,7 +224,7 @@ def mutate(state): } state = _update_state(mutate) - items = state.get("items") or {} + counts, by_status = _summary(state.get("items") or {}) outputs = { "item": item, "title": title, @@ -212,9 +232,9 @@ def mutate(state): "status": status, "note": inputs["note"], "recordedAt": when, - "items": items, - "summary": _summary(items), + "summary": counts, + "byStatus": by_status, } if title is None: - outputs["note"] = "'{}' is not in the current test plan; it was recorded anyway.".format(item) + outputs["warning"] = "'{}' is not in the current test plan; it was recorded anyway.".format(item) return _success("{} recorded as {}.".format(item, status), outputs) diff --git a/plugins/OHK-5zg1dkcr/OHK-5zg1dkcr_metadata.json b/plugins/OHK-5zg1dkcr/OHK-5zg1dkcr_metadata.json index 60141e9b..3adb0283 100644 --- a/plugins/OHK-5zg1dkcr/OHK-5zg1dkcr_metadata.json +++ b/plugins/OHK-5zg1dkcr/OHK-5zg1dkcr_metadata.json @@ -4,7 +4,7 @@ "description": "Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links.", "id": "OHK-5zg1dkcr", "max_retries": 0, - "name": "POC Onboarding: Status", + "name": "Onboarding: Status", "resource_technologies": [], "script_filename": "OHK-5zg1dkcr_script.py", "shared": false, diff --git a/plugins/OHK-5zg1dkcr/OHK-5zg1dkcr_script.py b/plugins/OHK-5zg1dkcr/OHK-5zg1dkcr_script.py index da07bcc3..a0d33627 100644 --- a/plugins/OHK-5zg1dkcr/OHK-5zg1dkcr_script.py +++ b/plugins/OHK-5zg1dkcr/OHK-5zg1dkcr_script.py @@ -1,14 +1,20 @@ """ -POC Onboarding: Status (MCP Tool Action plugin). +Onboarding: Status (MCP Tool Action plugin). Reports what the appliance has configured for a proof of concept in one read: licence, portal URL, SMTP, proxy, Content Library reachability, the Setup Wizard's derived step states, every resource handler with its -environments (OS builds, networks, groups, lifecycle parameters, last -verify result), the Custom Server blueprint, groups and users, LDAP and SSO, -which onboarding tools are installed and synchronous, the POC items the -agent has recorded as done or not applicable, and the next steps with the -UI link for each. Read-only, no inputs, synchronous. Admin only. +environments (OS builds, image guest credentials, networks, groups, +lifecycle parameters, key pairs, last verify result), the Expire Servers +job, the Custom Server blueprint, groups and users, LDAP and SSO, a summary +of the onboarding tools, the POC item statuses, the install record, and the +next steps with the UI link for each. Read-only, no inputs, synchronous. +Admin only. + +The report is a summary: tools are counted with only the missing, disabled +and not-synchronous ones named, and POC items carry their status only +(onb_scorecard and onb_set_item_status return the notes). Credentials are +reported as booleans; no password, username or key material is returned. The only network call is a HEAD against the Content Library host with a five-second timeout; everything else is the ORM. @@ -18,7 +24,7 @@ from django.conf import settings -TOOLKIT_VERSION = "0.1.0" +TOOLKIT_VERSION = "1.0.0" STATE_NAMESPACE = "poc_onboarding" STATE_FIELD = "poc_onboarding_state" TOOLKIT_TOOLS = [ @@ -36,6 +42,7 @@ "onb_import_os_build", "onb_configure_custom_server", "onb_remove_environment", + "onb_failed_servers", "onb_parameter", "onb_group", "onb_user", @@ -45,12 +52,62 @@ "onb_verify_ldap", "onb_smtp", "onb_smtp_test", + "onb_install_content_library_item", + "onb_cit_from_order", + "onb_scorecard", + "onb_sync_images", + "onb_environment_networks", + "onb_network_addressing", "sync_from_source_control_repo", "fetch_job_log", "manage_blueprint_permissions", + "run_recurring_job", + "run_cit_tests", ] +# Tools that run as jobs; onb_install turns Synchronous Action on for every other toolkit tool (its TOOLS map). +ASYNC_TOOLS = { + "onb_verify_resource_handler", + "onb_install", + "onb_handler_locations", + "onb_import_environments", + "onb_import_os_build", + "onb_verify_ldap", + "onb_smtp_test", + "onb_install_content_library_item", + "onb_sync_images", + "onb_environment_networks", + "onb_network_addressing", +} +INSTALL_STEP = "Run onb_install (asynchronous; poll the job), then reconnect the MCP client." ENV_PARAM_FLAGS = ["hostname_template", "expiration_date", "power_schedule"] +EXPIRE_JOB_NAME = "Expire Servers" MAX_GROUPS = 25 +MAX_FAILED_SERVERS = 5 +MAX_USERS = 20 +MAX_KEYS = 10 +# Guest credentials. A server's password comes from these parameters (ResourceHandler.get_server_credentials); +# provisioning copies the order's values and then the image's username, password and key_name onto the server. +GUEST_PASSWORD_PARAMS = ["password", "initial_password", "initial_linux_password", "initial_windows_password", "template_root_password"] +# The order form carries the guest password on these technologies, so an image without one is fine there. +ORDER_PASSWORD_TECH = {"azure_arm", "alibaba"} +# vCenter: new_password is the Windows guest password that guest customization sets. On "vmware" handlers +# scripts also run through VMware Tools (Server.use_tech_specific_script_execution), which needs a password: +# a key alone fails with "Cannot run script, server's password is unknown". +VCENTER_TECH = {"vmware", "vmc_aws"} +TOOLS_SCRIPT_TECH = {"vmware"} +# The handler page's tab that lists images, by handler type (resourcehandlers//views.py); the rest use "images". +IMAGES_TAB = {"vmware": "Templates", "proxmox": "Templates", "aws": "amis"} +SSH_KEY_STEPS = "Click the pencil in the Actions column of the key's row, paste the private key (PEM) into Key material, then Save." +SSH_KEY_WHY = ( + "CloudBolt needs it to sign in to Linux servers over SSH (remote scripts such as Standard Server's Hello World) and to read the Administrator password of Windows servers on AWS." +) +# Parameters the onboarding content creates: the Standard Server blueprint's (with the global id its sync stamps) +# and the ones the skill makes with onb_parameter (recorded in the state as toolkitParameters). +CONTENT_PARAMETERS = {"application": "CF-15yw228m", "maintenance_window": "CF-cei72k8x"} +PLAN_PARAMETERS = ("backup_policy", "cost_center") +PASSWORD_FIX_STEPS = ( + "CloudBolt asks for the user's current password before it changes one, and this user has none. On the user's page click Delete and confirm, then on the Users list click Add, enter the user again with Password and Confirm password, and click Create." +) def _failure(message): @@ -90,6 +147,29 @@ def _iso(value): return value +def _local_to_utc(value): + """A naive database datetime as aware UTC. CloudBolt runs with USE_TZ=False, so it is appliance-local time.""" + if value is None: + return None + if value.tzinfo is not None: + return value.astimezone(timezone.utc) + try: + from zoneinfo import ZoneInfo + + return value.replace(tzinfo=ZoneInfo(settings.TIME_ZONE)).astimezone(timezone.utc) + except Exception: + return value.astimezone(timezone.utc) # a naive datetime is read as the process's local time + + +def _parse_utc(text): + """An ISO string the toolkit stored with datetime.now(timezone.utc), as aware UTC; None when unreadable.""" + try: + value = datetime.fromisoformat(str(text)) + except (TypeError, ValueError): + return None + return value.replace(tzinfo=timezone.utc) if value.tzinfo is None else value.astimezone(timezone.utc) + + def _load_state(): try: from infrastructure.models import CustomField @@ -151,12 +231,13 @@ def _preferences(base): "smtp": { "configured": bool(smtp_host), "host": smtp_host or None, - "editUrl": base + "/admin/email_settings/edit/", - "testUrl": base + "/admin/email_test/", + "editUrl": base + "/admin/email_settings/", + "editClick": "Edit on the Overview tab", }, "proxy": { "configured": gp.web_proxy_id is not None, - "editUrl": base + "/admin/edit_web_proxy/", + "editUrl": base + "/admin/misc_settings/#web-proxy-pane", + "editClick": "Edit next to Settings on the Web Proxy tab", }, } @@ -211,23 +292,205 @@ def _setup_wizard(base): return {"available": False, "error": str(exc)[:200]} -def _environment_row(env, base): +# Technologies whose networks carry addressing CloudBolt sends to the guest (the others let the cloud assign IPs). +ADDRESSING_TECH = {"vmware", "vmc_aws", "scvmm", "hyperv", "acropolis", "h3ccas", "vcloud_director", "azurelocal"} +NO_NETWORK_TECH = {"proxmox", "metalsoft", "orka", "ipmi"} + + +def _network_problems(env): + """What would make an order's NIC 1 fail: no network, too many, static without gateway and netmask, a full pool.""" + problems = [] + handler = env.resource_handler + tech = getattr(handler, "resource_technology", None) if handler else None + slug = (getattr(tech, "slug", None) or "") if tech else "" + if slug in NO_NETWORK_TECH: + return problems + nets = [] + for cfv in env.custom_field_options.filter(field__name="sc_nic_0").select_related("network_value"): + if cfv.network_value is not None: + nets.append(cfv.network_value) + if not nets: + problems.append("no network on NIC 1") + return problems + if len(nets) > 5: + problems.append("{} networks on NIC 1; choose up to 5".format(len(nets))) + if env.custom_field_options.filter(field__name__regex=r"^sc_nic_([1-9]|[1-9][0-9])$").exists(): + problems.append("networks on more than one NIC") + if slug not in ADDRESSING_TECH: + return problems + for net in nets: + try: + provider = net.determine_ip_provider() + except Exception: + provider = None + if provider in ("user_static", "user_static_or_dhcp", "pool", "ipam") and not (net.gateway and net.netmask): + problems.append("network '{}' is static without gateway and netmask".format(net.name)) + if provider == "pool": + try: + rp = net.get_resource_pool() + if rp is not None and not rp.get_values().filter(server=None, resource=None).exists(): + problems.append("network '{}' has a full IP pool".format(net.name)) + except Exception: + pass + if provider == "ipam": + try: + if net.ipam_network.ipam_set.first() is None: + problems.append("network '{}' is mapped to an IPAM network with no IPAM endpoint".format(net.name)) + except Exception: + pass + return problems + + +def _ssh_keys(env, handler): + """Key pairs the environment offers and whether CloudBolt holds each one's private key (the handler's SSH Keys tab).""" + from common.methods import find_key_material + + field = getattr(handler, "ssh_keyname_field_name", None) if handler else None + if not field: + return [] + names = env.custom_field_options.filter(field__name=field).values_list("str_value", flat=True).distinct() + rows = [] + for name in list(names)[:MAX_KEYS]: + if name: + have, _material = find_key_material(name, handler) # the material itself is never returned + rows.append({"name": name, "materialUploaded": bool(have)}) + return rows + + +def _image_credentials(osb, osba, slug): + """Which guest credentials the image (OSBuildAttribute) carries, as booleans; the values are never returned.""" + creds = osba.get_credentials() # username, password and keyfile parameters on the image + row = {"osBuild": osb.name, "image": getattr(osba, "global_id", None) or osba.template_name} + if osb.is_windows(): + row["windows"] = True + row["username"] = bool(creds.get("username")) + if not slug.startswith("aws"): # on AWS the key pair is the environment's (sshKeys) + row["password"] = bool(creds.get("password")) + row["key"] = bool(creds.get("keyfile")) + # Not output: the template name, and whether a server without a username would sign in as root + # (get_server_credentials defaults to Administrator on Windows, ubuntu on the Ubuntu family, else root). + row["_template"] = osba.template_name or row["image"] + row["_rootDefault"] = not osb.is_windows() and getattr(osb.os_family, "name", None) != "Ubuntu" + return row + + +def _new_password_set(env): + """Whether the environment offers New Password (new_password) with a value; the value is only tested, never returned.""" + if not env.custom_fields.filter(name="new_password").exists(): + return False + for cfv in env.custom_field_options.filter(field__name="new_password"): + if cfv.value: + return True + return False + + +def _script_path(env): + """How scripts reach a vCenter server: VMware Tools (tech-specific) or SSH/WinRM, and the WinRM protocol.""" + tech = None + for cfv in env.custom_field_options.filter(field__name="tech_specific_script_execution"): + tech = bool(cfv.value) + if tech is None: + tech = bool(getattr(settings, "TECH_SPECIFIC_SCRIPT_EXECUTION", True)) + path = {"techSpecific": tech} + if not tech: + protocol = None + for cfv in env.custom_field_options.filter(field__name="winrm_protocol"): + protocol = str(cfv.value or "").lower() or None + path["winrmProtocol"] = protocol or "https" + path["ports"] = "SSH 22 (Linux) and WinRM {} (Windows) from the appliance to the servers".format( + 5985 if protocol == "http" else 5986) + return path + + +def _environment_row(env, base, handler, slug): try: network_count = len(env.networks()) except Exception: network_count = None flags = list(env.custom_fields.filter(name__in=ENV_PARAM_FLAGS).values_list("name", flat=True)) - return { + problems = [] + guest = [] + try: + for osb in env.os_builds.all(): + try: + osba = osb.osba_for_resource_handler(handler, environment=env) if handler is not None else None + if handler is not None and osba is None: + problems.append({"osBuild": osb.name, "problem": "no image of this OS build for the environment"}) + except Exception as exc: + problems.append({"osBuild": osb.name, "problem": str(exc)[:300]}) + continue + if osba is not None: + try: + guest.append(_image_credentials(osb, osba, slug)) + except Exception: + pass + except Exception: + pass + row = { "id": env.global_id, - "pk": env.id, "name": env.name, "osBuilds": env.os_builds.count(), + "osBuildProblems": problems, + "guestCredentials": guest, + "networkProblems": _network_problems(env), "networks": network_count, - "groups": env.groups_served.count(), + # Group.environments (Environment.groups_served is deprecated); Unassigned is the placeholder for restricted new environments. + "groups": env.group_set.exclude(name="Unassigned").count(), "lifecycleParameters": sorted(flags), + "sshKeys": _ssh_keys(env, handler), "url": base + "/environments/{}/".format(env.id), "parametersUrl": base + "/environments/{}/#tab-parameters".format(env.id), } + try: + # Not output: whether servers get a guest password from the order instead of the image. + row["_orderPassword"] = slug in ORDER_PASSWORD_TECH or env.custom_fields.filter(name__in=GUEST_PASSWORD_PARAMS).exists() + if slug in VCENTER_TECH: + row["newPasswordSet"] = _new_password_set(env) + row["scriptPath"] = _script_path(env) + except Exception: + pass + return row + + +def _cached_images(handler, slug): + """How many images the handler's cache holds; None when the technology keeps none.""" + try: + if (slug or "").startswith("aws"): + from resourcehandlers.aws.models import AwsCachedAMI + + return AwsCachedAMI.objects.for_resource_handler(resource_handler=handler).distinct().count() + if slug == "azure_arm": + from resourcehandlers.azure_arm.models import AzureARMAvailableImage + + return AzureARMAvailableImage.objects.for_resource_handler(handler).distinct().count() + if slug == "vmware": + from resourcehandlers.vmware.models import VMWareAvailableImage + + return VMWareAvailableImage.objects.filter(resource_handler=handler).count() + except Exception: + return None + return None + + +def _images_tab(handler): + """(fragment, label) of the handler page's image tab: tabs/views.py makes the pane id 'tab-' + the tab's slug.""" + try: + type_slug = handler.type_slug + except Exception: + type_slug = "" + fragment = IMAGES_TAB.get(type_slug, "images") + if fragment == "amis": + return fragment, "AMIs" + return fragment, "{}s".format(getattr(handler, "template_label", None) or "image").title() + + +def _last_verify(entry): + """The verify result onb_verify_resource_handler recorded, with the error cut to 300 characters.""" + verify = (entry or {}).get("lastVerify") + if not verify: + return verify + error = verify.get("error") + return {"ok": verify.get("ok"), "when": verify.get("when"), "error": error[:300] if error else None} def _handlers(base, state): @@ -241,20 +504,27 @@ def _handlers(base, state): except Exception: pass tech = handler.resource_technology - envs = [_environment_row(env, base) for env in handler.environment_set.all().order_by("id")] + slug = tech.slug if tech else None + envs = [_environment_row(env, base, handler, slug or "") for env in handler.environment_set.all().order_by("id")] + fragment, images_label = _images_tab(handler) rows.append( { "id": handler.global_id, - "pk": handler.id, "name": handler.name, "technology": tech.name if tech else None, - "technologySlug": tech.slug if tech else None, + "technologySlug": slug, "endpoint": handler.ip, "environments": envs, - "lastVerify": (verify_state.get(handler.global_id) or {}).get("lastVerify"), + "cachedImages": _cached_images(handler, slug), + "lastVerify": _last_verify(verify_state.get(handler.global_id)), "url": base + "/admin/resourcehandlers/{}/".format(handler.id), - "verifyUrl": base + "/admin/resourcehandlers/{}/verify_connection/".format(handler.id), - "importLocationsUrl": base + "/admin/resourcehandlers/{}/import_locations/".format(handler.id), + "editClick": "Edit Credentials on the Overview tab", + "importLocationsUrl": base + "/admin/resourcehandlers/{}/#tab-locations".format(handler.id), + "sshKeysUrl": base + "/admin/resourcehandlers/{}/#tab-ssh-keys".format(handler.id), + "imagesUrl": base + "/admin/resourcehandlers/{}/#tab-{}".format(handler.id, fragment), + # Not output: the tab's label and what the handler calls an image, for the step text. + "_imagesTab": images_label, + "_imageLabel": "AMI" if fragment == "amis" else (getattr(handler, "template_label", None) or "image").lower(), } ) return rows @@ -293,7 +563,6 @@ def _custom_server(base): "name": name, "exists": True, "id": blueprint.global_id, - "pk": blueprint.id, "status": blueprint.status, "isOrderable": bool(blueprint.is_orderable), "anyGroupCanDeploy": bool(blueprint.any_group_can_deploy), @@ -303,6 +572,74 @@ def _custom_server(base): } +def _failed_servers(base): + """Servers a failed order left in Provision Failed state; onb_failed_servers lists and deletes them.""" + from infrastructure.models import Server + + failed = Server.objects.filter(status="PROVFAILED").select_related("environment") + rows = [ + { + "id": s.global_id, + "hostname": s.hostname, + "environment": s.environment.name if s.environment else None, + "created": _iso(s.add_date), + "url": base + "/servers/{}/".format(s.id), + } + for s in failed.order_by("-add_date")[:MAX_FAILED_SERVERS] + ] + return {"count": failed.count(), "servers": rows} + + +def _users(base): + """Local users, newest first, each with its own page; passwordNeeded marks one an earlier onb_user created without a password.""" + from accounts.models import GroupRoleMembership, UserProfile + + rows = [] + for up in UserProfile.objects.filter(ldap__isnull=True).select_related("user").order_by("-id")[:MAX_USERS]: + user = up.user + usable = user.has_usable_password() + rows.append( + { + "id": up.global_id, + "username": user.username, + "name": "{} {}".format(user.first_name, user.last_name).strip(), + "superAdmin": bool(up.super_admin), + "roles": [ + "{}: {}".format(m.group.name, m.role.name) + for m in GroupRoleMembership.objects.filter(profile=up).select_related("group", "role") + ], + "passwordSet": usable, + # SSO users have no usable password either, but they have logged in. + "passwordNeeded": not usable and user.last_login is None, + "url": base + "/users/{}/".format(up.id), + } + ) + return rows + + +def _parameter_conflicts(base, state): + """Parameters the onboarding content would use that already exist and are not the toolkit's own.""" + from infrastructure.models import CustomField + + owned = set(state.get("toolkitParameters") or []) + rows = [] + for name in list(CONTENT_PARAMETERS) + list(PLAN_PARAMETERS): + cf = CustomField.objects.filter(name=name).first() + if cf is None or name in owned or CONTENT_PARAMETERS.get(name) == cf.global_id: + continue + rows.append( + { + "name": name, + "label": cf.label, + "type": cf.type, + "id": cf.global_id, + "usedFor": "Standard Server blueprint sync" if name in CONTENT_PARAMETERS else "onb_parameter", + "url": base + "/admin/customfields/{}/".format(cf.id), + } + ) + return rows + + def _groups_users(base): from accounts.models import Group, UserProfile @@ -311,21 +648,25 @@ def _groups_users(base): except AttributeError: groups_qs = Group.objects.exclude(name="Unassigned") groups = [ - {"id": g.global_id, "pk": g.id, "name": g.name, "url": base + "/groups/{}/".format(g.id)} + {"id": g.global_id, "name": g.name, "url": base + "/groups/{}/".format(g.id)} for g in groups_qs.order_by("name")[:MAX_GROUPS] ] total_groups = groups_qs.count() users = UserProfile.objects.count() admins = UserProfile.objects.filter(super_admin=True).count() - return { + local_users = _users(base) + result = { "groups": groups, "groupCount": total_groups, "groupsUrl": base + "/groups/", "userCount": users, "superAdminCount": admins, + "users": local_users, "usersUrl": base + "/users/", - "newUserUrl": base + "/users/create/", } + if any(u["passwordNeeded"] for u in local_users): + result["passwordFixSteps"] = PASSWORD_FIX_STEPS + return result def _auth(base): @@ -342,7 +683,7 @@ def _auth(base): "port": ldap.port, "protocol": ldap.protocol, "url": base + "/admin/ldap_settings/{}/".format(ldap.id), - "verifyUrl": base + "/admin/ldap_settings/{}/verify_connection/".format(ldap.id), + "editClick": "Credentials for the bind password, Settings for the rest", } ) sso_count = None @@ -354,24 +695,70 @@ def _auth(base): pass return { "ldapUtilities": ldap_rows, - "newLdapUrl": base + "/admin/ldap_settings/add/", + "newLdapUrl": base + "/admin/ldap_settings/", + "newLdapClick": "Add", "ssoProviders": sso_count, } def _toolkit(base): + """Counts the toolkit's tools and names only the missing, disabled and not-synchronous ones. + + lastSync is the newest last_cached of the tools and their plugins: SourceCodeRepoMixin.refresh_from_remote_source + stamps it on every refresh from a repository (a first import leaves it empty). + """ from cbhooks.models import MCPToolAction - present = {} - for action in MCPToolAction.objects.filter(mcp_tool_name__in=TOOLKIT_TOOLS): - present[action.mcp_tool_name] = { - "id": action.global_id, - "enabled": bool(action.enabled), - "isSynchronous": bool(action.is_synchronous), - "editUrl": base + "/actions/mcp_tool_actions/{}/edit/".format(action.id), - } - missing = [name for name in TOOLKIT_TOOLS if name not in present] - return {"tools": present, "missing": missing, "listUrl": base + "/actions/mcp_tool_actions/"} + present, disabled, not_sync, synced = set(), [], [], [] + rows = MCPToolAction.objects.filter(mcp_tool_name__in=TOOLKIT_TOOLS).values_list( + "mcp_tool_name", "enabled", "is_synchronous", "last_cached", "hook__last_cached" + ) + for name, enabled, is_sync, cached, hook_cached in rows: + present.add(name) + if not enabled: + disabled.append(name) + if name not in ASYNC_TOOLS and not is_sync: + not_sync.append(name) + synced.extend(t for t in (_local_to_utc(cached), _local_to_utc(hook_cached)) if t is not None) + return { + "count": len(present), + "missing": [name for name in TOOLKIT_TOOLS if name not in present], + "disabled": sorted(disabled), + "notSynchronous": sorted(not_sync), + "lastSync": max(synced).isoformat() if synced else None, + "listUrl": base + "/actions/mcp_tool_actions/", + } + + +def _install(state, toolkit): + """The record onb_install saved, compacted, with whether a toolkit sync came after it.""" + record = state.get("install") + if not isinstance(record, dict): + return None + egress = record.get("egress") or {} + result = { + "toolkitVersion": record.get("toolkitVersion"), + "when": record.get("when"), + "by": record.get("by"), + "missing": record.get("missing") or [], + "egress": {name: (check or {}).get("reachable") for name, check in egress.items() if isinstance(check, dict)}, + } + installed = _parse_utc(record.get("when")) + synced = _parse_utc(toolkit.get("lastSync")) + result["olderThanToolkitSync"] = bool(installed and synced and synced > installed) + return result + + +def _lifecycle_jobs(base): + """The Expire Servers recurring job, which acts on expiration_date (seeded disabled).""" + from jobs.models import RecurringJob + + job = RecurringJob.objects.filter(name=EXPIRE_JOB_NAME).first() + if job is None: + expire = {"exists": False, "listUrl": base + "/recurring_jobs/"} + else: + expire = {"enabled": bool(job.enabled), "url": base + job.get_absolute_url()} + return {"expireServers": expire} def _next_steps(report, base): @@ -379,36 +766,50 @@ def _next_steps(report, base): items = report["pocItems"] def skipped(item_id): - return (items.get(item_id) or {}).get("status") in ("skipped", "not_applicable", "done") + return items.get(item_id) in ("skipped", "not_applicable", "done") - if report["toolkit"]["missing"]: + toolkit = report["toolkit"] + install = report["install"] or {} + if toolkit["missing"]: steps.append( { "step": "Sync the missing onboarding tools, then run onb_install and reconnect the MCP client.", - "tools": report["toolkit"]["missing"], - "url": report["toolkit"]["listUrl"], + "tools": toolkit["missing"], + "url": toolkit["listUrl"], } ) + elif toolkit["disabled"] or toolkit["notSynchronous"] or install.get("olderThanToolkitSync"): + reasons = [] + if toolkit["disabled"]: + reasons.append("disabled: " + ", ".join(toolkit["disabled"])) + if toolkit["notSynchronous"]: + reasons.append("not synchronous: " + ", ".join(toolkit["notSynchronous"])) + if install.get("olderThanToolkitSync"): + reasons.append("the install record ({}) is older than the last toolkit sync ({})".format(install.get("when"), toolkit["lastSync"])) + steps.append({"step": INSTALL_STEP + " Why: " + "; ".join(reasons) + ".", "url": toolkit["listUrl"]}) handlers = report["resourceHandlers"] if not handlers: steps.append( { - "step": "Create the first resource handler in the UI (credentials are entered there), then run onb_verify_resource_handler.", + "step": "Create the first resource handler in the UI (credentials are entered there): the link opens the technology chooser. Then run onb_verify_resource_handler.", "item": "P3", - "url": base + "/admin/resourcehandlers/add/", + "url": base + "/setup/add-resource-handler/", } ) + guest_seen = set() # one step per image, however many environments offer it + advice = [] # steps that keep things tidy but block nothing, listed last for handler in handlers: verify = handler.get("lastVerify") or {} if verify and not verify.get("ok"): steps.append( { - "step": "Fix the connection of resource handler '{}': the last verify failed with '{}'. Re-run onb_verify_resource_handler afterwards.".format( + "step": "Fix the connection of resource handler '{}': the last verify failed with '{}'. On the handler's page, " + "click Edit Credentials on the Overview tab. Re-run onb_verify_resource_handler afterwards.".format( handler["name"], (verify.get("error") or "")[:160] ), "item": "P3", "handler": handler["id"], - "url": handler["url"] + "edit/", + "url": handler["url"], } ) elif not verify: @@ -422,10 +823,21 @@ def skipped(item_id): "url": handler["url"], } ) + if verify.get("ok") and handler.get("cachedImages") == 0: + steps.append( + { + "step": "Fill the image cache of '{}' with onb_sync_images (no whitelist; also enables the cache jobs); it runs for a while.".format( + handler["name"] + ), + "item": "P4", + "handler": handler["id"], + "url": handler["url"], + } + ) if not handler["environments"]: steps.append( { - "step": "Import one or two environments for '{}' (Import locations on the handler page).".format( + "step": "Import the one environment the POC needs for '{}' with onb_handler_locations and onb_import_environments (AWS: the one VPC the user picks).".format( handler["name"] ), "item": "P3", @@ -434,24 +846,120 @@ def skipped(item_id): } ) for env in handler["environments"]: - if env["osBuilds"] == 0: + for problem in env.get("osBuildProblems") or []: steps.append( { - "step": "Add an OS build with an image for environment '{}'.".format(env["name"]), + "step": "Orders in '{}' with OS build '{}' would fail: {}. Fix it with onb_import_os_build (onb_replace_existing=true replaces a duplicate image after the user agrees).".format( + env["name"], problem["osBuild"], problem["problem"]), "item": "P4", "environment": env["id"], "url": handler["url"], } ) - if env["networks"] == 0: + for problem in env.get("networkProblems") or []: steps.append( { - "step": "Attach a network (sc_nic_0) to environment '{}'.".format(env["name"]), + "step": "Environment '{}': {}. Choose its networks with onb_environment_networks and set their addressing with onb_network_addressing.".format( + env["name"], problem), "item": "P4", "environment": env["id"], "url": env["url"], } ) + for key in env.get("sshKeys") or []: + if not key["materialUploaded"]: + steps.append( + { + "step": "Have the admin upload the private key of key pair '{}', which '{}' offers: on the handler's SSH Keys tab, {} {}".format( + key["name"], env["name"], SSH_KEY_STEPS[0].lower() + SSH_KEY_STEPS[1:], SSH_KEY_WHY), + "item": "P4", + "environment": env["id"], + "url": handler["sshKeysUrl"], + } + ) + for image in env.get("guestCredentials") or []: + if image["image"] in guest_seen: + continue + if "password" not in image: # AWS: the key is the environment's, the username is the image's + if not image["username"] and image.get("_rootDefault"): + guest_seen.add(image["image"]) + steps.append( + { + "step": "SSH scripts on servers built from OS build '{}' would sign in as root, which AWS images normally refuse: " + "AMI '{}' has no username. Have the admin set it on the handler's AMIs tab: in that AMI's row, " + "Credentials column, click the + (Add credentials) next to None configured, enter the image's login " + "user as Username (ec2-user on Amazon Linux), then Save.".format(image["osBuild"], image["_template"]), + "item": "P4", + "environment": env["id"], + "url": handler["imagesUrl"], + } + ) + continue + if env.get("_orderPassword"): + continue + if image.get("windows") and env.get("newPasswordSet"): + continue # vCenter guest customization saves new_password as the Windows server's password + # VMware Tools needs a password; SSH also takes a key, which a Windows image cannot carry. + password_only = handler["technologySlug"] in TOOLS_SCRIPT_TECH or image.get("windows") + if image["password"] or (image["key"] and not password_only): + continue + guest_seen.add(image["image"]) + steps.append( + { + "step": "Remote scripts on servers built from OS build '{}' would fail{}: {} '{}' has no guest {}. " + "Have the admin enter it on the handler's {} tab: in that {}'s row, Credentials column, click the + (Add " + "credentials) next to None configured, or the pencil (Edit credentials) when a username or key is set; enter Username and Password{}, then Save. " + "Never ask for the password in chat.".format( + image["osBuild"], + " with 'Cannot run script, server's password is unknown'" + if handler["technologySlug"] in TOOLS_SCRIPT_TECH else "", + handler["_imageLabel"], + image["_template"], + "password" if password_only else "password or SSH key", + handler["_imagesTab"], + handler["_imageLabel"], + "" if password_only else " (or choose an SSH key)", + ), + "item": "P4", + "environment": env["id"], + "url": handler["imagesUrl"], + } + ) + if env.get("newPasswordSet") is False: + windows = [i["osBuild"] for i in env.get("guestCredentials") or [] if i.get("windows")] + if windows: + advice.append( + { + "step": "Advice, not a blocker: environment '{}' offers Windows OS build '{}' without New Password. Builds " + "pass on the {}'s password, but New Password is the Windows guest password CloudBolt sets at build and " + "stores for the server, so setting it keeps the two in agreement. Have the admin open the environment's " + "Parameters tab; unless New Password is listed, click Add, choose New Password and click Add; then click " + "the pencil in its Options column, enter the password and Save. Use the {}'s password unless the customer " + "wants it changed at build. Never ask for it in chat.".format( + env["name"], windows[0], handler["_imageLabel"], handler["_imageLabel"]), + "item": "P4", + "environment": env["id"], + "url": env["parametersUrl"], + } + ) + if env["osBuilds"] == 0: + steps.append( + { + "step": "Add an OS build with an image for environment '{}' (onb_import_os_build; empty onb_image lists the cache).".format(env["name"]), + "item": "P4", + "environment": env["id"], + "url": handler["url"], + } + ) + failed = report["failedServers"] + if failed["count"]: + steps.append( + { + "step": "{} server(s) are left in Provision Failed state by failed orders. Once the cause is known, list them with " + "onb_failed_servers and offer the user to delete them (it removes their VMs from the cloud too).".format(failed["count"]), + "url": failed["servers"][0]["url"], + } + ) custom = report["customServerBlueprint"] if not custom.get("exists"): steps.append({"step": "Restore the Custom Server blueprint.", "item": "P4", "url": custom.get("restoreUrl")}) @@ -467,6 +975,35 @@ def skipped(item_id): ) if report["groupsAndUsers"]["groupCount"] == 0: steps.append({"step": "Create a POC group and a non-admin test user.", "item": "2.3.1", "url": base + "/groups/"}) + for user in reversed(report["groupsAndUsers"]["users"]): # oldest first: the requestor is created before the approver + if user["passwordNeeded"]: + steps.append( + { + "step": "User '{}'{} has no password: {} Then run onb_user again with its group and roles to " + "restore them. One user per message; check passwordSet here before sending the next.".format( + user["username"], + " ({})".format(", ".join(user["roles"])) if user["roles"] else "", + PASSWORD_FIX_STEPS, + ), + "item": "2.3.1", + "user": user["id"], + "url": user["url"], + } + ) + expire = (report["lifecycleJobs"] or {}).get("expireServers") or {} + uses_expiration = any( + "expiration_date" in env["lifecycleParameters"] for handler in handlers for env in handler["environments"] + ) + if uses_expiration and expire.get("enabled") is False: + steps.append( + { + "step": "The Expire Servers recurring job is disabled, so expiration_date never acts on expired servers. It must be " + "enabled for expiration to work: enable it (onb_parameter does this when it attaches expiration_date), or have " + "the admin turn on the Enabled switch at the top right of the job's Overview tab.", + "item": "3.1.2", + "url": expire.get("url"), + } + ) if not report["preferences"]["smtp"]["configured"] and not skipped("P7"): steps.append( { @@ -483,7 +1020,26 @@ def skipped(item_id): "url": report["preferences"]["proxy"]["editUrl"], } ) - return steps[:10] + return (steps + advice)[:10] + + +def _strip_private(handlers): + """Drop the underscore keys the next steps read (template names, tab labels) from the output.""" + for handler in handlers: + for key in [k for k in handler if k.startswith("_")]: + del handler[key] + for env in handler["environments"]: + for key in [k for k in env if k.startswith("_")]: + del env[key] + for image in env.get("guestCredentials") or []: + image.pop("_template", None) + image.pop("_rootDefault", None) + + +def _poc_items(state): + """Each recorded POC item's status; the notes stay in the state.""" + items = state.get("items") or {} + return {item_id: (entry.get("status") if isinstance(entry, dict) else entry) for item_id, entry in items.items()} def run(job, *args, **kwargs): @@ -495,6 +1051,11 @@ def run(job, *args, **kwargs): base = _portal_url() state = _load_state() + toolkit = _toolkit(base) + try: + lifecycle_jobs = _lifecycle_jobs(base) + except Exception as exc: + lifecycle_jobs = {"error": str(exc)[:200]} report = { "generatedAt": datetime.now(timezone.utc).isoformat(), "appliance": _appliance(base), @@ -504,13 +1065,18 @@ def run(job, *args, **kwargs): "setupWizard": _setup_wizard(base), "resourceHandlers": _handlers(base, state), "customServerBlueprint": _custom_server(base), + "failedServers": _failed_servers(base), + "parameterConflicts": _parameter_conflicts(base, state), "groupsAndUsers": _groups_users(base), "authentication": _auth(base), - "toolkit": _toolkit(base), - "pocItems": state.get("items") or {}, - "install": state.get("install"), + "lifecycleJobs": lifecycle_jobs, + "toolkit": toolkit, + "pocItems": _poc_items(state), + "pocItemsNote": "Statuses only; onb_scorecard or onb_set_item_status returns each item's note.", + "install": _install(state, toolkit), } report["nextSteps"] = _next_steps(report, base) + _strip_private(report["resourceHandlers"]) if not base: report["note"] = ( "The default portal has no domain, so URLs are relative; prefix them with the appliance's https address." diff --git a/plugins/OHK-818zw61m/OHK-818zw61m_metadata.json b/plugins/OHK-818zw61m/OHK-818zw61m_metadata.json new file mode 100644 index 00000000..62f64848 --- /dev/null +++ b/plugins/OHK-818zw61m/OHK-818zw61m_metadata.json @@ -0,0 +1,18 @@ +{ + "commandline_args": null, + "credentials": "YOUR_CREDENTIALS", + "description": "Prints a hello message, the host name and the user inside a Linux guest to prove agentless script execution.", + "execution_timeout": 600, + "id": "OHK-818zw61m", + "max_retries": 0, + "name": "Hello World (Linux)", + "remove_after_run": true, + "resource_technologies": [], + "run_with_sudo": false, + "script_filename": "OHK-818zw61m_script.sh", + "shared": false, + "target_os_families": [ + "Linux" + ], + "type": "Remote Script" +} diff --git a/plugins/OHK-818zw61m/OHK-818zw61m_script.sh b/plugins/OHK-818zw61m/OHK-818zw61m_script.sh new file mode 100644 index 00000000..eda27afa --- /dev/null +++ b/plugins/OHK-818zw61m/OHK-818zw61m_script.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Hello World (Linux): proves that CloudBolt runs a script inside the +# guest over SSH without an agent (test plan 1.1.3, 4.1.2, 4.3.3). +set -e +echo "Hello from CloudBolt on $(hostname) at $(date -u +%Y-%m-%dT%H:%M:%SZ)" +echo "Running as $(whoami) on $(uname -sr)" +echo "hello_world=ok" diff --git a/plugins/OHK-8in52yhn/OHK-8in52yhn_metadata.json b/plugins/OHK-8in52yhn/OHK-8in52yhn_metadata.json index a95f783a..ee225369 100644 --- a/plugins/OHK-8in52yhn/OHK-8in52yhn_metadata.json +++ b/plugins/OHK-8in52yhn/OHK-8in52yhn_metadata.json @@ -143,10 +143,10 @@ "onb_user_roles", "onb_user_super_admin" ], - "description": "Creates a local user with no usable password and assigns roles in a group, returning the edit link where the admin sets the password; an existing user only gets the roles.", + "description": "Assigns roles in a group to a local POC user; a user that does not exist yet is added by the admin on the Users list with its password, and the tool says how.", "id": "OHK-8in52yhn", "max_retries": 0, - "name": "POC Onboarding: User", + "name": "Onboarding: User", "resource_technologies": [], "script_filename": "OHK-8in52yhn_script.py", "shared": false, diff --git a/plugins/OHK-8in52yhn/OHK-8in52yhn_script.py b/plugins/OHK-8in52yhn/OHK-8in52yhn_script.py index dc4b707f..e158b662 100644 --- a/plugins/OHK-8in52yhn/OHK-8in52yhn_script.py +++ b/plugins/OHK-8in52yhn/OHK-8in52yhn_script.py @@ -1,11 +1,14 @@ """ -POC Onboarding: User (MCP Tool Action plugin). - -Creates a local user for the POC (a requestor, an approver, a resource -admin) and assigns roles in a group, without ever handling a password: the -user is created with no usable password and the response carries the edit -link where the admin sets one. An existing user only gets the role -assignments. Covers the test plan's role tests (2.3.1, 2.3.4) and approval +Onboarding: User (MCP Tool Action plugin). + +Assigns roles in a group to a POC user (a requestor, an approver, a +resource admin) without ever handling a password. A user that does not exist +yet is not created here: CloudBolt's edit dialog asks for a user's current +password before it changes one (Original Password Verification, on by +default and hidden from the UI), so a user created without a password could +never get one. The response instead says how the admin adds the user on the +Users list, where the password is typed; calling again then assigns the +roles. Covers the test plan's role tests (2.3.1, 2.3.4) and approval tests (2.4.1, 2.4.2). Synchronous. Admin only. Every declared input is read from its rendered template token in @@ -17,6 +20,10 @@ GLOBAL_ID_RE = re.compile(r"^[A-Z]{2,4}-[A-Za-z0-9]{6,16}$") USERNAME_RE = re.compile(r"^[A-Za-z0-9@.+_-]{1,150}$") +CREATE_STEPS = "Click Add, fill in the values given, type the password in Password and Confirm password, then click Create." +PASSWORD_FIX_STEPS = ( + "CloudBolt asks for the user's current password before it changes one, and this user has none. On the user's page click Delete and confirm, then on the Users list click Add, enter the user again with Password and Confirm password, and click Create." +) def _text(value): @@ -81,6 +88,25 @@ def _read_inputs(): } +def _create_in_ui(inputs, base): + values = {"Username": inputs["username"]} + for label, key in (("Email", "email"), ("First Name", "first_name"), ("Last Name", "last_name")): + if inputs[key]: + values[label] = inputs[key] + outputs = { + "user": None, + "createInUi": {"url": base + "/users/", "click": "Add", "values": values, "steps": CREATE_STEPS}, + "next": ( + "Give the admin this as one step: the link, Add, the values, and that the password is typed in the form " + "(never in chat). Wait until they say it is created, then call onb_user again with the same inputs to " + "assign the roles." + ), + } + if not inputs["email"]: + outputs["note"] = "The form requires an Email; ask the admin which address to use." + return outputs + + def _resolve_group(ref): from accounts.models import Group @@ -132,27 +158,21 @@ def run(job, *args, **kwargs): from django.contrib.auth.models import User from accounts.models import GroupRoleMembership, UserProfile + base = _portal_url() user = User.objects.filter(username__iexact=inputs["username"]).first() - created = False - changes = [] if user is None: - user = User.objects.create_user( - username=inputs["username"], - email=inputs["email"] or "", - password=None, - first_name=inputs["first_name"], - last_name=inputs["last_name"], + return _success( + "User '{}' does not exist yet: the admin adds it in the UI, where the password is typed.".format(inputs["username"]), + _create_in_ui(inputs, base), ) - created = True - changes.append("created with no usable password") - else: - for field in ("email", "first_name", "last_name"): - value = inputs[field] - if value and getattr(user, field) != value: - setattr(user, field, value) - changes.append(field) - if changes: - user.save() + changes = [] + for field in ("email", "first_name", "last_name"): + value = inputs[field] + if value and getattr(user, field) != value: + setattr(user, field, value) + changes.append(field) + if changes: + user.save() user_profile = UserProfile.objects.filter(user=user).first() if user_profile is None: user_profile = UserProfile.objects.create(user=user) @@ -170,7 +190,7 @@ def run(job, *args, **kwargs): if made: changes.append("role {} in {}".format(role.name, group.name)) - base = _portal_url() + password_set = user.has_usable_password() outputs = { "user": { "id": user_profile.global_id, @@ -179,16 +199,20 @@ def run(job, *args, **kwargs): "email": user.email, "name": "{} {}".format(user.first_name, user.last_name).strip(), "superAdmin": bool(user_profile.super_admin), - "created": created, + "passwordSet": password_set, "url": base + "/users/{}/".format(user_profile.id), - "setPasswordUrl": base + "/users/{}/edit/".format(user_profile.id), }, "memberships": memberships, "changes": changes, - "next": ( - "Send the admin setPasswordUrl to set the user's password in the UI (never in chat); the user has no " - "usable password until then. Then have the user log in to exercise the role." - ), + "next": "Have the user log in to exercise the role.", } - message = "User '{}' {}; {} role assignment(s).".format(user.username, "created" if created else "updated", len(memberships)) + # Earlier versions of this tool created users without a password, which the UI cannot add later. + if not password_set and user.last_login is None and user_profile.ldap_id is None: + outputs["passwordFix"] = {"url": outputs["user"]["url"], "steps": PASSWORD_FIX_STEPS} + outputs["next"] = ( + "This user has no password and CloudBolt cannot add one on the user's page. Give the admin passwordFix as one " + "step (deleting the user also drops its roles); once they have added it again, call onb_user with the same " + "inputs to restore the roles." + ) + message = "User '{}' updated; {} role assignment(s).".format(user.username, len(memberships)) return _success(message, outputs) diff --git a/plugins/OHK-8j06wtoe/OHK-8j06wtoe_metadata.json b/plugins/OHK-8j06wtoe/OHK-8j06wtoe_metadata.json index 137adeb4..75fd224a 100644 --- a/plugins/OHK-8j06wtoe/OHK-8j06wtoe_metadata.json +++ b/plugins/OHK-8j06wtoe/OHK-8j06wtoe_metadata.json @@ -41,7 +41,7 @@ { "allow_multiple": false, "available_all_servers": false, - "description": "One location per line: AWS or |; Azure location name; vCenter, SCVMM or Nutanix cluster name; GCP project id.", + "description": "One location per line: AWS | (the region alone only when it has one VPC); Azure location name; vCenter, SCVMM or Nutanix cluster name; GCP project id.", "field_dependency_controlling_set": [], "field_dependency_dependent_set": [], "global_options": [], @@ -63,10 +63,10 @@ "onb_locations", "onb_env_name" ], - "description": "Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced, vCenter cluster networks attached to NIC 1), and reports existing environments instead of duplicating them.", + "description": "Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced; vCenter networks are chosen afterwards with onb_environment_networks), and reports existing environments instead of duplicating them.", "id": "OHK-8j06wtoe", "max_retries": 0, - "name": "POC Onboarding: Import Environments", + "name": "Onboarding: Import Environments", "resource_technologies": [], "script_filename": "OHK-8j06wtoe_script.py", "shared": false, diff --git a/plugins/OHK-8j06wtoe/OHK-8j06wtoe_script.py b/plugins/OHK-8j06wtoe/OHK-8j06wtoe_script.py index a0bdd93f..50739d38 100644 --- a/plugins/OHK-8j06wtoe/OHK-8j06wtoe_script.py +++ b/plugins/OHK-8j06wtoe/OHK-8j06wtoe_script.py @@ -1,11 +1,15 @@ """ -POC Onboarding: Import Environments (MCP Tool Action plugin). +Onboarding: Import Environments (MCP Tool Action plugin). Creates one environment per listed location on a resource handler, the same way the handler page's Import locations dialog does (create_location_specific_env), then brings the networks over: AWS VPC -subnets are imported with the environment, Azure subnets are synced, and -vCenter networks of the cluster are attached to NIC 1. A location that +subnets are imported with the environment and Azure subnets are synced. +vCenter networks are not attached here: the user chooses them, up to five, +with onb_environment_networks. An AWS region creates one environment for +one VPC: the region alone works only when it has a single VPC, otherwise +the user picks it. A handler's first AWS environment also adds the Name and +Annotation tags the handler form would have added. A location that already has an environment is reported, not duplicated. Runs as a job because it calls the cloud API. Admin only. @@ -18,7 +22,6 @@ GLOBAL_ID_RE = re.compile(r"^[A-Z]{2,4}-[A-Za-z0-9]{6,16}$") MAX_LOCATIONS = 4 -MAX_VMWARE_NETWORKS = 20 SPECIAL_FIELD = { "aws": "aws_region", "aws_govcloud": "aws_region", @@ -149,34 +152,97 @@ def _env_row(env, base, status, **extra): return row -def _pick_vpc(handler, region, wanted): - vpcs = [v for v in handler.get_vpc_dicts_for_region(region) if isinstance(v, dict)] - rows = [] - for vpc in vpcs: - rows.append( - { - "id": vpc.get("id") or vpc.get("VpcId") or vpc.get("vpc_id"), - "name": vpc.get("name") or vpc.get("Name") or "", - "isDefault": bool(vpc.get("is_default") or vpc.get("IsDefault") or vpc.get("default")), - } +def _vpc_rows(handler, region): + """ + The region's VPCs with their default flag, CIDR and subnet count. + get_vpc_dicts_for_region returns only id and name, so read the EC2 Vpc + resources through the handler's own boto3 helper, the same call it makes. + Vpc attributes: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/vpc/index.html + """ + try: + handler.connect(region_name=region) + ec2 = handler.resource_technology.work_class.get_boto3_resource( + handler.serviceaccount, handler.servicepasswd, region ) + rows = [] + for vpc in ec2.vpcs.all(): + name = "" + for tag in vpc.tags or []: + if tag.get("Key") == "Name": + name = tag.get("Value") or "" + try: + subnets = len(list(vpc.subnets.all())) + except Exception: + subnets = None + rows.append( + {"id": vpc.id, "name": name, "cidr": vpc.cidr_block, "isDefault": bool(vpc.is_default), "subnets": subnets} + ) + return rows + except Exception: + return [ + {"id": v.get("id"), "name": v.get("name") if v.get("name") != v.get("id") else "", "cidr": None, + "isDefault": False, "subnets": None} + for v in handler.get_vpc_dicts_for_region(region) + if isinstance(v, dict) + ] + + +def _vpc_list(rows): + return ", ".join( + "{} ({}{}{})".format( + r["id"], + r["name"] or "unnamed", + ", " + r["cidr"] if r.get("cidr") else "", + ", default" if r.get("isDefault") else "", + ) + for r in rows + ) + + +def _pick_vpc(handler, region, wanted): + """ + The VPC to build one environment for. With the region alone it picks the + VPC only when the region has exactly one; with several the user chooses, + because CloudBolt's own import makes one environment per VPC. + """ + rows = _vpc_rows(handler, region) if not rows: return None, "Region {} has no VPC visible to these credentials.".format(region) if wanted: + match = None for row in rows: if row["id"] == wanted or (row["name"] and row["name"].lower() == wanted.lower()): - return row, None - return None, "No VPC '{}' in region {}. Available: {}.".format( - wanted, region, ", ".join("{} ({})".format(r["id"], r["name"] or "unnamed") for r in rows) + match = row + break + if match is None: + return None, "No VPC '{}' in region {}. Available: {}.".format(wanted, region, _vpc_list(rows)) + elif len(rows) == 1: + match = rows[0] + else: + return None, ( + "Region {} has {} VPCs; ask the user which one the POC uses and pass |. " + "Available: {}.".format(region, len(rows), _vpc_list(rows)) ) - for row in rows: - if row["isDefault"]: - return row, None - if len(rows) == 1: - return rows[0], None - return None, "Region {} has {} VPCs and none is the default; pass |. Available: {}.".format( - region, len(rows), ", ".join("{} ({})".format(r["id"], r["name"] or "unnamed") for r in rows) - ) + if match.get("subnets") == 0: + return None, "VPC {} in {} has no subnets, so no server can be built there. Available: {}.".format( + match["id"], region, _vpc_list(rows)) + return match, None + + +def _add_default_tags(handler): + """ + The Name and Annotation tags that the handler form's Done adds when its + checkbox is left on; the POC flow closes that screen instead of clicking + Done, so the first environment adds them (the form's add_default_tag_attributes). + """ + from tags.models import TaggableAttribute + + added = [] + for attribute, label in (("hostname", "Name"), ("annotation", "Annotation")): + _ta, created = TaggableAttribute.objects.get_or_create(resource_handler=handler, attribute=attribute, label=label) + if created: + added.append(label) + return added def _import_aws(handler, line, prefix, base, job): @@ -195,9 +261,16 @@ def _import_aws(handler, line, prefix, base, job): env_name = "{} {}".format(prefix, region) if vpc_label.lower() != region.lower(): env_name += " " + vpc_label + first = not handler.environment_set.exists() _progress(job, "Creating AWS environment for {} / {}".format(region, vpc["id"])) env = handler.create_location_specific_env(region, env_name=env_name, vpc_id=vpc["id"], vpc_name=vpc["name"] or "") - return _env_row(env, base, "created", location=region, vpc=vpc["id"]) + extra = {"location": region, "vpc": vpc["id"], "vpcCidr": vpc.get("cidr")} + if first: + try: + extra["tagsAdded"] = _add_default_tags(handler) + except Exception as exc: + extra["tagsError"] = str(exc)[:300] + return _env_row(env, base, "created", **extra) def _import_azure(handler, location, prefix, base, job): @@ -226,20 +299,9 @@ def _import_vmware(handler, cluster, prefix, base, job): _progress(job, "Creating vCenter environment for cluster {}".format(cluster)) env = handler.create_location_specific_env(cluster, env_name=env_name) status = "created" - attached = [] - try: - if not env.networks(): - _progress(job, "Syncing vCenter networks") - try: - handler.sync_networks() - except Exception as exc: - attached.append("network sync failed: {}".format(str(exc)[:200])) - for network in list(handler.get_possible_networks(env))[:MAX_VMWARE_NETWORKS]: - env.add_network(network, nic_position=1) - attached.append(network.name) - except Exception as exc: - attached.append("network attach failed: {}".format(str(exc)[:200])) - return _env_row(env, base, status, location=cluster, networksAttached=attached) + note = ("Choose the networks servers in this environment use (up to five) with onb_environment_networks, then set " + "each one's addressing with onb_network_addressing.") + return _env_row(env, base, status, location=cluster, note=note) def _import_generic(handler, slug, location, prefix, base, job): @@ -276,7 +338,7 @@ def run(job, *args, **kwargs): if not inputs["locations"]: return _failure("onb_locations is required: one location per line (AWS: or |).") if len(inputs["locations"]) > MAX_LOCATIONS: - return _failure("At most {} locations per call; a POC needs one or two environments per handler.".format(MAX_LOCATIONS)) + return _failure("At most {} locations per call; a POC needs one environment per handler.".format(MAX_LOCATIONS)) handler, error = _resolve_handler(inputs["handler"]) if error: return _failure(error) diff --git a/plugins/OHK-b8c90uok/OHK-b8c90uok_metadata.json b/plugins/OHK-b8c90uok/OHK-b8c90uok_metadata.json index 775c35de..f2812e41 100644 --- a/plugins/OHK-b8c90uok/OHK-b8c90uok_metadata.json +++ b/plugins/OHK-b8c90uok/OHK-b8c90uok_metadata.json @@ -66,7 +66,7 @@ "description": "Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag.", "id": "OHK-b8c90uok", "max_retries": 0, - "name": "POC Onboarding: Tag Mapping", + "name": "Onboarding: Tag Mapping", "resource_technologies": [], "script_filename": "OHK-b8c90uok_script.py", "shared": false, diff --git a/plugins/OHK-b8c90uok/OHK-b8c90uok_script.py b/plugins/OHK-b8c90uok/OHK-b8c90uok_script.py index d30401cb..c305b9de 100644 --- a/plugins/OHK-b8c90uok/OHK-b8c90uok_script.py +++ b/plugins/OHK-b8c90uok/OHK-b8c90uok_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: Tag Mapping (MCP Tool Action plugin). +Onboarding: Tag Mapping (MCP Tool Action plugin). Lists, adds or removes a resource handler's tag mappings: which CloudBolt attribute (group, owner, os_family, environment, hostname, os_build, or diff --git a/plugins/OHK-bbhlwspa/OHK-bbhlwspa_metadata.json b/plugins/OHK-bbhlwspa/OHK-bbhlwspa_metadata.json new file mode 100644 index 00000000..37a995f6 --- /dev/null +++ b/plugins/OHK-bbhlwspa/OHK-bbhlwspa_metadata.json @@ -0,0 +1,75 @@ +{ + "action_inputs": [ + { + "allow_multiple": false, + "available_all_servers": false, + "description": "true also enables the technology's Fetch and Cache recurring job and rule plus Execute all Rules, with their use_whitelist input mapped to false.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-pek0ruuv", + "label": "Enable the cache jobs (true/false, default true)", + "name": "onb_enable_jobs", + "placeholder": "true", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "The handler, by global id or name.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-7f2q5v3a", + "label": "Resource handler (RH- id or name)", + "name": "onb_handler", + "placeholder": "RH-abc12345", + "relevant_osfamilies": [], + "required": true, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "Regions (AWS) or locations (Azure) to refresh; default the handler's environments' locations.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-piv7p0wi", + "label": "Locations, one per line", + "name": "onb_locations", + "placeholder": "us-east-1", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "TXT", + "value_pattern_string": null + } + ], + "action_inputs_sequence": [ + "onb_handler", + "onb_locations", + "onb_enable_jobs" + ], + "description": "Fills a resource handler's image cache now without the image whitelist and enables the recurring job and rule that keep it fresh, so the image pickers and onb_import_os_build see every image the credentials can.", + "id": "OHK-bbhlwspa", + "max_retries": 0, + "name": "Onboarding: Sync Images", + "resource_technologies": [], + "script_filename": "OHK-bbhlwspa_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-bbhlwspa/OHK-bbhlwspa_script.py b/plugins/OHK-bbhlwspa/OHK-bbhlwspa_script.py new file mode 100644 index 00000000..8b7e94f7 --- /dev/null +++ b/plugins/OHK-bbhlwspa/OHK-bbhlwspa_script.py @@ -0,0 +1,312 @@ +""" +Onboarding: Sync Images (MCP Tool Action plugin). + +Fills a resource handler's image cache now, without the image whitelist, +and turns on the recurring job and rule that keep it fresh, with their +use_whitelist input mapped to false so the scheduled runs stay complete. CloudBolt's +image pickers (and onb_import_os_build) read cached images: AMIs +(AwsCachedAMI), Azure marketplace images (AzureARMAvailableImage), vCenter +templates (VMWareAvailableImage). On a new appliance the caches are empty +until the "Fetch and Cache available ..." jobs run, and with the default +whitelist they skip the images many customers want. Run it right after a +handler is verified; it is a long job (minutes to tens of minutes on AWS), +so continue with environments while it runs. Admin only. + +Every declared input is read from its rendered template token in +_read_inputs(); keep each one referenced that way or CloudBolt's token scan +deletes the input when the script is saved. +""" +import html +import re +from datetime import datetime, timezone + +GLOBAL_ID_RE = re.compile(r"^[A-Z]{2,4}-[A-Za-z0-9]{6,16}$") +LOCATION_FIELD = {"aws": "aws_region", "aws_govcloud": "aws_region", "aws_china": "aws_region", "azure_arm": "node_location"} +# Per technology family: the recurring job and the rule (trigger point) that refresh the cache. +CACHE_JOBS = { + "aws": {"recurring_jobs": ["Fetch and Cache available AWS AMIs"], "rules": ["cache_available_aws_amis"]}, + "azure_arm": {"recurring_jobs": [], "rules": ["fetch_and_cache_available_azure_images"]}, + "vmware": {"recurring_jobs": ["Fetch and Cache available VMWare template"], "rules": ["fetch_and_cache_available_vmware_templates"]}, + "gcp": {"recurring_jobs": [], "rules": ["cache_available_gcp_images"]}, +} +RULES_RUNNER = "Execute all Rules" + + +def _text(value): + return html.unescape(value or "").strip() + + +def _lines(value): + return [line.strip() for line in re.split(r"[\r\n,]+", _text(value)) if line.strip()] + + +def _bool(value, default): + text = _text(value).lower() + if not text: + return default + return text in ("true", "1", "yes", "y", "on") + + +def _failure(message): + return {"status": "FAILURE", "output_message": "", "error_message": message, "outputs": {"error": message}} + + +def _success(message, outputs): + return {"status": "SUCCESS", "output_message": message, "error_message": "", "outputs": outputs} + + +def _caller(job, kwargs): + profile = kwargs.get("profile") + if profile is None and job is not None: + profile = job.owner + return profile + + +def _portal_url(): + try: + from portals.models import PortalConfig + + portal = PortalConfig.get_current_portal() + url = portal.site_url if portal else None + except Exception: + url = None + return (url or "").rstrip("/") + + +def _progress(job, message): + if job is None: + return + try: + from common.methods import set_progress + + set_progress(message) + except Exception: + pass + + +def _read_inputs(): + raw = { + "onb_handler": """{{ onb_handler }}""", + "onb_locations": """{{ onb_locations }}""", + "onb_enable_jobs": """{{ onb_enable_jobs }}""", + } + return { + "handler": _text(raw["onb_handler"]), + "locations": _lines(raw["onb_locations"]), + "enable_jobs": _bool(raw["onb_enable_jobs"], True), + } + + +def _resolve_handler(ref): + from resourcehandlers.models import ResourceHandler + + handler = None + if GLOBAL_ID_RE.match(ref): + handler = ResourceHandler.objects.filter(global_id=ref).first() + elif ref.isdigit(): + handler = ResourceHandler.objects.filter(id=int(ref)).first() + if handler is None: + matches = list(ResourceHandler.objects.filter(name__iexact=ref)) + if len(matches) > 1: + return None, "Several resource handlers are named '{}'; pass the RH- global id.".format(ref) + handler = matches[0] if matches else None + if handler is None: + return None, "No resource handler matches '{}'.".format(ref) + try: + handler = handler.cast() + except Exception: + pass + return handler, None + + +def _env_locations(handler, slug): + field = LOCATION_FIELD.get(slug) + if not field: + return [] + found = [] + for env in handler.environment_set.all(): + try: + value = env.get_cfv(field) + except Exception: + value = None + if value and str(value) not in found: + found.append(str(value)) + return found + + +def _family(slug): + return "aws" if slug.startswith("aws") else slug + + +def _cache_count(handler, family, locations): + try: + if family == "aws": + from resourcehandlers.aws.models import AwsCachedAMI + + qs = AwsCachedAMI.objects.for_resource_handler(resource_handler=handler) + if locations: + qs = qs.filter(ami_regions__name__in=locations) + return qs.distinct().count() + if family == "azure_arm": + from resourcehandlers.azure_arm.models import AzureARMAvailableImage + + qs = AzureARMAvailableImage.objects.for_resource_handler(handler) + if locations: + qs = qs.filter(locations__name__in=locations) + return qs.distinct().count() + if family == "vmware": + from resourcehandlers.vmware.models import VMWareAvailableImage + + return VMWareAvailableImage.objects.filter(resource_handler=handler).count() + except Exception: + return None + return None + + +def _refresh(handler, family, locations, job): + if family == "aws": + regions = locations or list(handler.current_regions() or []) + if not regions: + return {"refreshed": False, "note": "No region to refresh: import an environment first or pass onb_locations."} + _progress(job, "Fetching all AMIs for {} without the whitelist (this can take a while)".format(", ".join(regions))) + handler.get_all_templates(regions=regions, force_refresh=True, use_whitelist=False) + return {"refreshed": True, "scope": regions} + if family == "azure_arm": + where = locations or _env_locations(handler, "azure_arm") + if not where: + return {"refreshed": False, "note": "No location to refresh: import an environment first or pass onb_locations."} + _progress(job, "Fetching Azure images for {} without the whitelist".format(", ".join(where))) + handler.update_cached_images(where, use_whitelist=False) + return {"refreshed": True, "scope": where} + if family == "vmware": + _progress(job, "Fetching vCenter templates without the whitelist") + handler.update_cached_images(use_whitelist=False) + return {"refreshed": True, "scope": ["all clusters"]} + if hasattr(handler, "update_cached_images"): + _progress(job, "Fetching images for {}".format(handler.name)) + try: + handler.update_cached_images(use_whitelist=False) + except TypeError: + handler.update_cached_images() + return {"refreshed": True, "scope": ["all"]} + return {"refreshed": False, "note": "This technology keeps no image cache; its images are listed live on the handler page."} + + +def _whitelist_off(owner, hook): + """Map the action's use_whitelist input to false on this trigger (rule action or recurring job). + + The stock Fetch and Cache rules ship with use_whitelist mapped to true, so enabling them as they + are would keep the nightly refresh on the whitelist. The mapping is a RunHookInputMapping whose + default_value is a CustomFieldValue of the hook's input (named use_whitelist_a). + """ + from cbhooks.models import RunHookInputMapping + from orders.models import CustomFieldValue + + hook_input = hook.input_fields.filter(name__startswith="use_whitelist").first() + if hook_input is None: + return "no use_whitelist input" + mapping = owner.input_mappings.filter(hook_input=hook_input).first() + if mapping is not None and mapping.default_value is not None and mapping.default_value.value is False: + return "use_whitelist already false" + cfv, _created = CustomFieldValue.objects.get_or_create(field=hook_input, boolean_value=False) + if mapping is None: + mapping = RunHookInputMapping.objects.create(hook_input=hook_input, default_value=cfv) + owner.input_mappings.add(mapping) + else: + mapping.default_value = cfv + mapping.save() + return "use_whitelist set to false" + + +def _enable_jobs(family, base): + from cbhooks.models import HookPointAction, TriggerPoint + from jobs.models import RecurringJob + + spec = CACHE_JOBS.get(family, {"recurring_jobs": [], "rules": []}) + rows = [] + for name in spec["recurring_jobs"] + [RULES_RUNNER]: + rj = RecurringJob.objects.filter(name=name).first() + if rj is None: + rows.append({"kind": "recurring job", "name": name, "status": "missing"}) + continue + changed = False + if not rj.enabled: + rj.enabled = True + rj.save() + changed = True + row = {"kind": "recurring job", "name": name, "schedule": rj.schedule, "status": "enabled" if changed else "already enabled", + "url": base + rj.get_absolute_url()} + if name != RULES_RUNNER: + real = rj.cast() + hook = getattr(real, "hook", None) + if hook is not None: + row["useWhitelist"] = _whitelist_off(real, hook) + if family == "aws": + row["note"] = ("CloudBolt's AWS cache action always applies the whitelist when it runs as a recurring job " + "(no regions are passed); the rule below does the full refresh per imported region.") + rows.append(row) + for name in spec["rules"]: + rule = TriggerPoint.objects.filter(name=name).first() + if rule is None: + rows.append({"kind": "rule", "name": name, "status": "missing"}) + continue + changed = False + if not rule.enabled: + rule.enabled = True + rule.save() + changed = True + row = {"kind": "rule", "name": name, "status": "enabled" if changed else "already enabled", "url": base + rule.get_absolute_url()} + results = [] + for action in HookPointAction.objects.filter(hook_point_id=rule.pk): + results.append(_whitelist_off(action, action.hook)) + row["useWhitelist"] = results[0] if len(results) == 1 else (results or "no actions") + rows.append(row) + return rows + + +def run(job, *args, **kwargs): + profile = _caller(job, kwargs) + if profile is None: + return _failure("No calling user profile was supplied. Run this tool through the MCP server as an authenticated user.") + if not profile.is_cbadmin: + return _failure("Only CloudBolt admins may refresh image caches.") + + inputs = _read_inputs() + if not inputs["handler"]: + return _failure("onb_handler is required: the handler's RH- global id or its name.") + handler, error = _resolve_handler(inputs["handler"]) + if error: + return _failure(error) + + base = _portal_url() + tech = handler.resource_technology + slug = tech.slug if tech else "" + family = _family(slug) + locations = inputs["locations"] or _env_locations(handler, slug) + before = _cache_count(handler, family, locations) + started = datetime.now(timezone.utc) + try: + refresh = _refresh(handler, family, locations, job) + except Exception as exc: + return _failure( + "Image refresh for '{}' failed: {}: {}. Run onb_verify_resource_handler; the credentials may lack the " + "permission to list images (ec2:DescribeImages, Microsoft.Compute/images/read, vCenter template browse).".format( + handler.name, type(exc).__name__, str(exc)[:500]) + ) + after = _cache_count(handler, family, locations) + jobs = _enable_jobs(family, base) if inputs["enable_jobs"] else [] + seconds = int((datetime.now(timezone.utc) - started).total_seconds()) + outputs = { + "handler": {"id": handler.global_id, "name": handler.name, "technologySlug": slug}, + "refresh": refresh, + "cachedImages": {"before": before, "after": after, "scope": locations or "all"}, + "secondsTaken": seconds, + "whitelist": "not applied now, and the enabled rule and job are mapped to use_whitelist=false for their scheduled runs", + "scheduledRefresh": jobs, + "next": ( + "Pick the images with onb_import_os_build (leave onb_image empty to list the cache for a location). The " + "recurring job and rule above keep the cache fresh on their schedule, without the whitelist." + ), + } + message = "{}: cache {} -> {} image(s) in {}s; {} job/rule row(s).".format(handler.name, before, after, seconds, len(jobs)) + return _success(message, outputs) diff --git a/plugins/OHK-be18kqal/OHK-be18kqal_metadata.json b/plugins/OHK-be18kqal/OHK-be18kqal_metadata.json index 2edf3252..09132e5c 100644 --- a/plugins/OHK-be18kqal/OHK-be18kqal_metadata.json +++ b/plugins/OHK-be18kqal/OHK-be18kqal_metadata.json @@ -126,7 +126,7 @@ "description": "Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings.", "id": "OHK-be18kqal", "max_retries": 0, - "name": "POC Onboarding: SMTP Settings", + "name": "Onboarding: SMTP Settings", "resource_technologies": [], "script_filename": "OHK-be18kqal_script.py", "shared": false, diff --git a/plugins/OHK-be18kqal/OHK-be18kqal_script.py b/plugins/OHK-be18kqal/OHK-be18kqal_script.py index c29d9954..0f40b790 100644 --- a/plugins/OHK-be18kqal/OHK-be18kqal_script.py +++ b/plugins/OHK-be18kqal/OHK-be18kqal_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: SMTP Settings (MCP Tool Action plugin). +Onboarding: SMTP Settings (MCP Tool Action plugin). Sets the non-secret email settings (host, port, user, TLS, from address, CloudBolt admin email, email on order completion) and returns the link to @@ -123,10 +123,11 @@ def run(job, *args, **kwargs): "passwordSet": password_set, }, "changes": changes, - "editUrl": base + "/admin/email_settings/edit/", - "testUrl": base + "/admin/email_test/", + "editUrl": base + "/admin/email_settings/", + "editClick": "Edit on the Overview tab", "next": ( - "If the relay needs a password, send the user editUrl to enter it (never in chat). Then onb_smtp_test " + "If the relay needs a password, send the user editUrl and tell them to click Edit there to enter it (never in " + "chat). Then onb_smtp_test " "sends a test message with the saved settings." if not password_set else "Run onb_smtp_test to send a test message with the saved settings." ), diff --git a/plugins/OHK-efxm9m2b/OHK-efxm9m2b_metadata.json b/plugins/OHK-efxm9m2b/OHK-efxm9m2b_metadata.json index 88e5427e..a93d9d9b 100644 --- a/plugins/OHK-efxm9m2b/OHK-efxm9m2b_metadata.json +++ b/plugins/OHK-efxm9m2b/OHK-efxm9m2b_metadata.json @@ -126,7 +126,7 @@ "description": "Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items.", "id": "OHK-efxm9m2b", "max_retries": 0, - "name": "POC Onboarding: Group", + "name": "Onboarding: Group", "resource_technologies": [], "script_filename": "OHK-efxm9m2b_script.py", "shared": false, diff --git a/plugins/OHK-efxm9m2b/OHK-efxm9m2b_script.py b/plugins/OHK-efxm9m2b/OHK-efxm9m2b_script.py index c10b52cb..1348fad1 100644 --- a/plugins/OHK-efxm9m2b/OHK-efxm9m2b_script.py +++ b/plugins/OHK-efxm9m2b/OHK-efxm9m2b_script.py @@ -1,11 +1,19 @@ """ -POC Onboarding: Group (MCP Tool Action plugin). +Onboarding: Group (MCP Tool Action plugin). Creates or updates a group for the POC: parent, entitled environments, auto-approval and a server-count quota. Covers the test plan's group entitlements (2.3.2, 2.3.3), approvals (2.4.1) and quota (2.5.2) without the UI. Synchronous. Admin only. +Inputs left empty change nothing: environments are only added, and the +parent, description, auto-approval and quota keep their values. Called with +only the name of an existing group it changes nothing and reports the group. +Every result reports the group as it now stands: its environment +entitlements, its members with their roles, its server quota and +auto-approval, because fetch_group_details shows neither environments nor +members. + Every declared input is read from its rendered template token in _read_inputs(); keep each one referenced that way or CloudBolt's token scan deletes the input when the script is saved. @@ -15,6 +23,8 @@ from decimal import Decimal GLOBAL_ID_RE = re.compile(r"^[A-Z]{2,4}-[A-Za-z0-9]{6,16}$") +BOOL_WORDS = {"true": True, "1": True, "yes": True, "false": False, "0": False, "no": False} +MAX_MEMBERS = 100 def _text(value): @@ -130,6 +140,68 @@ def _set_quota(group, servers): return "unlimited" if servers < 0 else str(servers) +def _quota_report(group): + """The group's server-count quota as it stands: limit (None when unlimited) and servers counted against it.""" + try: + item = group.quota_set.vm_cnt + except Exception: + item = None + if item is None: + return None + limit = item.limit + unlimited = limit is None or Decimal(limit).is_infinite() + return {"limit": None if unlimited else int(limit), "unlimited": unlimited, "used": int(item.used or 0)} + + +def _env_rows(queryset): + return [{"id": env.global_id, "name": env.name} for env in queryset.order_by("name")] + + +def _members(group): + """Each member of the group with the roles they hold in it; inherited roles name the group they come from.""" + from accounts.models import GroupRoleMembership + + grms = ( + GroupRoleMembership.objects.filter(group=group) + .select_related("profile__user", "role", "group_inherited_from") + .order_by("profile__user__username", "role__name") + ) + members = {} + for grm in grms: + row = members.get(grm.profile_id) + if row is None: + user = grm.profile.user + row = members[grm.profile_id] = {"username": user.username, "email": user.email or None, "roles": []} + role = grm.role.name + if grm.group_inherited_from_id: + role = "{} (inherited from {})".format(role, grm.group_inherited_from.name) + row["roles"].append(role) + return list(members.values()) + + +def _report(group, base): + """The group's current environments, members, quota and auto-approval.""" + from infrastructure.models import Environment + + members = _members(group) + report = { + "environments": _env_rows(group.environments.all()), + "memberCount": len(members), + "members": members[:MAX_MEMBERS], + "serverQuota": _quota_report(group), + } + inherited = _env_rows(group.inherited_environments.all()) + if inherited: + report["inheritedEnvironments"] = inherited + unconstrained = _env_rows(Environment.without_unassigned.filter(group=None)) + if unconstrained: + report["unconstrainedEnvironments"] = unconstrained + if len(members) > MAX_MEMBERS: + report["membersNote"] = "Showing {} of {} members; the group page lists them all: {}".format( + MAX_MEMBERS, len(members), base + "/groups/{}/".format(group.id)) + return report + + def run(job, *args, **kwargs): profile = _caller(job, kwargs) if profile is None: @@ -140,6 +212,8 @@ def run(job, *args, **kwargs): inputs = _read_inputs() if not inputs["name"]: return _failure("onb_group_name is required.") + if inputs["auto_approval"] and inputs["auto_approval"] not in BOOL_WORDS: + return _failure("onb_group_auto_approval must be true or false, or empty to leave it unchanged.") parent = None if inputs["parent"]: parent = _resolve_group(inputs["parent"]) @@ -157,7 +231,15 @@ def run(job, *args, **kwargs): from accounts.models import Group - group = _resolve_group(inputs["name"]) if not GLOBAL_ID_RE.match(inputs["name"]) else _resolve_group(inputs["name"]) + group = _resolve_group(inputs["name"]) + report_only = not any(inputs[key] for key in ("parent", "environments", "auto_approval", "quota_servers", "description")) + if group is None and GLOBAL_ID_RE.match(inputs["name"]): + return _failure("No group has the id '{}'. Nothing was changed.".format(inputs["name"])) + if group is None and report_only: + return _failure( + "No group is named '{}'. Nothing was created: to create it, call again with at least one other input, " + "such as onb_group_environments.".format(inputs["name"]) + ) created = False changes = [] if group is None: @@ -172,8 +254,8 @@ def run(job, *args, **kwargs): if inputs["description"] and group.description != inputs["description"]: group.description = inputs["description"] changes.append("description") - if inputs["auto_approval"] in ("true", "false", "1", "0", "yes", "no"): - wanted = inputs["auto_approval"] in ("true", "1", "yes") + if inputs["auto_approval"]: + wanted = BOOL_WORDS[inputs["auto_approval"]] if bool(group.allow_auto_approval) != wanted: group.allow_auto_approval = wanted changes.append("allow_auto_approval={}".format(wanted)) @@ -182,22 +264,22 @@ def run(job, *args, **kwargs): elif changes and created and len(changes) > 1: group.save() - env_rows = [] for env in envs: if not group.environments.filter(id=env.id).exists(): group.environments.add(env) - env_rows.append({"id": env.global_id, "name": env.name, "status": "entitled"}) changes.append("environment '{}' entitled".format(env.name)) - else: - env_rows.append({"id": env.global_id, "name": env.name, "status": "already entitled"}) - quota_note = None + quota_error = None if quota_servers is not None: - try: - quota_note = _set_quota(group, quota_servers) - changes.append("server quota {}".format(quota_note)) - except Exception as exc: - quota_note = "failed: {}: {}".format(type(exc).__name__, str(exc)[:300]) + current = _quota_report(group) + unchanged = current is not None and ( + current["unlimited"] if quota_servers < 0 else current["limit"] == quota_servers + ) + if not unchanged: + try: + changes.append("server quota {}".format(_set_quota(group, quota_servers))) + except Exception as exc: + quota_error = "{}: {}".format(type(exc).__name__, str(exc)[:300]) base = _portal_url() outputs = { @@ -210,16 +292,26 @@ def run(job, *args, **kwargs): "allowAutoApproval": bool(group.allow_auto_approval), "created": created, "url": base + "/groups/{}/".format(group.id), - "quotasUrl": base + "/groups/{}/quotas/edit/".format(group.id), + "quotasUrl": base + "/groups/{}/#tab-quotas".format(group.id), + "quotasClick": "Edit on the Quotas tab", }, - "environments": env_rows, - "serverQuota": quota_note, - "changes": changes, - "next": ( - "Add users and roles with onb_user. Entitle the group to blueprints with manage_blueprint_permissions " - "when the blueprint is not open to every group. Orders from members without the approver role pause " - "for approval unless allowAutoApproval is true." - ), } - message = "Group '{}' {}; {} change(s).".format(group.name, "created" if created else "updated", len(changes)) + outputs.update(_report(group, base)) + if quota_error: + outputs["serverQuotaError"] = quota_error + outputs["changes"] = changes + outputs["next"] = ( + "environments are the group's own entitlements; inheritedEnvironments come from its parent groups, and " + "unconstrainedEnvironments have no group assigned, so every group may order into them. Add users and roles " + "with onb_user. Entitle the group to blueprints with manage_blueprint_permissions when the blueprint is not " + "open to every group. Orders from members without the approver role pause for approval unless " + "allowAutoApproval is true." + ) + if created: + verb = "created" + elif changes: + verb = "updated" + else: + verb = "unchanged" + message = "Group '{}' {}; {} change(s).".format(group.name, verb, len(changes)) return _success(message, outputs) diff --git a/plugins/OHK-ep5vo2nu/OHK-ep5vo2nu_metadata.json b/plugins/OHK-ep5vo2nu/OHK-ep5vo2nu_metadata.json new file mode 100644 index 00000000..5824ea97 --- /dev/null +++ b/plugins/OHK-ep5vo2nu/OHK-ep5vo2nu_metadata.json @@ -0,0 +1,35 @@ +{ + "action_inputs": [ + { + "allow_multiple": false, + "available_all_servers": false, + "description": "SVR- ids to delete, separated by commas or spaces; only servers in Provision Failed state. Empty lists the failed servers.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-qemldj3g", + "label": "Servers to delete (SVR- ids)", + "name": "onb_delete_servers", + "placeholder": "SVR-abc12345, SVR-def67890", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + } + ], + "action_inputs_sequence": [ + "onb_delete_servers" + ], + "description": "Lists servers left in Provision Failed state by failed orders and deletes the ones named, removing their VMs from the cloud when they exist.", + "id": "OHK-ep5vo2nu", + "max_retries": 0, + "name": "Onboarding: Failed Servers", + "resource_technologies": [], + "script_filename": "OHK-ep5vo2nu_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-ep5vo2nu/OHK-ep5vo2nu_script.py b/plugins/OHK-ep5vo2nu/OHK-ep5vo2nu_script.py new file mode 100644 index 00000000..57cce7e6 --- /dev/null +++ b/plugins/OHK-ep5vo2nu/OHK-ep5vo2nu_script.py @@ -0,0 +1,198 @@ +""" +Onboarding: Failed Servers (MCP Tool Action plugin). + +Lists the servers left in Provision Failed state by orders that did not +clean up after themselves (fetch_server_list only shows active servers, so +the agent cannot see them otherwise), and deletes the ones the user agreed +to. A delete goes through CloudBolt's own decommission (the same call as the +server's Delete button and the v3 API): the delete job removes the VM from +the cloud when the failed build got that far, then retires the record, and +the fast-track decommission preference decides whether it runs as a job or +as an order that may need approval. Only Provision Failed servers are +accepted. Synchronous. Admin only. + +Every declared input is read from its rendered template token in +_read_inputs(); keep each one referenced that way or CloudBolt's token scan +deletes the input when the script is saved. +""" +import html +import re + +MAX_LISTED = 50 +MAX_DELETE = 20 +SERVER_ID_RE = re.compile(r"^SVR-[A-Za-z0-9]{6,16}$") + + +def _text(value): + return html.unescape(value or "").strip() + + +def _failure(message): + return {"status": "FAILURE", "output_message": "", "error_message": message, "outputs": {"error": message}} + + +def _success(message, outputs): + return {"status": "SUCCESS", "output_message": message, "error_message": "", "outputs": outputs} + + +def _caller(job, kwargs): + profile = kwargs.get("profile") + if profile is None and job is not None: + profile = job.owner + return profile + + +def _portal_url(): + try: + from portals.models import PortalConfig + + portal = PortalConfig.get_current_portal() + url = portal.site_url if portal else None + except Exception: + url = None + return (url or "").rstrip("/") + + +def _split(value): + return [part for part in re.split(r"[\s,]+", _text(value)) if part] + + +def _read_inputs(): + raw = {"onb_delete_servers": """{{ onb_delete_servers }}"""} + return {"delete": _split(raw["onb_delete_servers"])} + + +def _iso(value): + return value.isoformat() if value else None + + +def _locked(server): + """The server_lock parameter (a list such as ["deletion"]) blocks the delete job.""" + lock = getattr(server, "server_lock", None) + return bool(lock and "deletion" in lock) + + +def _row(server, base): + """One failed server with where it came from and what a delete will do.""" + prov = server.jobs.filter(type="provision").order_by("-id").first() + order = prov.get_order() if prov else None + return { + "id": server.global_id, + "hostname": server.hostname, + "environment": server.environment.name if server.environment else None, + "environmentId": server.environment.global_id if server.environment else None, + "group": server.group.name if server.group else None, + "owner": server.owner.user.username if server.owner and server.owner.user else None, + "created": _iso(server.add_date), + "provisionJob": prov.global_id if prov else None, + "order": order.global_id if order else None, + "inCloud": bool(server.resource_handler_svr_id), + "locked": _locked(server), + "url": base + "/servers/{}/".format(server.id), + } + + +def _list(base): + from infrastructure.models import Server + + failed = Server.objects.filter(status="PROVFAILED").select_related("environment", "group", "owner__user") + rows = [_row(s, base) for s in failed.order_by("-add_date")[:MAX_LISTED]] + total = failed.count() + outputs = {"failedServerCount": total, "failedServers": rows} + if total > MAX_LISTED: + outputs["note"] = "Showing the newest {} of {}.".format(MAX_LISTED, total) + if total: + outputs["next"] = ( + "Show the user each server (hostname, environment, created, inCloud) and ask whether to delete them; " + "inCloud true means a VM was created and the delete removes it from the cloud too. Call again with " + "onb_delete_servers set to the SVR- ids the user agreed to." + ) + return outputs + + +def _delete(ids, profile, base): + from infrastructure.models import Server + from infrastructure.services import ServerService + + deleted, skipped = [], [] + for ref in ids: + if not SERVER_ID_RE.match(ref): + skipped.append({"id": ref, "reason": "Not a server global id (SVR-...)."}) + continue + server = Server.objects.filter(global_id=ref).first() + if server is None: + skipped.append({"id": ref, "reason": "No server has this id."}) + continue + if server.status != "PROVFAILED": + skipped.append({ + "id": ref, + "hostname": server.hostname, + "reason": "Status is {}, not Provision Failed; this tool deletes only failed builds.".format(server.status), + }) + continue + if _locked(server): + skipped.append({"id": ref, "hostname": server.hostname, "reason": "Locked against deletion on the server page."}) + continue + row = _row(server, base) + try: + job, order = ServerService(server).decommission(profile) + except Exception as error: + skipped.append({"id": ref, "hostname": server.hostname, "reason": "{}: {}".format(type(error).__name__, error)}) + continue + if job is None and order is not None: + # An auto-approved decommission order already has its delete job. + try: + jobs = order.list_of_jobs() + job = jobs[0] if jobs else None + except Exception: + job = None + row["deleteJob"] = job.global_id if job else None + row["deleteOrder"] = order.global_id if order else None + if order is not None: + row["deleteOrderStatus"] = order.status + row["next"] = _delete_next(job, order) + deleted.append(row) + return deleted, skipped + + +def _delete_next(job, order): + """What to poll for one delete: the job when there is one, otherwise the order it waits on.""" + if job is not None: + return "Poll deleteJob {} with fetch_job until it finishes.".format(job.global_id) + if order is not None: + return ( + "No delete job yet: the deletion waits on deleteOrder {} (status {}). Check it with fetch_order; it may " + "need approval (approve_order). Once approved, fetch_order lists its job; poll that with fetch_job." + ).format(order.global_id, order.status) + return "CloudBolt returned neither a job nor an order; open the server page (url) to see its state." + + +def run(job, *args, **kwargs): + profile = _caller(job, kwargs) + if profile is None: + return _failure("No calling user profile was supplied. Run this tool through the MCP server as an authenticated user.") + if not profile.is_cbadmin: + return _failure("Only CloudBolt admins may list or delete failed servers.") + + base = _portal_url() + ids = _read_inputs()["delete"] + if not ids: + outputs = _list(base) + return _success("{} server(s) in Provision Failed state.".format(outputs["failedServerCount"]), outputs) + + if len(ids) > MAX_DELETE: + return _failure("At most {} servers per call; {} were given.".format(MAX_DELETE, len(ids))) + deleted, skipped = _delete(ids, profile, base) + outputs = {"deleted": deleted, "skipped": skipped} + if deleted: + outputs["next"] = ( + "Follow each row's next. Where deleteJob is set, poll it with fetch_job until it finishes. Where deleteJob " + "is null, the deletion waits on deleteOrder: check it with fetch_order; it may need approval (approve_order), " + "and once approved fetch_order lists the delete job to poll with fetch_job. When every delete job has " + "finished, call this tool with no input: the deleted servers are gone from the list. A failed delete job: " + "onb_failure_trace with its id; when the cloud refused the delete the server comes back as active." + ) + message = "Delete started for {} server(s), {} skipped.".format(len(deleted), len(skipped)) + if not deleted and skipped: + return _failure(message + " " + " ".join("{}: {}".format(s["id"], s["reason"]) for s in skipped)) + return _success(message, outputs) diff --git a/plugins/OHK-f1ol9j5k/OHK-f1ol9j5k_metadata.json b/plugins/OHK-f1ol9j5k/OHK-f1ol9j5k_metadata.json new file mode 100644 index 00000000..3f480c79 --- /dev/null +++ b/plugins/OHK-f1ol9j5k/OHK-f1ol9j5k_metadata.json @@ -0,0 +1,11 @@ +{ + "description": "Fills the Application dropdown from Python with a list of business applications, to show Python-backed parameter options.", + "id": "OHK-f1ol9j5k", + "max_retries": 0, + "name": "Generate options for 'Application'", + "resource_technologies": [], + "script_filename": "OHK-f1ol9j5k_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-f1ol9j5k/OHK-f1ol9j5k_script.py b/plugins/OHK-f1ol9j5k/OHK-f1ol9j5k_script.py new file mode 100644 index 00000000..7839d2e1 --- /dev/null +++ b/plugins/OHK-f1ol9j5k/OHK-f1ol9j5k_script.py @@ -0,0 +1,24 @@ +""" +Generate options for 'Application' (Generated Parameter Options plugin). + +Fills the application dropdown on the Standard Server blueprint from Python +instead of a static list, which is the test plan's "Python-backed +extensibility" item (4.3.1). Every group sees the same list; replace it with +a lookup against a CMDB (for example the business applications in +ServiceNow) to show live options. +""" + +APPLICATIONS = [ + "Payroll", + "Customer Portal", + "Data Warehouse", + "Database", + "CRM", + "E-commerce Storefront", + "Internal Wiki", +] + + +def get_options_list(field, environment=None, group=None, **kwargs): + options = [(name, name) for name in APPLICATIONS] + return {"options": options, "initial_value": options[0][0]} diff --git a/plugins/OHK-f6kqrklx/OHK-f6kqrklx_metadata.json b/plugins/OHK-f6kqrklx/OHK-f6kqrklx_metadata.json index 564dac6f..0ca1192f 100644 --- a/plugins/OHK-f6kqrklx/OHK-f6kqrklx_metadata.json +++ b/plugins/OHK-f6kqrklx/OHK-f6kqrklx_metadata.json @@ -1,5 +1,24 @@ { "action_inputs": [ + { + "allow_multiple": false, + "available_all_servers": false, + "description": "true confirms a required change that also reaches environments or groups outside the targets; set it only after the user agreed to the alsoAffects list.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-n8nzjeld", + "label": "Confirm global required change (true/false)", + "name": "onb_param_confirm_global", + "placeholder": "false", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, { "allow_multiple": false, "available_all_servers": false, @@ -11,7 +30,7 @@ "id": "CF-ga0mjyn1", "label": "Description (optional)", "name": "onb_param_description", - "placeholder": "Tier of the application this server belongs to", + "placeholder": "How often this server is backed up", "relevant_osfamilies": [], "required": false, "show_as_attribute": false, @@ -30,7 +49,7 @@ "id": "CF-tokwenv4", "label": "Label shown on forms (optional)", "name": "onb_param_label", - "placeholder": "Application Tier", + "placeholder": "Backup Policy", "relevant_osfamilies": [], "required": false, "show_as_attribute": false, @@ -87,7 +106,7 @@ "id": "CF-09lnu50c", "label": "Parameter name (internal, snake_case)", "name": "onb_param_name", - "placeholder": "application_tier", + "placeholder": "backup_policy", "relevant_osfamilies": [], "required": true, "show_as_attribute": false, @@ -106,7 +125,7 @@ "id": "CF-6lyylf4j", "label": "Options, one per line (optional)", "name": "onb_param_options", - "placeholder": "web\napp\ndb", + "placeholder": "Gold\nSilver\nBronze\nNone", "relevant_osfamilies": [], "required": false, "show_as_attribute": false, @@ -117,7 +136,7 @@ { "allow_multiple": false, "available_all_servers": false, - "description": "Whether a value is mandatory on the targets.", + "description": "true makes the parameter required, false optional. CloudBolt has one required flag per parameter, so this applies everywhere it is offered, not only on the targets.", "field_dependency_controlling_set": [], "field_dependency_dependent_set": [], "global_options": [], @@ -189,6 +208,25 @@ "show_on_servers": false, "type": "STR", "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "true uses a parameter of that name that already exists and was not created by the onboarding toolkit; set it only after the user agreed.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-zmjb0uot", + "label": "Use the existing parameter (true/false)", + "name": "onb_param_use_existing", + "placeholder": "false", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null } ], "action_inputs_sequence": [ @@ -197,6 +235,8 @@ "onb_param_type", "onb_param_options", "onb_param_required", + "onb_param_confirm_global", + "onb_param_use_existing", "onb_param_targets", "onb_param_description", "onb_param_max", @@ -206,7 +246,7 @@ "description": "Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease.", "id": "OHK-f6kqrklx", "max_retries": 0, - "name": "POC Onboarding: Parameter", + "name": "Onboarding: Parameter", "resource_technologies": [], "script_filename": "OHK-f6kqrklx_script.py", "shared": false, diff --git a/plugins/OHK-f6kqrklx/OHK-f6kqrklx_script.py b/plugins/OHK-f6kqrklx/OHK-f6kqrklx_script.py index 93153951..27982d17 100644 --- a/plugins/OHK-f6kqrklx/OHK-f6kqrklx_script.py +++ b/plugins/OHK-f6kqrklx/OHK-f6kqrklx_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: Parameter (MCP Tool Action plugin). +Onboarding: Parameter (MCP Tool Action plugin). Creates or updates a parameter (CustomField) and attaches it to environments and groups with options and constraints, the way the @@ -8,17 +8,41 @@ power schedule (3.1.1) and expiration date with a maximum lease (3.1.2). Synchronous. Admin only. +Required is one flag on the parameter itself: the order form and the API +(api/parameter_helper_methods.py) read CustomField.required and ignore the +per-environment mapping's flag. So onb_param_required changes it for every +environment and group that offers the parameter, and asks for +onb_param_confirm_global=true when that reaches beyond the targets. + +A parameter name is global too, so a name that already exists and is not the +toolkit's own (created here, agreed to with onb_param_use_existing, or one +of CloudBolt's own parameters in BUILTIN_REUSE) changes nothing until the +user agrees. Names this tool creates are recorded in the onboarding state. + +Attaching expiration_date to a target also enables CloudBolt's "Expire +Servers" recurring job, which acts on the dates; the result reports it as +lifecycleJob. + Every declared input is read from its rendered template token in _read_inputs(); keep each one referenced that way or CloudBolt's token scan deletes the input when the script is saved. """ import html +import json import re GLOBAL_ID_RE = re.compile(r"^[A-Z]{2,4}-[A-Za-z0-9]{6,16}$") NAME_RE = re.compile(r"^[a-z][a-z0-9_]{0,99}$") TYPES = ("STR", "INT", "DEC", "BOOL", "TXT", "DT", "DTM", "IP", "URL", "EMAIL", "PWD", "CODE", "ETXT") MAX_OPTIONS = 100 +MAX_LISTED = 20 +STATE_NAMESPACE = "poc_onboarding" +STATE_FIELD = "poc_onboarding_state" +BUILTIN_REUSE = ("expiration_date", "power_schedule", "key_name", "new_password", "tech_specific_script_execution", "winrm_protocol") +# Parameters the Standard Server blueprint brings; a sync stamps these global ids only on parameters it creates. +CONTENT_PARAMETERS = {"application": "CF-15yw228m", "maintenance_window": "CF-cei72k8x"} +# The recurring job CloudBolt ships disabled that acts on expiration dates. +EXPIRE_JOB_NAME = "Expire Servers" def _text(value): @@ -84,6 +108,8 @@ def _read_inputs(): "onb_param_max": """{{ onb_param_max }}""", "onb_param_min": """{{ onb_param_min }}""", "onb_param_show_on_servers": """{{ onb_param_show_on_servers }}""", + "onb_param_confirm_global": """{{ onb_param_confirm_global }}""", + "onb_param_use_existing": """{{ onb_param_use_existing }}""", } return { "name": _text(raw["onb_param_name"]), @@ -96,9 +122,72 @@ def _read_inputs(): "maximum": _int(raw["onb_param_max"]), "minimum": _int(raw["onb_param_min"]), "show_on_servers": _text(raw["onb_param_show_on_servers"]), + "confirm_global": _bool(raw["onb_param_confirm_global"], False), + "use_existing": _bool(raw["onb_param_use_existing"], False), } +def _state_field(create=False): + from infrastructure.models import CustomField, Namespace + + if not create: + return CustomField.objects.filter(name=STATE_FIELD).first() + namespace, _ = Namespace.objects.get_or_create(name=STATE_NAMESPACE) + field, _ = CustomField.objects.get_or_create( + name=STATE_FIELD, + defaults=dict( + label="Onboarding State", + description="State recorded by the onboarding MCP tools: item statuses, handler verify results, install details.", + type="TXT", + namespace=namespace, + ), + ) + return field + + +def _load_state(): + try: + from orders.models import CustomFieldValue + + field = _state_field() + cfv = CustomFieldValue.objects.filter(field=field).order_by("id").first() if field else None + data = json.loads(cfv.txt_value or "") if cfv else {} + return data if isinstance(data, dict) else {} + except Exception: + return {} + + +def _record_owned(name): + """Remember that the toolkit created this parameter, or that the user agreed to use it.""" + from django.db import transaction + from infrastructure.models import CustomField + from orders.models import CustomFieldValue + + field = _state_field(create=True) + with transaction.atomic(): + list(CustomField.objects.select_for_update().filter(pk=field.pk)) + cfv = CustomFieldValue.objects.filter(field=field).order_by("id").first() + try: + state = json.loads(cfv.txt_value or "") if cfv else {} + except ValueError: + state = {} + if not isinstance(state, dict): + state = {} + owned = set(state.get("toolkitParameters") or []) + if name in owned: + return + state["toolkitParameters"] = sorted(owned | {name}) + cfv = cfv or CustomFieldValue(field=field) + cfv.value = json.dumps(state, indent=2) + cfv.save() + + +def _owned(cf): + if cf.name in BUILTIN_REUSE or cf.name in (_load_state().get("toolkitParameters") or []): + return True + return CONTENT_PARAMETERS.get(cf.name) == getattr(cf, "global_id", None) + + def _resolve_target(ref): from accounts.models import Group from infrastructure.models import Environment @@ -140,8 +229,23 @@ def _attach_group(group, cf, options): group.custom_field_options.add(cfv) +def _other_uses(cf, targets): + """Environments and groups offering the parameter besides the targets; a required change reaches them too.""" + from accounts.models import Group + from django.db.models import Q + from infrastructure.models import Environment + + env_ids = [obj.id for _ref, kind, obj in targets if kind == "environment"] + group_ids = [obj.id for _ref, kind, obj in targets if kind == "group"] + envs = Environment.objects.filter(Q(custom_fields=cf) | Q(custom_field_options__field=cf)).exclude(id__in=env_ids).distinct() + groups = Group.objects.filter(Q(custom_fields=cf) | Q(custom_field_options__field=cf)).exclude(id__in=group_ids).distinct() + rows = [{"kind": "environment", "id": e.global_id, "name": e.name} for e in envs.order_by("name")[:MAX_LISTED]] + rows += [{"kind": "group", "id": g.global_id, "name": g.name} for g in groups.order_by("name")[:MAX_LISTED]] + return envs.count() + groups.count(), rows + + def _constraints(cf, inputs, env=None, group=None): - if inputs["maximum"] is None and inputs["minimum"] is None and not inputs["required"]: + if inputs["maximum"] is None and inputs["minimum"] is None: return None from behavior_mapping.models import CustomFieldMapping @@ -156,13 +260,31 @@ def _constraints(cf, inputs, env=None, group=None): if inputs["minimum"] is not None: cfm.minimum = inputs["minimum"] changed.append("minimum={}".format(inputs["minimum"])) - if inputs["required"]: - cfm.required = _bool(inputs["required"], False) - changed.append("required={}".format(cfm.required)) cfm.save() return changed +def _expire_job(base, enable): + """Report the Expire Servers recurring job, enabling it first when asked. None when it does not exist.""" + from jobs.models import RecurringJob + + rj = RecurringJob.objects.filter(name=EXPIRE_JOB_NAME).first() + if rj is None: + return None + row = {"name": rj.name, "id": rj.global_id, "enabled": bool(rj.enabled), "changed": False, + "schedule": rj.schedule or None, "url": base + rj.get_absolute_url()} + if enable and not rj.enabled: + try: + rj.enabled = True + rj.save() + row.update(enabled=True, changed=True) + except Exception as exc: + row["error"] = "Could not enable it: {}: {}".format(type(exc).__name__, str(exc)[:200]) + if row["enabled"] and not rj.schedule: + row["note"] = "The job has no schedule, so it never runs on its own; set one on its page." + return row + + def run(job, *args, **kwargs): profile = _caller(job, kwargs) if profile is None: @@ -172,15 +294,59 @@ def run(job, *args, **kwargs): inputs = _read_inputs() if not inputs["name"]: - return _failure("onb_param_name is required: the parameter's internal name, for example application_tier.") + return _failure("onb_param_name is required: the parameter's internal name, for example backup_policy.") if not NAME_RE.match(inputs["name"]): return _failure("onb_param_name must be lowercase letters, digits and underscores, starting with a letter.") + if inputs["name"] == "hostname_template": + return _failure( + "Set hostname templates with onb_configure_custom_server (onb_environments for per-environment ones): " + "it checks the template has CloudBolt's zeros-and-X sequence, for example poc-00X." + ) if inputs["type"] and inputs["type"] not in TYPES: return _failure("onb_param_type must be one of: {}.".format(", ".join(TYPES))) from infrastructure.models import CustomField cf = CustomField.objects.filter(name=inputs["name"]).first() + targets = [(ref,) + _resolve_target(ref) for ref in inputs["targets"]] + wanted_required = _bool(inputs["required"], False) if inputs["required"] else None + base = _portal_url() + if cf is not None and not inputs["use_existing"] and not _owned(cf): + count, others = _other_uses(cf, []) + outputs = { + "parameter": {"id": getattr(cf, "global_id", None), "name": cf.name, "label": cf.label, "type": cf.type, + "url": base + "/admin/customfields/{}/".format(cf.id)}, + "existingParameter": True, + "usedByCount": count, + "usedBy": others, + "next": ( + "Nothing changed. This appliance already has a parameter named '{}' (label '{}', type {}) that the " + "onboarding toolkit did not create. Show the user its label and usedBy and ask one question: use it as " + "is for this step, or pick another name. Use it: call again with onb_param_use_existing=true." + ).format(cf.name, cf.label, cf.type), + } + return _success("Confirmation needed: parameter '{}' already exists and is not the toolkit's own.".format(cf.name), outputs) + if cf is not None and wanted_required is not None and bool(cf.required) != wanted_required: + count, others = _other_uses(cf, targets) + if count and not inputs["confirm_global"]: + outputs = { + "parameter": {"name": cf.name, "label": cf.label, "required": bool(cf.required), + "url": base + "/admin/customfields/{}/".format(cf.id)}, + "confirmationRequired": True, + "requiredWanted": wanted_required, + "alsoAffectsCount": count, + "alsoAffects": others, + "next": ( + "Nothing changed. CloudBolt has one required flag per parameter, so making '{}' {} applies to every " + "order form, API and MCP order that offers it, including the {} other environment(s) and group(s) in " + "alsoAffects. Ask the user whether to do that. Yes: call again with onb_param_confirm_global=true." + ).format(cf.name, "required" if wanted_required else "optional", count), + } + return _success( + "Confirmation needed: required on '{}' is global and also reaches {} other environment(s) or group(s).".format( + cf.name, count), + outputs, + ) created = False changes = [] if cf is None: @@ -189,7 +355,7 @@ def run(job, *args, **kwargs): label=inputs["label"] or inputs["name"].replace("_", " ").title(), type=inputs["type"] or "STR", description=inputs["description"], - required=_bool(inputs["required"], False), + required=bool(wanted_required), show_on_servers=_bool(inputs["show_on_servers"], True), show_as_attribute=True, ) @@ -207,15 +373,21 @@ def run(job, *args, **kwargs): if bool(cf.show_on_servers) != wanted: cf.show_on_servers = wanted changes.append("show_on_servers") - if inputs["type"] and cf.type != inputs["type"]: - changes.append("type left as {} (changing a parameter's type is a UI operation)".format(cf.type)) + if wanted_required is not None and bool(cf.required) != wanted_required: + cf.required = wanted_required + changes.append("required={} (global)".format(wanted_required)) if changes: cf.save() + if inputs["type"] and cf.type != inputs["type"]: + changes.append("type left as {} (changing a parameter's type is a UI operation)".format(cf.type)) + if created or inputs["use_existing"]: + try: + _record_owned(cf.name) + except Exception as exc: + changes.append("not recorded as the toolkit's own: {}".format(str(exc)[:160])) - base = _portal_url() attached = [] - for ref in inputs["targets"]: - kind, obj = _resolve_target(ref) + for ref, kind, obj in targets: if obj is None: attached.append({"target": ref, "status": "failed", "error": "no environment or group matches"}) continue @@ -245,6 +417,7 @@ def run(job, *args, **kwargs): "label": cf.label, "type": cf.type, "required": bool(cf.required), + "requiredScope": "global", "showOnServers": bool(cf.show_on_servers), "created": created, "changes": changes, @@ -253,10 +426,33 @@ def run(job, *args, **kwargs): "attached": attached, } notes = [] + if cf.required: + notes.append( + "Required applies wherever this parameter is offered. Where an environment or group offers exactly one " + "option, API and MCP orders fill it in automatically; with several, the order must pick one." + ) if cf.type in ("DT", "DTM") and inputs["maximum"] is not None: notes.append("For a date parameter the maximum is the number of days from today a user may pick.") if cf.name == "expiration_date": - notes.append("Expiration needs the 'Expire Servers' recurring job enabled (Admin > Recurring Jobs) to act on the date.") + attached_any = any(a["status"] == "attached" for a in attached) + try: + lifecycle = _expire_job(base, enable=attached_any) + except Exception as exc: + lifecycle = {"name": EXPIRE_JOB_NAME, "error": "{}: {}".format(type(exc).__name__, str(exc)[:200])} + if lifecycle is None: + notes.append( + "No recurring job named '{}' exists on this appliance; expiration needs it enabled " + "(Admin > Recurring Jobs) to act on the date.".format(EXPIRE_JOB_NAME) + ) + else: + outputs["lifecycleJob"] = lifecycle + if lifecycle.get("error"): + notes.append("'{}' could not be enabled (lifecycleJob.error); enable it under Admin > Recurring Jobs.".format(EXPIRE_JOB_NAME)) + elif not lifecycle.get("enabled"): + notes.append( + "'{}' is still disabled because expiration_date was not attached to any target; call again with " + "onb_param_targets and it is enabled.".format(EXPIRE_JOB_NAME) + ) if cf.name == "power_schedule": notes.append("Servers ordered with a schedule are powered by the scheduler every 15 minutes; set_server_power_schedule reads it back.") if inputs["options"] and not inputs["targets"]: diff --git a/plugins/OHK-gjfc20pv/OHK-gjfc20pv_metadata.json b/plugins/OHK-gjfc20pv/OHK-gjfc20pv_metadata.json new file mode 100644 index 00000000..8175d200 --- /dev/null +++ b/plugins/OHK-gjfc20pv/OHK-gjfc20pv_metadata.json @@ -0,0 +1,215 @@ +{ + "action_inputs": [ + { + "allow_multiple": false, + "available_all_servers": false, + "description": "dhcp, static, or both (the requester chooses per order); empty keeps the current schema.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-jqyfgjxw", + "label": "Addressing: dhcp, static or both", + "name": "onb_addressing", + "placeholder": "static", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "Primary DNS server, optional.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-yqnbsuas", + "label": "DNS 1", + "name": "onb_dns1", + "placeholder": "10.0.0.2", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "Secondary DNS server, optional.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-fjca3t12", + "label": "DNS 2", + "name": "onb_dns2", + "placeholder": "10.0.0.3", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "DNS domain, optional; Infoblox needs it for host records.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-758bt1zt", + "label": "DNS domain", + "name": "onb_dns_domain", + "placeholder": "poc.example", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "Gateway IPv4 address; required for static and both.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-3x75gdvn", + "label": "Gateway", + "name": "onb_gateway", + "placeholder": "10.0.5.1", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "For static: pool (CloudBolt IP pool), ipam (an IPAM endpoint) or manual (typed on each order).", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-2403wsao", + "label": "Static IP source: pool, ipam or manual", + "name": "onb_ip_source", + "placeholder": "pool", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "For ipam: the IPAM endpoint the user added in the UI.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-w3dn769p", + "label": "IPAM endpoint (name or id)", + "name": "onb_ipam", + "placeholder": "Infoblox", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "Netmask, dotted or as a prefix length; required for static and both.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-8af9jixx", + "label": "Netmask", + "name": "onb_netmask", + "placeholder": "255.255.255.0", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "The network, by global id or name; onb_environment_networks lists them.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-8dud29ch", + "label": "Network (NET- id or name)", + "name": "onb_network", + "placeholder": "NET-abc12345", + "relevant_osfamilies": [], + "required": true, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "For pool: a range such as 10.0.5.10-10.0.5.60, or addresses separated by commas or new lines.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-9zp2bjoo", + "label": "IP pool range or addresses", + "name": "onb_pool_range", + "placeholder": "10.0.5.10-10.0.5.60", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "TXT", + "value_pattern_string": null + } + ], + "action_inputs_sequence": [ + "onb_network", + "onb_addressing", + "onb_gateway", + "onb_netmask", + "onb_dns1", + "onb_dns2", + "onb_dns_domain", + "onb_ip_source", + "onb_pool_range", + "onb_ipam" + ], + "description": "Sets how servers on a network get their IP address (DHCP, static with gateway and netmask, a CloudBolt IP pool, an IPAM endpoint, or an IP typed per order) and verifies it with the network's IP provider.", + "id": "OHK-gjfc20pv", + "max_retries": 0, + "name": "Onboarding: Network Addressing", + "resource_technologies": [], + "script_filename": "OHK-gjfc20pv_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-gjfc20pv/OHK-gjfc20pv_script.py b/plugins/OHK-gjfc20pv/OHK-gjfc20pv_script.py new file mode 100644 index 00000000..28bf01ee --- /dev/null +++ b/plugins/OHK-gjfc20pv/OHK-gjfc20pv_script.py @@ -0,0 +1,422 @@ +""" +Onboarding: Network Addressing (MCP Tool Action plugin). + +Sets how servers on one CloudBolt network get their IP address, the way the +network's edit page and its IP Pool tab do, and proves the result with +ResourceNetwork.determine_ip_provider(), the call the order form and the +provisioning job use: + +- DHCP: addressing schema dhcp. +- Static: addressing schema static, with gateway and netmask required + (vCenter refuses a static NIC 1 without both) and DNS 1, DNS 2 and DNS + domain optional; then where the addresses come from: + - pool: a CloudBolt IP pool on the network (ResourceNetwork.add_ip_range or + add_ip_addresses), checked for free addresses; + - ipam: an IPAM endpoint the user added in the UI (credentials stay there); + the network must be mapped to one of the IPAM's networks on the IPAM's + Networks tab, and the IPAM orchestration action must be enabled, which + this tool does when it is off; + - manual: the requester types the IP on each order (sc_nic_0_ip). +- Both: the requester chooses DHCP or a typed static IP per order. + +Called with only onb_network it reports the current settings. Admin only. + +Every declared input is read from its rendered template token in +_read_inputs(); keep each one referenced that way or CloudBolt's token scan +deletes the input when the script is saved. +""" +import html +import ipaddress +import re + +GLOBAL_ID_RE = re.compile(r"^[A-Z]{2,4}-[A-Za-z0-9]{6,16}$") +MAX_POOL = 1024 +EXPECTED = {"dhcp": "dhcp", "pool": "pool", "ipam": "ipam", "manual": "user_static", "both": "user_static_or_dhcp"} + + +def _text(value): + return html.unescape(value or "").strip() + + +def _failure(message, outputs=None): + out = {"error": message} + if outputs: + out.update(outputs) + return {"status": "FAILURE", "output_message": "", "error_message": message, "outputs": out} + + +def _success(message, outputs): + return {"status": "SUCCESS", "output_message": message, "error_message": "", "outputs": outputs} + + +def _caller(job, kwargs): + profile = kwargs.get("profile") + if profile is None and job is not None: + profile = job.owner + return profile + + +def _portal_url(): + try: + from portals.models import PortalConfig + + portal = PortalConfig.get_current_portal() + url = portal.site_url if portal else None + except Exception: + url = None + return (url or "").rstrip("/") + + +def _read_inputs(): + raw = { + "onb_network": """{{ onb_network }}""", + "onb_addressing": """{{ onb_addressing }}""", + "onb_gateway": """{{ onb_gateway }}""", + "onb_netmask": """{{ onb_netmask }}""", + "onb_dns1": """{{ onb_dns1 }}""", + "onb_dns2": """{{ onb_dns2 }}""", + "onb_dns_domain": """{{ onb_dns_domain }}""", + "onb_ip_source": """{{ onb_ip_source }}""", + "onb_pool_range": """{{ onb_pool_range }}""", + "onb_ipam": """{{ onb_ipam }}""", + } + return {key[4:]: _text(value) for key, value in raw.items()} + + +def _resolve_network(ref): + from resourcehandlers.models import ResourceNetwork + + net = None + if GLOBAL_ID_RE.match(ref): + net = ResourceNetwork.objects.filter(global_id=ref).first() + elif ref.isdigit(): + net = ResourceNetwork.objects.filter(id=int(ref)).first() + if net is None: + matches = list(ResourceNetwork.objects.filter(name__iexact=ref)) or list(ResourceNetwork.objects.filter(network__iexact=ref)) + if len(matches) > 1: + return None, "Several networks match '{}'; pass the NET- global id (onb_environment_networks lists them).".format(ref) + net = matches[0] if matches else None + if net is None: + return None, "No network matches '{}'.".format(ref) + try: + net = net.cast() + except Exception: + pass + return net, None + + +def _ipv4(value, label): + try: + return str(ipaddress.IPv4Address(value)), None + except Exception: + return None, "{} '{}' is not an IPv4 address.".format(label, value) + + +def _netmask(value): + text = value.strip().lstrip("/") + try: + if text.isdigit(): + return str(ipaddress.IPv4Network("0.0.0.0/{}".format(int(text))).netmask), None + mask = ipaddress.IPv4Address(text) + ipaddress.IPv4Network("0.0.0.0/{}".format(mask)) + return str(mask), None + except Exception: + return None, "Netmask '{}' is not valid; use 255.255.255.0 or a prefix such as 24.".format(value) + + +def _pool_ips(spec, subnet, gateway): + """Expand '10.0.5.10-10.0.5.60' or a list of addresses; every address must sit in the network.""" + ips = [] + for part in re.split(r"[\s,]+", spec): + if not part: + continue + if "-" in part: + start_s, end_s = part.split("-", 1) + start, end = ipaddress.IPv4Address(start_s.strip()), ipaddress.IPv4Address(end_s.strip()) + if end < start: + raise ValueError("Range {} ends before it starts.".format(part)) + if int(end) - int(start) + 1 > MAX_POOL: + raise ValueError("Range {} holds more than {} addresses.".format(part, MAX_POOL)) + ips.extend(str(ipaddress.IPv4Address(i)) for i in range(int(start), int(end) + 1)) + else: + ips.append(str(ipaddress.IPv4Address(part))) + seen, out = set(), [] + for ip in ips: + addr = ipaddress.IPv4Address(ip) + if subnet is not None and addr not in subnet: + raise ValueError("{} is outside the network {} (gateway and netmask).".format(ip, subnet)) + if subnet is not None and addr in (subnet.network_address, subnet.broadcast_address): + continue + if ip == gateway or ip in seen: + continue + seen.add(ip) + out.append(ip) + if len(out) > MAX_POOL: + raise ValueError("More than {} addresses.".format(MAX_POOL)) + return out + + +def _pool_state(net): + try: + rp = net.get_resource_pool() + except Exception: + rp = None + if rp is None: + return None + values = rp.get_values() + return {"name": rp.name, "total": values.count(), "free": values.filter(server=None, resource=None).count(), + "url": "/resourcepools/{}/".format(rp.id)} + + +def _ipam_endpoints(): + try: + from ipam.models import IPAM + + return [{"id": i.id, "name": i.name, "technology": str(i.ipam_technology)} for i in IPAM.objects.all().order_by("name")] + except Exception: + return [] + + +def _resolve_ipam(ref): + from ipam.models import IPAM + + ipam = None + if ref.isdigit(): + ipam = IPAM.objects.filter(id=int(ref)).first() + if ipam is None: + matches = list(IPAM.objects.filter(name__iexact=ref)) + if len(matches) > 1: + return None, "Several IPAM endpoints are named '{}'; pass its numeric id.".format(ref) + ipam = matches[0] if matches else None + if ipam is None: + return None, "No IPAM endpoint matches '{}'.".format(ref) + return ipam, None + + +def _state(net, base): + try: + provider = net.determine_ip_provider() + except Exception: + provider = None + row = { + "id": getattr(net, "global_id", None), + "name": net.name, + "url": base + "/networks/{}/".format(net.id), + "addressing": net.addressing_schema, + "ipProvider": provider, + "gateway": net.gateway, + "netmask": net.netmask, + "dns1": net.dns1, + "dns2": net.dns2, + "dnsDomain": net.dns_domain, + } + pool = _pool_state(net) + if pool: + pool["url"] = base + pool["url"] + row["ipPool"] = pool + if net.ipam_network_id: + row["ipamNetwork"] = str(net.ipam_network) + return row + + +def _remove_pool(net): + from behavior_mapping.models import ResourcePoolMapping + + mappings = list(ResourcePoolMapping.objects.filter(network=net)) + for mapping in mappings: + pool = mapping.pool + if pool is not None and pool.get_values().exclude(server=None, resource=None).exists(): + raise ValueError("The network's IP pool '{}' has addresses in use; free them before removing it.".format(pool.name)) + for mapping in mappings: + pool = mapping.pool + mapping.delete() + if pool is not None: + pool.delete() + return len(mappings) + + +def run(job, *args, **kwargs): + profile = _caller(job, kwargs) + if profile is None: + return _failure("No calling user profile was supplied. Run this tool through the MCP server as an authenticated user.") + if not profile.is_cbadmin: + return _failure("Only CloudBolt admins may change network addressing.") + + inp = _read_inputs() + if not inp["network"]: + return _failure("onb_network is required: the NET- global id or the network name (onb_environment_networks lists them).") + net, error = _resolve_network(inp["network"]) + if error: + return _failure(error) + base = _portal_url() + slug = "" + if getattr(net, "resource_technology", None) is not None: + slug = net.resource_technology.slug or "" + + addressing = inp["addressing"].lower() + source = inp["ip_source"].lower() + if not addressing and not source and not any(inp[k] for k in ("gateway", "netmask", "dns1", "dns2", "dns_domain", "pool_range", "ipam")): + return _success("Current addressing of '{}'.".format(net.name), {"network": _state(net, base), "ipamEndpoints": _ipam_endpoints()}) + + addressing = addressing or net.addressing_schema + if addressing not in ("dhcp", "static", "both"): + return _failure("onb_addressing must be dhcp, static or both.") + if slug == "vcloud_director" and addressing == "both": + return _failure("vCloud Director turns 'both' into allocation mode NONE; use dhcp or static.") + if source and source not in ("pool", "ipam", "manual"): + return _failure("onb_ip_source must be pool, ipam or manual.") + if addressing != "static" and source in ("pool", "ipam"): + return _failure("An IP pool or IPAM supplies static addresses; use onb_addressing=static with onb_ip_source={}.".format(source)) + + changes = [] + gateway = net.gateway + netmask = net.netmask + if inp["gateway"]: + gateway, error = _ipv4(inp["gateway"], "Gateway") + if error: + return _failure(error) + if inp["netmask"]: + netmask, error = _netmask(inp["netmask"]) + if error: + return _failure(error) + dns = {} + for key, label in (("dns1", "DNS 1"), ("dns2", "DNS 2")): + if inp[key]: + value, error = _ipv4(inp[key], label) + if error: + return _failure(error) + dns[key] = value + if inp["dns_domain"] and len(inp["dns_domain"]) > 50: + return _failure("DNS domain is limited to 50 characters.") + if addressing in ("static", "both") and not (gateway and netmask): + return _failure("A static network needs a gateway and a netmask (DNS 1, DNS 2 and DNS domain are optional); pass onb_gateway and onb_netmask.") + subnet = None + if gateway and netmask: + subnet = ipaddress.IPv4Network("{}/{}".format(gateway, netmask), strict=False) + pool_ips = None + if source == "pool" and inp["pool_range"]: + try: + pool_ips = _pool_ips(inp["pool_range"], subnet, gateway) + except ValueError as exc: + return _failure(str(exc)) + if not pool_ips: + return _failure("onb_pool_range gave no usable address.") + elif source == "pool" and _pool_state(net) is None: + return _failure("onb_ip_source=pool needs onb_pool_range: a range such as 10.0.5.10-10.0.5.60 or a list of addresses.") + if source == "ipam" and not inp["ipam"]: + endpoints = _ipam_endpoints() + return _failure( + "onb_ip_source=ipam needs onb_ipam, the IPAM endpoint's name or id. " + + ("Endpoints: {}.".format(", ".join("{} ({}, id {})".format(e["name"], e["technology"], e["id"]) for e in endpoints)) + if endpoints else "No IPAM endpoint exists: the user adds one at {}/setup/add-ipam/ (credentials are entered there).".format(base)), + {"ipamEndpoints": endpoints, "addIpamUrl": base + "/setup/add-ipam/"}, + ) + + # Write the settings (the same fields as the network's edit page), only after every input is valid. + for field, value in (("gateway", gateway), ("netmask", netmask)): + if value and getattr(net, field) != value: + setattr(net, field, value) + changes.append("{} {}".format(field, value)) + for key, value in dns.items(): + if getattr(net, key) != value: + setattr(net, key, value) + changes.append("{} {}".format(key, value)) + if inp["dns_domain"] and net.dns_domain != inp["dns_domain"]: + net.dns_domain = inp["dns_domain"] + changes.append("DNS domain {}".format(inp["dns_domain"])) + if net.addressing_schema != addressing: + net.addressing_schema = addressing + changes.append("addressing {}".format(addressing)) + net.save() + + notes = [] + want = "dhcp" if addressing == "dhcp" else ("both" if addressing == "both" else (source or None)) + try: + # Leave only the chosen IP source on the network: a pool or an IPAM link outranks the schema. + if want != "ipam" and net.ipam_network_id: + net.ipam_network = None + net.save() + changes.append("IPAM link removed") + if want in ("dhcp", "both", "manual", "ipam") and _pool_state(net): + removed = _remove_pool(net) + changes.append("IP pool removed ({} mapping)".format(removed)) + if want == "pool": + pool = _pool_state(net) + if pool_ips: + ips = pool_ips + if pool is None: + net.add_ip_addresses(ips) + changes.append("IP pool created with {} address(es)".format(len(ips))) + else: + from infrastructure.models import ResourcePoolValueSet + + rp = net.get_resource_pool() + have = set(rp.get_values().values_list("ip", flat=True)) + new = [ResourcePoolValueSet(resource_pool=rp, ip=ip) for ip in ips if ip not in have] + ResourcePoolValueSet.objects.bulk_create(new) + changes.append("IP pool extended by {} address(es)".format(len(new))) + elif pool is None: + return _failure("onb_ip_source=pool needs onb_pool_range: a range such as 10.0.5.10-10.0.5.60 or a list of addresses.") + if want == "ipam": + if not inp["ipam"]: + endpoints = _ipam_endpoints() + return _failure( + "onb_ip_source=ipam needs onb_ipam, the IPAM endpoint's name or id. " + + ("Endpoints: {}.".format(", ".join("{} ({}, id {})".format(e["name"], e["technology"], e["id"]) for e in endpoints)) + if endpoints else "No IPAM endpoint exists: the user adds one at {}/setup/add-ipam/ (credentials are entered there).".format(base)), + {"ipamEndpoints": endpoints, "addIpamUrl": base + "/setup/add-ipam/"}, + ) + ipam, error = _resolve_ipam(inp["ipam"]) + if error: + return _failure(error, {"ipamEndpoints": _ipam_endpoints()}) + real = ipam.cast() + try: + real.verify_connection() + except Exception as exc: + return _failure("IPAM '{}' does not answer: {}: {}. Fix it on {}/ipam/{}/ (Edit Credentials) and verify there.".format( + ipam.name, type(exc).__name__, str(exc)[:300], base, ipam.id)) + if (ipam.ipam_technology.modulename or "").startswith("ipam.infoblox") and not net.dns_domain: + return _failure("Infoblox creates a host record under the network's DNS domain; pass onb_dns_domain.") + try: + hook = real.get_hook_module() + except Exception as exc: + return _failure("IPAM '{}' has no orchestration action to allocate addresses: {}.".format(ipam.name, str(exc)[:200])) + if not hook.enabled: + hook.enabled = True + hook.save() + changes.append("enabled the IPAM orchestration action '{}' (applies to every {} endpoint)".format(hook.name, ipam.ipam_technology)) + if not net.ipam_network_id or not net.ipam_network.ipam_set.filter(id=ipam.id).exists(): + outputs = { + "network": _state(net, base), + "needsUiStep": True, + "ipamUrl": base + "/ipam/{}/#tab-networks".format(ipam.id), + "next": ("Map the network in the IPAM, then call this tool again with the same inputs to verify: open the " + "link, Networks tab, Import IPAM Networks, tick the network that matches {} ({}), then the pencil " + "on that row and select CloudBolt network '{}'.".format(subnet or net.name, net.name, net.name)), + "changes": changes, + } + return _success("'{}' is not mapped to a network of IPAM '{}' yet.".format(net.name, ipam.name), outputs) + except ValueError as exc: + return _failure(str(exc), {"network": _state(net, base), "changes": changes}) + + # Prove it with the same call the order form and provisioning use. + state = _state(net, base) + expected = EXPECTED.get(want) if want else None + problems = [] + if expected and state["ipProvider"] != expected: + problems.append("CloudBolt resolves the IP source as '{}' instead of '{}'.".format(state["ipProvider"], expected)) + if state["ipProvider"] in ("user_static", "user_static_or_dhcp", "pool", "ipam") and not (net.gateway and net.netmask): + problems.append("Static addressing without gateway and netmask fails at provisioning.") + if state.get("ipPool") and state["ipPool"]["free"] == 0: + problems.append("The IP pool has no free address.") + if addressing == "static" and not source and not state.get("ipPool") and not net.ipam_network_id: + notes.append("Static with no pool or IPAM: the requester types the IP (sc_nic_0_ip) on each order.") + if state["ipProvider"] in ("user_static", "user_static_or_dhcp"): + notes.append("Orders on this network must pass sc_nic_0_ip (the static IP).") + outputs = {"network": state, "changes": changes, "verified": not problems} + if notes: + outputs["notes"] = notes + if problems: + outputs["problems"] = problems + return {"status": "FAILURE", "output_message": "", "error_message": " ".join(problems), "outputs": outputs} + return _success("'{}': IP source {}; {} change(s); verified.".format(net.name, state["ipProvider"], len(changes)), outputs) diff --git a/plugins/OHK-ilstyopk/OHK-ilstyopk_metadata.json b/plugins/OHK-ilstyopk/OHK-ilstyopk_metadata.json index 21766466..fe2152c4 100644 --- a/plugins/OHK-ilstyopk/OHK-ilstyopk_metadata.json +++ b/plugins/OHK-ilstyopk/OHK-ilstyopk_metadata.json @@ -41,7 +41,7 @@ { "allow_multiple": false, "available_all_servers": false, - "description": "CloudBolt hostname template, for example poc-# or a template using group and OS build names; see the hostname specification documentation.", + "description": "CloudBolt hostname template with a sequence: zeros followed by X, for example poc-00X (becomes poc-001, poc-002). A template with '#' or without a sequence is refused.", "field_dependency_controlling_set": [], "field_dependency_dependent_set": [], "global_options": [], @@ -49,7 +49,7 @@ "id": "CF-4ciiaerz", "label": "Hostname template (optional)", "name": "onb_hostname_template", - "placeholder": "poc-#", + "placeholder": "poc-00X", "relevant_osfamilies": [], "required": false, "show_as_attribute": false, @@ -66,7 +66,7 @@ "description": "Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments.", "id": "OHK-ilstyopk", "max_retries": 0, - "name": "POC Onboarding: Configure Custom Server", + "name": "Onboarding: Configure Custom Server", "resource_technologies": [], "script_filename": "OHK-ilstyopk_script.py", "shared": false, diff --git a/plugins/OHK-ilstyopk/OHK-ilstyopk_script.py b/plugins/OHK-ilstyopk/OHK-ilstyopk_script.py index 8a6db40f..0822a5a6 100644 --- a/plugins/OHK-ilstyopk/OHK-ilstyopk_script.py +++ b/plugins/OHK-ilstyopk/OHK-ilstyopk_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: Configure Custom Server (MCP Tool Action plugin). +Onboarding: Configure Custom Server (MCP Tool Action plugin). Makes the shipped Custom Server blueprint orderable for the POC: recreates it when it is missing, activates it, opens it to every environment (or the @@ -113,6 +113,24 @@ def _find_or_create_blueprint(name, default_name): return blueprint, created +def _hostname_problem(template): + """A reason the hostname template would not give each server its own name, or None. + + CloudBolt numbers names with a run of zeros followed by X: poc-00X becomes poc-001, poc-002 + and so on (common.methods, the 0+X substitution). '#' is not part of that syntax and stays + literal, so every server would get the same name. + """ + if not template: + return None + if "#" in template: + return "'#' is not CloudBolt hostname syntax and would be used literally; use a run of zeros and X, for example {}".format( + template.replace("#", "00X")) + if not re.search(r"0+X", template): + return "the template has no sequence, so every server would get the same name; add zeros and X, for example {}-00X".format( + template.rstrip("-")) + return None + + def run(job, *args, **kwargs): profile = _caller(job, kwargs) if profile is None: @@ -124,6 +142,9 @@ def run(job, *args, **kwargs): envs, error = _resolve_envs(inputs["environments"]) if error: return _failure(error) + problem = _hostname_problem(inputs["hostname_template"]) + if problem: + return _failure("Hostname template '{}' was not applied: {}.".format(inputs["hostname_template"], problem)) default_name = getattr(settings, "DEFAULT_NEW_SERVER_BLUEPRINT_NAME", "Custom Server") name = getattr(settings, "NEW_SERVER_BLUEPRINT_NAME", default_name) or default_name diff --git a/plugins/OHK-j60flmb3/OHK-j60flmb3_metadata.json b/plugins/OHK-j60flmb3/OHK-j60flmb3_metadata.json index 69123b6c..fb487e38 100644 --- a/plugins/OHK-j60flmb3/OHK-j60flmb3_metadata.json +++ b/plugins/OHK-j60flmb3/OHK-j60flmb3_metadata.json @@ -26,7 +26,7 @@ "description": "Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version.", "id": "OHK-j60flmb3", "max_retries": 0, - "name": "POC Onboarding: Install", + "name": "Onboarding: Install", "resource_technologies": [], "script_filename": "OHK-j60flmb3_script.py", "shared": false, diff --git a/plugins/OHK-j60flmb3/OHK-j60flmb3_script.py b/plugins/OHK-j60flmb3/OHK-j60flmb3_script.py index b2573fc8..c1dec607 100644 --- a/plugins/OHK-j60flmb3/OHK-j60flmb3_script.py +++ b/plugins/OHK-j60flmb3/OHK-j60flmb3_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: Install (MCP Tool Action plugin). +Onboarding: Install (MCP Tool Action plugin). Finishes the toolkit install after a Source Control Repos sync or a Content Package import: turns Synchronous Action on for the tools that @@ -10,6 +10,11 @@ after every toolkit sync. Runs as a job (asynchronous) so it works before any Synchronous flag is set. Admin only. +The result lists only the tools that need attention: the ones install +changed (or, with onb_action=status, would change) and the missing ones, +with counts for the rest. The install record saved in the onboarding state +keeps toolkitVersion, when, by, missing and egress for onb_status. + Every declared input is read from its rendered template token in _read_inputs(); keep each one referenced that way or CloudBolt's token scan deletes the input when the script is saved. @@ -18,7 +23,7 @@ import json from datetime import datetime, timezone -TOOLKIT_VERSION = "0.1.0" +TOOLKIT_VERSION = "1.0.0" STATE_NAMESPACE = "poc_onboarding" STATE_FIELD = "poc_onboarding_state" @@ -38,6 +43,7 @@ "onb_trim_environment": True, "onb_configure_custom_server": True, "onb_remove_environment": True, + "onb_failed_servers": True, "onb_parameter": True, "onb_group": True, "onb_user": True, @@ -47,12 +53,20 @@ "onb_verify_ldap": False, "onb_smtp": True, "onb_smtp_test": False, + "onb_install_content_library_item": False, + "onb_cit_from_order": True, + "onb_scorecard": True, + "onb_sync_images": False, + "onb_environment_networks": False, + "onb_network_addressing": False, # Reused testing tools that ship in the same package. "sync_from_source_control_repo": True, "fetch_job_log": True, "manage_blueprint_permissions": True, + "run_recurring_job": True, + "run_cit_tests": True, } -PLAYBOOK_URL = "https://raw.githubusercontent.com/mbomb67/cloudbolt-as-code/main/.claude/skills/cb-poc-onboarding/SKILL.md" +PLAYBOOK_URL = "https://raw.githubusercontent.com/mbomb67/cloudbolt-as-code/main/.claude/skills/cb-onboarding/SKILL.md" def _text(value): @@ -115,8 +129,8 @@ def _state_field(create=False): field, _ = CustomField.objects.get_or_create( name=STATE_FIELD, defaults=dict( - label="POC Onboarding State", - description="State recorded by the POC onboarding MCP tools: item statuses, handler verify results, install details.", + label="Onboarding State", + description="State recorded by the onboarding MCP tools: item statuses, handler verify results, install details.", type="TXT", namespace=namespace, ), @@ -199,45 +213,47 @@ def run(job, *args, **kwargs): base = _portal_url() present = {a.mcp_tool_name: a for a in MCPToolAction.objects.filter(mcp_tool_name__in=list(TOOLS))} - rows = {} + missing = [] changed = [] for name, wants_sync in TOOLS.items(): tool = present.get(name) if tool is None: - rows[name] = {"present": False} + missing.append(name) + continue + updates = [] + if bool(tool.is_synchronous) != wants_sync: + updates.append("isSynchronous={}".format(wants_sync)) + if not tool.enabled: + updates.append("enabled=True") + if not updates: continue - before = {"enabled": bool(tool.enabled), "isSynchronous": bool(tool.is_synchronous)} if action == "install": - updates = [] - if bool(tool.is_synchronous) != wants_sync: - tool.is_synchronous = wants_sync - updates.append("isSynchronous={}".format(wants_sync)) - if not tool.enabled: - tool.enabled = True - updates.append("enabled=True") - if updates: - tool.save() - changed.append({"tool": name, "changes": updates}) - rows[name] = { - "present": True, + tool.is_synchronous = wants_sync + tool.enabled = True + tool.save() + changed.append({ + "tool": name, "id": tool.global_id, - "enabled": bool(tool.enabled), - "isSynchronous": bool(tool.is_synchronous), - "wantsSynchronous": wants_sync, - "before": before, - "editUrl": base + "/actions/mcp_tool_actions/{}/edit/".format(tool.id), - } - missing = [name for name, row in rows.items() if not row["present"]] + "changes": updates, + "editUrl": base + "/actions/mcp_tool_action/{}/".format(tool.id), + }) _progress(job, "Checking outbound access to the Content Library and GitHub") egress = _egress() + # install reports what it changed; status reports what install would change. + change_key = "changed" if action == "install" else "needsChange" outputs = { "action": action, "toolkitVersion": TOOLKIT_VERSION, - "tools": rows, + "counts": { + "expected": len(TOOLS), + "present": len(TOOLS) - len(missing), + "missing": len(missing), + change_key: len(changed), + }, "missing": missing, - "changed": changed, + change_key: changed, "egress": egress, "mcpToolActionsUrl": base + "/actions/mcp_tool_actions/", } @@ -258,22 +274,25 @@ def mutate(state): except Exception as exc: outputs["stateNote"] = "Could not record the install: {}".format(str(exc)[:200]) notes = [] - if changed: + if changed and action == "install": notes.append( - "Synchronous Action was changed on {} tool(s). Reconnect the MCP client now: tool lists and " + "{} tool(s) were enabled or had Synchronous Action changed. Reconnect the MCP client now: tool lists and " "behaviour are cached per session.".format(len(changed)) ) + elif changed: + notes.append("{} tool(s) are disabled or have the wrong Synchronous Action; onb_install fixes them.".format(len(changed))) if missing: notes.append( "Missing tools: {}. Sync them from the repository (mcp_tool_actions folders) or import the " - "POC Onboarding Toolkit content package, then run onb_install again.".format(", ".join(missing)) + "Onboarding Toolkit content package, then run onb_install again.".format(", ".join(missing)) ) if egress.get("playbook", {}).get("reachable") is False: notes.append("GitHub is not reachable from the appliance, so onb_playbook will fail; read the skill from the repository instead.") if egress.get("contentLibrary", {}).get("reachable") is False: notes.append("The Content Library is not reachable; the extensibility phase will need the proxy or SSL settings fixed first.") outputs["notes"] = notes - message = "Toolkit {}: {} present, {} missing, {} changed.".format( - TOOLKIT_VERSION, len(TOOLS) - len(missing), len(missing), len(changed) + message = "Toolkit {}: {} present, {} missing, {} {}.".format( + TOOLKIT_VERSION, len(TOOLS) - len(missing), len(missing), len(changed), + "changed" if action == "install" else "need a change", ) return _success(message, outputs) diff --git a/plugins/OHK-j82f4ibp/OHK-j82f4ibp_metadata.json b/plugins/OHK-j82f4ibp/OHK-j82f4ibp_metadata.json index f8d438e3..34df2c1b 100644 --- a/plugins/OHK-j82f4ibp/OHK-j82f4ibp_metadata.json +++ b/plugins/OHK-j82f4ibp/OHK-j82f4ibp_metadata.json @@ -26,7 +26,7 @@ "description": "Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it.", "id": "OHK-j82f4ibp", "max_retries": 0, - "name": "POC Onboarding: Verify LDAP", + "name": "Onboarding: Verify LDAP", "resource_technologies": [], "script_filename": "OHK-j82f4ibp_script.py", "shared": false, diff --git a/plugins/OHK-j82f4ibp/OHK-j82f4ibp_script.py b/plugins/OHK-j82f4ibp/OHK-j82f4ibp_script.py index 4777801a..31a71a09 100644 --- a/plugins/OHK-j82f4ibp/OHK-j82f4ibp_script.py +++ b/plugins/OHK-j82f4ibp/OHK-j82f4ibp_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: Verify LDAP (MCP Tool Action plugin). +Onboarding: Verify LDAP (MCP Tool Action plugin). Runs an LDAP utility's Verify Connection (bind and search) and returns the real error text with a hint, the way onb_verify_resource_handler does for @@ -102,9 +102,14 @@ def run(job, *args, **kwargs): }, "links": { "detail": base + "/admin/ldap_settings/{}/".format(utility.id), - "edit": base + "/admin/ldap_settings/{}/edit/".format(utility.id), - "verifyDialog": base + "/admin/ldap_settings/{}/verify_connection/".format(utility.id), - "mappings": base + "/admin/ldap_settings/{}/group_mappings/add/".format(utility.id), + "edit": base + "/admin/ldap_settings/{}/".format(utility.id), + "mappings": base + "/admin/ldap_settings/{}/#tab-group-mappings".format(utility.id), + }, + "click": { + "password": "Credentials on links.edit", + "settings": "Settings on links.edit", + "verify": "Verify Connection on links.edit", + "mappings": "New LDAP Mapping on links.mappings", }, } try: @@ -116,5 +121,5 @@ def run(job, *args, **kwargs): error_text = "{}: {}".format(type(exc).__name__, str(exc))[:3000] hints = [hint for pattern, hint in HINTS if pattern.search(error_text)] outputs.update({"verified": False, "error": error_text, "hints": hints or ["Compare the server, port, protocol, base DN and service account on the edit page with the directory's values."]}) - outputs["next"] = "Explain the error and the first hint; credentials are fixed on links.edit (never in chat). Then run this tool again." + outputs["next"] = "Explain the error and the first hint; credentials are fixed on links.edit with its Credentials button (never in chat). Then run this tool again." return _success("LDAP utility '{}' failed: {}".format(outputs["ldapUtility"]["name"], error_text[:300]), outputs) diff --git a/plugins/OHK-jdyan3in/OHK-jdyan3in_metadata.json b/plugins/OHK-jdyan3in/OHK-jdyan3in_metadata.json index cc359354..ec440857 100644 --- a/plugins/OHK-jdyan3in/OHK-jdyan3in_metadata.json +++ b/plugins/OHK-jdyan3in/OHK-jdyan3in_metadata.json @@ -26,7 +26,7 @@ "description": "Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails.", "id": "OHK-jdyan3in", "max_retries": 0, - "name": "POC Onboarding: SMTP Test", + "name": "Onboarding: SMTP Test", "resource_technologies": [], "script_filename": "OHK-jdyan3in_script.py", "shared": false, diff --git a/plugins/OHK-jdyan3in/OHK-jdyan3in_script.py b/plugins/OHK-jdyan3in/OHK-jdyan3in_script.py index 632ab8cc..f393fed1 100644 --- a/plugins/OHK-jdyan3in/OHK-jdyan3in_script.py +++ b/plugins/OHK-jdyan3in/OHK-jdyan3in_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: SMTP Test (MCP Tool Action plugin). +Onboarding: SMTP Test (MCP Tool Action plugin). Sends a test email through the saved SMTP settings, the same as the Email Settings page's test button, and returns the relay's real error when it @@ -72,7 +72,8 @@ def run(job, *args, **kwargs): outputs = { "recipient": recipient or None, "settings": {"host": gp.smtp_host or None, "port": gp.smtp_port or None, "userSet": bool(gp.smtp_user), "useTls": bool(gp.smtp_use_tls), "passwordSet": bool(gp.smtp_password)}, - "editUrl": base + "/admin/email_settings/edit/", + "editUrl": base + "/admin/email_settings/", + "editClick": "Edit on the Overview tab", } if not gp.smtp_host: return _failure("No SMTP host is configured; set it with onb_smtp (and the password on the Email Settings page) first.") @@ -85,7 +86,7 @@ def run(job, *args, **kwargs): when = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M UTC") email( recipients=recipient, - context={"subject": "CloudBolt email test", "message": "This test email was sent from CloudBolt on {} by the POC onboarding toolkit.".format(when)}, + context={"subject": "CloudBolt email test", "message": "This test email was sent from CloudBolt on {} by the onboarding toolkit.".format(when)}, ) outputs["sent"] = True outputs["next"] = "Ask the user to confirm the message arrived; then record prerequisite P7 as done." diff --git a/plugins/OHK-k2p8ll4p/OHK-k2p8ll4p_metadata.json b/plugins/OHK-k2p8ll4p/OHK-k2p8ll4p_metadata.json index bda103e4..27663291 100644 --- a/plugins/OHK-k2p8ll4p/OHK-k2p8ll4p_metadata.json +++ b/plugins/OHK-k2p8ll4p/OHK-k2p8ll4p_metadata.json @@ -41,17 +41,17 @@ { "allow_multiple": false, "available_all_servers": false, - "description": "AWS AMI id or exact name; Azure template name or publisher:offer:sku[:version]; vCenter template name.", + "description": "AMI id or part of an AMI name; Azure template name or publisher:offer:sku[:version]; vCenter template name. Empty lists the cached images for the location.", "field_dependency_controlling_set": [], "field_dependency_dependent_set": [], "global_options": [], "hide_if_default_value": true, "id": "CF-fdogpsml", - "label": "Image: AMI id/name, Azure urn, template name", + "label": "Image (empty lists the cache)", "name": "onb_image", "placeholder": "ami-0123456789abcdef0", "relevant_osfamilies": [], - "required": true, + "required": false, "show_as_attribute": false, "show_on_servers": false, "type": "STR", @@ -60,7 +60,7 @@ { "allow_multiple": false, "available_all_servers": false, - "description": "Name of the OS build to create or reuse.", + "description": "Name of the OS build to create or reuse; required when onb_image names an image.", "field_dependency_controlling_set": [], "field_dependency_dependent_set": [], "global_options": [], @@ -70,7 +70,7 @@ "name": "onb_os_build_name", "placeholder": "Ubuntu 22.04", "relevant_osfamilies": [], - "required": true, + "required": false, "show_as_attribute": false, "show_on_servers": false, "type": "STR", @@ -94,6 +94,25 @@ "show_on_servers": false, "type": "STR", "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "true replaces this handler's other image in the OS build (CloudBolt allows one per handler, per region on AWS and Azure); the tool asks for this confirmation first.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-jlhhvju6", + "label": "Replace existing image (true/false)", + "name": "onb_replace_existing", + "placeholder": "false", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null } ], "action_inputs_sequence": [ @@ -101,12 +120,13 @@ "onb_image", "onb_os_build_name", "onb_environments", - "onb_region" + "onb_region", + "onb_replace_existing" ], - "description": "Imports one image (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing an existing build of the same name so one build spans handlers, and attaches the build to the handler's environments.", + "description": "Lists a handler's cached images for a location or imports one (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing a build of the same name so one build spans handlers, refreshing an empty cache without the whitelist, and attaching the build to the environments.", "id": "OHK-k2p8ll4p", "max_retries": 0, - "name": "POC Onboarding: Import OS Build", + "name": "Onboarding: Import OS Build", "resource_technologies": [], "script_filename": "OHK-k2p8ll4p_script.py", "shared": false, diff --git a/plugins/OHK-k2p8ll4p/OHK-k2p8ll4p_script.py b/plugins/OHK-k2p8ll4p/OHK-k2p8ll4p_script.py index f73b4ac5..c1ba6ee5 100644 --- a/plugins/OHK-k2p8ll4p/OHK-k2p8ll4p_script.py +++ b/plugins/OHK-k2p8ll4p/OHK-k2p8ll4p_script.py @@ -1,12 +1,19 @@ """ -POC Onboarding: Import OS Build (MCP Tool Action plugin). +Onboarding: Import OS Build (MCP Tool Action plugin). Imports one image (an AWS AMI, an Azure marketplace image, a vCenter template) into an OS build and attaches that OS build to the handler's -environments, the way the handler's images page does. An OS build name -that already exists is reused, so one build ("Ubuntu 22.04") can carry an -image per handler and a single blueprint deploys to both clouds. Runs as a -job because it calls the cloud API. Admin only. +environments, the way the handler's images page does. With onb_image empty +it lists the cached images for the location; a partial name narrows the +list and imports when exactly one image matches. The image caches come +from onb_sync_images (or the Fetch and Cache recurring jobs); an AMI id +that is not cached is fetched on the spot, and an empty Azure or vCenter +cache is refreshed without the whitelist before the lookup. An OS build +name that already exists is reused, so one build can carry an image per +handler and a single blueprint deploys to both clouds. After the import +it reports whether each image holds the guest credentials CloudBolt copies +onto servers built from it (booleans only, never the values). Runs as a job +because it calls the cloud API. Admin only. Every declared input is read from its rendered template token in _read_inputs(); keep each one referenced that way or CloudBolt's token scan @@ -17,6 +24,18 @@ GLOBAL_ID_RE = re.compile(r"^[A-Z]{2,4}-[A-Za-z0-9]{6,16}$") LOCATION_FIELD = {"aws": "aws_region", "aws_govcloud": "aws_region", "aws_china": "aws_region", "azure_arm": "node_location"} +MAX_LIST = 60 +# The default user of AWS images by OS family, from AWS's list of default usernames +# (root sign-in is disabled on them, so CloudBolt's root fallback fails there): +# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/managing-users.html#ami-default-user-names +AWS_USERNAMES = { + "Amazon Linux": "ec2-user", "CentOS": "centos", "Debian": "admin", "Fedora": "fedora", + "Oracle Enterprise Linux": "ec2-user", "Red Hat": "ec2-user", "SUSE": "ec2-user", "Ubuntu": "ubuntu", +} +NEW_PASSWORD_REMEDY = ( + "onb_parameter with onb_param_name new_password and onb_param_targets set to the environment, without " + "onb_param_options, so the order form asks for the Administrator password" +) def _text(value): @@ -71,6 +90,7 @@ def _read_inputs(): "onb_os_build_name": """{{ onb_os_build_name }}""", "onb_environments": """{{ onb_environments }}""", "onb_region": """{{ onb_region }}""", + "onb_replace_existing": """{{ onb_replace_existing }}""", } return { "handler": _text(raw["onb_handler"]), @@ -78,6 +98,7 @@ def _read_inputs(): "os_build_name": _text(raw["onb_os_build_name"]), "environments": _lines(raw["onb_environments"]), "region": _text(raw["onb_region"]), + "replace_existing": _text(raw["onb_replace_existing"]).lower() in ("true", "1", "yes", "y"), } @@ -142,8 +163,62 @@ def _existing_os_build(name): return OSBuild.objects.filter(name__iexact=name).order_by("id").first() +# Set by run() for this execution: whether the caller allowed replacing a handler's other image +# in the OS build, and what was removed. +_STATE = {"replace": False, "removed": []} + + +class NeedsReplace(Exception): + """The OS build already holds another image of this handler (in this region or location).""" + + def __init__(self, osb, attrs): + super().__init__("OS build '{}' already holds another image on this handler".format(osb.name)) + self.osb = osb + self.attrs = attrs + + +def _describe_osba(attr): + row = {"id": attr.id, "template": getattr(attr, "template_name", None) or str(attr)} + for key in ("ami_id", "region"): + value = getattr(attr, key, None) + if value: + row[key] = value + return row + + +def _conflicting_osbas(handler, osb, image): + """Images of this handler already in the OS build that the new image would collide with. + + CloudBolt resolves exactly one image per OS build and handler, per region for AWS and per + location for Azure (osba_for_resource_handler raises "There should only be one OSBA in common + between a resource handler and an OSB" otherwise), so a second one breaks every order. + """ + rows = [] + try: + attrs = list(handler.os_build_attributes.filter(os_build=osb)) + except Exception: + return rows + want_name = str(image.get("name") or "") + want_ami = str(image.get("ami_id") or "") + want_region = str(image.get("region") or "") + for attr in attrs: + try: + real = attr.cast() + except Exception: + real = attr + if want_ami and getattr(real, "ami_id", None) == want_ami: + continue + if not want_ami and want_name and (getattr(real, "template_name", "") or "") == want_name: + continue + region = getattr(real, "region", None) + if want_region and region and str(region) != want_region: + continue + rows.append(real) + return rows + + def _add_template(handler, image_dict, os_build_name, existing_osb): - """What ResourceHandlerBaseService.create_osbuild_and_attributes does, without the abstract service.""" + """What the handler service's create_osbuild_and_attributes does, without the abstract service.""" from c2_wrapper import guess_os_family image = dict(image_dict) @@ -151,81 +226,163 @@ def _add_template(handler, image_dict, os_build_name, existing_osb): image["os_family"] = guess_os_family(image) image["reported_os"] = image.get("guest_os") image.pop("os_build_name", None) + image.pop("os_build", None) if existing_osb is not None: - image.pop("os_build", None) - return handler.add_template(os_build=existing_osb, **image) + conflicts = _conflicting_osbas(handler, existing_osb, image) + if conflicts: + if not _STATE["replace"]: + raise NeedsReplace(existing_osb, conflicts) + for attr in conflicts: + _STATE["removed"].append(_describe_osba(attr)) + handler.delete_osbuild_attribute(attr) + # AWS and Azure add_template() require os_build_name positionally and reset os_build + # unless the mapping flag says the caller chose the build on purpose. + return handler.add_template(os_build_name=existing_osb.name, os_build=existing_osb, + is_ami_osb_mapping=True, is_images_osb_mapping=True, **image) return handler.add_template(os_build_name=os_build_name, **image) -def _import_aws(handler, image, region, os_build_name, existing_osb, job): - from resourcehandlers.aws.models import AmazonMachineImage +class Choices(Exception): + """Raised when the lookup found several (or no) images and the agent must choose.""" + + def __init__(self, rows, note): + super().__init__(note) + self.rows = rows + self.note = note - _progress(job, "Looking up image {} in {}".format(image, region)) + +# --- AWS ------------------------------------------------------------------- + +def _aws_rows(qs): + rows = [] + for ami in qs[:MAX_LIST]: + rows.append({"amiId": ami.ami_id, "name": (ami.name or "")[:120], "platform": ami.platform, "owner": ami.owner_alias or ami.owner_id, + "public": bool(ami.public), "architecture": ami.architecture}) + return rows + + +def _import_aws(handler, image, region, os_build_name, existing_osb, job): + from resourcehandlers.aws.models import AmazonMachineImage, AwsCachedAMI + + cache = AwsCachedAMI.objects.for_resource_handler(resource_handler=handler).filter(ami_regions__name__in=[region]).distinct() + cached_total = cache.count() + if not image: + raise Choices(_aws_rows(cache.order_by("name")), "{} cached AMI(s) in {}{}.".format( + cached_total, region, + "" if cached_total else "; the cache is empty, run onb_sync_images for this handler or pass an AMI id")) if image.lower().startswith("ami-"): - discovered, not_in_cb, _only = handler.discover_templates(region, ami_ids=[image]) + ami_id = image + if not cache.filter(ami_id=ami_id).exists(): + _progress(job, "Fetching {} from AWS into the cache".format(ami_id)) + handler.get_all_templates(image_ids=[ami_id], regions=[region], force_refresh=True, use_whitelist=False) else: - discovered = handler.get_ami_dicts_for_region_by_names([image], region) - not_in_cb = discovered - discovered = list(discovered or []) - if not discovered: - return None, "AWS returned no image for '{}' in {}. Pass the AMI id (ami-...) or the exact AMI name.".format(image, region) - image_dict = dict(discovered[0]) - ami_id = image_dict.get("ami_id") or image + matches = cache.filter(name__icontains=image).order_by("name") + count = matches.count() + if count != 1: + raise Choices(_aws_rows(matches), "{} cached AMI(s) in {} match '{}'{}.".format( + count, region, image, + "; pass the AMI id of the one to import" if count else + "; the cache may be empty (run onb_sync_images) or the name differs; pass the AMI id")) + ami_id = matches.first().ami_id + if not os_build_name: + raise Choices(_aws_rows(cache.filter(ami_id=ami_id)), "One AMI matches ({}); pass onb_os_build_name to import it.".format(ami_id)) already = AmazonMachineImage.objects.filter(resourcehandler=handler, ami_id=ami_id, region=region).order_by("-id").first() if already is not None and already.os_build is not None: return already.os_build, None + # An AMI stored by an earlier run of this tool has no region, so the environment's lookup + # (AWSHandler.get_osba_for_osb_and_region) cannot see it. Give it the region and reuse it. + stale = AmazonMachineImage.objects.filter(resourcehandler=handler, ami_id=ami_id, region="").order_by("-id").first() + if stale is not None and stale.os_build is not None: + AmazonMachineImage.objects.filter(pk=stale.pk).update(region=region) + _progress(job, "Set region {} on the image {} imported earlier without one".format(region, ami_id)) + return stale.os_build, None + discovered, _not_in_cb, _only = handler.discover_templates(region, ami_ids=[ami_id]) + discovered = list(discovered or []) + if not discovered: + return None, "AWS returned no image for {} in {}; check the id and that the credentials may describe it.".format(ami_id, region) + image_dict = dict(discovered[0]) image_dict.setdefault("region", region) _add_template(handler, image_dict, os_build_name, existing_osb) osba = AmazonMachineImage.objects.filter(resourcehandler=handler, ami_id=ami_id).order_by("-id").first() if osba is None or osba.os_build is None: return None, "The image was imported but no OS build attribute for {} was found afterwards.".format(ami_id) + # AWSHandler.add_template_attrs creates the record without its region; CloudBolt's own + # import (resourcehandlers/aws/services.py) fills it afterwards from the image dict. The + # region is what an environment uses to find the image, so set it here the same way. + fields = {"region": region} + if isinstance(image_dict.get("description"), str) and image_dict["description"]: + fields["description"] = image_dict["description"] + if isinstance(image_dict.get("owner_alias"), str) and image_dict["owner_alias"]: + fields["owner_alias"] = image_dict["owner_alias"][:100] + AmazonMachineImage.objects.filter(pk=osba.pk).update(**fields) return osba.os_build, None +# --- Azure ----------------------------------------------------------------- + +def _azure_urn(d): + return ":".join(str(d.get(k) or "") for k in ("publisher", "offer", "sku", "version")) + + +def _azure_rows(items): + return [{"templateName": d.get("template_name") or d.get("name"), "urn": _azure_urn(d), "os": d.get("os_type") or d.get("guest_os")} for d in items[:MAX_LIST]] + + def _azure_match(d, image): wanted = image.lower() - urn = ":".join(str(d.get(k) or "") for k in ("publisher", "offer", "sku", "version")).lower() + urn = _azure_urn(d).lower() for key in ("template_name", "name", "azure_image_name", "label", "image_id"): if str(d.get(key) or "").lower() == wanted: - return True - return urn == wanted or urn.rsplit(":", 1)[0] == wanted + return "exact" + if urn == wanted or urn.rsplit(":", 1)[0] == wanted: + return "exact" + if wanted in urn or any(wanted in str(d.get(k) or "").lower() for k in ("template_name", "name", "azure_image_name")): + return "partial" + return None def _import_azure(handler, image, location, os_build_name, existing_osb, job): - from c2_wrapper import guess_os_family from resourcehandlers.azure_arm.models import AzureARMImage - _progress(job, "Looking up image {} in {}".format(image, location)) - available, unimported, _only = handler.discover_templates(locations=[location]) + available, _unimported, _only = handler.discover_templates(locations=[location]) available = list(available or []) if not available: - return None, ( - "No Azure images are cached for location {}. Run Sync Images on the handler page (or wait for the " - "images sync job), then retry.".format(location) - ) - match = next((d for d in available if _azure_match(d, image)), None) - if match is None: - sample = ", ".join(str(d.get("template_name") or d.get("name")) for d in available[:15]) - return None, "No image '{}' in {}. Pass the template name or publisher:offer:sku[:version]. Some available: {}.".format( - image, location, sample - ) + _progress(job, "No cached Azure images for {}; fetching them without the whitelist".format(location)) + handler.update_cached_images([location], use_whitelist=False) + available, _unimported, _only = handler.discover_templates(locations=[location]) + available = list(available or []) + if not image: + raise Choices(_azure_rows(sorted(available, key=lambda d: str(d.get("template_name") or ""))), + "{} cached image(s) in {}.".format(len(available), location)) + exact = [d for d in available if _azure_match(d, image) == "exact"] + partial = [d for d in available if _azure_match(d, image) == "partial"] + candidates = exact or partial + if len(candidates) != 1: + raise Choices(_azure_rows(candidates), "{} image(s) in {} match '{}'; pass the template name or publisher:offer:sku:version.".format( + len(candidates), location, image)) + match = candidates[0] template_name = match.get("template_name") or match.get("name") + if not os_build_name: + raise Choices(_azure_rows([match]), "One image matches ({}); pass onb_os_build_name to import it.".format(template_name)) already = AzureARMImage.objects.filter(resourcehandler=handler, template_name=template_name, region=location).order_by("-id").first() if already is not None and already.os_build is not None: return already.os_build, None + if existing_osb is not None: + conflicts = _conflicting_osbas(handler, existing_osb, {"name": template_name, "region": location}) + if conflicts: + if not _STATE["replace"]: + raise NeedsReplace(existing_osb, conflicts) + for attr in conflicts: + _STATE["removed"].append(_describe_osba(attr)) + handler.delete_osbuild_attribute(attr) + from c2_wrapper import guess_os_family + d = dict(match) d.pop("template_name", None) d.pop("name", None) d.pop("_state", None) - family = guess_os_family(dict(match)) - osba = handler.add_template( - template_name, - os_build_name=os_build_name, - os_family=family, - os_build=existing_osb, - region=location, - **d, - ) + osba = handler.add_template(template_name, os_build_name=os_build_name, os_family=guess_os_family(dict(match)), + os_build=existing_osb, region=location, **d) if osba is None or getattr(osba, "os_build", None) is None: osba = AzureARMImage.objects.filter(resourcehandler=handler, template_name=template_name, region=location).order_by("-id").first() if osba is None or osba.os_build is None: @@ -233,21 +390,32 @@ def _import_azure(handler, image, location, os_build_name, existing_osb, job): return osba.os_build, None +# --- vCenter --------------------------------------------------------------- + +def _vmware_rows(items): + return [{"name": d.get("name"), "guestOs": d.get("guest_os"), "type": d.get("type")} for d in items[:MAX_LIST]] + + def _import_vmware(handler, image, os_build_name, existing_osb, job): from resourcehandlers.vmware.models import VsphereOSBuildAttribute - _progress(job, "Looking up template {}".format(image)) - discovered, not_in_cb, _only = handler.discover_templates() + discovered, _not_in_cb, _only = handler.discover_templates() discovered = list(discovered or []) if not discovered: - return None, ( - "No vCenter templates are cached yet. Run the recurring job 'Fetch and Cache available VMWare template' " - "(Admin > Recurring Jobs) and retry." - ) - match = next((d for d in discovered if str(d.get("name") or "").lower() == image.lower()), None) - if match is None: - sample = ", ".join(str(d.get("name")) for d in discovered[:20]) - return None, "No template named '{}'. Some available: {}.".format(image, sample) + _progress(job, "No cached vCenter templates; fetching them without the whitelist") + handler.update_cached_images(use_whitelist=False) + discovered, _not_in_cb, _only = handler.discover_templates() + discovered = list(discovered or []) + if not image: + raise Choices(_vmware_rows(sorted(discovered, key=lambda d: str(d.get("name") or ""))), "{} cached template(s).".format(len(discovered))) + exact = [d for d in discovered if str(d.get("name") or "").lower() == image.lower()] + partial = [d for d in discovered if image.lower() in str(d.get("name") or "").lower()] + candidates = exact or partial + if len(candidates) != 1: + raise Choices(_vmware_rows(candidates), "{} template(s) match '{}'; pass the exact name.".format(len(candidates), image)) + match = candidates[0] + if not os_build_name: + raise Choices(_vmware_rows([match]), "One template matches ({}); pass onb_os_build_name to import it.".format(match["name"])) already = VsphereOSBuildAttribute.objects.filter(resourcehandler=handler, template_name=match["name"]).order_by("-id").first() if already is not None and already.os_build is not None: return already.os_build, None @@ -258,24 +426,214 @@ def _import_vmware(handler, image, os_build_name, existing_osb, job): return osba.os_build, None +# --- other technologies ---------------------------------------------------- + def _import_generic(handler, image, os_build_name, existing_osb, job): - _progress(job, "Looking up image {}".format(image)) - discovered, not_in_cb, _only = handler.discover_templates() - discovered = list(discovered or []) - match = next( - (d for d in discovered if isinstance(d, dict) and str(d.get("name") or d.get("value") or "").lower() == image.lower()), - None, - ) - if match is None: - sample = ", ".join(str(d.get("name")) for d in discovered[:20] if isinstance(d, dict)) - return None, "No image named '{}'. Some available: {}.".format(image, sample or "none discovered") - _add_template(handler, match, os_build_name, existing_osb) - osba = handler.os_build_attributes.filter(template_name=match.get("name")).order_by("-id").first() + discovered, _not_in_cb, _only = handler.discover_templates() + discovered = [d for d in (discovered or []) if isinstance(d, dict)] + if not image: + raise Choices([{"name": d.get("name") or d.get("value")} for d in discovered[:MAX_LIST]], "{} image(s) discovered.".format(len(discovered))) + candidates = [d for d in discovered if str(d.get("name") or d.get("value") or "").lower() == image.lower()] + if len(candidates) != 1: + raise Choices([{"name": d.get("name") or d.get("value")} for d in discovered[:MAX_LIST]], "{} image(s) match '{}'.".format(len(candidates), image)) + if not os_build_name: + raise Choices([{"name": candidates[0].get("name") or candidates[0].get("value")}], "One image matches; pass onb_os_build_name to import it.") + _add_template(handler, candidates[0], os_build_name, existing_osb) + osba = handler.os_build_attributes.filter(template_name=candidates[0].get("name")).order_by("-id").first() if osba is None or osba.os_build is None: return None, "The image was imported but no OS build attribute was found afterwards." return osba.os_build, None +# --- guest credentials ----------------------------------------------------- +# CloudBolt copies every parameter value of the image (username, password, key_name) onto a +# server it builds from it (_assign_nonunique_server_info in jobengine/jobmodules/provisionjob.py), +# and Server.get_credentials reads them back (ResourceHandler.get_server_credentials). + +def _family_names(osb): + names = [] + family = getattr(osb, "os_family", None) + while family is not None and len(names) < 5: + names.append(family.name) + family = getattr(family, "parent", None) + return names + + +def _default_username(osb): + """The user CloudBolt signs in as when the image has none (ResourceHandler.get_server_credentials).""" + if osb.is_windows(): + return "Administrator" + if osb.os_family is not None and osb.os_family.name == "Ubuntu": + return "ubuntu" + return "root" + + +def _suggested_username(osb, slug): + if osb.is_windows(): + return "Administrator", "the Windows built-in administrator" + families = _family_names(osb) + if slug.startswith("aws"): + for name in families: + if name in AWS_USERNAMES: + return AWS_USERNAMES[name], "AWS's default user for {} AMIs".format(name) + return "ec2-user", "the default user of most AWS Linux AMIs; check with the AMI provider" + if "Ubuntu" in families: + return "ubuntu", "the default user of Ubuntu images" + return "root", "CloudBolt's default user for Linux" + + +def _images_tab(handler): + """The handler page's images tab slug, and the noun its credentials icons use in their titles. + + resourcehandlers/aws/views.py names the tab amis; vmware/views.py (and proxmox) use the + title-cased plural of template_label; every other handler uses images + (ResourceHandler.get_templates_tab_as_tuple). The noun is what each tab-templates.html passes + to the template_credentials tag. + """ + from django.template.defaultfilters import title + + module = handler.type_slug + noun = getattr(handler, "template_label", None) or "image" + if module == "aws": + return "amis", "AMI" + if module in ("vmware", "proxmox"): + return title("{}s".format(noun)), noun + if module == "azure_arm": + return "images", "image" + return "images", noun + + +def _has_new_password(env): + return (env.custom_fields.filter(name="new_password").exists() + or env.custom_field_options.filter(field__name="new_password").exists()) + + +def _credentials_entry(handler, slug, osb, osba, envs, base): + """Which guest credentials one image holds (booleans, never values) and how to set the missing ones.""" + try: + creds = osba.get_credentials() + except Exception: + creds = {} + has_user = bool(creds.get("username")) + has_password = bool(creds.get("password")) + has_key = bool(creds.get("keyfile")) + windows = osb.is_windows() + tab, noun = _images_tab(handler) + image = {"id": osba.global_id, "name": osba.template_name or str(osba)} + for key, field in (("amiId", "ami_id"), ("region", "region")): + value = getattr(osba, field, None) + if value: + image[key] = value + if has_user or has_password or has_key: + click = "the pencil (Edit credentials for {}) in the Credentials column of the image's row".format(noun) + else: + click = "the + (Add credentials to {}) next to None configured in the Credentials column of the image's row".format(noun) + suggested, basis = _suggested_username(osb, slug) + default = _default_username(osb) + entry = { + "osBuild": {"id": osb.global_id, "name": osb.name}, + "environments": [{"id": env.global_id, "name": env.name} for env in envs], + "image": image, + "username": has_user, + } + if slug.startswith("aws"): + missing = ["username"] if not has_user and suggested != default else [] + entry.update({ + "missing": missing, + "imagesUrl": base + "/admin/resourcehandlers/{}/#tab-{}".format(handler.id, tab), + "click": click, + "values": {"Username": suggested, "suggestion": "Suggested: {}. Confirm it against the AMI.".format(basis)}, + "steps": "Click {}, type the username in Username, leave Password and Key name empty, then Save.".format(click), + "why": ( + "Without it CloudBolt signs in to servers from this AMI as {}, which AWS images refuse, so remote scripts fail.".format(default) + if missing else + "CloudBolt signs in to servers from this AMI as the username set on it." + if has_user else + "CloudBolt signs in as {} when the image names no user, which suits this AMI.".format(default) + ), + "keyPair": "AWS servers sign in with the key pair, not a password; its private key is checked by onb_trim_environment (keyMaterial) and onb_status (sshKeys).", + }) + return entry + entry["password"] = has_password + if not windows: + entry["key"] = has_key + values = {"Username": suggested, "suggestion": "Suggested: {}. Use the account the image actually has.".format(basis)} + steps = ("Click {}, type the image's Username and Password (the password goes in the dialog, never in chat), " + "then Save.".format(click)) + if slug == "azure_arm": + missing = [] + values = {} + steps = "Nothing to set: the order form supplies the password (password_arm)." + why = ("Azure sets the admin account at build: the password comes from the order form's password_arm, " + "and the username from this image unless it is empty, root, admin or Administrator, when CloudBolt " + "uses the server owner's username.") + elif slug == "vmware" and windows: + without = [env.name for env in envs if not _has_new_password(env)] + missing = [] if has_password or not without else ["password"] + why = ("vCenter's Windows customization sets the Administrator password to new_password when the order " + "carries one and otherwise falls back to the server's password, which CloudBolt copies from this " + "template, and in-guest scripts then sign in with it; with neither, the build fails with \"No password " + "parameter set\".") + entry["newPassword"] = { + "setOn": [env.name for env in envs if env.name not in without], + "notSetOn": without, + "remedy": NEW_PASSWORD_REMEDY, + "note": ("The template password should be enough on its own, but that is not yet confirmed on an " + "appliance; new_password on the environment is the sure remedy."), + } + elif slug == "vmware": + missing = [] if has_password else ["password"] + why = ("vCenter runs in-guest scripts through VMware Tools as the server's username and password, which " + "CloudBolt copies from this template; without a password every script fails with \"Cannot run script, " + "server's password is unknown\".") + else: + missing = [] if has_password or (has_key and not windows) else ["password"] + why = ("Remote scripts sign in with the server's username and password or key, which CloudBolt copies from " + "this image at build.") + entry.update({ + "missing": missing, + "imagesUrl": base + "/admin/resourcehandlers/{}/#tab-{}".format(handler.id, tab), + "click": click, + "values": values, + "steps": steps, + "why": why, + }) + if not has_user and missing: + entry["defaultUsername"] = default + return entry + + +def _image_credentials(handler, slug, osb, resolved, base): + """One entry per image the target environments resolve, in environment order.""" + entries = [] + for osba, envs in resolved.values(): + try: + entries.append(_credentials_entry(handler, slug, osb, osba, envs, base)) + except Exception as exc: + entries.append({"image": {"id": getattr(osba, "global_id", None)}, "error": "{}: {}".format(type(exc).__name__, str(exc)[:300])}) + return entries + + +def _credentials_next(entries): + """The credentials step for next, or an empty string when nothing is missing.""" + missing = [e for e in entries if e.get("missing")] + text = "" + if missing: + text = ( + "Before the first order, have the admin set the guest credentials of {} on the handler's images tab: " + "open credentials[].imagesUrl, click credentials[].click, type credentials[].values (suggestions) and the " + "password in the dialog, never in chat. ".format(", ".join("'{}'".format(e["image"]["name"]) for e in missing)) + ) + for entry in entries: + without = (entry.get("newPassword") or {}).get("notSetOn") or [] + if without: + text += ( + "For the Windows template '{}', the sure way past \"No password parameter set\" is new_password on {}: " + "{}. ".format(entry["image"]["name"], ", ".join(without), NEW_PASSWORD_REMEDY) + ) + return text + + def run(job, *args, **kwargs): profile = _caller(job, kwargs) if profile is None: @@ -284,9 +642,8 @@ def run(job, *args, **kwargs): return _failure("Only CloudBolt admins may import OS builds.") inputs = _read_inputs() - for key in ("handler", "image", "os_build_name"): - if not inputs[key]: - return _failure("onb_{} is required.".format(key)) + if not inputs["handler"]: + return _failure("onb_handler is required.") handler, error = _resolve_handler(inputs["handler"]) if error: return _failure(error) @@ -302,10 +659,12 @@ def run(job, *args, **kwargs): location = inputs["region"] or _location_of(envs, slug) if slug in LOCATION_FIELD and not location: return _failure("Pass onb_region: the region or location of the image (none could be read from the environments).") - existing_osb = _existing_os_build(inputs["os_build_name"]) + existing_osb = _existing_os_build(inputs["os_build_name"]) if inputs["os_build_name"] else None from externalcontent.models import OSBuild osb_ids_before = set(OSBuild.objects.values_list("id", flat=True)) + _STATE["replace"] = inputs["replace_existing"] + _STATE["removed"] = [] try: if slug.startswith("aws"): @@ -316,16 +675,69 @@ def run(job, *args, **kwargs): osb, error = _import_vmware(handler, inputs["image"], inputs["os_build_name"], existing_osb, job) else: osb, error = _import_generic(handler, inputs["image"], inputs["os_build_name"], existing_osb, job) + except NeedsReplace as conflict: + existing = [_describe_osba(attr) for attr in conflict.attrs] + outputs = { + "handler": {"id": handler.global_id, "name": handler.name, "technologySlug": slug}, + "image": inputs["image"], + "location": location, + "confirmationRequired": True, + "osBuild": {"id": conflict.osb.global_id, "name": conflict.osb.name}, + "existingImages": existing, + "next": ( + "Nothing changed. CloudBolt allows one image per OS build per handler{}. Ask the user whether to replace " + "{} with '{}' in '{}'. Yes: call again with onb_replace_existing=true, which removes the existing image " + "first. No: use another onb_os_build_name.".format( + " in each region" if slug.startswith("aws") or slug == "azure_arm" else "", + ", ".join("'{}'".format(row["template"]) for row in existing), + inputs["image"], conflict.osb.name, + ) + ), + } + return _success( + "Confirmation needed: OS build '{}' already holds {} on {}.".format( + conflict.osb.name, ", ".join("'{}'".format(row["template"]) for row in existing), handler.name), + outputs, + ) + except Choices as choices: + outputs = { + "handler": {"id": handler.global_id, "name": handler.name, "technologySlug": slug}, + "location": location, + "filter": inputs["image"] or None, + "images": choices.rows, + "note": choices.note, + "next": "Call again with onb_image set to one AMI id, template name or publisher:offer:sku:version from the list, and onb_os_build_name.", + } + if inputs["image"] and inputs["os_build_name"]: + return {"status": "FAILURE", "output_message": "", "error_message": choices.note, "outputs": outputs} + return _success(choices.note, outputs) except Exception as exc: return _failure("Importing '{}' on {} failed: {}: {}".format(inputs["image"], handler.name, type(exc).__name__, str(exc)[:600])) if error: return _failure(error) attached = [] + unresolved = [] + images = {} # OSBA id -> (OSBA, environments that resolve it) for env in envs: if not osb.environments.filter(id=env.id).exists(): osb.environments.add(env) attached.append({"id": env.global_id, "name": env.name}) + try: + resolved = osb.osba_for_resource_handler(handler, environment=env) + except Exception as exc: + resolved = None + unresolved.append("{}: {}".format(env.name, str(exc)[:300])) + else: + if resolved is None: + unresolved.append("{}: no image of OS build '{}' for this environment".format(env.name, osb.name)) + else: + try: + resolved = resolved.cast() + except Exception: + pass + images.setdefault(resolved.id, (resolved, []))[1].append(env) + credentials = _image_credentials(handler, slug, osb, images, base) outputs = { "handler": {"id": handler.global_id, "name": handler.name, "technologySlug": slug}, @@ -340,7 +752,8 @@ def run(job, *args, **kwargs): "url": base + "/externalcontent/osbuilds/{}/".format(osb.id), }, "attachedToEnvironments": attached, - "next": ( + "credentials": credentials, + "next": _credentials_next(credentials) + ( "For a second cloud, call this tool again with the same onb_os_build_name and that handler's image so one " "blueprint deploys to both. Then onb_trim_environment on each environment." ), @@ -356,4 +769,21 @@ def run(job, *args, **kwargs): ) if notes: outputs["notes"] = notes - return _success("OS build '{}' holds {} and is attached to {} environment(s).".format(osb.name, inputs["image"], len(attached)), outputs) + if _STATE["removed"]: + outputs["replacedImages"] = list(_STATE["removed"]) + outputs["verified"] = not unresolved + if unresolved: + outputs["unresolved"] = unresolved + message = ( + "OS build '{}' is attached, but CloudBolt cannot resolve its image for {} environment(s), so an order there " + "would fail: {}. Run this tool again for the image (it repairs an image stored without a region), or check " + "the image's region against the environment's.".format(osb.name, len(unresolved), "; ".join(unresolved)) + ) + return {"status": "FAILURE", "output_message": "", "error_message": message, "outputs": outputs} + lacking = [e for e in credentials if e.get("missing")] + return _success( + "OS build '{}' holds {} and is attached to {} environment(s); verified that each environment resolves the image.{}".format( + osb.name, inputs["image"], len(attached), + " {} image(s) lack guest credentials; see credentials.".format(len(lacking)) if lacking else ""), + outputs, + ) diff --git a/plugins/OHK-kst5rkhi/OHK-kst5rkhi_metadata.json b/plugins/OHK-kst5rkhi/OHK-kst5rkhi_metadata.json new file mode 100644 index 00000000..1db2fbe7 --- /dev/null +++ b/plugins/OHK-kst5rkhi/OHK-kst5rkhi_metadata.json @@ -0,0 +1,75 @@ +{ + "action_inputs": [ + { + "allow_multiple": false, + "available_all_servers": false, + "description": "blueprints, server-actions, resource-actions, orchestration-actions, rules, recurring-jobs, ui-extension-packages or cb-applets.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-jaxai79k", + "label": "Collection", + "name": "onb_cl_collection", + "placeholder": "server-actions", + "relevant_osfamilies": [], + "required": true, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "Display name or id of the item to install; empty returns the collection's items.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-rbunxfpb", + "label": "Item name or id (empty lists the collection)", + "name": "onb_cl_item", + "placeholder": "Resize Instance", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "true refreshes an item that already exists on the appliance.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-m9dqp260", + "label": "Replace existing (true/false, default false)", + "name": "onb_cl_replace", + "placeholder": "false", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + } + ], + "action_inputs_sequence": [ + "onb_cl_collection", + "onb_cl_item", + "onb_cl_replace" + ], + "description": "Lists a Content Library collection or downloads one item from content.cloudbolt.app and imports it the way the library page does, for UI extensions, recurring jobs, server and resource actions, rules and blueprints.", + "id": "OHK-kst5rkhi", + "max_retries": 0, + "name": "Onboarding: Install Content Library Item", + "resource_technologies": [], + "script_filename": "OHK-kst5rkhi_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-kst5rkhi/OHK-kst5rkhi_script.py b/plugins/OHK-kst5rkhi/OHK-kst5rkhi_script.py new file mode 100644 index 00000000..90d93b66 --- /dev/null +++ b/plugins/OHK-kst5rkhi/OHK-kst5rkhi_script.py @@ -0,0 +1,200 @@ +""" +Onboarding: Install Content Library Item (MCP Tool Action plugin). + +Downloads an item from CloudBolt's Content Library (content.cloudbolt.app) +and imports it, the way the library page does, so the POC can add the +Jupyter Notebook UI extension, the tmp cleanup recurring job, the Resize +Instance server action or any other item without clicking +through the UI. With onb_cl_item empty it lists the collection's items. +Runs as a job because it downloads from the internet. Admin only. + +Every declared input is read from its rendered template token in +_read_inputs(); keep each one referenced that way or CloudBolt's token scan +deletes the input when the script is saved. +""" +import html + +COLLECTIONS = { + "blueprints": ("servicecatalog.api.v3.serializers", "ServiceBlueprintSerializer"), + "server-actions": ("cbhooks.api.v3.serializers", "ServerActionSerializer"), + "resource-actions": ("cbhooks.api.v3.serializers", "ResourceActionSerializer"), + "orchestration-actions": ("cbhooks.api.v3.serializers", "OrchestrationActionSerializer"), + "rules": ("cbhooks.api.v3.serializers", "TriggerPointSerializer"), + "recurring-jobs": ("jobs.api.v3.serializers", "RecurringJobSerializer"), + "ui-extension-packages": ("extensions.api.v3.serializers", "UIExtensionSerializer"), + "cb-applets": ("extensions.api.v3.serializers", "CbAppletSerializer"), +} +MAX_LIST = 300 + + +def _text(value): + return html.unescape(value or "").strip() + + +def _bool(value, default): + text = _text(value).lower() + if not text: + return default + return text in ("true", "1", "yes", "y", "on") + + +def _failure(message): + return {"status": "FAILURE", "output_message": "", "error_message": message, "outputs": {"error": message}} + + +def _success(message, outputs): + return {"status": "SUCCESS", "output_message": message, "error_message": "", "outputs": outputs} + + +def _caller(job, kwargs): + profile = kwargs.get("profile") + if profile is None and job is not None: + profile = job.owner + return profile + + +def _portal_url(): + try: + from portals.models import PortalConfig + + portal = PortalConfig.get_current_portal() + url = portal.site_url if portal else None + except Exception: + url = None + return (url or "").rstrip("/") + + +def _progress(job, message): + if job is None: + return + try: + from common.methods import set_progress + + set_progress(message) + except Exception: + pass + + +def _read_inputs(): + raw = { + "onb_cl_collection": """{{ onb_cl_collection }}""", + "onb_cl_item": """{{ onb_cl_item }}""", + "onb_cl_replace": """{{ onb_cl_replace }}""", + } + return { + "collection": _text(raw["onb_cl_collection"]).lower().replace("_", "-"), + "item": _text(raw["onb_cl_item"]), + "replace": _bool(raw["onb_cl_replace"], False), + } + + +def _item_name(item): + return item.get("display-name") or item.get("name") or item.get("label") or item.get("base_action_name") or item.get("id") or "" + + +def _serializer(collection): + import importlib + + module_path, class_name = COLLECTIONS[collection] + module = importlib.import_module(module_path) + cls = getattr(module, class_name) + return cls() + + +def _describe(obj, base): + row = {"model": type(obj).__name__} + for attr in ("global_id", "name", "label"): + value = getattr(obj, attr, None) + if value: + row[attr] = value + try: + row["url"] = base + obj.get_absolute_url() + except Exception: + pass + return row + + +def run(job, *args, **kwargs): + profile = _caller(job, kwargs) + if profile is None: + return _failure("No calling user profile was supplied. Run this tool through the MCP server as an authenticated user.") + if not profile.is_cbadmin: + return _failure("Only CloudBolt admins may install Content Library items.") + + inputs = _read_inputs() + if inputs["collection"] not in COLLECTIONS: + return _failure("onb_cl_collection must be one of: {}.".format(", ".join(COLLECTIONS))) + + try: + from utilities.cb_http import export_resource, get_content_library_connection, get_exportable_content, import_resource_from_download_package + except Exception as exc: + return _failure("This CloudBolt version does not expose the Content Library helpers: {}".format(str(exc)[:200])) + + collection = inputs["collection"] + _progress(job, "Reading the Content Library index for {}".format(collection)) + try: + connection = get_content_library_connection(collection) + except Exception as exc: + return _failure("No Content Library connection: {}".format(str(exc)[:300])) + try: + index = get_exportable_content(connection, collection=collection) + except Exception as exc: + return _failure( + "Could not read the Content Library: {}: {}. The appliance needs outbound HTTPS to content.cloudbolt.app " + "(proxy under Admin > Miscellaneous Settings, inspecting CA under Admin > SSL Certificates).".format(type(exc).__name__, str(exc)[:400]) + ) + items = index.get(collection, []) if isinstance(index, dict) else list(index or []) + items = [i for i in items if isinstance(i, dict)] + base = _portal_url() + + if not inputs["item"]: + rows = [{"name": _item_name(i), "id": i.get("id"), "version": i.get("version"), "description": (i.get("description") or "")[:200]} for i in items[:MAX_LIST]] + rows.sort(key=lambda r: (r["name"] or "").lower()) + return _success( + "{} item(s) in the {} collection.".format(len(rows), collection), + {"collection": collection, "count": len(items), "items": rows, "libraryUrl": base + "/library/", "next": "Call again with onb_cl_item set to one of the names (or ids) to install it."}, + ) + + wanted = inputs["item"].lower() + match = next((i for i in items if _item_name(i).lower() == wanted or str(i.get("id") or "").lower() == wanted), None) + if match is None: + close = [_item_name(i) for i in items if wanted in _item_name(i).lower()][:15] + return _failure("No item named '{}' in the {} collection. {}".format( + inputs["item"], collection, "Close matches: {}.".format(", ".join(close)) if close else "Call with onb_cl_item empty to list the collection.")) + package_url = match.get("package-url") or match.get("package_url") + if not package_url: + return _failure("The index entry for '{}' has no package URL.".format(_item_name(match))) + + _progress(job, "Downloading {} from the Content Library".format(_item_name(match))) + try: + response = export_resource(connection, package_url) + except Exception as exc: + return _failure("Download of '{}' failed: {}: {}".format(_item_name(match), type(exc).__name__, str(exc)[:400])) + _progress(job, "Importing {}".format(_item_name(match))) + try: + serializer = _serializer(collection) + replace = inputs["replace"] or collection in ("ui-extension-packages", "cb-applets") + resource = import_resource_from_download_package(response, serializer, replace_existing=replace) + except Exception as exc: + text = "{}: {}".format(type(exc).__name__, str(exc)[:600]) + hint = "" + if "already exist" in text.lower() or "duplicate" in text.lower(): + hint = " It already exists; pass onb_cl_replace=true to refresh it." + return _failure("Import of '{}' failed: {}.{}".format(_item_name(match), text, hint)) + + imported = _describe(resource, base) if resource is not None else {"note": "The importer returned no object; check the collection's page in the UI."} + outputs = { + "collection": collection, + "item": {"name": _item_name(match), "id": match.get("id"), "version": match.get("version")}, + "imported": imported, + "libraryUrl": base + "/library/", + } + if collection == "ui-extension-packages": + outputs["next"] = "UI extensions add URL routes: restart the web server (systemctl restart httpd) or wait for the next restart before opening it, then follow the extension's documentation cell." + elif collection == "recurring-jobs": + outputs["next"] = "Set the schedule and inputs on the recurring job, then run it once with run_recurring_job." + elif collection in ("server-actions", "resource-actions"): + outputs["next"] = "The action is available on servers (fetch_server_actions); set Requires approval with onb_action_approval if the test calls for it." + elif collection == "rules": + outputs["next"] = "Enable the rule under Actions > Rules and run Execute Rules there (test plan 4.2.3)." + return _success("Installed '{}' from the {} collection.".format(_item_name(match), collection), outputs) diff --git a/plugins/OHK-mgta9oez/OHK-mgta9oez_metadata.json b/plugins/OHK-mgta9oez/OHK-mgta9oez_metadata.json index 403650ec..c702acf5 100644 --- a/plugins/OHK-mgta9oez/OHK-mgta9oez_metadata.json +++ b/plugins/OHK-mgta9oez/OHK-mgta9oez_metadata.json @@ -3,13 +3,13 @@ { "allow_multiple": false, "available_all_servers": false, - "description": "grant (default) adds the permission, revoke removes it, list only reports the blueprint's current permissions.", + "description": "grant (default) adds the permission, revoke removes it, list only reports the blueprint's current permissions; open turns Any group can deploy on, restrict turns it off (with grant_group it also grants that group DEPLOY).", "field_dependency_controlling_set": [], "field_dependency_dependent_set": [], "global_options": [], "hide_if_default_value": true, "id": "CF-gb9r1qil", - "label": "Action: grant (default), revoke, or list", + "label": "Action: grant, revoke, list, open, restrict", "name": "grant_action", "placeholder": "grant", "relevant_osfamilies": [], @@ -41,7 +41,7 @@ { "allow_multiple": false, "available_all_servers": false, - "description": "Group global id (GRP-...) or exact group name. Required for grant and revoke, ignored for list.", + "description": "Group global id (GRP-...) or exact group name. Required for grant and revoke, optional for restrict (granted DEPLOY first), ignored for list and open.", "field_dependency_controlling_set": [], "field_dependency_dependent_set": [], "global_options": [], diff --git a/plugins/OHK-mgta9oez/OHK-mgta9oez_script.py b/plugins/OHK-mgta9oez/OHK-mgta9oez_script.py index 6a911c98..4d20e6ec 100644 --- a/plugins/OHK-mgta9oez/OHK-mgta9oez_script.py +++ b/plugins/OHK-mgta9oez/OHK-mgta9oez_script.py @@ -3,7 +3,11 @@ Lists, grants, or revokes a group's DEPLOY or MANAGE permission on a blueprint, the same ServiceBlueprintGroupPermissions rows the Permissions -tab manages. The content-testing loop uses it around every blueprint sync: +tab manages, and turns the blueprint's Any group can deploy checkbox on +(open) or off (restrict). While it is on, every group may order the +blueprint whatever the DEPLOY rows say; restrict leaves only the groups with +DEPLOY, so it refuses when none would be left (grant_group names one to +grant in the same call). The content-testing loop uses it around every blueprint sync: list before the sync, restore the same groups after it (the importer's add_group_permissions keeps only the groups named in the metadata, repo exports name none, so a sync of a blueprint whose any_group_can_deploy is @@ -21,7 +25,7 @@ from servicecatalog.models import ServiceBlueprint, ServiceBlueprintGroupPermissions PERMISSIONS = ("DEPLOY", "MANAGE") -ACTIONS = ("grant", "revoke", "list") +ACTIONS = ("grant", "revoke", "list", "open", "restrict") def _text(value): @@ -89,6 +93,37 @@ def _state(blueprint): } +def _set_any_group(blueprint, inputs): + """The Any group can deploy checkbox: open turns it on, restrict turns it off.""" + wanted = inputs["action"] == "open" + granted = None + if not wanted and inputs["group"]: + group, error = _find_group(inputs["group"]) + if error: + return _failure(error) + _row, made = ServiceBlueprintGroupPermissions.objects.get_or_create(permission="DEPLOY", group=group, blueprint=blueprint) + granted = {"id": group.global_id, "name": group.name, "changed": made} + if not wanted and not list(blueprint.groups_with_deploy_permission): + return _failure( + "No group has DEPLOY on '{}', so restricting it would leave only admins able to order it. " + "Pass grant_group to grant one in the same call, or grant first.".format(blueprint.name) + ) + changed = bool(blueprint.any_group_can_deploy) != wanted + if changed: + blueprint.any_group_can_deploy = wanted + blueprint.save(update_fields=["any_group_can_deploy"]) + outputs = _state(blueprint) + outputs.update({"action": inputs["action"], "changed": changed}) + if granted: + outputs["granted"] = granted + if wanted: + message = "'{}' is open to every group{}.".format(blueprint.name, "" if changed else " (already)") + else: + message = "'{}' is restricted to: {}{}.".format( + blueprint.name, ", ".join(g["name"] for g in outputs["groupsThatCanDeploy"]), "" if changed else " (already)") + return {"status": "SUCCESS", "output_message": message, "error_message": "", "outputs": outputs} + + def run(job, *args, **kwargs): profile = kwargs.get("profile") if profile is None and job is not None: @@ -103,7 +138,7 @@ def run(job, *args, **kwargs): inputs = _read_inputs() if inputs["action"] not in ACTIONS: - return _failure("grant_action must be grant, revoke, or list; got '{}'.".format(inputs["action"])) + return _failure("grant_action must be grant, revoke, list, open or restrict; got '{}'.".format(inputs["action"])) if not inputs["blueprint"]: return _failure("grant_blueprint is required: a BP-... global id or the exact name.") if inputs["permission"] not in PERMISSIONS: @@ -124,6 +159,9 @@ def run(job, *args, **kwargs): ) return {"status": "SUCCESS", "output_message": message, "error_message": "", "outputs": outputs} + if inputs["action"] in ("open", "restrict"): + return _set_any_group(blueprint, inputs) + if not inputs["group"]: return _failure("grant_group is required for grant and revoke: a GRP-... global id or the exact name.") group, error = _find_group(inputs["group"]) diff --git a/plugins/OHK-ndsuxv0k/OHK-ndsuxv0k_metadata.json b/plugins/OHK-ndsuxv0k/OHK-ndsuxv0k_metadata.json index 117fc1f4..539f76a4 100644 --- a/plugins/OHK-ndsuxv0k/OHK-ndsuxv0k_metadata.json +++ b/plugins/OHK-ndsuxv0k/OHK-ndsuxv0k_metadata.json @@ -11,7 +11,7 @@ "id": "CF-5jkupf06", "label": "Server or resource action (id or label)", "name": "onb_action", - "placeholder": "Resize VM", + "placeholder": "Change Resources", "relevant_osfamilies": [], "required": true, "show_as_attribute": false, @@ -46,7 +46,7 @@ "description": "Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver.", "id": "OHK-ndsuxv0k", "max_retries": 0, - "name": "POC Onboarding: Action Approval", + "name": "Onboarding: Action Approval", "resource_technologies": [], "script_filename": "OHK-ndsuxv0k_script.py", "shared": false, diff --git a/plugins/OHK-ndsuxv0k/OHK-ndsuxv0k_script.py b/plugins/OHK-ndsuxv0k/OHK-ndsuxv0k_script.py index 7ce56d07..f3700914 100644 --- a/plugins/OHK-ndsuxv0k/OHK-ndsuxv0k_script.py +++ b/plugins/OHK-ndsuxv0k/OHK-ndsuxv0k_script.py @@ -1,8 +1,8 @@ """ -POC Onboarding: Action Approval (MCP Tool Action plugin). +Onboarding: Action Approval (MCP Tool Action plugin). Turns "Requires approval" on or off for a server action or resource -action (for example Resize VM), so a day-2 action from a requestor pauses +action (for example Change Resources), so a day-2 action from a requestor pauses as an order for an approver (test plan 2.4.2). The v3 API offers no way to change it, hence this tool. Synchronous. Admin only. @@ -84,7 +84,7 @@ def run(job, *args, **kwargs): inputs = _read_inputs() if not inputs["action"]: - return _failure("onb_action is required: a server or resource action global id (SVA-, RSA-) or its label, for example Resize VM.") + return _failure("onb_action is required: a server or resource action global id (SVA-, RSA-) or its label, for example Change Resources.") if inputs["requires_approval"] not in ("true", "false", "1", "0", "yes", "no", "on", "off", ""): return _failure("onb_requires_approval must be true or false.") wanted = inputs["requires_approval"] in ("true", "1", "yes", "on", "") diff --git a/plugins/OHK-qn4k1pme/OHK-qn4k1pme_metadata.json b/plugins/OHK-qn4k1pme/OHK-qn4k1pme_metadata.json index 3c1afe3c..e103ab7e 100644 --- a/plugins/OHK-qn4k1pme/OHK-qn4k1pme_metadata.json +++ b/plugins/OHK-qn4k1pme/OHK-qn4k1pme_metadata.json @@ -103,10 +103,10 @@ "onb_keep", "onb_remove" ], - "description": "Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size and, where needed, the network and password; the report profile only lists the current form.", + "description": "Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size, the NIC 1 networks chosen with onb_environment_networks and, where needed, the password; the report profile only lists the current form.", "id": "OHK-qn4k1pme", "max_retries": 0, - "name": "POC Onboarding: Trim Environment Order Form", + "name": "Onboarding: Trim Environment Order Form", "resource_technologies": [], "script_filename": "OHK-qn4k1pme_script.py", "shared": false, diff --git a/plugins/OHK-qn4k1pme/OHK-qn4k1pme_script.py b/plugins/OHK-qn4k1pme/OHK-qn4k1pme_script.py index 4be55d6a..a4f1d614 100644 --- a/plugins/OHK-qn4k1pme/OHK-qn4k1pme_script.py +++ b/plugins/OHK-qn4k1pme/OHK-qn4k1pme_script.py @@ -1,15 +1,25 @@ """ -POC Onboarding: Trim Environment Order Form (MCP Tool Action plugin). +Onboarding: Trim Environment Order Form (MCP Tool Action plugin). Shortens an environment's order form to what a POC user needs. CloudBolt hides a required parameter that has exactly one option, so the tool pins infrastructure choices (key pair, security group, resource group, storage type, datastore, disk type) to one value and removes the optional -technology parameters a POC never touches, leaving the size and, where -needed, the network and password visible. Pinned fields are protected from +technology parameters a POC never touches, leaving the size, the NIC 1 +networks chosen with onb_environment_networks and, where needed, the +password visible. Pinned fields are protected from the handler's sync jobs. The report profile only shows the current form. Synchronous. Admin only. +vCenter customization sets a Windows server's Administrator password from +new_password, else from the template's credentials, and fails with neither +(resourcehandlers/vmware/models.py and pyvmomi_wrapper.py +create_os_prep_obj), so on vCenter new_password is never pinned or removed, +and the result says whether the environment gives it a value +(newPasswordSet) and how the admin sets one or the template's credentials. +Password and encrypted values are never returned, and never accepted through +onb_pin. + Every declared input is read from its rendered template token in _read_inputs(); keep each one referenced that way or CloudBolt's token scan deletes the input when the script is saved. @@ -23,6 +33,7 @@ # Per technology: fields the user still sees (constrained to a short list of # sizes when those exist among the options), fields pinned to one value # (preferred values first; an empty list = first existing option), fields +# NIC 1 (sc_nic_0) is never pinned here: onb_environment_networks sets its choices. # removed. TRIM = { "aws": { @@ -33,7 +44,6 @@ "sec_groups": ["default"], "delete_ebs_volumes_on_termination": ["True", "true"], "ebs_volume_type": ["gp3", "gp2"], - "sc_nic_0": [], }, "remove": ["aws_availability_zone", "aws_elastic_ip", "iops", "aws_host", "aws_host_group"], }, @@ -46,7 +56,6 @@ "create_public_ip": ["False", "false"], "availability_set_arm": [], "availability_zone_arm": [], - "sc_nic_0": [], }, "remove": [ "spot_instance_arm", "eviction_type_arm", "eviction_policy_arm", "max_price_arm", @@ -58,7 +67,7 @@ "vmware": { "show": ["cpu_cnt", "mem_size"], "constrain": {"cpu_cnt": ["1", "2", "4"], "mem_size": ["2", "4", "8"]}, - "pin": {"vmware_datastore": [], "vmware_disk_type": ["thin", "Thin"], "sc_nic_0": []}, + "pin": {"vmware_datastore": [], "vmware_disk_type": ["thin", "Thin"]}, "remove": ["vmware_resourcepool", "nsx_scope", "nsx_edge"], }, } @@ -66,6 +75,10 @@ TRIM["aws_china"] = TRIM["aws"] # Fields other fields regenerate their options from; a single option never hides them. NEVER_HIDDEN = {"azure_arm": ["node_size", "availability_set_arm", "azure_authentication_type"]} +# The Windows Administrator password field a technology's customization needs; never pinned or removed. +PASSWORD_FIELDS = {"vmware": "new_password"} +SECRET_TYPES = ("PWD", "ETXT") +MASK = "********" def _text(value): @@ -157,8 +170,6 @@ def _option_label(cfv): def _field_rows(env, handler): """One row per parameter that can appear on this environment's order form.""" - from infrastructure.models import CustomField - special = set(handler.special_fields() or []) tech = set(handler.tech_parameter_fields() or []) base_names = set(getattr(handler, "base_orders_cf_names", []) or []) @@ -169,6 +180,7 @@ def _field_rows(env, handler): for name in sorted(names): cf = env_fields.get(name) or rh_fields.get(name) options = list(env.custom_field_options.filter(field=cf).order_by("id")) + labels = [MASK if cf.type in SECRET_TYPES else _option_label(o) for o in options] rows[name] = { "name": name, "label": cf.label, @@ -179,7 +191,7 @@ def _field_rows(env, handler): "technologyParameter": name in tech, "special": name in special, "baseOrderField": name in base_names, - "options": [_option_label(o) for o in options][:25], + "options": labels[:25], "optionCount": len(options), "_cf": cf, "_cfvs": options, @@ -225,6 +237,53 @@ def _choose(row, preferred, wanted): return None, "no options to pin" +def _shown(row, choice): + """The value to report for a pinned choice; password and encrypted values are masked.""" + if row["type"] in SECRET_TYPES: + return MASK + return _option_label(choice) if hasattr(choice, "value") else str(choice) + + +def _password_status(env, handler, rows, field, slug, base): + """Whether the environment gives the password field a value; the value itself is never read out.""" + row = rows.get(field) + is_set = bool(row and row["onEnvironment"] and row["optionCount"]) + entry = {"field": field, "action": "kept", "newPasswordSet": is_set, + "hiddenOnOrderForm": bool(row and _hidden(row, slug))} + if is_set: + return is_set, entry, None + if row is None or not row["onEnvironment"]: + entry.update(action="missing", reason="the environment does not offer {}".format(field)) + steps = ( + "Attach it with onb_parameter: onb_param_name={0}, onb_param_targets={1}, no onb_param_options; or have " + "the admin click Add on the environment's Parameters tab and pick New Password. Then the admin opens " + "parametersUrl, clicks the pencil in New Password's Options column, enters the value and clicks Save. " + "One value hides the field on the order form." + ).format(field, env.global_id) + else: + entry["reason"] = "the environment offers {} with no value, so the order form asks for it".format(field) + steps = ( + "The admin opens parametersUrl, clicks the pencil in New Password's Options column, enters the value and " + "clicks Save. One value hides the field on the order form; until then the form asks for it and MCP " + "orders must pass new_password." + ) + block = { + "onEnvironment": bool(row and row["onEnvironment"]), + "parametersUrl": base + "/environments/{}/#tab-parameters".format(env.id), + "steps": steps, + "whatToEnter": "The Windows template's Administrator password, unless the customer wants it changed at build. " + "The admin types it in CloudBolt; never ask for it in chat.", + "why": "vCenter customization sets a Windows server's Administrator password from new_password, else from " + "the password in the Windows template's credentials, and fails with 'No password parameter set' when " + "the server has neither. On Linux templates that have credentials, CloudBolt also changes the login " + "password to new_password at build.", + "alternative": "Credentials on the Windows template are enough on their own: onb_ui_link handler_images:{} " + "(the handler's Templates tab), + (Add credentials to template) or the pencil in the " + "Credentials column.".format(handler.global_id), + } + return is_set, entry, block + + def _protect(env, names): data = env.modified_parameters or {} current = list(data.get("tech_specific_parameters", []) or []) @@ -239,6 +298,23 @@ def _protect(env, names): env.save() +def _ssh_keys(env): + """Key pairs the environment offers and whether CloudBolt holds each one's private key (the handler's SSH Keys tab).""" + from common.methods import find_key_material + + handler = env.resource_handler.cast() if env.resource_handler else None + field = getattr(handler, "ssh_keyname_field_name", None) if handler else None + if not field: + return [] + names = env.custom_field_options.filter(field__name=field).values_list("str_value", flat=True).distinct() + rows = [] + for name in list(names)[:10]: + if name: + have, _material = find_key_material(name, handler) # the material itself is never returned + rows.append({"name": name, "materialUploaded": bool(have)}) + return rows + + def run(job, *args, **kwargs): profile = _caller(job, kwargs) if profile is None: @@ -274,17 +350,29 @@ def run(job, *args, **kwargs): outputs["note"] = "On {} the fields {} drive other fields' options and stay visible however many options they have.".format( slug, ", ".join(NEVER_HIDDEN[slug]) ) + password_field = PASSWORD_FIELDS.get(slug) if inputs["profile"] == "report": visible = [r["name"] for r in before if not r["hiddenOnOrderForm"]] + if password_field: + password_set, _entry, password_block = _password_status(env, handler, rows, password_field, slug, base) + outputs["newPasswordSet"] = password_set + if password_block: + outputs["newPassword"] = password_block return _success("{}: {} parameter(s) visible on the order form.".format(env.name, len(visible)), dict(outputs, visibleNow=visible)) table = TRIM.get(slug, {"show": [], "constrain": {}, "pin": {}, "remove": []}) - keep = set(inputs["keep"]) | set(table["show"]) + keep = set(inputs["keep"]) | set(table["show"]) | ({password_field} if password_field else set()) constrain_plan = dict(table.get("constrain", {})) pin_plan = {name: prefs for name, prefs in table["pin"].items() if name not in keep} user_pins = {} + actions = [] for name, values in inputs["pins"].items(): + if name in rows and rows[name]["type"] in SECRET_TYPES: + # A password passed here would have come through chat; the admin types it in the UI instead. + actions.append({"field": name, "action": "left", + "reason": "a password is entered by the admin on the environment's Parameters tab, never through onb_pin"}) + continue if len(values) > 1: constrain_plan[name] = values pin_plan.pop(name, None) @@ -292,8 +380,10 @@ def run(job, *args, **kwargs): pin_plan[name] = pin_plan.get(name, []) user_pins[name] = values[0] if values else "" remove_plan = [n for n in list(table["remove"]) + inputs["remove"] if n not in keep and n not in pin_plan] + if password_field and password_field in inputs["remove"]: + actions.append({"field": password_field, "action": "left", + "reason": "kept: customization needs it for every Windows server on this technology"}) - actions = [] protected = [] for name, wanted_values in constrain_plan.items(): row = rows.get(name) @@ -303,7 +393,7 @@ def run(job, *args, **kwargs): chosen = [c for c, label in zip(row["_cfvs"], labels) if label in wanted_values] if len(chosen) < 2 or len(chosen) == len(row["_cfvs"]): if name in inputs["pins"]: - actions.append({"field": name, "action": "left", "reason": "fewer than two of the requested values exist among the options {}".format(labels[:15])}) + actions.append({"field": name, "action": "left", "reason": "fewer than two of the requested values exist among the options {}".format(row["options"][:15])}) continue chosen.sort(key=lambda c: wanted_values.index(_option_label(c))) env.replace_cf_options(name, chosen) @@ -324,7 +414,7 @@ def run(job, *args, **kwargs): continue env.replace_cf_options(name, [choice]) protected.append(name) - actions.append({"field": name, "action": "pinned", "value": _option_label(choice) if hasattr(choice, "value") else str(choice), + actions.append({"field": name, "action": "pinned", "value": _shown(row, choice), "reason": "handler-level field; pinned instead of removed"}) continue env.clear_cfv(name) @@ -350,8 +440,7 @@ def run(job, *args, **kwargs): continue env.replace_cf_options(name, [choice]) protected.append(name) - label = _option_label(choice) if hasattr(choice, "value") else str(choice) - entry = {"field": name, "action": "pinned", "value": label} + entry = {"field": name, "action": "pinned", "value": _shown(row, choice)} if not (row["required"] or row["type"] == "BOOL") and name not in NEVER_HIDDEN.get(slug, []): entry["note"] = "optional field: a single option still shows with a blank choice; remove it with onb_remove if it should disappear" actions.append(entry) @@ -362,9 +451,30 @@ def run(job, *args, **kwargs): after_rows = _field_rows(env, handler) after = [_public(r, slug) for r in after_rows.values()] visible = [r["name"] for r in after if not r["hiddenOnOrderForm"]] + password_block = None + if password_field: + password_set, entry, password_block = _password_status(env, handler, after_rows, password_field, slug, base) + actions.append(entry) + outputs["newPasswordSet"] = password_set + if password_block: + outputs["newPassword"] = password_block outputs.update({"actions": actions, "protectedFromSync": sorted(set(protected)), "after": after, "visibleNow": visible}) + keys = _ssh_keys(env) + missing = [k["name"] for k in keys if not k["materialUploaded"]] + if keys: + outputs["keyMaterial"] = { + "keys": keys, + "uploadUrl": base + "/admin/resourcehandlers/{}/#tab-ssh-keys".format(handler.id), + "steps": "Click the pencil in the Actions column of the key's row, paste the private key (PEM) into Key material, then Save.", + "why": "CloudBolt needs it to sign in to Linux servers over SSH (remote scripts such as Standard Server's Hello World) and to read the Administrator password of Windows servers on AWS.", + } outputs["next"] = ( - "Order the Custom Server into this environment through MCP and confirm the form shows only {}. " + ("Before the first order, have the admin upload the private key of {} at keyMaterial.uploadUrl (keyMaterial.steps; " + "the key is pasted there, never in chat). ".format(", ".join(missing)) if missing else "") + + ("Before the first Windows order, make sure the Windows template has credentials (newPassword.alternative) " + "or give new_password a value on this environment (newPassword.steps and newPassword.whatToEnter); the " + "admin types either in CloudBolt, never in chat. " if password_block else "") + + "Order the Custom Server into this environment through MCP and confirm the form shows only {}. " "Pass onb_keep to bring a field back, onb_pin field=value to change a pin, onb_pin field=a|b|c to offer " "exactly those sizes.".format(", ".join(visible) or "the size") ) diff --git a/plugins/OHK-s76tknmk/OHK-s76tknmk_metadata.json b/plugins/OHK-s76tknmk/OHK-s76tknmk_metadata.json index 77e91c47..f1e5f3ab 100644 --- a/plugins/OHK-s76tknmk/OHK-s76tknmk_metadata.json +++ b/plugins/OHK-s76tknmk/OHK-s76tknmk_metadata.json @@ -86,7 +86,7 @@ "description": "Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login.", "id": "OHK-s76tknmk", "max_retries": 0, - "name": "POC Onboarding: LDAP Mapping", + "name": "Onboarding: LDAP Mapping", "resource_technologies": [], "script_filename": "OHK-s76tknmk_script.py", "shared": false, diff --git a/plugins/OHK-s76tknmk/OHK-s76tknmk_script.py b/plugins/OHK-s76tknmk/OHK-s76tknmk_script.py index 53beaade..0f783e06 100644 --- a/plugins/OHK-s76tknmk/OHK-s76tknmk_script.py +++ b/plugins/OHK-s76tknmk/OHK-s76tknmk_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: LDAP Mapping (MCP Tool Action plugin). +Onboarding: LDAP Mapping (MCP Tool Action plugin). Maps an Active Directory or LDAP group (by distinguished name) to a CloudBolt group with roles, the way the LDAP utility's Group Mappings tab diff --git a/plugins/OHK-s7cdvkpr/OHK-s7cdvkpr_metadata.json b/plugins/OHK-s7cdvkpr/OHK-s7cdvkpr_metadata.json index 7ecd191b..7338b7a9 100644 --- a/plugins/OHK-s7cdvkpr/OHK-s7cdvkpr_metadata.json +++ b/plugins/OHK-s7cdvkpr/OHK-s7cdvkpr_metadata.json @@ -26,7 +26,7 @@ "description": "Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool.", "id": "OHK-s7cdvkpr", "max_retries": 0, - "name": "POC Onboarding: Verify Resource Handler", + "name": "Onboarding: Verify Resource Handler", "resource_technologies": [], "script_filename": "OHK-s7cdvkpr_script.py", "shared": false, diff --git a/plugins/OHK-s7cdvkpr/OHK-s7cdvkpr_script.py b/plugins/OHK-s7cdvkpr/OHK-s7cdvkpr_script.py index d41656e3..2eccee27 100644 --- a/plugins/OHK-s7cdvkpr/OHK-s7cdvkpr_script.py +++ b/plugins/OHK-s7cdvkpr/OHK-s7cdvkpr_script.py @@ -1,5 +1,5 @@ """ -POC Onboarding: Verify Resource Handler (MCP Tool Action plugin). +Onboarding: Verify Resource Handler (MCP Tool Action plugin). Calls the handler's own Verify Connection and returns the real exception text, which the UI form replaces with "Unable to connect to handler with @@ -131,8 +131,8 @@ def _state_field(create=False): field, _ = CustomField.objects.get_or_create( name=STATE_FIELD, defaults=dict( - label="POC Onboarding State", - description="State recorded by the POC onboarding MCP tools: item statuses, handler verify results, install details.", + label="Onboarding State", + description="State recorded by the onboarding MCP tools: item statuses, handler verify results, install details.", type="TXT", namespace=namespace, ), @@ -239,9 +239,10 @@ def run(job, *args, **kwargs): slug = tech.slug if tech else "" links = { "detail": base + "/admin/resourcehandlers/{}/".format(handler.id), - "edit": base + "/admin/resourcehandlers/{}/edit/".format(handler.id), - "verifyDialog": base + "/admin/resourcehandlers/{}/verify_connection/".format(handler.id), - "importLocations": base + "/admin/resourcehandlers/{}/import_locations/".format(handler.id), + "edit": base + "/admin/resourcehandlers/{}/".format(handler.id), + "editClick": "Edit Credentials on the Overview tab", + "importLocations": base + "/admin/resourcehandlers/{}/#tab-locations".format(handler.id), + "importLocationsClick": "Import Locations on the Locations tab", "permissionsDoc": PERMISSION_DOCS.get(slug, DEFAULT_DOC), } outputs = { @@ -269,8 +270,8 @@ def run(job, *args, **kwargs): outputs.update({"verified": True, "checkedAt": when}) message = "Connection to '{}' verified.".format(handler.name) outputs["next"] = ( - "Import one or two environments for this handler (Import locations on the handler page), " - "then add an OS build with an image for each environment." + "Start onb_sync_images for this handler now (it fills the image cache without the whitelist and enables the " + "cache jobs; it runs for a while), then onb_handler_locations and onb_import_environments while it runs." ) except Exception as exc: # the cloud wrapper raises its own exception types error_text = "{}: {}".format(type(exc).__name__, str(exc))[:3000] @@ -286,7 +287,7 @@ def run(job, *args, **kwargs): message = "Connection to '{}' failed: {}".format(handler.name, error_text[:300]) outputs["next"] = ( "Explain the error and the first hint to the user. Credentials and permissions are fixed on links.edit " - "(never ask for the secret in chat); connectivity, DNS, proxy and TLS are fixed on the appliance or network " + "with its Edit Credentials button (never ask for the secret in chat); connectivity, DNS, proxy and TLS are fixed on the appliance or network " "side. Then run this tool again. For appliance-side context call onb_recent_errors with " "onb_contains='{}'.".format(handler.name) ) diff --git a/plugins/OHK-u7j8o0vm/OHK-u7j8o0vm_metadata.json b/plugins/OHK-u7j8o0vm/OHK-u7j8o0vm_metadata.json new file mode 100644 index 00000000..126cd3f3 --- /dev/null +++ b/plugins/OHK-u7j8o0vm/OHK-u7j8o0vm_metadata.json @@ -0,0 +1,18 @@ +{ + "commandline_args": null, + "credentials": "YOUR_CREDENTIALS", + "description": "Prints a hello message, the computer name and the user inside a Windows guest to prove agentless script execution.", + "execution_timeout": 600, + "id": "OHK-u7j8o0vm", + "max_retries": 0, + "name": "Hello World (Windows)", + "remove_after_run": true, + "resource_technologies": [], + "run_with_sudo": false, + "script_filename": "OHK-u7j8o0vm_script.ps1", + "shared": false, + "target_os_families": [ + "Windows" + ], + "type": "Remote Script" +} diff --git a/plugins/OHK-u7j8o0vm/OHK-u7j8o0vm_script.ps1 b/plugins/OHK-u7j8o0vm/OHK-u7j8o0vm_script.ps1 new file mode 100644 index 00000000..0027a7a6 --- /dev/null +++ b/plugins/OHK-u7j8o0vm/OHK-u7j8o0vm_script.ps1 @@ -0,0 +1,6 @@ +# Hello World (Windows): proves that CloudBolt runs a script inside the +# guest over WinRM without an agent (test plan 1.1.3, 4.1.2, 4.3.2). +$ErrorActionPreference = "Stop" +Write-Output ("Hello from CloudBolt on {0} at {1}" -f $env:COMPUTERNAME, (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")) +Write-Output ("Running as {0} on {1}" -f [Security.Principal.WindowsIdentity]::GetCurrent().Name, (Get-CimInstance Win32_OperatingSystem).Caption) +Write-Output "hello_world=ok" diff --git a/plugins/OHK-vwpjfa9d/OHK-vwpjfa9d_metadata.json b/plugins/OHK-vwpjfa9d/OHK-vwpjfa9d_metadata.json new file mode 100644 index 00000000..b1d18cac --- /dev/null +++ b/plugins/OHK-vwpjfa9d/OHK-vwpjfa9d_metadata.json @@ -0,0 +1,11 @@ +{ + "description": "Fills the Maintenance Window dropdown with weekly two-hour UTC windows computed in Python.", + "id": "OHK-vwpjfa9d", + "max_retries": 0, + "name": "Generate options for 'Maintenance Window'", + "resource_technologies": [], + "script_filename": "OHK-vwpjfa9d_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-vwpjfa9d/OHK-vwpjfa9d_script.py b/plugins/OHK-vwpjfa9d/OHK-vwpjfa9d_script.py new file mode 100644 index 00000000..388e9379 --- /dev/null +++ b/plugins/OHK-vwpjfa9d/OHK-vwpjfa9d_script.py @@ -0,0 +1,21 @@ +""" +Generate options for 'Maintenance Window' (Generated Parameter Options plugin). + +Fills the maintenance_window dropdown on the Standard Server blueprint with +weekly two-hour windows computed in Python: an early-morning and a late-night +start on each day of the week, in UTC. Change DAYS, START_HOURS or +LENGTH_HOURS to match the customer's change calendar. +""" + +DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] +START_HOURS = [2, 22] +LENGTH_HOURS = 2 + + +def _window(day, start): + return "{} {:02d}:00-{:02d}:00 UTC".format(day, start, (start + LENGTH_HOURS) % 24) + + +def get_options_list(field, environment=None, group=None, **kwargs): + options = [(_window(day, start), _window(day, start)) for day in DAYS for start in START_HOURS] + return {"options": options, "initial_value": options[0][0]} diff --git a/plugins/OHK-w78lalkx/OHK-w78lalkx_metadata.json b/plugins/OHK-w78lalkx/OHK-w78lalkx_metadata.json new file mode 100644 index 00000000..d6fa5a82 --- /dev/null +++ b/plugins/OHK-w78lalkx/OHK-w78lalkx_metadata.json @@ -0,0 +1,13 @@ +{ + "action_inputs": [], + "action_inputs_sequence": [], + "description": "Returns the posted JSON or query fields with the calling user and the time, proving a synchronous authenticated call into CloudBolt.", + "id": "OHK-w78lalkx", + "max_retries": 0, + "name": "Echo", + "resource_technologies": [], + "script_filename": "OHK-w78lalkx_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-w78lalkx/OHK-w78lalkx_script.py b/plugins/OHK-w78lalkx/OHK-w78lalkx_script.py new file mode 100644 index 00000000..9dd58b75 --- /dev/null +++ b/plugins/OHK-w78lalkx/OHK-w78lalkx_script.py @@ -0,0 +1,37 @@ +""" +Echo (inbound webhook plugin, webhooks/IWH-f16qxnhm). + +Returns whatever JSON or form fields were posted, with the calling user and +the time, so an external system can prove a synchronous, authenticated call +into CloudBolt (test plan 4.2.5). + +URL (trailing slash required): + POST /api/v3/cmp/inboundWebHooks/echo/run/ with a JSON body + GET /api/v3/cmp/inboundWebHooks/echo/run/?hello=world + +Authenticate with the CloudBolt API token or session; unauthenticated calls +are rejected by CloudBolt before this code runs. +""" +from datetime import datetime, timezone + + +def _response(parameters, profile, method): + user = None + if profile is not None: + user = getattr(getattr(profile, "user", None), "username", None) + return { + "received": parameters if isinstance(parameters, dict) else {"body": str(parameters)}, + "fieldCount": len(parameters) if isinstance(parameters, dict) else 0, + "method": method, + "caller": user, + "receivedAt": datetime.now(timezone.utc).isoformat(), + "webhook": "echo", + } + + +def inbound_web_hook_post(*args, parameters=None, profile=None, **kwargs): + return _response(parameters or {}, profile, "POST") + + +def inbound_web_hook_get(*args, parameters=None, profile=None, **kwargs): + return _response(parameters or {}, profile, "GET") diff --git a/plugins/OHK-y95w8ai0/OHK-y95w8ai0_metadata.json b/plugins/OHK-y95w8ai0/OHK-y95w8ai0_metadata.json index 2d98c534..6b4ad855 100644 --- a/plugins/OHK-y95w8ai0/OHK-y95w8ai0_metadata.json +++ b/plugins/OHK-y95w8ai0/OHK-y95w8ai0_metadata.json @@ -26,7 +26,7 @@ "description": "Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback.", "id": "OHK-y95w8ai0", "max_retries": 0, - "name": "POC Onboarding: Failure Trace", + "name": "Onboarding: Failure Trace", "resource_technologies": [], "script_filename": "OHK-y95w8ai0_script.py", "shared": false, diff --git a/plugins/OHK-y95w8ai0/OHK-y95w8ai0_script.py b/plugins/OHK-y95w8ai0/OHK-y95w8ai0_script.py index 0590b529..d19c4baa 100644 --- a/plugins/OHK-y95w8ai0/OHK-y95w8ai0_script.py +++ b/plugins/OHK-y95w8ai0/OHK-y95w8ai0_script.py @@ -1,33 +1,49 @@ """ -POC Onboarding: Failure Trace (MCP Tool Action plugin). +Onboarding: Failure Trace (MCP Tool Action plugin). Given an order (ORD-) or job (JOB-) global id, returns every failed job under it with its errors, output, the tail of its progress messages, its failed children and a hint for the provisioning failures a new appliance -hits most (no image in the region, no subnet, missing key pair, Windows -password, datastore not pinned). The built-in fetch_order and fetch_job -tools stop at the top-level status; this tool walks down to the job that -actually failed and tells the agent which job id to pass to fetch_job_log -for the full traceback. Read-only, synchronous. Admin only. +hits most (no image in the region, no subnet, missing key pair or its +private key, Windows password, guest credentials, unreachable ESXi hosts, +datastore not pinned). +Some failures leave the job's errors field empty and write the exception +only to the job's log file, so for a failed job with no errors the hints are +also matched against the error lines in the tail of that file. The built-in +fetch_order and fetch_job tools stop at the top-level status; this tool +walks down to the job that actually failed and tells the agent which job id +to pass to fetch_job_log for the full traceback. Read-only, synchronous. +Admin only. Every declared input is read from its rendered template token in _read_inputs(); keep each one referenced that way or CloudBolt's token scan deletes the input when the script is saved. """ import html +import json +import os import re PROGRESS_TAIL = 15 MAX_DEPTH = 6 MAX_FAILED = 25 +LOG_TAIL_BYTES = 256 * 1024 +LOG_LEVEL_RE = re.compile(r"\b(ERROR|CRITICAL)\b") +EXCEPTION_LINE_RE = re.compile(r"^\s*[\w.]*(Error|Exception)\b.*:") HINTS = [ + (re.compile(r"server's password is unknown", re.I), "CloudBolt has no guest password for this server because the vCenter template has no credentials. Set them on the template: onb_ui_link handler_images: opens the handler's Templates tab; in the template's Credentials column click + (Add credentials to template), or the pencil when some are set, enter the guest username and password, and Save. Later orders copy them onto the server."), + (re.compile(r"No password parameter set|cannot set the Administrator password", re.I), "vCenter customization of a Windows server had no Administrator password. Set the Windows template's credentials: onb_ui_link handler_images: opens the handler's Templates tab; in the template's Credentials column click + (Add credentials to template) or the pencil, enter Administrator and its password, and Save. Orders copy them onto the server and customization uses that password. Alternative: new_password on the environment (onb_trim_environment reports newPasswordSet and the steps), equal to the template's password unless the customer wants it changed at build."), + (re.compile(r"guestFile[\s\S]{0,800}?(ConnectTimeout|NewConnectionError|timed out|Connection refused|No route to host|unreachable)|failed to make the HTTP PUT request to the VMware API", re.I), "The appliance could not upload the script to the VM's ESXi host (443, or the port in the error): VMware Tools file transfer goes straight to the host, not through vCenter, which hosted or provider-managed vCenter often blocks. Set tech_specific_script_execution (Use Tech-Specific Script Execution) to False on the environment: onb_parameter onb_param_name=tech_specific_script_execution, onb_param_targets=, onb_param_options=False. Scripts then run over SSH (22) and WinRM (5985/5986), which must be open from the appliance to the guests. Do not pass the parameter in orders: the order form supplies it and an explicit value is refused. Opening 443 from the appliance to every ESXi host also works."), + (re.compile(r"ssh_config: line \d+: Bad configuration option|Bad configuration option: \w+[\s\S]{0,200}?terminating", re.I), "The appliance's own SSH client configuration is invalid (the error names /etc/ssh/ssh_config and the line), so no SSH remote script can run from this appliance; nothing on the guest is wrong. A server-side option such as PermitRootLogin in the client file causes it: on the appliance, as root, remove or comment out the named line, then run the script again."), + (re.compile(r"port=5986[\s\S]{0,400}?(ConnectTimeout|timed out|Connection refused|NewConnectionError)|wsman[\s\S]{0,400}?(ConnectTimeout|timed out)", re.I), "WinRM from the appliance to the Windows server timed out on 5986: CloudBolt uses WinRM over HTTPS unless the server's winrm_protocol is http. Either enable the WinRM HTTPS listener and a firewall rule for 5986 on the Windows image, or set winrm_protocol to http on the environment (onb_parameter onb_param_name=winrm_protocol, onb_param_targets=, onb_param_options=http), and then 5985 must be open. The appliance needs that port open to the guest network."), + (re.compile(r"Could not find required key material|no matching key material uploaded|key pair has not been added", re.I), "CloudBolt holds no private key for the key pair named in the error. The admin uploads it: onb_ui_link handler_ssh_keys: opens the handler's SSH Keys tab; click the pencil in the Actions column of the key's row, paste the private key into Key material, and Save. The key is pasted there, never in chat."), (re.compile(r"is required for Azure windows servers|password_arm", re.I), "Azure Windows builds need the password_arm parameter; add it to the environment or order form."), (re.compile(r"vmware_datastore parameter must be specified", re.I), "Pin a vmware_datastore value on the vCenter environment's VMware Parameters tab."), (re.compile(r"Memory and CPU are required", re.I), "The vCenter environment needs cpu_cnt and mem_size options."), (re.compile(r"InvalidAMIID|image.*not found|No (image|template|AMI)|not available in (this )?(region|location)", re.I), "The OS build has no image for this environment's region or location; import one on the handler's images page and attach the OS build to the environment."), (re.compile(r"subnet|sc_nic_0|No network", re.I), "No network or subnet is attached to the environment; add one on the environment's Networks tab (sc_nic_0)."), - (re.compile(r"InvalidKeyPair|key pair|key_name", re.I), "The key pair named in key_name does not exist in this region; pin an existing one on the environment."), + (re.compile(r"InvalidKeyPair|key pair(?! has not been added)|key_name", re.I), "The key pair named in key_name does not exist in this region; pin an existing one on the environment."), (re.compile(r"InsufficientInstanceCapacity|QuotaExceeded|exceeds quota|OperationNotAllowed.*quota", re.I), "The cloud account's quota or capacity blocked the build; pick a smaller size or another region."), (re.compile(r"UnauthorizedOperation|AuthorizationFailed|AccessDenied|Permission to perform this operation was denied", re.I), "The handler's credentials lack a permission for this step; compare with CloudBolt's minimum permissions document for the technology."), (re.compile(r"CERTIFICATE_VERIFY_FAILED|SSLError", re.I), "TLS verification failed; add the CA under Admin > SSL Certificates or disable verification for the POC."), @@ -102,8 +118,38 @@ def _progress_tail(job): ] +def _log_error_text(job): + """ERROR and CRITICAL entries and exception lines from the last LOG_TAIL_BYTES of the job's log file.""" + try: + path = job.get_log_file_path() + size = os.path.getsize(path) + with open(path, "rb") as handle: + if size > LOG_TAIL_BYTES: + handle.seek(size - LOG_TAIL_BYTES) + data = handle.read(LOG_TAIL_BYTES) + except (OSError, AttributeError, ValueError): + return "" + keep = [] + for line in data.decode("utf-8", errors="replace").splitlines(): + stripped = line.strip() + if stripped.startswith("{") and stripped.endswith("}"): + # CloudBolt 2026.2+ writes one JSON object per line, with the traceback in exc_info. + try: + entry = json.loads(stripped) + except ValueError: + continue + if isinstance(entry, dict) and str(entry.get("levelname") or "").upper() in ("ERROR", "CRITICAL"): + keep.append("{}\n{}".format(entry.get("message") or "", entry.get("exc_info") or entry.get("exc_text") or "")) + elif LOG_LEVEL_RE.search(line) or EXCEPTION_LINE_RE.match(line): + keep.append(line) + return "\n".join(keep) + + def _summary(job, base, with_progress=True): text = "{}\n{}".format(job.errors or "", job.output or "") + log_checked = job.status == "FAILURE" and not (job.errors or "").strip() + if log_checked: + text += "\n" + _log_error_text(job) row = { "id": job.global_id, "pk": job.id, @@ -117,6 +163,8 @@ def _summary(job, base, with_progress=True): "url": base + "/jobs/{}/".format(job.id), "hints": _hints_for(text), } + if log_checked: + row["logTailChecked"] = True if with_progress: row["progressTail"] = _progress_tail(job) return row @@ -139,6 +187,23 @@ def _failed_descendants(job, base, depth=0, seen=None): return rows[:MAX_FAILED] +def _failed_servers(job_ids, base): + """Servers the traced jobs left in Provision Failed state (re-running a failed job in the UI deletes its own).""" + from infrastructure.models import Server + + servers = Server.objects.filter(jobs__id__in=job_ids, status="PROVFAILED").distinct().order_by("id") + return [ + { + "id": s.global_id, + "hostname": s.hostname, + "environment": s.environment.name if s.environment else None, + "inCloud": bool(s.resource_handler_svr_id), + "url": base + "/servers/{}/".format(s.id), + } + for s in servers[:MAX_FAILED] + ] + + def _trace_order(order, base): try: jobs = list(order.list_of_jobs(recursive=True) or []) @@ -156,6 +221,7 @@ def _trace_order(order, base): }, "totalJobs": len(jobs), "failedJobs": failed, + "failedServers": _failed_servers([j.id for j in jobs], base), } if order.status == "PENDING": outputs["note"] = "The order is awaiting approval; approve it with approve_order (the caller must be an approver) and poll again." @@ -173,6 +239,7 @@ def _trace_job(job, base): "target": dict(_summary(job, base), kind="job"), "failedJobs": _failed_descendants(job, base), } + outputs["failedServers"] = _failed_servers([job.id] + [row["pk"] for row in outputs["failedJobs"]], base) if job.status != "FAILURE" and not outputs["failedJobs"]: outputs["note"] = "Neither this job nor any job under it has failed (status {}).".format(job.status) return outputs @@ -222,5 +289,10 @@ def run(job, *args, **kwargs): "For the traceback, call fetch_job_log with log_job_id={} and log_file_tail=200; for appliance-wide " "context call onb_recent_errors with onb_log=jobengine.".format(failed_ids[0]) ) + if outputs["failedServers"]: + outputs["next"] = (outputs.get("next", "") + " " + ( + "{} server(s) were left in Provision Failed state ({}). Once the cause is explained, offer the user to delete " + "them with onb_failed_servers before ordering again; inCloud true means a VM exists in the cloud." + ).format(len(outputs["failedServers"]), ", ".join(s["hostname"] or s["id"] for s in outputs["failedServers"]))).strip() message = "{}: {} failed job(s).".format(target, len(failed_ids)) return _success(message, outputs) diff --git a/plugins/OHK-yjow1qql/OHK-yjow1qql_metadata.json b/plugins/OHK-yjow1qql/OHK-yjow1qql_metadata.json new file mode 100644 index 00000000..d77a0568 --- /dev/null +++ b/plugins/OHK-yjow1qql/OHK-yjow1qql_metadata.json @@ -0,0 +1,55 @@ +{ + "action_inputs": [ + { + "allow_multiple": false, + "available_all_servers": false, + "description": "Name of the CIT test; defaults to the order's name.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-frgip09z", + "label": "Test name (optional)", + "name": "onb_cit_name", + "placeholder": "POC: Custom Server in AWS", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + }, + { + "allow_multiple": false, + "available_all_servers": false, + "description": "The finished blueprint order to replay.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-an75eqvs", + "label": "Order (ORD- global id)", + "name": "onb_cit_order", + "placeholder": "ORD-abc12345", + "relevant_osfamilies": [], + "required": true, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + } + ], + "action_inputs_sequence": [ + "onb_cit_order", + "onb_cit_name" + ], + "description": "Turns a finished blueprint order into a Continuous Infrastructure Testing test, the same as the order page's Add to CIT action.", + "id": "OHK-yjow1qql", + "max_retries": 0, + "name": "Onboarding: CIT Test from Order", + "resource_technologies": [], + "script_filename": "OHK-yjow1qql_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-yjow1qql/OHK-yjow1qql_script.py b/plugins/OHK-yjow1qql/OHK-yjow1qql_script.py new file mode 100644 index 00000000..e0578f7a --- /dev/null +++ b/plugins/OHK-yjow1qql/OHK-yjow1qql_script.py @@ -0,0 +1,137 @@ +""" +Onboarding: CIT Test from Order (MCP Tool Action plugin). + +Turns a finished order into a Continuous Infrastructure Testing test, the +same as the order page's "Add to CIT" action: CloudBolt replays the +order's payload on every test run and compares the outcome with the +original status (test plan 4.2.4). Synchronous. Admin only. + +Every declared input is read from its rendered template token in +_read_inputs(); keep each one referenced that way or CloudBolt's token scan +deletes the input when the script is saved. +""" +import html +import json +import re + +GLOBAL_ID_RE = re.compile(r"^[A-Z]{2,4}-[A-Za-z0-9]{6,16}$") + + +def _text(value): + return html.unescape(value or "").strip() + + +def _failure(message): + return {"status": "FAILURE", "output_message": "", "error_message": message, "outputs": {"error": message}} + + +def _success(message, outputs): + return {"status": "SUCCESS", "output_message": message, "error_message": "", "outputs": outputs} + + +def _caller(job, kwargs): + profile = kwargs.get("profile") + if profile is None and job is not None: + profile = job.owner + return profile + + +def _portal_url(): + try: + from portals.models import PortalConfig + + portal = PortalConfig.get_current_portal() + url = portal.site_url if portal else None + except Exception: + url = None + return (url or "").rstrip("/") + + +def _read_inputs(): + raw = { + "onb_cit_order": """{{ onb_cit_order }}""", + "onb_cit_name": """{{ onb_cit_name }}""", + } + return {"order": _text(raw["onb_cit_order"]), "name": _text(raw["onb_cit_name"])} + + +def run(job, *args, **kwargs): + profile = _caller(job, kwargs) + if profile is None: + return _failure("No calling user profile was supplied. Run this tool through the MCP server as an authenticated user.") + if not profile.is_cbadmin: + return _failure("Only CloudBolt admins may create CIT tests.") + + inputs = _read_inputs() + if not inputs["order"]: + return _failure("onb_cit_order is required: the ORD- global id of a finished blueprint order.") + from orders.models import Order + + order = Order.objects.filter(global_id=inputs["order"]).first() if GLOBAL_ID_RE.match(inputs["order"]) else None + if order is None and inputs["order"].isdigit(): + order = Order.objects.filter(id=int(inputs["order"])).first() + if order is None: + return _failure("Order '{}' not found.".format(inputs["order"])) + + from cscv.models import ActionCITTest, CITConf, CITTest, can_order_be_tested + + base = _portal_url() + existing = CITTest.objects.filter(order=order).first() + if existing is not None: + return _success( + "Order {} is already CIT test '{}'.".format(order.global_id, existing.name), + {"test": {"id": existing.global_id, "name": existing.name, "enabled": bool(existing.enabled), "url": base + "/cit/{}/".format(existing.id)}, + "order": {"id": order.global_id, "status": order.status}, "created": False, + "next": "Run it with run_cit_tests (testing toolkit) or from the CIT page, then poll the job."}, + ) + if not can_order_be_tested(order): + return _failure( + "Order {} cannot become a CIT test: it must be finished (SUCCESS, FAILURE or WARNING) and be a blueprint " + "order; its status is {}.".format(order.global_id, order.status) + ) + blueprint = getattr(order, "blueprint", None) + if blueprint is None: + return _failure("Order {} has no blueprint.".format(order.global_id)) + + try: + from cbhooks.models import CloudBoltHook + from django.core.files.uploadedfile import SimpleUploadedFile + from orders.views import ACTIONCITTEST_PAYLOAD_TEMPLATE + from servicecatalog.services.blueprint_service import BlueprintService + + service = BlueprintService(blueprint) + try: + still_valid = service.order_still_valid_for_blueprint(order) + except Exception: + still_valid = True + ok, payload_dict = service.sample_payload(profile, order.group, order=order if still_valid else None) + if not ok: + return _failure("Could not build the order payload: {}".format( + payload_dict.get("error", "unknown error") if isinstance(payload_dict, dict) else str(payload_dict)[:300])) + payload = json.dumps(payload_dict, indent=4, sort_keys=True) + plugin = CloudBoltHook(name="{}_ActionCIT_{}".format(blueprint.name, order.id)) + content = ACTIONCITTEST_PAYLOAD_TEMPLATE.format(order_dict_json=payload).encode("utf8") + plugin.module_file.save("cb_plugin.py", SimpleUploadedFile("cb_plugin.py", content), save=False) + plugin.save() + test = ActionCITTest.objects.create( + name=inputs["name"] or order.name, + order=order, + cit_conf=CITConf.objects.first() or CITConf.get_singleton(), + expected_status=order.status, + hook=plugin, + blueprint=blueprint, + ) + except Exception as exc: + return _failure("Creating the CIT test failed: {}: {}".format(type(exc).__name__, str(exc)[:500])) + + outputs = { + "test": {"id": test.global_id, "name": test.name, "expectedStatus": test.expected_status, "enabled": bool(test.enabled), "url": base + "/cit/{}/".format(test.id)}, + "order": {"id": order.global_id, "name": order.name, "status": order.status, "blueprint": blueprint.name}, + "created": True, + "citUrl": base + "/cit/", + "next": ( + "Run it now with run_cit_tests (testing toolkit) or the Run button on the CIT page and poll the job; a pass " + "means every system in the provisioning path still works. Each run provisions and decommissions a server." + ), + } + return _success("CIT test '{}' created from order {}.".format(test.name, order.global_id), outputs) diff --git a/plugins/OHK-yqu8b25o/OHK-yqu8b25o_metadata.json b/plugins/OHK-yqu8b25o/OHK-yqu8b25o_metadata.json new file mode 100644 index 00000000..8ea5d8c1 --- /dev/null +++ b/plugins/OHK-yqu8b25o/OHK-yqu8b25o_metadata.json @@ -0,0 +1,35 @@ +{ + "action_inputs": [ + { + "allow_multiple": false, + "available_all_servers": false, + "description": "all (default), self-service, rbac, resource-management or extensibility.", + "field_dependency_controlling_set": [], + "field_dependency_dependent_set": [], + "global_options": [], + "hide_if_default_value": true, + "id": "CF-k29swycy", + "label": "Section (optional): all, self-service, rbac, ...", + "name": "onb_score_section", + "placeholder": "all", + "relevant_osfamilies": [], + "required": false, + "show_as_attribute": false, + "show_on_servers": false, + "type": "STR", + "value_pattern_string": null + } + ], + "action_inputs_sequence": [ + "onb_score_section" + ], + "description": "Builds the POC test plan scorecard from the recorded item statuses and live evidence on the appliance (orders, handlers, environments, groups, mappings, actions, jobs), per category with weights.", + "id": "OHK-yqu8b25o", + "max_retries": 0, + "name": "Onboarding: Scorecard", + "resource_technologies": [], + "script_filename": "OHK-yqu8b25o_script.py", + "shared": false, + "target_os_families": [], + "type": "CloudBolt Plug-in" +} diff --git a/plugins/OHK-yqu8b25o/OHK-yqu8b25o_script.py b/plugins/OHK-yqu8b25o/OHK-yqu8b25o_script.py new file mode 100644 index 00000000..d5d77eed --- /dev/null +++ b/plugins/OHK-yqu8b25o/OHK-yqu8b25o_script.py @@ -0,0 +1,621 @@ +""" +Onboarding: Scorecard (MCP Tool Action plugin). + +Builds the POC Test Plan scorecard: every item with its weight, the status +recorded with onb_set_item_status, and the live evidence on the appliance +(orders, handlers, environments, parameters, mappings, roles, approvals, +quotas, lifecycle parameters, recurring jobs, rules, CIT tests, webhooks, +extensions). Any recorded status wins, pending included; evidence only +suggests a status for items nobody recorded. Evidence rules lean strict: a +missed item is better than a false done. Read-only, synchronous. Admin only. + +Every declared input is read from its rendered template token in +_read_inputs(); keep each one referenced that way or CloudBolt's token scan +deletes the input when the script is saved. +""" +import html +import json +import os + +from django.conf import settings + +STATE_FIELD = "poc_onboarding_state" +SECTIONS = { + "all": None, + "self-service": "Self-Service", + "rbac": "Role-Based Access Control and Governance", + "resource-management": "Resource Management", + "extensibility": "Extensibility", +} +CATEGORIES = [ + ("Self-Service", [ + ("1.1.1", "Provision a standardized blueprint from the self-service catalog", 5), + ("1.1.2", "User-defined parameters during provisioning", 5), + ("1.1.3", "Post-provisioning automation from a catalog blueprint", 5), + ("1.1.4", "Hostname naming convention with preview", 5), + ("1.2.1", "One blueprint deploys to two clouds", 5), + ("1.2.2", "Cross-cloud tagging policy", 5), + ("1.2.3", "Unified visibility of servers across clouds", 5), + ]), + ("Role-Based Access Control and Governance", [ + ("2.1.1", "LDAP or Active Directory authentication", 3), + ("2.1.2", "Group and role assignment from AD group membership", 3), + ("2.1.3", "SAML2 single sign-on", 2), + ("2.2.1", "Per-tenant branded portal", 3), + ("2.3.1", "Resource visibility constrained by group role", 4), + ("2.3.2", "Blueprint entitlement by group", 4), + ("2.3.3", "Environment entitlement by group", 4), + ("2.3.4", "Custom role", 3), + ("2.4.1", "Basic order approval", 3), + ("2.4.2", "Approval on a day-2 action", 3), + ("2.5.1", "Tagging policy from a parameter", 5), + ("2.5.2", "Group quota", 2), + ]), + ("Resource Management", [ + ("3.1.1", "Power schedules", 5), + ("3.1.2", "Leases (expiration dates)", 5), + ("3.1.3", "Self-service decommission", 4), + ("3.1.4", "Onboard existing cloud resources", 5), + ("3.2.1", "Resize a VM", 4), + ("3.2.2", "Configuration update through Ansible", 0), + ("3.2.3", "Lifecycle actions (start, stop, reboot)", 3), + ]), + ("Extensibility", [ + ("4.1.1", "Agentless", 5), + ("4.1.2", "Agentless in-guest script execution", 5), + ("4.2.1", "UI extension from the Content Library", 5), + ("4.2.2", "Recurring job on a custom schedule", 4), + ("4.2.3", "Rule-based automation", 3), + ("4.2.4", "Continuous infrastructure testing", 3), + ("4.2.5", "Inbound webhook", 4), + ("4.2.6", "Customizable notification templates", 0), + ("4.3.1", "Python generated options for a parameter", 5), + ("4.3.2", "PowerShell in-guest script as a build item", 4), + ("4.3.3", "Bash in-guest script as a build item", 4), + ("4.3.4", "Terraform-backed blueprint", 0), + ("4.3.5", "Ansible Automation Platform configuration", 0), + ]), +] +PREREQS = [ + ("P1", "CMP license key installed"), ("P2", "Appliance deployed, initial configuration done"), + ("P3", "Up to two resource handlers, one or two environments each"), ("P4", "Custom Server deployed in each environment"), + ("P5", "Outbound 443 to content.cloudbolt.app"), ("P6", "Web proxy configured, if required"), ("P7", "SMTP configured"), + ("P8", "DNS A record for the portal"), ("P9", "SSO application and SME"), ("P10", "AD/LDAP service account and group DN"), + ("P11", "Ansible or AAP prerequisites"), ("P12", "Terraform scripts in git"), +] +BUILTIN_TAG_ATTRIBUTES = {"environment", "group", "hostname", "os_build", "os_family", "owner"} +MAX_JOBS = 2000 +CIT_JOB_TYPE = "functionaltest" +# A decom under one of these job types is cleanup (failed provision or blueprint deploy), a CIT run or a lease expiry. +NOT_SELF_SERVICE_DECOM_PARENTS = {"provision", "deploy_blueprint", CIT_JOB_TYPE, "expire"} +APPROVED_ORDER_STATUSES = ["ACTIVE", "SUCCESS", "WARNING", "FAILURE"] + + +def _text(value): + return html.unescape(value or "").strip() + + +def _failure(message): + return {"status": "FAILURE", "output_message": "", "error_message": message, "outputs": {"error": message}} + + +def _success(message, outputs): + return {"status": "SUCCESS", "output_message": message, "error_message": "", "outputs": outputs} + + +def _caller(job, kwargs): + profile = kwargs.get("profile") + if profile is None and job is not None: + profile = job.owner + return profile + + +def _read_inputs(): + raw = {"onb_score_section": """{{ onb_score_section }}"""} + return {"section": (_text(raw["onb_score_section"]) or "all").lower()} + + +def _load_state(): + try: + from infrastructure.models import CustomField + from orders.models import CustomFieldValue + + field = CustomField.objects.filter(name=STATE_FIELD).first() + if field is None: + return {} + cfv = CustomFieldValue.objects.filter(field=field).order_by("id").first() + if cfv is None: + return {} + data = json.loads(cfv.txt_value or "") + return data if isinstance(data, dict) else {} + except Exception: + return {} + + +def _safe(func): + try: + return func() + except Exception as exc: + return {"found": None, "detail": "could not evaluate: {}: {}".format(type(exc).__name__, str(exc)[:160])} + + +def _ev(found, detail): + return {"found": bool(found), "detail": detail} + + +def _ancestor_types(job, depth=10): + types = set() + parent = job.parent_job + while parent is not None and depth > 0: + types.add(parent.type) + parent = parent.parent_job + depth -= 1 + return types + + +def _successful_jobs(job_type, excluded_ancestors): + """The latest successful jobs of one type, minus those started under an excluded job type.""" + from jobs.models import Job + + rows = Job.objects.filter(type=job_type, status="SUCCESS").select_related("parent_job__parent_job__parent_job").order_by("-id")[:MAX_JOBS] + return [job for job in rows if not (_ancestor_types(job) & excluded_ancestors)] + + +def _blueprint_servers(): + """(id, status, blueprint, technology) for servers a successful provision job built from a blueprint server tier, CIT runs excluded.""" + from infrastructure.models import Server + + job_ids = [job.id for job in _successful_jobs("provision", {CIT_JOB_TYPE})] + return list(Server.objects.filter(jobs__id__in=job_ids, service_item__isnull=False).exclude(resource_handler__isnull=True).values_list( + "id", "status", "service_item__blueprint__name", "resource_handler__resource_technology__name").distinct()) + + +def _seed(): + """CloudBolt's seed definitions: the roles, recurring jobs and rules every appliance ships with.""" + from initialize import cb_minimal + + return cb_minimal + + +# --- evidence per item ----------------------------------------------------- + +def _ev_1_1_1(): + from orders.models import BlueprintOrderItem + + name = getattr(settings, "DEFAULT_NEW_SERVER_BLUEPRINT_NAME", "Custom Server") + custom = BlueprintOrderItem.objects.filter(blueprint__name=name, order__status="SUCCESS").values("order").distinct().count() + any_bp = BlueprintOrderItem.objects.filter(order__status="SUCCESS").values("order").distinct().count() + return _ev(custom or any_bp, "{} successful Custom Server order(s), {} successful blueprint order(s) in all".format(custom, any_bp)) + + +def _ev_1_1_2(): + from accounts.models import Group + from infrastructure.models import Environment + from resourcehandlers.models import ResourceHandler + + tech = set() + for rh in ResourceHandler.objects.all(): + try: + rh = rh.cast() + tech |= set(rh.tech_parameter_fields() or []) | set(rh.special_fields() or []) | set(getattr(rh, "base_orders_cf_names", []) or []) + except Exception: + pass + names = set() + for env in Environment.objects.all(): + names |= {n for n in env.custom_fields.values_list("name", flat=True) if n not in tech and not n.startswith("sc_nic_")} + for group in Group.objects.all(): + names |= set(group.custom_fields.values_list("name", flat=True)) + names -= {"hostname_template", "expiration_date", "power_schedule", "annotation", "poc_onboarding_state"} + return _ev(names, "parameters on environments or groups: {}".format(", ".join(sorted(names)[:12]) or "none")) + + +def _ev_1_1_3(): + from servicecatalog.models import RunRemoteScriptHookServiceItem, ServiceBlueprint + + scripts = RunRemoteScriptHookServiceItem.objects.filter(blueprint__status="ACTIVE").count() + bps = ServiceBlueprint.objects.filter(status="ACTIVE", global_id="BP-x78p48gz").count() + return _ev(scripts, "{} remote-script build item(s) on active blueprints; Standard Server blueprint present: {}".format(scripts, bool(bps))) + + +def _ev_1_1_4(): + from infrastructure.models import Environment + from servicecatalog.models import ProvisionServerServiceItem + + envs = Environment.objects.filter(custom_field_options__field__name="hostname_template").distinct().count() + tiers = ProvisionServerServiceItem.objects.exclude(hostname_template="").exclude(hostname_template__isnull=True).count() + return _ev(envs or tiers, "{} environment(s) and {} server tier(s) carry a hostname template".format(envs, tiers)) + + +def _ev_1_2_1(): + per_blueprint = {} + for _server_id, _status, blueprint, tech in _blueprint_servers(): + per_blueprint.setdefault(blueprint, set()).add(tech) + rows = ["{} ({})".format(bp, ", ".join(sorted(techs))) for bp, techs in sorted(per_blueprint.items()) if len(techs) >= 2] + return _ev(rows, "blueprints that provisioned servers on two or more technologies: {}".format("; ".join(rows[:8]) or "none")) + + +def _ev_1_2_2(): + from tags.models import TaggableAttribute + + per_handler = {} + for ta in TaggableAttribute.objects.exclude(resource_handler__isnull=True): + per_handler.setdefault(ta.resource_handler.name, set()).add(ta.attribute) + common = set.intersection(*per_handler.values()) if len(per_handler) >= 2 else set() + return _ev(len(per_handler) >= 2 and common, "handlers with tag mappings: {}; attributes mapped on all of them: {}".format( + ", ".join(sorted(per_handler)) or "none", ", ".join(sorted(common)) or "none")) + + +def _ev_1_2_3(): + counts = {} + for _server_id, status, _blueprint, tech in _blueprint_servers(): + if status == "ACTIVE": + counts[tech] = counts.get(tech, 0) + 1 + return _ev(len(counts) >= 2, "active blueprint-provisioned servers per technology: {}".format( + ", ".join("{} ({})".format(k, v) for k, v in sorted(counts.items())) or "none")) + + +def _ev_2_1_1(): + from utilities.models import LDAPUtility + + utilities = list(LDAPUtility.objects.all()) + ldap_users = None + try: + from accounts.models import UserProfile + + ldap_users = UserProfile.objects.exclude(ldap__isnull=True).count() + except Exception: + pass + return _ev(utilities, "{} LDAP utility(ies){}".format(len(utilities), "; {} directory user(s) seen".format(ldap_users) if ldap_users is not None else "")) + + +def _ev_2_1_2(): + from utilities.models import LDAPMapping + + rows = list(LDAPMapping.objects.all()[:10]) + return _ev(rows, "{} LDAP group mapping(s)".format(LDAPMapping.objects.count())) + + +def _ev_2_1_3(): + from authentication.sso.models import BaseSSOProvider + + count = BaseSSOProvider.objects.count() + return _ev(count, "{} SSO provider(s)".format(count)) + + +def _ev_2_2_1(): + from portals.models import PortalConfig + + count = PortalConfig.objects.count() + return _ev(count > 1, "{} portal(s); more than one means a branded portal exists".format(count)) + + +def _ev_2_3_1(): + from accounts.models import GroupRoleMembership + + roles = set(GroupRoleMembership.objects.filter(profile__super_admin=False).values_list("role__name", flat=True)) + return _ev({"requestor", "resource_admin"} & roles, "roles held by non-admin users: {}".format(", ".join(sorted(roles)) or "none")) + + +def _ev_2_3_2(): + from servicecatalog.models import ServiceBlueprint + + restricted = ServiceBlueprint.objects.filter(status="ACTIVE", any_group_can_deploy=False) + with_groups = [bp.name for bp in restricted if bp.groups.exists()][:8] + return _ev(with_groups, "blueprints restricted to groups: {}".format(", ".join(with_groups) or "none")) + + +def _ev_2_3_3(): + from accounts.models import Group + from infrastructure.models import Environment + + # Entitlement lives on Group.environments (Environment.groups_served is deprecated); Unassigned is the + # placeholder CloudBolt adds to new environments when they are restricted by default. + groups = Group.objects.exclude(name="Unassigned") + rows = list(Environment.objects.filter(group__in=groups).distinct().order_by("name").values_list("name", flat=True)[:8]) + return _ev(rows, "environments entitled to specific groups: {}".format(", ".join(rows) or "none")) + + +def _ev_2_3_4(): + from accounts.models import Role + + # The built-in set is the one CloudBolt's own custom-role count excludes (analytics register_role_counts). + seed = _seed() + builtin = {r["name"] for r in list(seed.all_default_roles) + list(seed.all_special_roles) + list(seed.all_grouptype_roles)} + custom = sorted(Role.objects.exclude(name__in=builtin).values_list("name", flat=True)) + return _ev(custom, "roles that are not built in: {}".format(", ".join(custom) or "none")) + + +def _ev_2_4_1(): + from django.db.models import F + from orders.models import Order + + approved = Order.objects.filter(status__in=["SUCCESS", "ACTIVE", "FAILURE"]).exclude(approved_by__isnull=True).exclude(approved_by=F("owner")).count() + pending = Order.objects.filter(status="PENDING").count() + return _ev(approved, "{} order(s) approved by someone other than the requester; {} pending now".format(approved, pending)) + + +def _ev_2_4_2(): + # An action that requires approval runs through an order with an ActionJobOrderItem; one without approval never + # creates an order. Auto-approval records the owner as approver, and a denial also fills approved_by. + from django.db.models import F + from orders.models import ActionJobOrderItem + + items = ActionJobOrderItem.objects.exclude(order__isnull=True) + approved = items.filter(order__status__in=APPROVED_ORDER_STATUSES, order__approved_by__isnull=False).exclude( + order__approved_by=F("order__owner")).values("order").distinct().count() + pending = items.filter(order__status="PENDING").values("order").distinct().count() + return _ev(approved, "{} server or resource action order(s) approved by someone other than the requester; {} pending now".format(approved, pending)) + + +def _ev_2_5_1(): + from tags.models import TaggableAttribute + + params = sorted({ta.attribute for ta in TaggableAttribute.objects.all() if ta.attribute not in BUILTIN_TAG_ATTRIBUTES}) + return _ev(params, "parameters mapped to cloud tags: {}".format(", ".join(params) or "none")) + + +def _ev_2_5_2(): + from accounts.models import Group + + rows = [] + for group in Group.objects.exclude(name="Unassigned"): + try: + item = group.quota_set.vm_cnt + if item is not None and item.limit is not None and item.limit != float("inf"): + rows.append("{} ({})".format(group.name, int(item.limit))) + except Exception: + pass + return _ev(rows, "groups with a server quota: {}".format(", ".join(rows[:8]) or "none")) + + +def _envs_with(name): + from infrastructure.models import Environment + + return [e.name for e in Environment.objects.filter(custom_fields__name=name).distinct()][:8] + + +def _ev_3_1_1(): + envs = _envs_with("power_schedule") + return _ev(envs, "environments offering power_schedule: {}".format(", ".join(envs) or "none")) + + +def _ev_3_1_2(): + from jobs.models import RecurringJob + + envs = _envs_with("expiration_date") + expire = RecurringJob.objects.filter(name__icontains="expire", enabled=True).exists() + return _ev(envs and expire, "environments offering expiration_date: {}; Expire Servers job enabled: {}".format(", ".join(envs) or "none", expire)) + + +def _ev_3_1_3(): + from infrastructure.models import Server + + decoms = [job.id for job in _successful_jobs("decom", NOT_SELF_SERVICE_DECOM_PARENTS)] + provisioned = Server.objects.filter(jobs__type="provision", jobs__status="SUCCESS") + count = Server.jobs.through.objects.filter(job_id__in=decoms, server__in=provisioned).values("job_id").distinct().count() + return _ev(count, "{} successful decommission job(s) of servers CloudBolt provisioned; CIT, cleanup and expiry excluded".format(count)) + + +def _ev_3_1_4(): + from infrastructure.models import Server + + unassigned = Server.objects.filter(status="ACTIVE", group__name="Unassigned").count() + return _ev(None, "{} active server(s) still in Unassigned; onboarding is recorded manually".format(unassigned)) + + +def _ev_3_2_1(): + from jobs.models import Job + + count = Job.objects.filter(status="SUCCESS", job_parameters__hookparameters__hook__name__icontains="resize").count() + return _ev(count, "{} successful Resize job(s)".format(count)) + + +def _ev_3_2_2(): + try: + from connectors.models import ConnectorConf + + count = ConnectorConf.objects.count() + except Exception: + count = 0 + return _ev(count, "{} configuration manager(s) configured".format(count)) + + +def _ev_3_2_3(): + # Power operations run inline and are recorded in server history, not as jobs. + from history.models import ServerHistory + + count = 0 + for field in ("event_message", "message", "description"): + try: + count = ServerHistory.objects.filter(**{field + "__iregex": r"power(ed)? (on|off)|reboot"}).count() + break + except Exception: + continue + return _ev(count, "{} power on/off/reboot event(s) in server history".format(count)) + + +def _ev_4_1_2(): + from cbhooks.models import ServerAction + + labels = list(ServerAction.objects.filter(label__icontains="ad-hoc").values_list("label", flat=True)) + list( + ServerAction.objects.filter(label__icontains="ad hoc").values_list("label", flat=True)) + return _ev(labels, "ad-hoc script actions: {}".format(", ".join(labels) or "none")) + + +def _ev_4_2_1(): + # A Content Library import keeps the library item's global id, and the stock Content Library Caching job writes + # the library index to CONTENTLIBRARY_CACHE_LOCATION_PATH/.json, so a match there names its origin. + from extensions.models import UIExtension + + local = UIExtension.objects.filter(enabled=True, source_code_repo__isnull=True, remote_source_url="") + path = os.path.join(settings.CONTENTLIBRARY_CACHE_LOCATION_PATH, "ui-extension-packages.json") + if not os.path.isfile(path): + names = sorted(local.values_list("name", flat=True)) + return {"found": None, "detail": "Content Library index not cached on the appliance; extensions not synced from a repository: {}".format( + ", ".join(names[:10]) or "none")} + with open(path) as handle: + index = json.load(handle) + ids = {str(item.get("id")) for item in index if isinstance(item, dict) and item.get("id")} + names = sorted(local.filter(global_id__in=ids).values_list("name", flat=True)) + return _ev(names, "UI extensions installed from the Content Library: {}".format(", ".join(names[:10]) or "none")) + + +def _ev_4_2_2(): + from cbhooks.models import RecurringActionJob + from jobs.models import RecurringJob + + stock = _seed().recurring_jobs + stock_names = {job["name"] for job in stock} + # A stock job the customer renamed still runs its stock action. + stock_hooks = {job["hook_name"] for job in stock if job.get("hook_name")} + renamed = RecurringActionJob.objects.filter(hook__name__in=stock_hooks).values_list("pk", flat=True) + names = sorted(RecurringJob.objects.filter(enabled=True).exclude(name__in=stock_names).exclude(id__in=renamed).values_list("name", flat=True)) + return _ev(names, "enabled recurring jobs that are not stock: {}".format(", ".join(names[:10]) or "none")) + + +def _ev_4_2_3(): + from cbhooks.models import TriggerPoint + + stock = {rule["name"] for rule in _seed().rules} + rows = TriggerPoint.objects.filter(enabled=True).exclude(name__in=stock).values_list("name", "label") + names = sorted(label or name for name, label in rows) + return _ev(names, "enabled rules that are not stock: {}".format(", ".join(names[:10]) or "none")) + + +def _ev_4_2_4(): + from cscv.models import CITTest + from jobs.models import Job + + tests = CITTest.objects.count() + runs = Job.objects.filter(type="functionaltest").count() + return _ev(tests, "{} CIT test(s), {} test run(s)".format(tests, runs)) + + +def _ev_4_2_5(): + from cbhooks.models import InboundWebHook + + labels = list(InboundWebHook.objects.values_list("label", flat=True)) + return _ev(labels, "inbound webhooks: {}".format(", ".join(labels[:10]) or "none")) + + +def _ev_4_3_1(): + from cbhooks.models import HookPoint + + hp = HookPoint.objects.filter(label__iexact="Generated Parameter Options").first() or HookPoint.objects.filter(name__icontains="generated").first() + count = 0 + if hp is not None: + for attr in ("hookpointaction_set", "hookpointactions", "actions"): + try: + count = getattr(hp, attr).filter(enabled=True).count() + break + except Exception: + continue + return _ev(count, "{} enabled generated-options action(s)".format(count)) + + +def _ev_scripts(os_family): + from cbhooks.models import RemoteScriptHook + + rows = list(RemoteScriptHook.objects.filter(os_families__name__icontains=os_family).distinct().values_list("name", flat=True)) + return _ev(rows, "{} remote scripts: {}".format(os_family, ", ".join(rows[:8]) or "none")) + + +def _ev_4_3_4(): + from servicecatalog.models import ServiceItem + + count = 0 + for item in ServiceItem.objects.filter(blueprint__status="ACTIVE"): + try: + if "terraform" in type(item.cast()).__name__.lower(): + count += 1 + except Exception: + continue + return _ev(count, "{} Terraform build item(s) on active blueprints".format(count)) + + +EVIDENCE = { + "1.1.1": _ev_1_1_1, "1.1.2": _ev_1_1_2, "1.1.3": _ev_1_1_3, "1.1.4": _ev_1_1_4, "1.2.1": _ev_1_2_1, "1.2.2": _ev_1_2_2, "1.2.3": _ev_1_2_3, + "2.1.1": _ev_2_1_1, "2.1.2": _ev_2_1_2, "2.1.3": _ev_2_1_3, "2.2.1": _ev_2_2_1, "2.3.1": _ev_2_3_1, "2.3.2": _ev_2_3_2, "2.3.3": _ev_2_3_3, + "2.3.4": _ev_2_3_4, "2.4.1": _ev_2_4_1, "2.4.2": _ev_2_4_2, "2.5.1": _ev_2_5_1, "2.5.2": _ev_2_5_2, + "3.1.1": _ev_3_1_1, "3.1.2": _ev_3_1_2, "3.1.3": _ev_3_1_3, "3.1.4": _ev_3_1_4, "3.2.1": _ev_3_2_1, "3.2.2": _ev_3_2_2, "3.2.3": _ev_3_2_3, + "4.1.1": lambda: _ev(True, "CloudBolt uses SSH and WinRM; no agent is installed in guests"), + "4.1.2": _ev_4_1_2, "4.2.1": _ev_4_2_1, "4.2.2": _ev_4_2_2, "4.2.3": _ev_4_2_3, "4.2.4": _ev_4_2_4, "4.2.5": _ev_4_2_5, + "4.2.6": lambda: _ev(None, "email template edits are not detectable; record manually"), + "4.3.1": _ev_4_3_1, "4.3.2": lambda: _ev_scripts("Windows"), "4.3.3": lambda: _ev_scripts("Linux"), "4.3.4": _ev_4_3_4, "4.3.5": _ev_3_2_2, +} + + +def run(job, *args, **kwargs): + profile = _caller(job, kwargs) + if profile is None: + return _failure("No calling user profile was supplied. Run this tool through the MCP server as an authenticated user.") + if not profile.is_cbadmin: + return _failure("Only CloudBolt admins may read the scorecard.") + + section = _read_inputs()["section"] + if section not in SECTIONS: + return _failure("onb_score_section must be one of: {}.".format(", ".join(SECTIONS))) + wanted = SECTIONS[section] + recorded = (_load_state().get("items") or {}) + + categories = [] + pending_with_evidence = [] + totals = {"items": 0, "done": 0, "notApplicable": 0, "pending": 0, "pointsPossible": 0, "pointsPossibleApplicable": 0} + for name, items in CATEGORIES: + if wanted and name != wanted: + continue + rows = [] + possible = 0 + applicable = 0 + for item_id, title, weight in items: + record = recorded.get(item_id) or {} + evidence = _safe(EVIDENCE[item_id]) if item_id in EVIDENCE else {"found": None, "detail": ""} + status = record.get("status") + # Any recorded status wins over evidence, pending included; evidence only fills in unrecorded items. + if status in ("skipped", "not_applicable"): + suggested = "not_applicable" + elif status == "done": + suggested = "done" + elif status: + suggested = "pending" + if evidence.get("found"): + pending_with_evidence.append(item_id) + elif evidence.get("found"): + suggested = "done (evidence)" + else: + suggested = "pending" + possible += 5 * weight + if suggested != "not_applicable": + applicable += 5 * weight + totals["items"] += 1 + if suggested.startswith("done"): + totals["done"] += 1 + elif suggested == "not_applicable": + totals["notApplicable"] += 1 + else: + totals["pending"] += 1 + rows.append({ + "id": item_id, "title": title, "weight": weight, + "recorded": status, "recordedNote": record.get("note") or None, + "evidence": evidence.get("detail"), "evidenceFound": evidence.get("found"), + "suggested": suggested, + }) + totals["pointsPossible"] += possible + totals["pointsPossibleApplicable"] += applicable + categories.append({"category": name, "pointsPossible": possible, "pointsPossibleApplicable": applicable, "items": rows}) + + prereqs = [{"id": pid, "title": title, "recorded": (recorded.get(pid) or {}).get("status"), "note": (recorded.get(pid) or {}).get("note")} for pid, title in PREREQS] + outputs = { + "section": section, + "categories": categories, + "prerequisites": prereqs if not wanted else [], + "totals": totals, + "recordedPendingWithEvidence": pending_with_evidence, + "scoring": "The workbook multiplies a 0 to 5 score per item by its weight; points possible are 5 times the weight. Items recorded not applicable are excluded from pointsPossibleApplicable.", + "next": "Read the pending items to the user; record each outcome with onb_set_item_status (done, or not_applicable with a reason), then call this tool again for the final table. " + "Items in recordedPendingWithEvidence were recorded pending but now show evidence: ask the user whether to record them done.", + } + message = "{} item(s): {} done, {} not applicable, {} pending.".format(totals["items"], totals["done"], totals["notApplicable"], totals["pending"]) + if pending_with_evidence: + message += " Recorded pending but evidence found: {}.".format(", ".join(pending_with_evidence)) + return _success(message, outputs) diff --git a/plugins/README.md b/plugins/README.md index 85929a8c..9057701c 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -92,6 +92,7 @@ Python and remote-script actions. Plugins that belong to a blueprint or action a | DNS Record - Discover | [OHK-dnsdsc01](OHK-dnsdsc01/) | Discovers AD-integrated DNS A records across all configured LDAP utilities. | CloudBolt Plug-in | [DNS A Record](../blueprints/BP-dnsrec01/README.md) | | DNS Record - Teardown | [OHK-dnstrd01](OHK-dnstrd01/) | Tombstones the AD-integrated DNS A record created by the resource. | CloudBolt Plug-in | [DNS A Record](../blueprints/BP-dnsrec01/README.md) | | Drift Check | [OHK-9n4wfasa](OHK-9n4wfasa/) | Reports drift between a Bicep deployment stack and its template with a read-only what-if. | CloudBolt Plug-in | [Drift Check](../resource_actions/RSA-5jeixn92/) | +| Echo | [OHK-w78lalkx](OHK-w78lalkx/) | Returns the posted JSON or query fields with the calling user and the time, proving a synchronous authenticated call into CloudBolt. | CloudBolt Plug-in | [Echo](../webhooks/IWH-f16qxnhm/) | | Enable Apache Down Alert | [OHK-ut5c0igl](OHK-ut5c0igl/) | Adds a TCP readiness probe on port 443 to an OpenShift Virtualization VM (restarting it once), creates a PrometheusRule that fires ApacheDown when the VM's pod goes not-ready, and routes the alert to the Monitoring Alerts webhook. | CloudBolt Plug-in | [Enable Apache Down Alert](../server_actions/SVA-t1z9yt6d/README.md) | | Enable Apache Down Alert for Tier | [OHK-jjltp87s](OHK-jjltp87s/) | Sets up the ApacheDown alert for one tier's OpenShift Virtualization VM: a readiness probe, one restart, a PrometheusRule and delivery to the Monitoring Alerts webhook. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](../blueprints/BP-sy5pb325/README.md) | | Expire Servers | [OHK-59t2apzf](OHK-59t2apzf/) | Finds expired servers and runs the configured expiration orchestration action on them. | CloudBolt Plug-in | [Expire Servers](../recurring_jobs/RJB-nsx4v2s1/README.md) | @@ -102,7 +103,9 @@ Python and remote-script actions. Plugins that belong to a blueprint or action a | Extend GKE Namespace Expiration | [OHK-vtuzh4nh](OHK-vtuzh4nh/) | Extends a GKE namespace landing zone's expiration date on the resource and the namespace annotation. | CloudBolt Plug-in | [Extend GKE Namespace Expiration](../resource_actions/RSA-1qdgexp2/) | | Fetch Job Log | [OHK-2p0rhzup](OHK-2p0rhzup/) | Returns a job's status, output, errors, progress log, child jobs, failed descendants, and sync results in one call so a failed job can be diagnosed. | CloudBolt Plug-in | [Fetch Job Log](../mcp_tool_actions/MTA-8j9c0tb0/README.md) | | Form Options | [OHK-fx500o2r](OHK-fx500o2r/) | Serves custom-form dropdown options scoped to a CloudBolt Environment or an HCP Terraform no-code module, and builds a deployed resource's Terraform Update variables panel. | CloudBolt Plug-in | [Form Options](../webhooks/IWH-yj93is5z/) | +| Generate options for 'Application' | [OHK-f1ol9j5k](OHK-f1ol9j5k/) | Fills the Application dropdown from Python with a list of business applications, to show Python-backed parameter options. | CloudBolt Plug-in | [Generate options for 'Application'](../orchestration_actions/HPA-2ud31gkx/README.md) | | Generate options for 'Expiration Date' | [OHK-cfciy0fo](OHK-cfciy0fo/) | Returns an initial Expiration Date value of seven days from now. | CloudBolt Plug-in | [Generate options for 'Expiration Date'](../orchestration_actions/HPA-qb0w86mi/README.md) | +| Generate options for 'Maintenance Window' | [OHK-vwpjfa9d](OHK-vwpjfa9d/) | Fills the Maintenance Window dropdown with weekly two-hour UTC windows computed in Python. | CloudBolt Plug-in | [Generate options for 'Maintenance Window'](../orchestration_actions/HPA-onelxnkw/README.md) | | Generate options for Ansible job template maps | [OHK-7i1fk0l5](OHK-7i1fk0l5/) | Generates the dropdown choices an admin pins a blueprint's ansible_job_template_maps parameter from: every Variable Map on the instance whose JSON has a job_template key, labeled with the AAP job template it launches. | CloudBolt Plug-in | [Generate options for Ansible job template maps](../orchestration_actions/HPA-aualk6ei/) | | Generate Options for Domain Service Account | [OHK-ww524a3e](OHK-ww524a3e/) | Lists every connection info labeled domain_service_account, by name and username, with its ID as the value, for the domain_service_account parameter. | CloudBolt Plug-in | [Generate Options for Domain Service Account](../orchestration_actions/HPA-g8pqv6uv/README.md) | | Generate options for HCP Terraform coordinates | [OHK-529jjzli](OHK-529jjzli/) | Generates the dropdown choices an admin pins a no-code blueprint's HCP Terraform connection, organization, project and module from, each list narrowed by the pins before it. | CloudBolt Plug-in | [Generate options for HCP Terraform coordinates](../orchestration_actions/HPA-swe1kifa/) | @@ -115,6 +118,8 @@ Python and remote-script actions. Plugins that belong to a blueprint or action a | Grant Restricted Contributor Access | [OHK-pr8q2szp](OHK-pr8q2szp/) | Grants a user the CloudBolt Restricted Contributor role on the subscription. | CloudBolt Plug-in | [Grant Access](../resource_actions/RSA-1kpl3w0d/) | | HCP Terraform No-Code Module | [OHK-axtt0yqq](OHK-axtt0yqq/) | Provisions infrastructure from a pinned HCP Terraform no-code module into a chosen CloudBolt environment's Azure subscription through a workspace that HCP Terraform auto-applies. | CloudBolt Plug-in | [HCP Terraform No-Code + Ansible](../blueprints/BP-uh9v24v3/README.md), [HCP Terraform No-Code Module](../blueprints/BP-00meiwwz/README.md) | | HCP Terraform VM | [OHK-pvo05e24](OHK-pvo05e24/) | Provisions a VM through HCP Terraform into a chosen CloudBolt environment's Azure subscription, in a dedicated workspace with a plan-approval pause before apply. | CloudBolt Plug-in | [HCP Terraform VM](../blueprints/BP-b0qm83lh/README.md) | +| Hello World (Linux) | [OHK-818zw61m](OHK-818zw61m/) | Prints a hello message, the host name and the user inside a Linux guest to prove agentless script execution. | Remote Script | [Standard Server](../blueprints/BP-x78p48gz/README.md) | +| Hello World (Windows) | [OHK-u7j8o0vm](OHK-u7j8o0vm/) | Prints a hello message, the computer name and the user inside a Windows guest to prove agentless script execution. | Remote Script | [Standard Server](../blueprints/BP-x78p48gz/README.md) | | Initialize Windows Disk | [OHK-2evtyysr](OHK-2evtyysr/) | Initializes, partitions, and formats newly attached raw disks in a Windows guest. | Remote Script | [Windows File Server](../blueprints/BP-psw7rclb/README.md) | | Install Apache and PHP | [OHK-d9ujne9z](OHK-d9ujne9z/) | Installs Apache httpd and PHP on a blueprint's app tier through the OpenShift API tunnel, on the distribution's default PHP or a chosen stream. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](../blueprints/BP-sy5pb325/README.md) | | Install Apache TLS Proxy | [OHK-lwhuaezv](OHK-lwhuaezv/) | Installs Apache httpd with mod_ssl on a blueprint's web tier through the OpenShift API tunnel, ready to act as a TLS reverse proxy. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](../blueprints/BP-sy5pb325/README.md) | @@ -159,31 +164,38 @@ Python and remote-script actions. Plugins that belong to a blueprint or action a | Network Security Group Teardown | [OHK-9jouejv8](OHK-9jouejv8/) | Deletes the Azure network security group behind the resource. | CloudBolt Plug-in | [Azure Network Security Group](../blueprints/BP-3fdhnw54/README.md) | | Node Size - Generate Options by OS Build Architecture | [OHK-9csbq3zd](OHK-9csbq3zd/README.md) | Generates node_size options limited to sizes matching the selected OS build's processor architecture. | CloudBolt Plug-in | standalone | | Node Size - Generate Options by Region, OS Image, Security, Networking and Storage (Azure SKU capabilities) | [OHK-kujhsds0](OHK-kujhsds0/README.md) | Generates node_size options filtered by live Azure SKU capabilities for the selected region, image, security, networking, and storage settings. | CloudBolt Plug-in | standalone | +| Onboarding: Action Approval | [OHK-ndsuxv0k](OHK-ndsuxv0k/) | Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver. | CloudBolt Plug-in | [Onboarding: Action Approval](../mcp_tool_actions/MTA-bp0rkcq9/README.md) | +| Onboarding: CIT Test from Order | [OHK-yjow1qql](OHK-yjow1qql/) | Turns a finished blueprint order into a Continuous Infrastructure Testing test, the same as the order page's Add to CIT action. | CloudBolt Plug-in | [Onboarding: CIT Test from Order](../mcp_tool_actions/MTA-ckumouj0/README.md) | +| Onboarding: Configure Custom Server | [OHK-ilstyopk](OHK-ilstyopk/) | Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments. | CloudBolt Plug-in | [Onboarding: Configure Custom Server](../mcp_tool_actions/MTA-i1kmy5fd/README.md) | +| Onboarding: Environment Networks | [OHK-0u7aonmo](OHK-0u7aonmo/) | Lists the networks an environment can offer on its first NIC and makes the chosen ones, up to five, its only NIC 1 choices, removing networks from every other NIC. | CloudBolt Plug-in | [Onboarding: Environment Networks](../mcp_tool_actions/MTA-20u1ney4/README.md) | +| Onboarding: Failed Servers | [OHK-ep5vo2nu](OHK-ep5vo2nu/) | Lists servers left in Provision Failed state by failed orders and deletes the ones named, removing their VMs from the cloud when they exist. | CloudBolt Plug-in | [Onboarding: Failed Servers](../mcp_tool_actions/MTA-36j661yp/README.md) | +| Onboarding: Failure Trace | [OHK-y95w8ai0](OHK-y95w8ai0/) | Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback. | CloudBolt Plug-in | [Onboarding: Failure Trace](../mcp_tool_actions/MTA-jzscq0mk/README.md) | +| Onboarding: Group | [OHK-efxm9m2b](OHK-efxm9m2b/) | Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items. | CloudBolt Plug-in | [Onboarding: Group](../mcp_tool_actions/MTA-cpq7bvz4/README.md) | +| Onboarding: Handler Locations | [OHK-0nuhjdxl](OHK-0nuhjdxl/) | Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs. | CloudBolt Plug-in | [Onboarding: Handler Locations](../mcp_tool_actions/MTA-89dxppus/README.md) | +| Onboarding: Import Environments | [OHK-8j06wtoe](OHK-8j06wtoe/) | Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced; vCenter networks are chosen afterwards with onb_environment_networks), and reports existing environments instead of duplicating them. | CloudBolt Plug-in | [Onboarding: Import Environments](../mcp_tool_actions/MTA-i6p4j2l7/README.md) | +| Onboarding: Import OS Build | [OHK-k2p8ll4p](OHK-k2p8ll4p/) | Lists a handler's cached images for a location or imports one (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing a build of the same name so one build spans handlers, refreshing an empty cache without the whitelist, and attaching the build to the environments. | CloudBolt Plug-in | [Onboarding: Import OS Build](../mcp_tool_actions/MTA-0dr8xi4i/README.md) | +| Onboarding: Install | [OHK-j60flmb3](OHK-j60flmb3/) | Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version. | CloudBolt Plug-in | [Onboarding: Install](../mcp_tool_actions/MTA-6zxrhdls/README.md) | +| Onboarding: Install Content Library Item | [OHK-kst5rkhi](OHK-kst5rkhi/) | Lists a Content Library collection or downloads one item from content.cloudbolt.app and imports it the way the library page does, for UI extensions, recurring jobs, server and resource actions, rules and blueprints. | CloudBolt Plug-in | [Onboarding: Install Content Library Item](../mcp_tool_actions/MTA-znqpide5/README.md) | +| Onboarding: LDAP Mapping | [OHK-s76tknmk](OHK-s76tknmk/) | Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login. | CloudBolt Plug-in | [Onboarding: LDAP Mapping](../mcp_tool_actions/MTA-e5qv0zay/README.md) | +| Onboarding: Network Addressing | [OHK-gjfc20pv](OHK-gjfc20pv/) | Sets how servers on a network get their IP address (DHCP, static with gateway and netmask, a CloudBolt IP pool, an IPAM endpoint, or an IP typed per order) and verifies it with the network's IP provider. | CloudBolt Plug-in | [Onboarding: Network Addressing](../mcp_tool_actions/MTA-z3h0o9t3/README.md) | +| Onboarding: Parameter | [OHK-f6kqrklx](OHK-f6kqrklx/) | Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease. | CloudBolt Plug-in | [Onboarding: Parameter](../mcp_tool_actions/MTA-70aez9bm/README.md) | +| Onboarding: Playbook | [OHK-1am7i73s](OHK-1am7i73s/) | Returns a section of the onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. | CloudBolt Plug-in | [Onboarding: Playbook](../mcp_tool_actions/MTA-92b836jb/README.md) | +| Onboarding: Recent Errors | [OHK-4vwq70dg](OHK-4vwq70dg/) | Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most. | CloudBolt Plug-in | [Onboarding: Recent Errors](../mcp_tool_actions/MTA-hwg74btd/README.md) | +| Onboarding: Remove Environment | [OHK-1wmzl7sp](OHK-1wmzl7sp/) | Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it. | CloudBolt Plug-in | [Onboarding: Remove Environment](../mcp_tool_actions/MTA-pz5o2gjl/README.md) | +| Onboarding: Scorecard | [OHK-yqu8b25o](OHK-yqu8b25o/) | Builds the POC test plan scorecard from the recorded item statuses and live evidence on the appliance (orders, handlers, environments, groups, mappings, actions, jobs), per category with weights. | CloudBolt Plug-in | [Onboarding: Scorecard](../mcp_tool_actions/MTA-zfoxwh12/README.md) | +| Onboarding: Set Item Status | [OHK-5885tete](OHK-5885tete/) | Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read. | CloudBolt Plug-in | [Onboarding: Set Item Status](../mcp_tool_actions/MTA-p72v9y76/README.md) | +| Onboarding: SMTP Settings | [OHK-be18kqal](OHK-be18kqal/) | Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings. | CloudBolt Plug-in | [Onboarding: SMTP Settings](../mcp_tool_actions/MTA-89w58iux/README.md) | +| Onboarding: SMTP Test | [OHK-jdyan3in](OHK-jdyan3in/) | Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails. | CloudBolt Plug-in | [Onboarding: SMTP Test](../mcp_tool_actions/MTA-qab6r2gk/README.md) | +| Onboarding: Status | [OHK-5zg1dkcr](OHK-5zg1dkcr/) | Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links. | CloudBolt Plug-in | [Onboarding: Status](../mcp_tool_actions/MTA-1985b88g/README.md) | +| Onboarding: Sync Images | [OHK-bbhlwspa](OHK-bbhlwspa/) | Fills a resource handler's image cache now without the image whitelist and enables the recurring job and rule that keep it fresh, so the image pickers and onb_import_os_build see every image the credentials can. | CloudBolt Plug-in | [Onboarding: Sync Images](../mcp_tool_actions/MTA-po1gmnou/README.md) | +| Onboarding: Tag Mapping | [OHK-b8c90uok](OHK-b8c90uok/) | Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag. | CloudBolt Plug-in | [Onboarding: Tag Mapping](../mcp_tool_actions/MTA-0689nxjy/README.md) | +| Onboarding: Trim Environment Order Form | [OHK-qn4k1pme](OHK-qn4k1pme/) | Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size, the NIC 1 networks chosen with onb_environment_networks and, where needed, the password; the report profile only lists the current form. | CloudBolt Plug-in | [Onboarding: Trim Environment Order Form](../mcp_tool_actions/MTA-iyknuxox/README.md) | +| Onboarding: UI Link | [OHK-1gp25bmt](OHK-1gp25bmt/) | Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. | CloudBolt Plug-in | [Onboarding: UI Link](../mcp_tool_actions/MTA-zpohocjt/README.md) | +| Onboarding: User | [OHK-8in52yhn](OHK-8in52yhn/) | Assigns roles in a group to a local POC user; a user that does not exist yet is added by the admin on the Users list with its password, and the tool says how. | CloudBolt Plug-in | [Onboarding: User](../mcp_tool_actions/MTA-tuzkb8h4/README.md) | +| Onboarding: Verify LDAP | [OHK-j82f4ibp](OHK-j82f4ibp/) | Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it. | CloudBolt Plug-in | [Onboarding: Verify LDAP](../mcp_tool_actions/MTA-kw8krevn/README.md) | +| Onboarding: Verify Resource Handler | [OHK-s7cdvkpr](OHK-s7cdvkpr/) | Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool. | CloudBolt Plug-in | [Onboarding: Verify Resource Handler](../mcp_tool_actions/MTA-r5v1eblg/README.md) | | OpenShift Project Landing Zone | [OHK-prew0osh](OHK-prew0osh/) | Creates an OpenShift project with quota, limits, network policies, and an optional role binding, then pins a CloudBolt environment to it. | CloudBolt Plug-in | [OpenShift Project Landing Zone](../blueprints/BP-tikkhf2y/README.md) | | Order Counts by Blueprint | [OHK-yjblxbwg](OHK-yjblxbwg/) | | CloudBolt Plug-in | [Order Counts by Blueprint](../mcp_tool_actions/MTA-lp8lgi7e/) | -| POC Onboarding: Action Approval | [OHK-ndsuxv0k](OHK-ndsuxv0k/) | Turns Requires approval on or off for a server or resource action, which the API cannot change, so a day-2 action pauses as an order for an approver. | CloudBolt Plug-in | [POC Onboarding: Action Approval](../mcp_tool_actions/MTA-bp0rkcq9/README.md) | -| POC Onboarding: Configure Custom Server | [OHK-ilstyopk](OHK-ilstyopk/) | Makes the shipped Custom Server blueprint orderable for the POC: recreates it when missing, activates it, enables every environment on its server tier, and sets a hostname template on the tier or on the listed environments. | CloudBolt Plug-in | [POC Onboarding: Configure Custom Server](../mcp_tool_actions/MTA-i1kmy5fd/README.md) | -| POC Onboarding: Failure Trace | [OHK-y95w8ai0](OHK-y95w8ai0/) | Walks an order or job down to the jobs that actually failed and returns their errors, output, progress tail, failed children and a hint for the common provisioning failures, naming the job id to pass to fetch_job_log for the traceback. | CloudBolt Plug-in | [POC Onboarding: Failure Trace](../mcp_tool_actions/MTA-jzscq0mk/README.md) | -| POC Onboarding: Group | [OHK-efxm9m2b](OHK-efxm9m2b/) | Creates or updates a group with its parent, entitled environments, auto-approval flag and server-count quota, covering the test plan's entitlement, approval and quota items. | CloudBolt Plug-in | [POC Onboarding: Group](../mcp_tool_actions/MTA-cpq7bvz4/README.md) | -| POC Onboarding: Handler Locations | [OHK-0nuhjdxl](OHK-0nuhjdxl/) | Lists the regions, locations or clusters a resource handler can turn into environments, flags the ones already imported, lists the existing environments, and for an AWS region lists its VPCs. | CloudBolt Plug-in | [POC Onboarding: Handler Locations](../mcp_tool_actions/MTA-89dxppus/README.md) | -| POC Onboarding: Import Environments | [OHK-8j06wtoe](OHK-8j06wtoe/) | Creates one environment per listed location on a resource handler the way the Import locations dialog does, brings the networks over (AWS subnets with the environment, Azure subnets synced, vCenter cluster networks attached to NIC 1), and reports existing environments instead of duplicating them. | CloudBolt Plug-in | [POC Onboarding: Import Environments](../mcp_tool_actions/MTA-i6p4j2l7/README.md) | -| POC Onboarding: Import OS Build | [OHK-k2p8ll4p](OHK-k2p8ll4p/) | Imports one image (AWS AMI, Azure marketplace image, vCenter template) into an OS build, reusing an existing build of the same name so one build spans handlers, and attaches the build to the handler's environments. | CloudBolt Plug-in | [POC Onboarding: Import OS Build](../mcp_tool_actions/MTA-0dr8xi4i/README.md) | -| POC Onboarding: Install | [OHK-j60flmb3](OHK-j60flmb3/) | Finishes the toolkit install after a sync or package import: sets Synchronous Action on the inline tools, enables every tool, checks outbound access to the Content Library and GitHub, and records the toolkit version. | CloudBolt Plug-in | [POC Onboarding: Install](../mcp_tool_actions/MTA-6zxrhdls/README.md) | -| POC Onboarding: LDAP Mapping | [OHK-s76tknmk](OHK-s76tknmk/) | Maps an AD or LDAP group DN to a CloudBolt group with roles on an existing LDAP utility, so directory users land in the right group at first login. | CloudBolt Plug-in | [POC Onboarding: LDAP Mapping](../mcp_tool_actions/MTA-e5qv0zay/README.md) | -| POC Onboarding: Parameter | [OHK-f6kqrklx](OHK-f6kqrklx/) | Creates or updates a parameter and attaches it to environments and groups with options and constraints, covering the test plan's user-defined parameter, cost-center tag source, power schedule and expiration date with a maximum lease. | CloudBolt Plug-in | [POC Onboarding: Parameter](../mcp_tool_actions/MTA-70aez9bm/README.md) | -| POC Onboarding: Playbook | [OHK-1am7i73s](OHK-1am7i73s/) | Returns a section of the POC onboarding skill text from the public cloudbolt-as-code repository, so MCP clients without skill support follow the same procedure. | CloudBolt Plug-in | [POC Onboarding: Playbook](../mcp_tool_actions/MTA-92b836jb/README.md) | -| POC Onboarding: Recent Errors | [OHK-4vwq70dg](OHK-4vwq70dg/) | Reads the tail of a CloudBolt log and returns the recent WARNING-and-above entries grouped by exception and message, secrets redacted, each group with a hint for the failures a new appliance hits most. | CloudBolt Plug-in | [POC Onboarding: Recent Errors](../mcp_tool_actions/MTA-hwg74btd/README.md) | -| POC Onboarding: Remove Environment | [OHK-1wmzl7sp](OHK-1wmzl7sp/) | Deletes an environment imported by mistake so the POC can start over; refuses while active servers live in it. | CloudBolt Plug-in | [POC Onboarding: Remove Environment](../mcp_tool_actions/MTA-pz5o2gjl/README.md) | -| POC Onboarding: Set Item Status | [OHK-5885tete](OHK-5885tete/) | Records a POC test plan item or prerequisite as done, skipped, not applicable or pending with a reason, in a namespaced CustomField store that onb_status and the scorecard read. | CloudBolt Plug-in | [POC Onboarding: Set Item Status](../mcp_tool_actions/MTA-p72v9y76/README.md) | -| POC Onboarding: SMTP Settings | [OHK-be18kqal](OHK-be18kqal/) | Sets the non-secret email settings and returns the link where the SMTP password is entered; with no inputs it reports the current settings. | CloudBolt Plug-in | [POC Onboarding: SMTP Settings](../mcp_tool_actions/MTA-89w58iux/README.md) | -| POC Onboarding: SMTP Test | [OHK-jdyan3in](OHK-jdyan3in/) | Sends a test email through the saved SMTP settings and returns the relay's real error with a hint when it fails. | CloudBolt Plug-in | [POC Onboarding: SMTP Test](../mcp_tool_actions/MTA-qab6r2gk/README.md) | -| POC Onboarding: Status | [OHK-5zg1dkcr](OHK-5zg1dkcr/) | Reports the appliance's POC readiness in one read: licence, portal, SMTP, proxy, Content Library, Setup Wizard, resource handlers with environments and last verify result, the Custom Server blueprint, groups, users, LDAP, SSO, installed onboarding tools, recorded POC items, and the next steps with UI links. | CloudBolt Plug-in | [POC Onboarding: Status](../mcp_tool_actions/MTA-1985b88g/README.md) | -| POC Onboarding: Tag Mapping | [OHK-b8c90uok](OHK-b8c90uok/) | Lists, adds or removes a resource handler's mappings from CloudBolt attributes or parameters to cloud tags, giving cross-cloud tagging and the cost-center tag. | CloudBolt Plug-in | [POC Onboarding: Tag Mapping](../mcp_tool_actions/MTA-0689nxjy/README.md) | -| POC Onboarding: Trim Environment Order Form | [OHK-qn4k1pme](OHK-qn4k1pme/) | Shortens an environment's order form for a POC by pinning infrastructure parameters to one value (which hides a required field) and removing the optional technology parameters, leaving the size and, where needed, the network and password; the report profile only lists the current form. | CloudBolt Plug-in | [POC Onboarding: Trim Environment Order Form](../mcp_tool_actions/MTA-iyknuxox/README.md) | -| POC Onboarding: UI Link | [OHK-1gp25bmt](OHK-1gp25bmt/) | Turns a CloudBolt global id or a named admin page (new resource handler per technology, LDAP, SMTP, user edit, environment parameters, group quotas, and more) into an absolute UI link so the agent can send the user to the exact page where a secret is entered or an object is edited. | CloudBolt Plug-in | [POC Onboarding: UI Link](../mcp_tool_actions/MTA-zpohocjt/README.md) | -| POC Onboarding: User | [OHK-8in52yhn](OHK-8in52yhn/) | Creates a local user with no usable password and assigns roles in a group, returning the edit link where the admin sets the password; an existing user only gets the roles. | CloudBolt Plug-in | [POC Onboarding: User](../mcp_tool_actions/MTA-tuzkb8h4/README.md) | -| POC Onboarding: Verify LDAP | [OHK-j82f4ibp](OHK-j82f4ibp/) | Runs an LDAP utility's Verify Connection and returns the real bind or search error with a hint and the links to fix it. | CloudBolt Plug-in | [POC Onboarding: Verify LDAP](../mcp_tool_actions/MTA-kw8krevn/README.md) | -| POC Onboarding: Verify Resource Handler | [OHK-s7cdvkpr](OHK-s7cdvkpr/) | Runs a resource handler's Verify Connection and returns the real exception text with a technology-specific hint, the minimum-permissions document and the handler's edit and verify links, recording the result for the status tool. | CloudBolt Plug-in | [POC Onboarding: Verify Resource Handler](../mcp_tool_actions/MTA-r5v1eblg/README.md) | | Prepare OpenShift Pod Network | [OHK-zsv5qq15](OHK-zsv5qq15/) | Adds the Pod networking record CloudBolt looks up under the namespace of each OpenShift Virtualization environment in the order, so server builds outside the default namespace do not fail at Adjusting NICs. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](../blueprints/BP-sy5pb325/README.md) | | Publish VM HTTPS Route | [OHK-njnsxqbf](OHK-njnsxqbf/) | Publishes an OpenShift Virtualization VM's HTTPS port outside the cluster with a re-encrypt Route and stores the URL on the resource. | CloudBolt Plug-in | [3-Tier Web App on OpenShift Virtualization](../blueprints/BP-sy5pb325/README.md) | | Remove from StormForge | [OHK-vdr6oo2z](OHK-vdr6oo2z/) | After an EKS, AKS or GKE cluster is deleted, deletes the cluster in StormForge. | CloudBolt Plug-in | [AWS EKS](../blueprints/BP-r5apcf7e/README.md), [Azure Kubernetes Service](../blueprints/BP-20q58q9z/README.md), [Google Kubernetes Engine](../blueprints/BP-g8g8aecx/README.md) | diff --git a/webhooks/IWH-f16qxnhm/IWH-f16qxnhm_metadata.json b/webhooks/IWH-f16qxnhm/IWH-f16qxnhm_metadata.json new file mode 100644 index 00000000..a20e1704 --- /dev/null +++ b/webhooks/IWH-f16qxnhm/IWH-f16qxnhm_metadata.json @@ -0,0 +1,16 @@ +{ + "action_input_default_values": [], + "authentication_method": "normal", + "base_action_name": "Echo", + "dependencies": { + "hook": "plugins/OHK-w78lalkx" + }, + "description": "Endpoint that returns the posted JSON with the calling user and the time, so an external system can prove a synchronous authenticated call into CloudBolt.", + "enabled": true, + "id": "IWH-f16qxnhm", + "label": "Echo", + "last_updated": null, + "maximum_version_required": "", + "minimum_version_required": "8.6", + "uri_path": "echo" +} diff --git a/webhooks/README.md b/webhooks/README.md index 86732a5b..a5e090dc 100644 --- a/webhooks/README.md +++ b/webhooks/README.md @@ -7,6 +7,7 @@ Inbound REST endpoints. |---|---|---|---| | Aria Migration Form Options | [IWH-xr0508nf](IWH-xr0508nf/) | GET endpoint the Aria migration order form calls to list Aria projects, an Aria cloud template's resources, a CloudBolt blueprint's tiers, and CloudBolt groups. | [Aria Migration Form Options](../plugins/OHK-xhpq1rn3/) | | Azure PS Script Panel | [IWH-vfkvduxm](IWH-vfkvduxm/) | GET endpoint the Run an Azure PowerShell Script order form calls to fetch the SurveyJS fields for the chosen catalog script's declared action inputs. | [Azure PS Script Panel](../plugins/OHK-bvn2l7q1/) | +| Echo | [IWH-f16qxnhm](IWH-f16qxnhm/) | Endpoint that returns the posted JSON with the calling user and the time, so an external system can prove a synchronous authenticated call into CloudBolt. | [Echo](../plugins/OHK-w78lalkx/) | | Form Options | [IWH-yj93is5z](IWH-yj93is5z/) | GET endpoint that custom forms call to fill dropdowns from a CloudBolt Environment (resource groups, subnets, images, sizes, any custom field), from an HCP Terraform no-code module's variable options, or to build a deployed resource's Terraform Update variables panel. | [Form Options](../plugins/OHK-fx500o2r/) | | IP Reservations | [IWH-x82773zb](IWH-x82773zb/README.md) | Endpoint external systems call to reserve the next free IP in a CloudBolt IP pool, release it, and check a pool's free count. | [IP Reservations](../plugins/OHK-axepfitm/) | | Monitoring Alerts | [IWH-i7b44zvs](IWH-i7b44zvs/README.md) | Endpoint a monitoring system posts Alertmanager alerts to; each firing alert starts the mapped remediation server action on the server it names. | [Monitoring Alerts](../plugins/OHK-ogu8lqt2/) |