diff --git a/content/admin/upgrading-your-instance/index.md b/content/admin/upgrading-your-instance/index.md index 7d32e899c243..ad6b74bff376 100644 --- a/content/admin/upgrading-your-instance/index.md +++ b/content/admin/upgrading-your-instance/index.md @@ -8,7 +8,4 @@ - /performing-an-upgrade - /troubleshooting-upgrades shortTitle: Upgrade your instance - redirect_from: - - /admin/upgrading-your-instance/automation-via-cli-api - - /admin/upgrading-your-instance/automation-via-cli-api/enterprise-server-upgrade-automation --- diff --git a/content/admin/upgrading-your-instance/performing-an-upgrade/automating-an-upgrade.md b/content/admin/upgrading-your-instance/performing-an-upgrade/automating-an-upgrade.md new file mode 100644 index 000000000000..8a7a1c484aad --- /dev/null +++ b/content/admin/upgrading-your-instance/performing-an-upgrade/automating-an-upgrade.md @@ -0,0 +1,346 @@ +--- +title: Automating an upgrade +intro: You can automate upgrade operations using the REST API or a {% data variables.product.prodname_cli %} extension. +versions: + ghes: '>=3.22' +shortTitle: Automate an upgrade +contentType: how-tos +--- + +You can upgrade your {% data variables.product.prodname_ghe_server %} instance using the Manage {% data variables.product.prodname_ghe_server %} API or the `gh es` extension for {% data variables.product.prodname_cli %}. These tools automate the process of downloading the upgrade package, running pre-upgrade checks, and applying the new version. + +## Prerequisites + +* Back up your data with [{% data variables.product.prodname_enterprise_backup_utilities %}](https://github.com/github/backup-utils#readme). +* Schedule a maintenance window for end users. +* Ensure you can authenticate to the Manage {% data variables.product.prodname_ghe_server %} API. For more information, see [AUTOTITLE](/rest/enterprise-admin#authentication). + +## Automating an upgrade using the REST API + +1. Download the upgrade package. + + ```shell + curl -L \ + -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/upgrade/download \ + -d '{"version":"VERSION"}' + ``` + +1. Confirm the download has completed before proceeding. + + ```shell + curl -L \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/upgrade/download/status + ``` + + Wait until `status` shows `COMPLETED`. + +1. Apply the upgrade's pre-upgrade phase. + + ```shell + curl -L \ + -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/upgrade/apply \ + -d '{"version":"VERSION", "phase":"pre-upgrade"}' + ``` + +1. Monitor the pre-upgrade phase until it completes. + + ```shell + curl -L \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + "https://HOSTNAME:8443/manage/v1/upgrade/status?is_verbose=true" + ``` + + Wait until `status` shows `completed` and `is_running` shows `false`. + +1. Enable maintenance mode. + + ```shell + curl -L \ + -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/maintenance \ + -d '{"enabled":true}' + ``` + +1. Apply the upgrade's upgrade phase. + + ```shell + curl -L \ + -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/upgrade/apply \ + -d '{"version":"VERSION", "phase":"upgrade"}' + ``` + +1. Confirm the release version has been updated. + + ```shell + curl -L \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/version + ``` + +1. Disable maintenance mode. + + ```shell + curl -L \ + -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/maintenance \ + -d '{"enabled":false}' + ``` + +## Automating an upgrade using the {% data variables.product.prodname_cli %} extension + +1. Download the upgrade package. To download a specific version, specify the `--version` flag; otherwise, the latest available version is downloaded. + + ```shell + # Download a specific version + gh es upgrade download --version VERSION + + # Or download the latest available version + gh es upgrade download + ``` + +1. Confirm the download has completed before proceeding. + + ```shell + gh es upgrade download status + ``` + + Wait until `status` shows `COMPLETED`. + +1. Apply the upgrade's pre-upgrade phase. + + ```shell + gh es upgrade apply --version VERSION --phase pre-upgrade + ``` + +1. Monitor the pre-upgrade phase until it completes. + + ```shell + gh es upgrade status --verbose + ``` + + Wait until `status` shows `completed` and `is_running` shows `false`. + +1. Enable maintenance mode. + + ```shell + gh es maintenance set --enabled true + ``` + +1. Apply the upgrade's upgrade phase. + + ```shell + gh es upgrade apply --version VERSION --phase upgrade + ``` + +1. Confirm the release version has been updated. + + ```shell + gh es release version + ``` + +1. Disable maintenance mode. + + ```shell + gh es maintenance set --enabled false + ``` + +## Upgrading a high availability deployment + +For instances with a high availability (HA) replica, the download and pre-upgrade phases are non-disruptive and can run across all nodes at once. UUID targeting is only needed for the upgrade phase itself, which triggers the reboot. This lets you control the order nodes reboot in: upgrade the replica first, then the primary. + +To retrieve node UUIDs, run `gh es config get-metadata` or query `GET /manage/v1/config/nodes`. + +### Upgrading a high availability deployment using the {% data variables.product.prodname_cli %} + +1. Download the package to all nodes. + + ```shell + gh es upgrade download --version VERSION + ``` + +1. Wait for the download to complete on all nodes. + + ```shell + gh es upgrade download status + ``` + +1. Run the pre-upgrade phase on all nodes at once. This phase is non-disruptive. + + ```shell + gh es upgrade apply --version VERSION --phase pre-upgrade + ``` + +1. Wait for the pre-upgrade phase to complete. + + ```shell + gh es upgrade status --verbose + ``` + +1. Enable maintenance mode. + + ```shell + gh es maintenance set --enabled true + ``` + +1. Stop replication on the replica. + + ```shell + ghe-repl-stop + ``` + +1. Upgrade the primary first, which triggers the reboot, then monitor its progress. + + ```shell + gh es upgrade apply --version VERSION --phase upgrade --uuid PRIMARY-UUID + gh es upgrade status --uuid PRIMARY-UUID --verbose + ``` + +1. After the primary finishes, upgrade the replica, then monitor its progress. + + ```shell + gh es upgrade apply --version VERSION --phase upgrade --uuid REPLICA-UUID + gh es upgrade status --uuid REPLICA-UUID --verbose + ``` + +1. Start replication again on the replica. + + ```shell + ghe-repl-start + ``` + +1. Verify replication health and the version, then disable maintenance mode. + + ```shell + gh es replication status + gh es release version + gh es maintenance set --enabled false + ``` + +### Upgrading a high availability deployment using the REST API + +1. Download the package to all nodes. + + ```shell + curl -L -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/upgrade/download \ + -d '{"version":"VERSION"}' + ``` + +1. Wait for the download to complete on all nodes. + + ```shell + curl -L \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/upgrade/download/status + ``` + +1. Run the pre-upgrade phase on all nodes at once. This phase is non-disruptive. + + ```shell + curl -L -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/upgrade/apply \ + -d '{"version":"VERSION","phase":"pre-upgrade"}' + ``` + +1. Wait for the pre-upgrade phase to complete. + + ```shell + curl -L \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + "https://HOSTNAME:8443/manage/v1/upgrade/status?is_verbose=true" + ``` + +1. Enable maintenance mode. + + ```shell + curl -L -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/maintenance \ + -d '{"enabled":true}' + ``` + +1. Stop replication on the replica. + + ```shell + ghe-repl-stop + ``` + +1. Upgrade the primary first, which triggers the reboot, then monitor its progress. + + ```shell + curl -L -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/upgrade/apply \ + -d '{"version":"VERSION","phase":"upgrade","uuid":"PRIMARY-UUID"}' + + curl -L \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + "https://HOSTNAME:8443/manage/v1/upgrade/status?uuid=PRIMARY-UUID&is_verbose=true" + ``` + +1. After the primary finishes, upgrade the replica, then monitor its progress. + + ```shell + curl -L -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/upgrade/apply \ + -d '{"version":"VERSION","phase":"upgrade","uuid":"REPLICA-UUID"}' + + curl -L \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + "https://HOSTNAME:8443/manage/v1/upgrade/status?uuid=REPLICA-UUID&is_verbose=true" + ``` + +1. Start replication again on the replica. + + ```shell + ghe-repl-start + ``` + +1. Verify replication health and the version, then disable maintenance mode. + + ```shell + curl -L \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/replication/status + + curl -L \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/version + + curl -L -X POST \ + -u "api_key:ROOT-SITE-ADMINISTRATOR-PASSWORD" \ + -H "Content-Type: application/json" \ + https://HOSTNAME:8443/manage/v1/maintenance \ + -d '{"enabled":false}' + ``` diff --git a/content/admin/upgrading-your-instance/performing-an-upgrade/index.md b/content/admin/upgrading-your-instance/performing-an-upgrade/index.md index dca37028a9d3..a946182ae3bd 100644 --- a/content/admin/upgrading-your-instance/performing-an-upgrade/index.md +++ b/content/admin/upgrading-your-instance/performing-an-upgrade/index.md @@ -6,6 +6,7 @@ versions: children: - /upgrading-with-a-hotpatch - /upgrading-with-an-upgrade-package + - /automating-an-upgrade - /migrating-from-github-enterprise-1110x-to-2123 shortTitle: Perform an upgrade redirect_from: diff --git a/content/admin/upgrading-your-instance/performing-an-upgrade/upgrading-with-an-upgrade-package.md b/content/admin/upgrading-your-instance/performing-an-upgrade/upgrading-with-an-upgrade-package.md index 700e98dcab2e..ffe18cfd912b 100644 --- a/content/admin/upgrading-your-instance/performing-an-upgrade/upgrading-with-an-upgrade-package.md +++ b/content/admin/upgrading-your-instance/performing-an-upgrade/upgrading-with-an-upgrade-package.md @@ -98,7 +98,7 @@ To upgrade a multi-node {% data variables.product.prodname_ghe_server %} environ ## Upgrading an instance using phased upgrade execution -Phased upgrade execution allows {% data variables.product.prodname_ghe_server %} operators running versions 3.22 or greater better control over downtime-inducing actions by isolating those actions to their own phase. To use phased execution perform the following after downloading the upgrade package: +Phased upgrade execution allows {% data variables.product.prodname_ghe_server %} operators running versions 3.21 or greater better control over downtime-inducing actions by isolating those actions to their own phase. To use phased execution perform the following after downloading the upgrade package: 1. Run the package's pre-upgrade phase ```shell diff --git a/content/billing/reference/github-license-users.md b/content/billing/reference/github-license-users.md index 254495069636..47e80218b044 100644 --- a/content/billing/reference/github-license-users.md +++ b/content/billing/reference/github-license-users.md @@ -63,7 +63,7 @@ If your enterprise does not use {% data variables.product.prodname_emus %} or us * Suspended {% data variables.enterprise.prodname_managed_users_caps %} * Enterprise owners who are not a member or owner of at least one organization in the enterprise -* The user who set up the enterprise +* The setup user for an enterprise that uses {% data variables.product.prodname_emus %} (see [AUTOTITLE](/enterprise-cloud@latest/admin/concepts/identity-and-access-management/setup-user)) * Enterprise billing managers * Billing managers for individual organizations * Anyone with a pending invitation to become a billing manager diff --git a/content/code-security/concepts/supply-chain-security/dependabot-on-actions.md b/content/code-security/concepts/supply-chain-security/dependabot-on-actions.md index ed51dd054c84..0b7093d81470 100644 --- a/content/code-security/concepts/supply-chain-security/dependabot-on-actions.md +++ b/content/code-security/concepts/supply-chain-security/dependabot-on-actions.md @@ -32,11 +32,8 @@ Future releases of {% data variables.product.github %} will remove the ability t To run {% data variables.product.prodname_dependabot %} jobs on {% data variables.product.prodname_actions %}, {% data variables.product.github %} creates a dynamic workflow for each job. Unlike standard {% data variables.product.prodname_actions %} workflows, dynamic workflows are generated for a specific run and are not stored in your repository's `.github/workflows` directory. -You may see workflow runs named `dynamic/dependabot/dependabot-updates` or check runs with `(dynamic)` appended to their names. You can use the workflow run logs to troubleshoot errors or configuration problems. - You may see workflow runs named `dynamic/dependabot/dependabot-updates` or check runs with `(dynamic)` appended to their names. To troubleshoot errors or configuration problems, on the repository's **Actions** tab, filter the workflow runs to show only {% data variables.product.prodname_dependabot %} update jobs, then open a workflow run to view the logs. -## Runner options ## Runner options You can run {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_actions %} using: diff --git a/content/copilot/concepts/agents/copilot-cli/about-custom-agents.md b/content/copilot/concepts/agents/copilot-cli/about-custom-agents.md index 2d0a9dd27737..dfb5390d8158 100644 --- a/content/copilot/concepts/agents/copilot-cli/about-custom-agents.md +++ b/content/copilot/concepts/agents/copilot-cli/about-custom-agents.md @@ -35,6 +35,8 @@ In addition to the main {% data variables.product.prodname_copilot_short %} agen * **rubber-duck** — A constructive critic that gives {% data variables.product.prodname_copilot_short %} a second opinion on its own plans, code, and tests. It runs on a different model from the one driving your session, so it brings a complementary perspective. It is designed to review proposed changes, not to make file changes itself. For more information, see [AUTOTITLE](/copilot/concepts/agents/copilot-cli/rubber-duck). +* **security-review** — A read-only specialist that searches your codebase for exploitable security vulnerabilities and reports only high-confidence findings. You can invoke it explicitly using the `/security-review` slash command. The main agent can also delegate security-focused work to it, including when you explicitly ask it to find exploitable vulnerabilities. + ## Running agents as subagents One of the benefits of using custom agents you have defined yourself—or the built-in agents—is that the main {% data variables.product.prodname_copilot_short %} agent can run them as subagents with a separate context window. This means that your custom agent, or built-in agent, can focus on a specific subtask without cluttering the context window of the main agent. diff --git a/content/copilot/concepts/agents/copilot-cli/autopilot.md b/content/copilot/concepts/agents/copilot-cli/autopilot.md index 86d20c34f194..af3db81b0499 100644 --- a/content/copilot/concepts/agents/copilot-cli/autopilot.md +++ b/content/copilot/concepts/agents/copilot-cli/autopilot.md @@ -26,7 +26,7 @@ In autopilot mode, {% data variables.product.prodname_copilot_short %} keeps on * The agent determines that the task is complete. * A problem occurs that prevents further progress. * You press Ctrl+C to stop the agent from continuing. -* The maximum continuation limit is reached (if set). +* The maximum continuation limit is reached. By default, autopilot mode pauses after 5 automatic continuation messages. You can adjust this limit with the `--max-autopilot-continues` option. To switch into autopilot mode during an interactive session, press Shift+Tab and cycle through the available modes until you reach autopilot mode, then enter your prompt. Use the same keypress to switch from autopilot mode back to the standard interactive mode. @@ -35,7 +35,7 @@ To switch into autopilot mode during an interactive session, press ShiftCtrl+Y to open the current session's most recent research report in the terminal. > [!NOTE] -> The application used to display a report when you press Ctrl+Y is determined by the value of the `COPILOT_EDITOR`, `VISUAL`, or `EDITOR` environment variables (in that order of precedence). If none of these are set, the CLI will use vi on Linux or vim on macOS. +> The application used to display a report when you press Ctrl+Y is determined by the value of the `COPILOT_EDITOR`, `VISUAL`, or `EDITOR` environment variables (in that order of precedence). On Linux and macOS, if none of these are set, the CLI will use vi. To share the report you can either save it to a file or create a {% data variables.product.github %} gist. diff --git a/content/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.md b/content/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.md index 5563201809a9..d8d62882b501 100644 --- a/content/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.md +++ b/content/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers.md @@ -91,7 +91,7 @@ copilot mcp add context7 -- npx -y @upstash/context7-mcp Add a local server with environment variables: ```shell copy -copilot mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=YOUR_GITHUB_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server +copilot mcp add github --env GITHUB_PERSONAL_ACCESS_TOKEN=YOUR_GITHUB_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server ``` Add a remote HTTP server: @@ -219,7 +219,7 @@ You can manage your configured MCP servers using the `/mcp` commands in interact * **Delete a server:** Use the command `/mcp delete SERVER-NAME`. -* **Disable a server:** Use the command `/mcp disable SERVER-NAME`. A disabled server remains configured but is not used by {% data variables.product.prodname_copilot_short %} for the current session. +* **Disable a server:** Use the command `/mcp disable SERVER-NAME`. A disabled server remains configured but is not used by {% data variables.product.prodname_copilot_short %}. This setting persists across sessions. * **Enable a previously disabled server:** Use the command `/mcp enable SERVER-NAME`. diff --git a/content/copilot/reference/copilot-billing/models-and-pricing.md b/content/copilot/reference/copilot-billing/models-and-pricing.md index 43a6212eda3c..8d4ef319e0e0 100644 --- a/content/copilot/reference/copilot-billing/models-and-pricing.md +++ b/content/copilot/reference/copilot-billing/models-and-pricing.md @@ -117,5 +117,3 @@ You can view your current {% data variables.product.prodname_actions %} usage fo {% data variables.copilot.copilot_pro_short %} and {% data variables.copilot.copilot_pro_plus_short %} subscribers on **existing annual billing plans** using the **request-based billing** model have different model multipliers. See [AUTOTITLE](/copilot/reference/copilot-billing/request-based-billing-legacy/model-multipliers-for-annual-plans). [^gemini-flash-promo]: {% data variables.copilot.copilot_gemini_36_flash %}, {% data variables.copilot.copilot_gemini_37_flash %}, and {% data variables.copilot.copilot_gemini_38_flash %} are available at the promotional pricing of $0.75 per 1M input tokens, $0.075 per 1M cached input tokens, and $3.75 per 1M output tokens through December 31, 2026. - -[^gpt-56-sol-promo]: {% data variables.copilot.copilot_gpt_56_sol %} is available at promotional pricing, 50% off standard rates, through September 3, 2026. The default tier is $2.00 per 1M input tokens, $0.20 per 1M cached input tokens, $2.50 per 1M cache write tokens, and $10.00 per 1M output tokens. The long context tier is $4.00 per 1M input tokens, $0.40 per 1M cached input tokens, $5.00 per 1M cache write tokens, and $15.00 per 1M output tokens. diff --git a/data/reusables/copilot/custom-instructions-effective.md b/data/reusables/copilot/custom-instructions-effective.md index b67c576c0360..2a84c1fb26fb 100644 --- a/data/reusables/copilot/custom-instructions-effective.md +++ b/data/reusables/copilot/custom-instructions-effective.md @@ -5,7 +5,6 @@ The instructions you add to your custom instruction file(s) should be short, sel The exact structure you utilize for your instructions file(s) will vary by project and need, but the following guidelines provide a good starting point: * Provide an overview of the project you're working on, including its purpose, goals, and any relevant background information. -* Include the folder structure of the repository, including any important directories or files that are relevant to the project. * Specify the coding standards and conventions that should be followed, such as naming conventions, formatting rules, and best practices. * Include any specific tools, libraries, or frameworks that are used in the project, along with any relevant version numbers or configurations. @@ -16,12 +15,6 @@ The following instructions file is an example of these practices in action: This project is a web application that allows users to manage their tasks and to-do lists. It is built using React and Node.js, and uses MongoDB for data storage. -## Folder Structure - -- `/src`: Contains the source code for the frontend. -- `/server`: Contains the source code for the Node.js backend. -- `/docs`: Contains documentation for the project, including API specifications and user guides. - ## Libraries and Frameworks - React and Tailwind CSS for the frontend. diff --git a/data/tables/copilot/models-and-pricing.yml b/data/tables/copilot/models-and-pricing.yml index 2dceefefd20b..83d11d535da1 100644 --- a/data/tables/copilot/models-and-pricing.yml +++ b/data/tables/copilot/models-and-pricing.yml @@ -130,27 +130,27 @@ output: $1.80 cache_write: $0.50 -- model: 'GPT-5.6 Sol[^gpt-56-sol-promo]' +- model: GPT-5.6 Sol provider: openai release_status: GA category: Powerful threshold: '≤ 272K' tier: Default - input: $2.00 - cached_input: $0.20 - output: $10.00 - cache_write: $2.50 + input: $4.00 + cached_input: $0.40 + output: $20.00 + cache_write: $5.00 -- model: 'GPT-5.6 Sol[^gpt-56-sol-promo]' +- model: GPT-5.6 Sol provider: openai release_status: GA category: Powerful threshold: '> 272K' tier: 'Long context' - input: $4.00 - cached_input: $0.40 - output: $15.00 - cache_write: $5.00 + input: $8.00 + cached_input: $0.80 + output: $30.00 + cache_write: $10.00 - model: GPT-5.6 Terra provider: openai