aboutsummaryrefslogtreecommitdiff
path: root/bigtop-deploy
diff options
context:
space:
mode:
authorEvans Ye <evansye@apache.org>2015-05-13 18:20:25 +0000
committerKonstantin Boudnik <cos@wandisco.com>2015-05-13 11:59:56 -0700
commitaf8d003df86dc454832eb105d32402cbf8009c57 (patch)
tree62420869983d02bef3dcca4c887bfe7229aefaf8 /bigtop-deploy
parent0154e3c872b3b6e55d5350b54450c57f0b8f81c6 (diff)
BIGTOP-1870. Latest version of Puppet::Apt doesn't work for our deployment recipes
Signed-off-by: Konstantin Boudnik <cos@wandisco.com>
Diffstat (limited to 'bigtop-deploy')
-rw-r--r--bigtop-deploy/puppet/manifests/site.pp11
-rwxr-xr-xbigtop-deploy/vm/utils/setup-env-centos.sh8
-rwxr-xr-xbigtop-deploy/vm/utils/setup-env-debian.sh6
-rwxr-xr-xbigtop-deploy/vm/vagrant-puppet-docker/provision.sh11
4 files changed, 15 insertions, 21 deletions
diff --git a/bigtop-deploy/puppet/manifests/site.pp b/bigtop-deploy/puppet/manifests/site.pp
index 04ccb1da..20954341 100644
--- a/bigtop-deploy/puppet/manifests/site.pp
+++ b/bigtop-deploy/puppet/manifests/site.pp
@@ -30,15 +30,18 @@ case $operatingsystem {
Yumrepo<||> -> Package<||>
}
/(Ubuntu|Debian)/: {
- class { "apt": disable_keys => true }
+ include apt
+ apt::conf { "disable_keys":
+ content => "APT::Get::AllowUnauthenticated 1;",
+ ensure => present
+ }
apt::source { "Bigtop":
location => hiera("bigtop::bigtop_repo_uri", $default_debrepo),
release => "bigtop",
repos => "contrib",
ensure => present,
- include_src => false,
- }
- Apt::Source<||> -> Package<||>
+ }
+ Apt::Source<||> -> Exec['apt_update'] -> Package<||>
}
default: {
notify{"WARNING: running on a neither yum nor apt platform -- make sure Bigtop repo is setup": }
diff --git a/bigtop-deploy/vm/utils/setup-env-centos.sh b/bigtop-deploy/vm/utils/setup-env-centos.sh
index e149dad1..58cdd34d 100755
--- a/bigtop-deploy/vm/utils/setup-env-centos.sh
+++ b/bigtop-deploy/vm/utils/setup-env-centos.sh
@@ -20,10 +20,7 @@ echo "$enable_local_repo"
# Install puppet agent
yum -y install http://yum.puppetlabs.com/puppetlabs-release-el-6.noarch.rpm
-yum -y install puppet
-cd /etc/puppet/modules && puppet module install puppetlabs/stdlib
-
-mkdir -p /data/{1,2}
+yum -y install puppet curl sudo unzip
# Setup rng-tools to improve virtual machine entropy performance.
# The poor entropy performance will cause kerberos provisioning failed.
@@ -31,9 +28,6 @@ yum -y install rng-tools
sed -i.bak 's/EXTRAOPTIONS=\"\"/EXTRAOPTIONS=\"-r \/dev\/urandom\"/' /etc/sysconfig/rngd
service rngd start
-# Install packages for smoke-tests
-yum -y install unzip
-
if [ $enable_local_repo == "true" ]; then
echo "Enabling local yum."
yum -y install yum-utils
diff --git a/bigtop-deploy/vm/utils/setup-env-debian.sh b/bigtop-deploy/vm/utils/setup-env-debian.sh
index 05282039..40fc0ea5 100755
--- a/bigtop-deploy/vm/utils/setup-env-debian.sh
+++ b/bigtop-deploy/vm/utils/setup-env-debian.sh
@@ -17,11 +17,9 @@
enable_local_repo=${1:-false}
-apt-get update
# Install puppet agent
-apt-get -y install puppet puppet-module-puppetlabs-stdlib puppet-module-puppetlabs-apt curl
-
-mkdir -p /data/{1,2}
+apt-get update
+apt-get -y install puppet curl sudo unzip
# Setup rng-tools to improve virtual machine entropy performance.
# The poor entropy performance will cause kerberos provisioning failed.
diff --git a/bigtop-deploy/vm/vagrant-puppet-docker/provision.sh b/bigtop-deploy/vm/vagrant-puppet-docker/provision.sh
index 48cb968c..3fa9cac7 100755
--- a/bigtop-deploy/vm/vagrant-puppet-docker/provision.sh
+++ b/bigtop-deploy/vm/vagrant-puppet-docker/provision.sh
@@ -23,13 +23,12 @@ umount /etc/hosts
mv /etc/hosts /etc/hosts.bak
ln -s /vagrant/hosts /etc/hosts
-# Prepare puppet configuration file
-if [ -f /etc/debian_version ] ; then
- apt-get -y install puppet-module-puppetlabs-stdlib
-else
- cd /etc/puppet/modules && puppet module install puppetlabs/stdlib
-fi
+# Install puppet modules
+puppet apply --modulepath=/bigtop-home -e "include bigtop_toolchain::puppet-modules"
+
+mkdir -p /data/{1,2}
+# Prepare puppet configuration file
mkdir -p /etc/puppet/hieradata
cp /bigtop-home/bigtop-deploy/puppet/hiera.yaml /etc/puppet
cp -r /bigtop-home/bigtop-deploy/puppet/hieradata/bigtop/ /etc/puppet/hieradata/