As long as you have a support network, ie family or friend etc who would be willing to take the dog when you have to hit the road for workups/cruise, keeping the dog is doable. It will be hardest during your first fleet tour, but through TRACOM and shore tour you shouldn't have too much of a problem making sure you give it enough time.
If you do decide to keep it, my biggest recommendation will be to get a place to live with a fenced in yard and a doggy door- That way the dog is free to go out in the yard and come back in the climate controlled house whenever it feels like it. Make sure you take the time and get it socialized and trained early on. It will make keeping it easier.
I watched one of my friends dogs or a long time during the home-cycle of my fleet tour while they were on IA. It did two things- showed me that having a dog was possible during a fleet tour when I wasn't deployed (P-3s didn't involve much in the way of workups away from home station, just a lot of overnight flights) and also ensured I had someone I could count on besides my family to take mine if I got deployed/IA'd. If I didn't have anyone I could trust to watch my dog while I was gone, I wouldn't have gotten one.