The constituent republics of the Soviet Union were established both for ideological reasons and political ones. Lenin holds that nations must have the right to self-determination, and Russian subjugation of the minority states doesn't help to establish legitimacy during the Civil War.
The Declaration of the Rights of the Peoples of Russia (late 1917) highlights both the romantic premise of the USSR as well as the early approach to nationalism (though this is sometimes treated in a strictly political sense re European territories which had already been lost). Stalin, along with Bukharin, had written a pamphlet in 1913 addressing the same question, and affirming the right of self-determination; for Stalin a nation is borne out of a shared language and shared culture, so Soviet republics that share neither with Russia are not Russian. Lenin wrote a longer manuscript the following year.
The brief-lived commissariat Narkomnats managed these national concerns in the early Soviet Union, and the policy of korenizatsiya reinforced the legitimacy of non-Russian languages and cultures. Instruction, the press, and local governments all operated in local languages, but again by the 1930s these policies were dropped and the purges many of these leaders were targeted for being 'anti-Soviet.'
Not all national identitis were treated equally, though. The process of nation building and territorial creation, razmezhevaniye, favored some nationalities and identities over others. "Union Republics" (what you're probably thinking of - Ukraine, Belarus, etc) have more control than "Autonomous Republics" (Abkhazia, Yakutia, etc) and raions (Chukchi) or okrugs. This is a little later, but there is a very nice popular history on the 'sad and absurd' Jewish Autonomous Oblast by Masha Gessen.
At any rate, the Bolsheviks wanted to have semi-independent socialist republics, and many early Bolsheviks envisioned more independence than was ever achieved. Stalin, throughout the 1930s, either abandoned or repealed these policies and pushed for Russification, though the autonomous republics were retained.