From 198f5888ba6daed8378e9af07142374294e25eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20St=C3=BCck?= Date: Tue, 5 Sep 2017 12:28:08 -0400 Subject: [PATCH 1/2] Adds and configures Elasticsearch as a service. --- puppet/Puppetfile | 4 +++- puppet/Puppetfile.lock | 38 +++++++++++++++++++++++---------- puppet/precip/manifests/init.pp | 18 ++++++++++++++++ 3 files changed, 48 insertions(+), 12 deletions(-) diff --git a/puppet/Puppetfile b/puppet/Puppetfile index ba6dec5..215753a 100644 --- a/puppet/Puppetfile +++ b/puppet/Puppetfile @@ -8,10 +8,12 @@ mod 'puppetlabs-apt', "4.1.0" mod 'puppetlabs-mysql' mod 'puppetlabs-vcsrepo' mod 'puppetlabs-stdlib' + mod 'ftaeger-mailhog', :git => "https://github.com/jeffgeorge/ftaeger-mailhog.git", :ref => "remove_wget_cache_dir" mod 'saz-memcached' +mod 'elastic-elasticsearch', '5.4.3' -mod 'clwdev-precip', :path => '/vagrant/puppet/precip' \ No newline at end of file +mod 'clwdev-precip', :path => '/vagrant/puppet/precip' diff --git a/puppet/Puppetfile.lock b/puppet/Puppetfile.lock index badcf96..dfcd4d0 100644 --- a/puppet/Puppetfile.lock +++ b/puppet/Puppetfile.lock @@ -1,23 +1,38 @@ FORGE remote: https://forgeapi.puppetlabs.com specs: + elastic-elasticsearch (5.4.3) + puppet-yum (< 3.0.0, >= 0.9.6) + puppetlabs-apt (< 5.0.0, >= 2.0.0) + puppetlabs-java (< 3.0.0, >= 1.0.0) + puppetlabs-stdlib (< 5.0.0, >= 4.6.0) + richardc-datacat (< 1.0.0, >= 0.6.2) + puppet-archive (1.3.0) + puppetlabs-stdlib (< 5.0.0, >= 4.6.0) puppet-staging (2.2.0) - puppetlabs-apache (1.11.0) - puppetlabs-concat (< 3.0.0, >= 1.1.1) - puppetlabs-stdlib (< 5.0.0, >= 4.2.0) + puppet-yum (2.0.1) + puppetlabs-concat (< 5.0.0, >= 1.2.5) + puppetlabs-stdlib (< 5.0.0, >= 4.10.0) + puppetlabs-apache (2.0.0) + puppetlabs-concat (< 5.0.0, >= 2.2.1) + puppetlabs-stdlib (< 5.0.0, >= 4.13.1) puppetlabs-apt (4.1.0) puppetlabs-stdlib (< 5.0.0, >= 4.16.0) - puppetlabs-concat (2.2.1) - puppetlabs-stdlib (< 5.0.0, >= 4.2.0) - puppetlabs-firewall (1.8.1) + puppetlabs-concat (4.0.1) + puppetlabs-stdlib (< 5.0.0, >= 4.13.1) + puppetlabs-firewall (1.9.0) + puppetlabs-java (2.1.0) + puppet-archive (< 2.0.0, >= 1.1.0) + puppetlabs-stdlib (< 5.0.0, >= 4.13.1) puppetlabs-mysql (3.11.0) puppet-staging (< 3.0.0, >= 1.0.1) puppetlabs-stdlib (< 5.0.0, >= 3.2.0) - puppetlabs-stdlib (4.16.0) - puppetlabs-vcsrepo (1.4.0) - saz-memcached (2.8.1) - puppetlabs-firewall (>= 0.1.0) - puppetlabs-stdlib (>= 3.2.0) + puppetlabs-stdlib (4.19.0) + puppetlabs-vcsrepo (2.0.0) + richardc-datacat (0.6.2) + saz-memcached (3.0.2) + puppetlabs-firewall (< 2.0.0, >= 0.1.0) + puppetlabs-stdlib (< 6.0.0, >= 4.6.0) GIT remote: https://github.com/jeffgeorge/ftaeger-mailhog.git @@ -34,6 +49,7 @@ PATH DEPENDENCIES clwdev-precip (>= 0) + elastic-elasticsearch (= 5.4.3) ftaeger-mailhog (>= 0) puppetlabs-apache (>= 0) puppetlabs-apt (= 4.1.0) diff --git a/puppet/precip/manifests/init.pp b/puppet/precip/manifests/init.pp index 5560a88..97252c9 100644 --- a/puppet/precip/manifests/init.pp +++ b/puppet/precip/manifests/init.pp @@ -15,6 +15,7 @@ 'vim', 'g++', 'software-properties-common', + 'ruby-augeas', ]: ensure => present, } @@ -98,6 +99,23 @@ # Install Memcached class { 'memcached': } + + # Install Elasticsearch + # (Allows VM host access and enables CORS for all .vm hosts) + class { 'elasticsearch': + restart_on_change => true, + java_install => true, + instances => { + 'es-01' => { + 'config' => { + 'network.host' => '0.0.0.0', + 'network.bind_host' => '0', + 'http.cors.enabled' => 'true', + 'http.cors.allow-origin' => '/https?:\/\/.*\.vm/', + }, + }, + }, + } # Install Mailhog, back to being handled by ftaeger-mailhog class { 'mailhog': } From 00de4f41745ac07a2f6d0f4ba0bfd84c0a606197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20St=C3=BCck?= Date: Tue, 5 Sep 2017 12:29:16 -0400 Subject: [PATCH 2/2] Added metadata.json for precip puppet module, removed defunct Modulefile. --- puppet/precip/Modulefile | 8 -------- puppet/precip/metadata.json | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 8 deletions(-) delete mode 100644 puppet/precip/Modulefile create mode 100644 puppet/precip/metadata.json diff --git a/puppet/precip/Modulefile b/puppet/precip/Modulefile deleted file mode 100644 index 6523f96..0000000 --- a/puppet/precip/Modulefile +++ /dev/null @@ -1,8 +0,0 @@ -name 'clwdev-precip' -version '0.0.2' -source 'https://github.com/clwdev/precip' -author 'clwdev' -license 'MIT' -summary 'Builds out a full-featured Acquia-Cloud-Oriented LAMP Stack for Drupal Apps' -description "This puppet module defines a full-featured LAMP Stack for local development of Drupal Sites, and (pretty closely) mirrors how Acquia Cloud Drupal Environments work. It's the special-sauce behind the Precip vagrant box." -project_page 'https://github.com/clwdev/precip' \ No newline at end of file diff --git a/puppet/precip/metadata.json b/puppet/precip/metadata.json new file mode 100644 index 0000000..08535f2 --- /dev/null +++ b/puppet/precip/metadata.json @@ -0,0 +1,14 @@ +{ + "name": "clwdev-precip", + "version": "0.0.3", + "author": "Travelopia, Inc. (Clearwater Development Team)", + "summary": "Builds and configures a full-featured Acquia Cloud–oriented LAMP+ infrastructure for Drupal–based applications.", + "license": "MIT", + "source": "https://github.com/clwdev/precip/puppet/precip", + "project_page": "https://github.com/clwdev/precip", + "issues_url": "https://github.com/clwdev/precip/issues", + "description": "This puppet module defines a full-featured LAMP Stack for local development of Drupal sites, and (pretty closely) mirrors how Acquia Cloud Drupal Environments work. It's the special-sauce behind the Precip vagrant box.", + "dependencies": [ + { "name": "puppetlabs/stdlib", "version_requirement": ">= 3.2.0 < 5.0.0" } + ] +}