Installed apps are tied to your Roku account, not the device, so as long as you link the new Ultra to the same Roku account all of your apps that were installed on the Roku 2 should automatically be installed on the Ultra. I think there may be some exceptions with some old games (Angry Birds comes to mind), but I'm not sure. If you're not sure what email address you used on the Roku 2, you can see it under Settings->System->About. Don't set up a new Roku account.
Now the bad news...
Your apps will be installed, but they'll show up in a random order on your Home Screen. Some logins are tied to your Roku account, but some are not and you may have to log in again on some of them. Subscriptions purchased through Roku are tied to your Roku account and will automatically be available (pretty much the only advantage I can think of for subscribing to anything through Roku). Any settings having to do with the screensaver, Home Screen, network, display, audio, and probably other things I can't think of are tied to the device, so you'll have to set them up again if you've changed anything from the defaults.
One other thing: if you're planning on getting rid of the Roku 2 (there's no reason why you can't keep using it on another TV), make sure you factory reset it and remove it from your Roku account at https://my.roku.com .
How do I factory reset my Roku® streaming device? | Official Roku Support
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.