Skip to content

Instantly share code, notes, and snippets.

@franciscocpg
Last active December 27, 2015 19:08
Show Gist options
  • Select an option

  • Save franciscocpg/370ae06a50edc23d77f0 to your computer and use it in GitHub Desktop.

Select an option

Save franciscocpg/370ae06a50edc23d77f0 to your computer and use it in GitHub Desktop.

Master (Ubuntu 14.04)

wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main" >> /etc/apt/sources.list'
sudo apt-get update
sudo apt-get install salt-master salt-minion salt-ssh

Master (CentOS 7 server)

rpm --import https://repo.saltstack.com/yum/redhat/7/x86_64/latest/SALTSTACK-GPG-KEY.pub
echo '[saltstack-repo]
name=SaltStack repo for RHEL/CentOS $releasever
baseurl=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest
enabled=1
gpgcheck=1
gpgkey=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/latest/$releaseverSALTSTACK-GPG-KEY.pub
' > /etc/yum.repos.d/saltstack.repo
sudo yum clean expire-cache
sudo yum update
sudo yum install salt-master
sudo yum install salt-minion
# Install gitpython
yum --enablerepo=epel install GitPython -y

sudo chkconfig salt-master on

Master (CentOS 6 server)

wget -O /tmp/install_salt.sh https://bootstrap.saltstack.com
sudo sh /tmp/install_salt.sh -M
# Install gitpython
yum --enablerepo=epel install GitPython -y

sudo chkconfig salt-master on

Edit /etc/salt/master and change the following lines

fileserver_backend:
  - git

gitfs_provider: gitpython

gitfs_remotes:
  - git_repo_url

Example for git_repo_url:
git clone git@bitbucket.org:rest4hub/salt-server.git
should be
git+ssh://git@bitbucket.org/rest4hub/salt-server.git
Restart
sudo service salt-master restart

Minions

wget -O /tmp/install_salt.sh https://bootstrap.saltstack.com
sudo sh /tmp/install_salt.sh -P
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment