1
0
mirror of synced 2025-12-19 18:10:59 -05:00

[Improvement]: Update "Setting up a staging instance" for GitHub Packages (#57526)

Co-authored-by: Felicity Chapman <felicitymay@github.com>
This commit is contained in:
John Clement
2025-09-25 13:50:19 -04:00
committed by GitHub
parent 68358bb0a4
commit df0dae4f5f

View File

@@ -57,7 +57,7 @@ If you want to test changes on an instance that contains the same data and confi
### 2. Set up a staging instance ### 2. Set up a staging instance
Set up a new instance to act as your staging environment. When following the setup process, be sure to select the **"New Install"** option. This will ensure your staging environment is initialized properly and is ready for restoring a backup if needed. Set up a new instance to act as your staging environment. When following the setup process, be sure to select the **New Install** option. This will ensure your staging environment is initialized properly and is ready for restoring a backup if needed.
You can use the same guides for provisioning and installing your staging instance as you did for your production instance. For more information, see [AUTOTITLE](/admin/installation/setting-up-a-github-enterprise-server-instance). You can use the same guides for provisioning and installing your staging instance as you did for your production instance. For more information, see [AUTOTITLE](/admin/installation/setting-up-a-github-enterprise-server-instance).
@@ -89,39 +89,22 @@ Once you've configured and enabled {% data variables.product.prodname_actions %}
### 4. Configure {% data variables.product.prodname_registry %} ### 4. Configure {% data variables.product.prodname_registry %}
Optionally, if you use {% data variables.product.prodname_registry %} on your production instance, configure the feature on the staging instance before restoring your production backup. If you don't use {% data variables.product.prodname_registry %}, skip to [1. Restore your production backup](#5-restore-your-production-backup). Optionally, if you use {% data variables.product.prodname_registry %} on your production instance, configure the feature on the staging instance before restoring your production backup. If you don't use {% data variables.product.prodname_registry %}, skip to [Restore your production backup](#5-restore-your-production-backup).
> [!WARNING] > [!WARNING]
> If you don't configure {% data variables.product.prodname_registry %} on the staging instance before restoring your production backup, your staging instance will use your production instance's external storage, which could result in loss of data. We strongly recommended that you use different external storage for your staging instance. > If you don't configure {% data variables.product.prodname_registry %} on the staging instance before restoring your production backup, your staging instance will use your production instance's external storage, which could result in loss of data. We strongly recommended that you use different external storage for your staging instance. For more information, see [AUTOTITLE](/admin/github-actions/advanced-configuration-and-troubleshooting/using-a-staging-environment).
1. Review the backup you will restore to the staging instance. To configure {% data variables.product.prodname_registry %} for your staging instance:
* If you took the backup with {% data variables.product.prodname_enterprise_backup_utilities %} 3.5 or later, the backup includes the configuration for {% data variables.product.prodname_registry %}. Continue to the next step.
* If you took the backup with {% data variables.product.prodname_enterprise_backup_utilities %} 3.4 or earlier, configure {% data variables.product.prodname_registry %} on the staging instance. For more information, see [AUTOTITLE](/admin/packages/getting-started-with-github-packages-for-your-enterprise).
{% data reusables.enterprise_installation.ssh-into-staging-instance %}
1. Configure the external storage connection by entering the following commands, replacing the placeholder values with actual values for your connection.
* Azure Blob Storage:
```shell copy 1. Access the {% data variables.enterprise.management_console %}. See [Accessing the Management Console](/admin/administering-your-instance/administering-your-instance-from-the-web-ui/accessing-the-management-console).
ghe-config secrets.packages.blob-storage-type "azure" 1. In the sidebar, open the **Packages** tab.
ghe-config secrets.packages.azure-container-name "AZURE CONTAINER NAME" 1. Enable GitHub Packages by checking the **Enable GitHub Packages** box.
ghe-config secrets.packages.azure-connection-string "CONNECTION STRING" 1. Under **Packages Storage Settings**, select your external storage provider.
``` 1. Test your storage configuration by clicking **Test storage settings**.
1. Click **Save settings** to apply your configuration.
* Amazon S3: > [!NOTE]
> You can use ecosystem toggles to enable, disable, or set individual package types to read-only for your instance as needed.
```shell copy
ghe-config secrets.packages.blob-storage-type "s3"
ghe-config secrets.packages.service-url "S3 SERVICE URL"
ghe-config secrets.packages.s3-bucket "S3 BUCKET NAME"
ghe-config secrets.packages.aws-access-key "S3 ACCESS KEY ID"
ghe-config secrets.packages.aws-secret-key "S3 ACCESS SECRET"
```
1. To prepare to enable {% data variables.product.prodname_registry %} on the staging instance, enter the following command.
```shell copy
ghe-config app.packages.enabled true
```
### 5. Restore your production backup ### 5. Restore your production backup