I'm looking at learning Go as my first programming language and figured this would be a good project to start out on.
Would it be possible to write a Golang app that would take a fresh and clean vanilla install of Ubuntu for example and bring it to a full configured state?
A rough sketch of what I would need it to do would be to install applications via package manager. Pull dotfiles from a github repo and then set permissions of the files to the correct permissions for the user that is on the machine.
Would Golang be a good fit here or is there a simpler way to accomplish the above?
评论:
benwalton:
smartowlick:Well, you could certainly write a tool to do that using Go, but that wouldn't be wise. This space is already filled with multiple competing options. You should rule those out before you write yet another configuration management tool. Have a look at puppet, chef, ansible, cfengine, salt, etc...
cafxx1985:I will do so. Thank you.
benwalton:bosh even has a go component (bosh-agent) that does, among many other things, exactly what the OP describes above
kjnsn01:That further reinforces the point that this wheel has been sufficiently invented. :)
Sounds like good old bash scripting is what you need! Go would be suitable for interacting with kernel apis, not tools that already exist on the system. From my experience getting external cli applications to run the way you want can be fiddly
