Last active
November 23, 2023 05:46
-
-
Save igorcosta/2c40d4d66d44edd8ac1c97dee77327da to your computer and use it in GitHub Desktop.
Revisions
-
igorcosta revised this gist
Nov 17, 2021 . 1 changed file with 32 additions and 28 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,25 +1,25 @@ # GitLab to GitHub Enterprise Cloud (GHEC) migration playbook This playbook is a step-by-step guide to assist you with migration from [GitLab](https://GitLab.com) to [GitHub.com Enterprise Cloud](https://GitHub.com) **GHEC**. | Steps & Tasks | Description | | --- | --- | | Step One | Let's get ready for the migration. This step gives you an overview of what is required to start the migration process| | Step Two | Creating the artefact to be imported on GitHub requires special access to the Enterprise Cloud Import tool. This step will help you understand what is required to get access to the tool. | | Step Three | With the file ready to be imported, this step will guide you on how to connect and upload the file to your GitHub Enterprise Cloud instance. | ## Step One ###### Preparing the ground for migration For instance, GitLab uses a different [naming convention](https://en.wikipedia.org/wiki/Naming_convention) than GitHub for things, as a quick reference, use the table below to upgrade your GitLab lingo into GitHub. #### Naming convention | GitLab | GitHub | | --- | --- | | Groups | Organizations | | Group members | Teams | | Projects | Repositories | | Merge Requests | Pull Requests | @@ -28,45 +28,45 @@ For instance, Gitlab uses a different [naming convention](https://en.wikipedia.o #### Limitations We're constantly developing our tools to support new things, however, the interoperability between GitLab and GitHub, may lead some crumbs along the way, please check what you *can* and *can't* migrate using our tool. ##### Tasks - [ ] Check the [limits of migrating data from GitLab](https://GitHub.GitHub.com/enterprise-migrations/#/./2.2.2.0-export-from-GitLab-features) to GitHub using GitLab Exporter tool. - [ ] Make a list of all repositories that need to be migrated - [ ] Categorize/Group the repositories depending on the different source platforms - [ ] Create a source-to-target matrix/checklist for each of the categorized/grouped repositories - [ ] Determine potential Organizations that will be created in the target platform - [ ] Check the [scope of the migration](https://GitHub.GitHub.com/enterprise-migrations/#/./1.4-pre-migration-scope) to be executed - [ ] [Setup](https://GitHub.GitHub.com/enterprise-migrations/#/./0.3.1.3-tools-prerequisites-export-GitLab) the Migration tool for GitLab. With all the checkboxes confirmed, let's move to step two. ## Step Two ###### Export data from GitLab Now that you did the groundwork, it's time to prepare the data from GitLab to GitHub. For instance, as a rule of thumb, try to use a simple group from GitLab with max 5 repositories, this will allow you to understand mapping and adjust your requirements. We do recommend to consolidate into a maximum of 2 Organizations, because is easy to maintain and govern, however in some scenarios companies that are services providers, they like to keep the same structure when migrating to GitHub. ##### Tasks - [ ] [Preparing the file](https://GitHub.GitHub.com/enterprise-migrations/#/./2.2.2.1-export-from-GitLab-guide) to be imported at GitHub ## Step Three ###### Import GitLab data into GitHub.com With your archive ready to import, it's time to upload the file you prepared and validate the data using our ECI tool. ##### Tasks - [ ] Ask a GitHub Professional member to include the target organization and user account to use [ECI tool](https://eci.GitHub.com). - [ ] Follow the steps described [here](https://GitHub.GitHub.com/enterprise-migrations/#/./3.1.1-import-from-archive) to import the file package to GitHub Enterprise Cloud. - [ ] Check the GitLab [caveats](https://GitHub.GitHub.com/enterprise-migrations/#/./4.3.1-post-migration-GitLab-caveats), which list some of the things you should be aware,in case you're having trouble. ##### Tips @@ -79,26 +79,30 @@ With your archive ready to import, it's time to upload the file you prepared and > ***Note***: - The user will authenticate with a very high authority using the **Personal Access Token** > - Select the `admin:org` scope > - If the user has not created *PAT*, follow instructions documented [here](https://GitHub.com/settings/tokens) > - Select `Authenticate` --- ### Troubleshooting If the system seems to hang during the import, you can run the following command to gather information on the migration process and see the models being migrated: ```bash curl --request POST \ --url https://api.GitHub.com/graphql \ -H 'authorization: Bearer TOKEN' \ -H'content-type: application/json' \ --header 'graphql-features: gh_migrator_import_to_dotcom' \ --data '{"query":"query(\n $login: String!,\n $guid: String!,\n){\n organization(login: $login) {\n migration(guid: $guid) {\n state\n guid\n id\n migratableResources(\n first: 100\n\t\t\t\tstate: IMPORTED\n \n ) {\n totalCount\n }\n }\n }\n}","variables":{"login":"THE_ORG_NAME","guid":"THE_MIGRATION_GUID"}}' ``` There are a few err ##### Tips - *If you made a mistake and didn't name the repositories properly, they might end up being in a lock phase and you're unable to delete to restart the importing process. If that happens, open a support ticket witht Professional Services Architect assigned to your project.* - *If you're having trouble with the migration, you can [open a support ticket]( with the Migration GUID and the error message) and we'll be able to help you.* - *ECI tool is cannot handle large files, which may fail several times before the migration is complete, Try multiple times. If the problem persists, contact the Professional Services Architect assigned to your project.* --- ### Extra Links - [GitHub.com Import page](https://eci.GitHub.com) - [Post-migration checklist](https://GitHub.GitHub.com/enterprise-migrations/#/./4.1-post-migration-checklist) - [GitHub Enterprise Organizations and Teams](https://docs.GitHub.com/en/enterprise-cloud@latest/organizations) - [GitHub Enterprise Administrators guidelines](https://docs.GitHub.com/en/enterprise-cloud@latest/admin) - [GitHub Markdown Syntax](https://docs.GitHub.com/en/GitHub/writing-on-GitHub/getting-started-with-writing-and-formatting-on-GitHub/basic-writing-and-formatting-syntax) -
igorcosta revised this gist
Nov 16, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,6 +39,7 @@ some crumbs along the way, please check what you *can* and *can't* migrate using - [ ] Create a source-to-target matrix/checklist for each of the categorized/grouped repositories - [ ] Determine potential Organizations that will be created in the target platform - [ ] Check the [scope of the migration](https://github.github.com/enterprise-migrations/#/./1.4-pre-migration-scope) to be executed - [ ] [Setup](https://github.github.com/enterprise-migrations/#/./0.3.1.3-tools-prerequisites-export-gitlab) the Migration tool for GitLab. With all the checkboxes confirmed, let's move to step 2. -
igorcosta revised this gist
Nov 16, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # GitLab to Github Enterprise Cloud (GHEC) migration playbook This playbook is a step-by-step guide to assist you with migration from [GitLab](https://gitlab.com) to [Github.com Enterprise Cloud](https://github.com) **GHEC**. | Steps & Tasks | Description | | --- | --- | -
igorcosta revised this gist
Nov 16, 2021 . 1 changed file with 19 additions and 19 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,18 @@ # GitLab to Github Enterprise Cloud (GHEC) migration playbook This playbook is a step-by-step guide to assist you with migration from [Gitlab](https://gitlab.com) to [Github.com Enterprise Cloud](https://github.com) **GHEC**. | Steps & Tasks | Description | | --- | --- | | Step One | Let's get ready for the migration. This step gives you an overview of what is required to start the migration process| | Step Two | Creating the artefact to be imported on Github requires special access to the Enterprise Cloud Import tool. This step will help you understand what is required to get access to the tool. | | Step Three | With the file ready to be imported, this step will guide you on how to connect and upload the file to your Github Enterprise Cloud instance. | ## Step One ###### Preparing the ground for migration For instance, Gitlab uses a different [naming convention](https://en.wikipedia.org/wiki/Naming_convention) than Github for things, as a quick reference, use the table below to upgrade your Gitlab lingo into Github. #### Naming convention @@ -28,27 +28,27 @@ For instance, Gitlab uses a different [naming convention](https://en.wikipedia.o #### Limitations We're constantly developing our tools to support new things, however, the interoperability between GitLab and Github, may lead some crumbs along the way, please check what you *can* and *can't* migrate using our tool. ##### Tasks - [ ] Check the [limits of migrating data from Gitlab](https://github.github.com/enterprise-migrations/#/./2.2.2.0-export-from-gitlab-features) to Github using GitLab Exporter tool. - [ ] Make a list of all repositories that need to be migrated - [ ] Categorize/Group the repositories depending on the different source platforms - [ ] Create a source-to-target matrix/checklist for each of the categorized/grouped repositories - [ ] Determine potential Organizations that will be created in the target platform - [ ] Check the [scope of the migration](https://github.github.com/enterprise-migrations/#/./1.4-pre-migration-scope) to be executed With all the checkboxes confirmed, let's move to step 2. ## Step Two ###### Export data from GitLab Now that you did the groundwork, it's time to prepare the data from GitLab to Github. For instance, as a rule of thumb, try to use a simple group from GitLab with max 5 repositories, this will allow you to understand mapping and adjust your requirements. We do recommend to consolidate into a maximum of 2 organisations, because is easy to maintain and govern, however in some scenarios companies that are services providers, they like to keep the same structure when migrating to Github. ##### Tasks @@ -57,9 +57,9 @@ companies that are services provider they like to keep the same structure when m ## Step Three ###### Import GitLab data into Github.com With your archive ready to import, it's time to upload the file you prepared and validate the data using our ECI tool. ##### Tasks @@ -72,7 +72,7 @@ With your archive ready to import, it's time to upload the file you prepared and - *Migrations to GitHub Enterprise Cloud are scoped to a single organization.* - *All incoming users must have an account on GitHub.com for user mapping purposes and will need to be invited to the importing GitHub Enterprise Cloud organization and accept their invitations.* - *Users that do not have a matching GitHub.com account created and added as a member to the importing organization at the time of the migration will be mapped to a placeholder user.* - ***(If applicable)** We recommend consolidating repositories and teams (if supported) on a single organization on the source export instance. This will front-load the work of resolving naming conflicts (duplicate repository and team names) and organizing teams for access control.* - *Create an admin token on GitHub.com. Remember to discard once used* @@ -86,12 +86,12 @@ With your archive ready to import, it's time to upload the file you prepared and If the system seems to hang during the import, you can run the following command to gather information on the migration process and see the models being migrated: ```bash curl --request POST \ --url https://api.github.com/graphql \ -H 'authorization: Bearer TOKEN' \ -H'content-type: application/json' \ --header 'graphql-features: gh_migrator_import_to_dotcom' \ --data '{"query":"query(\n $login: String!,\n $guid: String!,\n){\n organization(login: $login) {\n migration(guid: $guid) {\n state\n guid\n id\n migratableResources(\n first: 100\n\t\t\t\tstate: IMPORTED\n \n ) {\n totalCount\n }\n }\n }\n}","variables":{"login":"THE_ORG_NAME","guid":"THE_MIGRATION_GUID"}}' ``` ##### Tips - *If you made a mistake and didn't name the repositories properly, they might end up being in a lock phase and you're unable to delete to restart the importing process. If that happens, open a support ticket.* --- -
igorcosta revised this gist
Nov 16, 2021 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ For instance, Gitlab uses a different [naming convention](https://en.wikipedia.o | Merge Request Notes | Issue comments | | Issue notes | Issue comments | #### Limitations We're constantly evolving our tools to support new things, however the interoperability between Gitlab and Github, may lead some crumbs along the way, please check what you *can* and *can't* migrate using our tool. @@ -95,7 +95,9 @@ curl --request POST \ --url https://api.github.com/graphql \ -H 'authoriza --- ### Extra Links - [GitHub.com Import page](https://eci.github.com) - [Post-migration checklist](https://github.github.com/enterprise-migrations/#/./4.1-post-migration-checklist) - [Github Enterprise Organisations and Teams](https://docs.github.com/en/enterprise-cloud@latest/organizations) - [Github Enterprise Administrators guidelines](https://docs.github.com/en/enterprise-cloud@latest/admin) - [Github Markdown Syntax](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax) -
igorcosta created this gist
Nov 16, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,101 @@ # Gitlab to Github Enterprise Cloud (GHEC) migration playbook This playbook is a step-by-step guide to assist you with migration from [Gitlab](https://gitlab.com) to [Github.com Enterprise Cloud](https://github.com) **GHEC**. | Steps & Tasks | Description | | --- | --- | | Step One | Let's get ready for the migration, this step gives you an overview of what are required to start the migration process| | Step Two | Creating the artefact to be imported on Github, requires especial access to the Enterprise Cloud Import tool, this step will help you to understand what is required to get access to the tool. | | Step Three | With the file ready to be imported, this step will guide you how to connect and upload the file to your Github Enterprise Cloud instance. | ## Step One ###### Preparing the ground for migration For instance, Gitlab uses a different [naming convention](https://en.wikipedia.org/wiki/Naming_convention) than Github for things, as quick reference use the table below to upgrade your Gitlab lingo into Github. #### Naming convention | Gitlab | Github | | --- | --- | | Groups | Organisations | | Group members | Teams | | Projects | Repositories | | Merge Requests | Pull Requests | | Merge Request Notes | Issue comments | | Issue notes | Issue comments | ### Limitations We're constantly evolving our tools to support new things, however the interoperability between Gitlab and Github, may lead some crumbs along the way, please check what you *can* and *can't* migrate using our tool. ##### Tasks - [ ] Check the [limits of migrating data from Gitlab](https://github.github.com/enterprise-migrations/#/./2.2.2.0-export-from-gitlab-features) to Github using Gitlab Exporter tool. - [ ] Make a list of all repositories that need to be migrated - [ ] Categorize/Group the repositories depending on the different source platforms - [ ] Create a source-to-target matrix/checklist for each of the categorized/grouped repositories - [ ] Determine potential Organization that will be created in the target platform - [ ] Check the [scope of the migration](https://github.github.com/enterprise-migrations/#/./1.4-pre-migration-scope) to be executed With all the checkboxes confirmed, let's move to the step 2. ## Step Two ###### Export data from Gitlab Now the you did the ground work, it's time to prepare the data from Gitlab to Github, for instance, as a rule of thumb, try to use a simple Group from Gitlab with max 5 repositories, this will allow to understand mapping and adjust your requirements. We do recommend to consolidate into maximum of 2 organisations, because is easy to maintain and govern, however in some scenarios companies that are services provider they like to keep the same structure when migrating to Github. ##### Tasks - [ ] [Preparing the file](https://github.github.com/enterprise-migrations/#/./2.2.2.1-export-from-gitlab-guide) to be imported at Github - [ ] Ask a Github Professional member to include the target organization and user account to use [ECI tool](https://eci.github.com). ## Step Three ###### Import Gitlab data into Github.com With your archive ready to import, it's time to upload the file you prepared and valdiate the data using our ECI tool. ##### Tasks - [ ] Follow the steps described [here](https://github.github.com/enterprise-migrations/#/./3.1.1-import-from-archive) to import the file package to GitHub Enterprise Cloud. - [ ] Check the Gitlab [caveats](https://github.github.com/enterprise-migrations/#/./4.3.1-post-migration-gitlab-caveats), which list some of the things you should be aware, in case you're having trouble. ##### Tips - *Migrations to GitHub Enterprise Cloud are scoped to a single organization.* - *All incoming users must have an account on GitHub.com for user mapping purposes and will need to be invited to the importing GitHub Enterprise Cloud organization and accept their invitations.* - *Users that do not have a matching GitHub.com account created and added as a member to the importing organization at the time of the migration will be mapped to a placeholder user.* - ***(If applicable)** We recommend consolidating repositories and teams (if supported) on a single organization on the source export instance. This will frontload the work of resolving naming conflicts (duplicate repository and team names) and organizing teams for access control.* - *Create an admin token on GitHub.com. Remember to discard once used* > ***Note***: - The user will authenticate with a very high authority using the **Personal Access Token** > - Select the `admin:org` scope > - If the user has not created *PAT*, follow instructions documented [here](https://github.com/settings/tokens) > - Select `Authenticate` --- ### Troubleshooting If the system seems to hang during the import, you can run the following command to gather information on the migration process and see the models being migrated: ```bash curl --request POST \ --url https://api.github.com/graphql \ -H 'authorization: Bearer TOKEN' \ -H'content-type: application/json' \ --header 'graphql-features: gh_migrator_import_to_dotcom' \ --data '{"query":"query(\n $login: String!,\n $guid: String!,\n){\n organization(login: $login) {\n migration(guid: $guid) {\n state\n guid\n id\n migratableResources(\n first: 100\n\t\t\t\tstate: IMPORTED\n \n ) {\n totalCount\n }\n }\n }\n}","variables":{"login":"THE_ORG_NAME","guid":"THE_MIGRATION_GUID"}}' ``` ##### Tips - *If you made a mistake and didn't name the repositories properly, they might end up been in a lock phase and you're unable to delete to restart the importing process, If that happens open a support ticket.* --- ### Links - [GitHub.com Import page](https://eci.github.com) - [Post-migration checklist](https://github.github.com/enterprise-migrations/#/./4.1-post-migration-checklist) - [Github Markdown Syntax](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)