SaltStack Git fileserver for states and pillars

Tweet about this on Twitter3Share on Facebook1Share on Google+0Share on LinkedIn0

This is a part two of my previous blog post AWS Salt Cloud provisioning from Docker. Sometimes it is much easier to store SaltStack states and pillars on GitHub. Also, this is preferred way if you need to provision Salt master on AWS. In this post, I will go through configuration options and describe how to provision Salt master using salt-cloud and also how to use git fileserver for states and pillars.

Configuring git states and pillars

To configure salt master to use git fileserver you need to add gitfs related properties. Also check your root directories for states and pillars:

Additional pillars

It is still possible to use additional pillars on the host, except those hosted on GitHub. This is useful if you have some sensitive information in pillars like passwords or secret keys which you don’t want to store on GitHub repo:

Provisioning Salt master to use git fileserver

You will need python-git (Ubuntu) or GitPython (RHEL/CentOS) package installed before be able to use git fileserver. This is easy to do when using local machine, but to provision a new VM on AWS you need to install that package along with SaltStack. To do that add bootstrap script parameters to ec2 profile:

Here is complete ec2 profile file for a reference: ubuntu_ec2.conf

Keep in mind that this is for using public git repository. If you need to use authentication please refer to official docs.

If you encounter any problems during configuration, please leave a comment.

Tweet about this on Twitter3Share on Facebook1Share on Google+0Share on LinkedIn0
Posted in DevOps and tagged , , , .

Alen Komljen

I'm a DevOps/Cloud engineer with experience that spans a broad portfolio of skills, including cloud computing, software deployment, process automation, shell scripting and configuration management, as well as Agile development and Scrum. This allowed me to excel in solving challenges in cloud computing, and the entire IT infrastructure along with my deep interest in OpenStack, Ceph, Docker and the open-source community.