I'm working in Azure and having some trouble managing user data for our developers who primarily use their own unique VMs. We're using FSLogix to handle user profiles, but I'm stuck when it comes to user data like cloned git repositories. Given the need for local builds, performance is key here.
Currently, our VMs are treated like pets, receiving regular updates, but we're aiming to transition to immutable images. Ideally, I'd like to use a pooled host pool for VMs and keep FSLogix for profiles. However, I keep facing issues regarding the management of user data. If network shares weren't a performance concern, that'd be the way to go, but I'm looking for a more localized solution.
Is there any way to automatically attach a data disk based on the user who logs in? Any suggestions on how to effectively handle this setup, especially since it's all on Windows?
5 Answers
What if they build on a separate dev drive that acts like a cache, rather than on the main OS drive? That way, they could keep their local dev files while having a clean OS.
Have you checked out Dev containers? While they might not be suitable for every language, they can really help standardize setups while keeping machines cleaner from unnecessary files. It’s definitely worth considering!
Yeah, I like the idea, but it does mean developers need to really get into how containers work.
I think you mentioned Windows—Dev containers could require a bit of a learning curve for developers not familiar with containers, though.
You might want to consider using extra data volumes to keep around user data. That way, they don't store anything directly on the OS volume. I do this for my databases; they stay on a separate volume while the OS image remains unchanged. Just swap out the instance when updates are needed and reattach the data volume as necessary.
That’s what we do right now too, but I'm struggling with getting those persistent assignments to let us rotate hosts freely without user-specific VMs.
The challenge seems to be finding a balance between speed and flexibility as you work towards immutable images. Here are a few ideas:
1. Use Azure Managed Disks to auto-attach user-specific disks at boot—great for quick access to data without messing with your base image.
2. Azure Files could help for user data storage if the pet approach isn't ideal, but remember to optimize network operations for performance.
3. Keep a local cache of frequent files to reduce network lag during builds, syncing back to a central location as needed.
4. Set up automation or use scripts for seamless disk attachment at user login. Azure VM extensions can assist with that.
5. Don't forget a solid backup strategy for user data to prevent data loss when switching models.
You’re on the right track with immutable images, just focus on a smart disk-attachment strategy and keep it simple!
Have you thought about using a managed Vagrant box? It's straightforward and could work for your use case.
That's a great idea! The issue we've faced, though, is bringing that data disk over to the new host when we update the image, especially without persistent user assignments.