CorefinityCorefinityDocs
Open the Control PanelControl Panel
Playbooks · 7 of 13

Create or refresh a staging environment

Create a staging environment for a site, or refresh an existing one from another environment, then check it answers.

create-staging
On this page

Start it

Paste this into an assistant that is connected to Corefinity.

Prompt
Use the Corefinity MCP prompt "create-staging" with site: <the site: its domain, or the id of any of its environments>, name: <the staging environment's name. defaults to staging>, copy_from: <the environment to copy from. defaults to production>, branch: <a git branch to deploy to it afterwards, if any>. Follow it step by step and tell me before anything that changes my account.

Arguments

siteRequired

The site: its domain, or the id of any of its environments.

name

The staging environment's name. Defaults to Staging.

copy_from

The environment to copy from. Defaults to production.

branch

A Git branch to deploy to it afterwards, if any.

What your assistant is told

Purpose: give <the site's domain> a staging environment, or refresh an existing one from another environment, and check it answers.

  • The environment to create or refresh: <name> (when not given: Staging).
  • Copy it from: <copy from> (when not given: production).
  • A branch to deploy to it afterwards: <branch>.

Before you start

  • The site row you start from is <the id of the site row you work on>. Use it as site_id.
  • Ask before every change, and type a confirm_* value only after the person has said yes to that exact action.
  • Secrets, such as the environment's HTTP login, open in the person's browser. Never ask for reveal_to_agent: true unless the person asks for the value to be given to you.
  • If a call is refused because this token lacks a scope or the site is outside its limits, the person is asked to allow it in the Control Panel; carry on once they have.

Steps

  1. Does it exist, and is there room? Read corestack_environment_list. Check room with corestack_uat_sizes_list for a CoreStack site, or corecluster_capacity_check for a CoreCluster site. If the person wants a price first, ask corestack_billing_quote_preview.
  2. Create or refresh.
  3. A branch, if one was named: read corestack_deployments_get, then run corestack_deployment_trigger when the environment deploys from Git.
  4. Verify with corestack_site_http_check. The environment's HTTP login opens in the person's browser through corestack_http_auth_reveal_password.

A create that waits because the region's platform is not taking new changes for a while ("Waiting for the platform") carries on by itself: follow it with corestack_site_progress_get or corestack_site_operation_get instead of creating it again.

Stop and ask

  • Before creating or replacing anything, and before any price is incurred.
  • If the copy would land on production: stop; this playbook never writes production.

When you are done

Report the environment's address and how the person gets its login.

Was this helpful?
Open in ClaudeOpen in ChatGPT