質問

Salt stack is being used with bit bucket. There are 2-3 of us who push updates to it occasionaly. I was wondering is there a way where salt stack can get the latest changes from bit bucket then highstate? If so, how would you go about doing it?

役に立ちましたか?

解決

What you are looking for is the hgfs backend. whenever a state.highstate is called, the master will pull from bitbucket and send it to the minion. A basic configuration would be the following:

fileserver_backend:
  - hg

hgfs_remotes:
  - https://self@bitbucket.org/self/salt

hgfs_branch_method: branches

There is unfortuntaley a lack of documentation about how to configure hgfs so doing anything more advance may require you to dig around. Good luck.

Note for future readers: I am not sure whether the minion or the master pulls from bitbucket.

他のヒント

Set up a webhook in BitBucket to call salt-api to do a salt-run fileserver.update followed by a state.highstate.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top