. . . "by ordinance, a fire code and other regulations necessary to carry out the" . .