You might be interested in this answer as well as this additional answer with some extra details that I wrote. In short - there was an attempt to keep the Soviet military more or less intact, but over the next several years there was a protracted process of dividing units up among Commonwealth of Independent States members.