vRealize Automation 8.x includes SaltStack Config as configuration management tool. This works with state files that define which configurations will be applied on target system. One of the options to store state files is leveraging a git repository. In this blog I will explain how the SaltStack appliance can be configured to leverage such a repository. It’s important to note that some parts might be different to the native git integration documentation as the appliance uses PhotonOS as underlying system.
Following procedure is required to configure it properly.
Create git repository
To store your state files, you must create a git repository. Best practice is to create a sub folder for your service and store sls files like init.sls in it.
Configure git integration on Salt Master
All following commands must be executed on the salt master (appliance) by an SSH connection.
Install GitPython (in this example GitPython is used)
pip3 install GitPython
Install git client
yum install git
Modify /et/salt/master.d/raas.conf file
# Enable fileserver backends to use eAPI first, then local filesystem
Create /etc/salt/master.d/fileserver_backend.conf file
Replace <account> by your git account name (e.g. cferber in my case)
Replace <repository.git> by your git repository name (e.g. saltstack.git in my case)
- base: main
- mountpoint: /
Restart salt master
systemctl restart salt-master
rm -rf /var/cache/salt/master/files
rm -rf /var/cache/salt/master/gitfs
Update file server
salt-run fileserver.update -l info
Test git integration
Verify if git integration works by listing all the files available on the file server. The file server on SaltStack is like a virtual file services that stores files from different sources incl. local and git.
With this command you can scan the files available in file server and check if the one’s from git are listed: