What were the origins of the Soviet Union?

Though the terms "Soviet Russia" and "Soviet Union" often are synonymous in everyday speech, when referring to the foundations of the Soviet Union, "Soviet Russia" properly refers to the few years between the October Revolution of 1917 and the creation of the Soviet Union in 1922. However, before 1922 the Soviet Union was multiple independent Soviet Republics, e.g. the RSFSR and Ukrainian