Ranga Reddy - SKO 2022-01-16

Welcome to Congregate

Workshop pre-work

This should be completed prior to the SKO breakout session

  1. Install Pre-requisites:
    • Docker Desktop
    • Boost your available resources within Docker Desktop. By default, there will not be enough resources available to reliably launch the environment.
  2. Grab the workshop repo and start the applications
    • Run git clone git@gitlab.com:gitlab-com/customer-success/professional-services-group/global-practice-development/migration/congregate-onboarding-workshop.git to get this repo to your local
    • Navigate into the repo directory using cd congregate-onboarding-workshop
    • Generate a personal access token from your gitlab.com account that has the read_registry permission by clicking User Icon (top right) > Preferences > Access Tokens > Generate Access Token. No need for a long expiration date, a day or two from now will do.
    • Then run docker login registry.gitlab.com and provide your username and paste the access token when prompted for a password.
    • Start the source, destination and congregate containers using docker-compose up
    • Note about logging into your instances below: You may encounter issues logging into both your source and destination instances at the same time. One workaround is to use two different browsers, and another is to use an incognito window for one of them.
    • From browser, login to 127.0.0.1:8080 for gitlab-src, (Username: root, Password found in the docker compose file)
      • Generate personal access token with full api privileges by clicking User Icon (top right) > Preferences > Access Tokens > Generate Access Token. Copy this to a text file or leave this page open.
    • From browser, login to 127.0.0.1:8081 for gitlab-dest, (username: root, Password found in the docker compose file)
      • Generate personal access token with full api privileges by clicking User Icon (top right) > Preferences > Access Tokens > Generate Access Token. Copy this to a text file or leave this page open

To be done during workshop

  1. Congregate List

    • Copy the congregate.conf.template from the local repo to the congregate container:
      • docker cp congregate.conf.template congregate:/opt/congregate/data/congregate.conf
    • Get into congregate by
      • run docker-compose ps to note the congregate container ID.
      • Then run docker exec -it <container-id> /bin/bash to connect to the congregate container.
    • We need to base64 encode the tokens we generated in the step. To do this run congregate obfuscate. This will prompt you to paste the token from the source system. Copy the encoded token from the source system to your clipboard.
    • Edit the congregate configuration to add the tokens by running vim data/congregate.conf. Once in here press i to get into insert mode, and paste the encoded token into the src_access_token=<encoded token>. Repeat this process for the dest_access_token.
    • Once we have our tokens setup in congregate.conf, we can run congregate list
    • This will run with some output streaming to the console. Watch this to ensure listing is happening without error. This should take less than X seconds.
  2. Congregate Stage

    • Let's look at the listed data to find a repo or group to migrate:
      • less data/groups.json or less data/projects.json
    • Take note of the group ID that you want to migrate.
      • congregate stage-groups <space delimited list of group-ids> --commit or congregate stage-projects <space delimited list of project-ids> --commit
  3. Congregate Migrate

    • First let's look at the admin screen on gitlab-com at 127.0.0.1:8081/admin
    • Take note of the number of groups, projects and users on the dashboard
    • From congregate container
      • congregate migrate //this is a dry run
      • Review the output of the dry run
      • congregate migrate --commit
  4. Validation

    • From destination 127.0.0.1:8081/admin, watch the number of projects, users, and groups increment.
    • Click on the number of projects to see the list of projects. Click on the most recently created project.
    • Once it finishes importing, spot check the number of branches, commits, MRs and users.
    • post a screenshot of the source and destination systems that shows the project data hse been migrated
    • attach the logs from /opt/congregate/data/logs/ to show the output of the successful congregate migration run.
Edited by ranga reddy