Manual migration from pulp2 -> pulp3

I was recently handed a project to migrate my company’s existing Pulp2 (2.12 I think) deployment to Pulp3, while also finding ways to modernize the deployment and find some cost savings.

The cost savings and modernization are easy with all the new cloud aware capabilities, And I got my first PoC systems stood up today and working, So now we are starting the process of actually building out a full clustered setup in our dev environment and working towards a full prod deployment. Obviously, we have pulp2 already deployed and configured, so migrating as much of its configuration as possible to ensure a smooth transition would be ideal, instead of simply building from scratch. (Also, the obvious DevOPs advantages from minimal prod system changes to use the new system).

Unfortunately, it looks like we just missed the EOL date for the migration plugin, so simply using the plugin is no longer an option.

To facilitate a potential manual migration (resyncing the new systems isn’t out of the question), Is there a way to export and/or dump/display the existing repo/remote/etc type configs within pulp2 in such a way that we can easily reference them when rebuilding within pulp3?

Thanks for any help or advice anyone could offer

So, the best answer to your question is obviously depending on the size of your installation and the types of content you want migrated.

To use the migration plugin you would need to upgrade to the latest version of pulp2 first and then install pulpcore 3.19 with the migration plugin and only after migrating and removing the migration plugin again, you could upgrade to a current version there. It is most probably best to migrate by starting out fresh.

To get all the information you need, you probably want to query the mongodb directly. It’s the easiest way to get the information in a machine processable way.

pulp2to3 EOL just means “we’re not going to do more work on the plugin”; it works just as well today in a core/3.19 system, as it did when core/3.19 was released :slight_smile: @x9c4 's advice is sound - first get your Pulp2 system upgraded to the last release (2.21.5, I think), set up core/3.19-based Pulp3, and you should be able to work w/ 2to3 just fine. Post-migration, you can finish upgrading the Pulp3 system to core/3.22 and friends.

That being said - if “stand up a Pulp3 system and resync the repos the old system had” is an option, it’s def a less-potentially-problematic workflow. Pulp2 and Pulp3 are wildly different, and while 2to3 works very hard to migrate your data, Pulp2 systems have had years to end up with truly filthy data problems (especially when running on older versions of Pulp2). Migration takes a long time, but is designed to run in the background of your production system, be interruptible, and be run repeatedly, picking up where it left off. Each time it runs it should take less time, so the last run that has to happen when your Pulp2 system is down can be as short as possible.

You can def query Mongo directly, assuming you’re comfortable w/ MongoDB query syntax. As @x9c4 mentions, this is prob the best way to get output in a format that can be handed to scripts. It’s def not for everyone.

On your Pulp2 system, the “pulp-admin” CLI command is more human-friendly, at the expense of human-readable output. The pulp2 pulp-admin user doc has a lot of examples, and each plugin has more - see the pulp_rpm pulp-admin docs, for example.

On the Pulp3 side, pulp-cli is the command-line tool, and is your friend :slight_smile: .

That’s a lot of links, I’ll stop here. If/when/as you have questions, you can hit us up here in Discourse, or drop into #pulp on Matrix.

1 Like