From 2338286de10f54bd76ba8af928b03ac87622fc94 Mon Sep 17 00:00:00 2001 From: Sean Channel Date: Mon, 24 Dec 2012 10:55:50 -0800 Subject: [PATCH 1/3] add repos directly, start/stop --- saltcloud/deploy/Ubuntu-git.sh | 9 ++++++--- saltcloud/deploy/Ubuntu.sh | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/saltcloud/deploy/Ubuntu-git.sh b/saltcloud/deploy/Ubuntu-git.sh index 836092f0d7..41fbb91367 100644 --- a/saltcloud/deploy/Ubuntu-git.sh +++ b/saltcloud/deploy/Ubuntu-git.sh @@ -5,11 +5,14 @@ echo '{{ vm['priv_key'] }}' > /etc/salt/pki/minion.pem echo '{{ vm['pub_key'] }}' > /etc/salt/pki/minion.pub echo "{{ minion }}" > /etc/salt/minion +echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | sudo tee /etc/apt/sources.list.d/saltstack.list +wget -q -O- "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6" | sudo apt-key add - apt-get update -apt-get install -y python-software-properties -echo | add-apt-repository ppa:saltstack/salt -apt-get update + apt-get install -y salt-minion git-core +# minion will be started automatically by install +service salt-minion stop + rm -rf /usr/share/pyshared/salt* rm -rf /usr/bin/salt-* mkdir -p /root/git diff --git a/saltcloud/deploy/Ubuntu.sh b/saltcloud/deploy/Ubuntu.sh index a28b670e13..7abe251a41 100644 --- a/saltcloud/deploy/Ubuntu.sh +++ b/saltcloud/deploy/Ubuntu.sh @@ -5,9 +5,9 @@ echo '{{ vm['priv_key'] }}' > /etc/salt/pki/minion.pem echo '{{ vm['pub_key'] }}' > /etc/salt/pki/minion.pub echo "{{ minion }}" > /etc/salt/minion +echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | sudo tee /etc/apt/sources.list.d/saltstack.list +wget -q -O- "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6" | sudo apt-key add - apt-get update -apt-get install -y python-software-properties -echo | add-apt-repository ppa:saltstack/salt -apt-get update + apt-get install -y salt-minion -service salt-minion start +# minion will be started automatically by install From 2ce2051b60788853dd7899adeeb6084620220c85 Mon Sep 17 00:00:00 2001 From: Sean Channel Date: Mon, 24 Dec 2012 11:06:08 -0800 Subject: [PATCH 2/3] stray sudos --- saltcloud/deploy/Ubuntu-git.sh | 4 ++-- saltcloud/deploy/Ubuntu.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/saltcloud/deploy/Ubuntu-git.sh b/saltcloud/deploy/Ubuntu-git.sh index 41fbb91367..c56089ea92 100644 --- a/saltcloud/deploy/Ubuntu-git.sh +++ b/saltcloud/deploy/Ubuntu-git.sh @@ -5,8 +5,8 @@ echo '{{ vm['priv_key'] }}' > /etc/salt/pki/minion.pem echo '{{ vm['pub_key'] }}' > /etc/salt/pki/minion.pub echo "{{ minion }}" > /etc/salt/minion -echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | sudo tee /etc/apt/sources.list.d/saltstack.list -wget -q -O- "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6" | sudo apt-key add - +echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | tee /etc/apt/sources.list.d/saltstack.list +wget -q -O- "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6" | apt-key add - apt-get update apt-get install -y salt-minion git-core diff --git a/saltcloud/deploy/Ubuntu.sh b/saltcloud/deploy/Ubuntu.sh index 7abe251a41..2bacbf3fa6 100644 --- a/saltcloud/deploy/Ubuntu.sh +++ b/saltcloud/deploy/Ubuntu.sh @@ -5,8 +5,8 @@ echo '{{ vm['priv_key'] }}' > /etc/salt/pki/minion.pem echo '{{ vm['pub_key'] }}' > /etc/salt/pki/minion.pub echo "{{ minion }}" > /etc/salt/minion -echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | sudo tee /etc/apt/sources.list.d/saltstack.list -wget -q -O- "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6" | sudo apt-key add - +echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | tee /etc/apt/sources.list.d/saltstack.list +wget -q -O- "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6" | apt-key add - apt-get update apt-get install -y salt-minion From ac2339708a3fb37ac7c923d92bb8a6efcd964ff7 Mon Sep 17 00:00:00 2001 From: Sean Channel Date: Mon, 24 Dec 2012 11:46:39 -0800 Subject: [PATCH 3/3] also Debian --- saltcloud/deploy/Debian-git.sh | 25 +++++++++++++++++++++++++ saltcloud/deploy/Debian.sh | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 saltcloud/deploy/Debian-git.sh create mode 100644 saltcloud/deploy/Debian.sh diff --git a/saltcloud/deploy/Debian-git.sh b/saltcloud/deploy/Debian-git.sh new file mode 100644 index 0000000000..c58b791d3b --- /dev/null +++ b/saltcloud/deploy/Debian-git.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +mkdir -p /etc/salt/pki +echo '{{ vm['priv_key'] }}' > /etc/salt/pki/minion.pem +echo '{{ vm['pub_key'] }}' > /etc/salt/pki/minion.pub +echo "{{ minion }}" > /etc/salt/minion + +# echo deb http://ftp.debian.org/debian experimental main | tee -a /etc/apt/sources.list +echo deb http://backports.debian.org/debian-backports squeeze-backports main | tee -a /etc/apt/sources.list +echo deb http://debian.madduck.net/repo squeeze-backports main | tee -a /etc/apt/sources.list +wget -q -O- "http://debian.madduck.net/repo/gpg/archive.key" | apt-key add - + +apt-get update +apt-get install -y salt-minion git-core +# minion will be started automatically by install +service salt-minion stop + +rm -rf /usr/share/pyshared/salt* +rm -rf /usr/bin/salt-* +mkdir -p /root/git +cd /root/git +git clone git://github.com/saltstack/salt.git +cd salt +python setup.py install --install-layout=deb +service salt-minion start diff --git a/saltcloud/deploy/Debian.sh b/saltcloud/deploy/Debian.sh new file mode 100644 index 0000000000..482f1238ca --- /dev/null +++ b/saltcloud/deploy/Debian.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +mkdir -p /etc/salt/pki +echo '{{ vm['priv_key'] }}' > /etc/salt/pki/minion.pem +echo '{{ vm['pub_key'] }}' > /etc/salt/pki/minion.pub +echo "{{ minion }}" > /etc/salt/minion + +# echo deb http://ftp.debian.org/debian experimental main | tee -a /etc/apt/sources.list +echo deb http://backports.debian.org/debian-backports squeeze-backports main | tee -a /etc/apt/sources.list +echo deb http://debian.madduck.net/repo squeeze-backports main | tee -a /etc/apt/sources.list +wget -q -O- "http://debian.madduck.net/repo/gpg/archive.key" | apt-key add - + +apt-get update +apt-get install -y salt-minion +# minion will be started automatically by install