Skip to content

Commit

Permalink
Improve blob storage-related documentation for GitHub Enterprise Impo…
Browse files Browse the repository at this point in the history
…rter (#35978)

Co-authored-by: Laura Coursen <lecoursen@github.com>
  • Loading branch information
timrogers and lecoursen authored Mar 29, 2023
1 parent c79b78a commit 669adc2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,10 @@ You must follow this step from a computer that can access:
Before running the script you generated above, you must set additional environment variables to authenticate to your blob storage provider.

- For AWS S3, set the following environment variables.
- `AWS_BUCKET_NAME`: The name of your bucket
- `AWS_ACCESS_KEY`: The access key for your bucket
- `AWS_SECRET_KEY`: The secret key for your bucket
- `AWS_REGION`: The AWS region where your bucket is located
- `AWS_SESSION_TOKEN`: The session token, if you're using AWS temporary credentials (see [Using temporary credentials with AWS resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) in the AWS documentation)
- For Azure Blob Storage, set `AZURE_STORAGE_CONNECTION_STRING` to the connection string for your Azure storage account.

{% data reusables.enterprise-migration-tool.azure-storage-connection-key %}
Expand All @@ -179,6 +180,8 @@ gh bbs2gh migrate-repo --bbs-server-url BBS-SERVER-URL \
--ssh-user SSH-USER --ssh-private-key PATH-TO-KEY
# Use the following options if your Bitbucket Server instance runs on Windows
--smb-user SMB-USER
# Use the following option if you're using AWS S3 as your blob storage provider
--aws-bucket-name AWS-BUCKET-NAME
```

{% data reusables.enterprise-migration-tool.placeholder-table %}
Expand All @@ -190,6 +193,7 @@ gh bbs2gh migrate-repo --bbs-server-url BBS-SERVER-URL \
{% data reusables.enterprise-migration-tool.ssh-user-placeholder %}
{% data reusables.enterprise-migration-tool.path-to-key-placeholder %}
{% data reusables.enterprise-migration-tool.smb-user-placeholder %}
{% data reusables.enterprise-migration-tool.aws-bucket-name-placeholder %}

{% note %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ If you configure your blob storage credentials in the {% data variables.product.

{% data reusables.enterprise-migration-tool.gh-gei-generate-script %}

For Azure Blob Storage, use the following flags:
For {% data variables.product.prodname_ghe_server %} 3.8 or later, or if you're using 3.7 or lower with Azure Blob Storage, use the following flags:

```shell{:copy}
gh gei generate-script --github-source-org SOURCE \
Expand All @@ -397,7 +397,7 @@ gh gei generate-script --github-source-org SOURCE \
--ghes-api-url GHES-API-URL
```

For AWS S3, use the following flags:
If you're using {% data variables.product.prodname_ghe_server %} 3.7 or lower with AWS S3, use the following flags:

```shell{:copy}
gh gei generate-script --github-source-org SOURCE \
Expand Down Expand Up @@ -432,15 +432,16 @@ When you migrate repositories, the {% data variables.product.prodname_gei_cli %}

### Migrate multiple repositories

Before running the script you generated above, you must set additional environment variables to authenticate to your blob storage provider.
If you're migrating from {% data variables.product.prodname_ghe_server %} 3.7 or earlier, before you run your script, you must set additional environment variables to authenticate to your blob storage provider.

- For Azure Blob Storage, set `AZURE_STORAGE_CONNECTION_STRING` to the connection string for your Azure storage account.

{% data reusables.enterprise-migration-tool.azure-storage-connection-key %}
- For AWS S3, set the following environment variables.
- `AWS_BUCKET_NAME`: The name of your bucket
- `AWS_ACCESS_KEY`: The access key for your bucket
- `AWS_SECRET_KEY`: The secret key for your bucket
- `AWS_REGION`: The AWS region where your bucket is located
- `AWS_SESSION_TOKEN`: The session token, if you're using AWS temporary credentials (see [Using temporary credentials with AWS resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) in the AWS documentation)

{% data reusables.enterprise-migration-tool.migrate-multiple-repos %}

Expand All @@ -450,19 +451,24 @@ Before running the script you generated above, you must set additional environme

{% data reusables.enterprise-migration-tool.gei-migrate-repo %}

If you're using Azure Blob Storage, use the following flags to authenticate:
If you're using {% data variables.product.prodname_ghe_server %} 3.8 or later, use the following flags:

```shell{:copy}
gh gei migrate-repo --github-source-org SOURCE --source-repo CURRENT-NAME --github-target-org DESTINATION --target-repo NEW-NAME --ghes-api-url GHES-API-URL
```

If you're migrating from {% data variables.product.prodname_ghe_server %} 3.7 or earlier and using Azure Blob Storage as your blob storage provider, use the following flags to authenticate:

```shell{:copy}
gh gei migrate-repo --github-source-org SOURCE --source-repo CURRENT-NAME --github-target-org DESTINATION --target-repo NEW-NAME \
--ghes-api-url GHES-API-URL --azure-storage-connection-string "AZURE_STORAGE_CONNECTION_STRING"
```

If you're using AWS S3, use the following flags to authenticate:
If you're migrating from {% data variables.product.prodname_ghe_server %} 3.7 or earlier and using Amazon S3 as your blob storage provider, use the following flags to authenticate:

```shell{:copy}
gh gei migrate-repo --github-source-org SOURCE --source-repo CURRENT-NAME --github-target-org DESTINATION --target-repo NEW-NAME \
--ghes-api-url GHES-API-URL --aws-bucket-name "AWS-BUCKET-NAME" --aws-access-key "AWS_ACCESS_KEY" \
--aws-secret-key "AWS_SECRET_KEY"
--ghes-api-url GHES-API-URL --aws-bucket-name "AWS-BUCKET-NAME"
```

{% data reusables.enterprise-migration-tool.ssl-flag %}
Expand All @@ -473,7 +479,6 @@ gh gei migrate-repo --github-source-org SOURCE --source-repo CURRENT-NAME --gith
{% data reusables.enterprise-migration-tool.ghes-api-url-placeholder %}
{% data reusables.enterprise-migration-tool.azure-storage-connection-string-placeholder %}
{% data reusables.enterprise-migration-tool.aws-bucket-name-placeholder %}
{% data reusables.enterprise-migration-tool.aws-key-placeholders %}

## Step 7: Validate your migration and check the error log

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
When you're ready to run your migration, you can either pass your bucket name, access key, and secret key into the {% data variables.product.prodname_cli %} as arguments, or pass them in using environment variables called `AWS_BUCKET_NAME`, `AWS_ACCESS_KEY`, and `AWS_SECRET_KEY`.
When you're ready to run your migration, you will need to provide your AWS credentials to the {% data variables.product.prodname_cli %}: region, access key, secret key, and session token (if required). You can pass them as arguments, or set environment variables called `AWS_REGION`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_SESSION_TOKEN`.

You will also need to pass in the name of the S3 bucket using the `--aws-bucket-name` argument.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AWS-REGION | The AWS region where your S3 bucket is located
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AWS-SESSION-TOKEN | The AWS session token, if you're using temporary credentials (see [Using temporary credentials with AWS resources](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) in the AWS documentation)

0 comments on commit 669adc2

Please sign in to comment.