Let's start a golang command line project.
lets use https://github.com/spf13/cobra for our cli frameworklets use dep for dependency managementlets read a simple ansible hosts filelets enable local command execlets start off, running only local operations from themaster
node orboot
node
- lets level all remote operations to
terraform
- lets keep it simple, and support only INCEPTION
uninstall
,install
,hosts
operations - lets also support construction of the ansible hosts file, just to see how hard it is to build that logic
- add a new package dependency to gopkg.toml, after you have imported it
dep ensure -add github.com/spf13/cobra/cobra
-
uninstall INCEPTION
grandctl uninstall --gate stable
-
install INCEPTION
grandctl install --gate stable
-
dump
config.yaml
and update from~/.grandctl/config.yaml
grandctl init --gate stable
-
build and deploy
DEPLOY_USER=user DEPLOY_TARGET=9.x.x.x make deploy