Giter VIP home page Giter VIP logo

aem-cookbook's Introduction

aem-cookbook

This cookbook installs and configures Adobe Experience Manager (AEM). (NOTE: CQ versions 5.4 and 5.5 should work as well -- CQ was renamed to AEM as of version 5.6). Included are recipes to install an author or publish instance as well as the dispatcher module for Apache HTTP server.

Supported Platforms

  • CentOS

Supported Versions

  • AEM 6.0.0
  • AEM 5.6.1
  • AEM 5.6.0
  • CQ 5.5.0

Featured Functionality

  • Unattended installation of aem author, publish, and dispatcher nodes.
  • Automatically search for and configure aem cluster members (dispatcher, author, publish) using chef searches.
  • Configure replication agents using the replicator provider.
  • Configure dispatcher farms with the farm provider.
  • Deploy and remove aem packages with the package provider (recommended for development purposes only).

Attributes

Key Type Description Default
['aem']['version'] String AEM version nil
['aem']['download_url'] String URL to AEM jar file nil
['aem']['license_url'] String URL to AEM license file nil
['aem']['dispatcher']['mod_dispatcher_url'] String URL to AEM dispatcher (.tar.gz or .so) nil
['aem']['dispatcher']['version'] String dispatcher module version nil

Usage

aem::author

Include aem::author in your node's run_list:

{
  "run_list": [
    "recipe[aem::author]"
  ]
}

aem::publish

Include aem::publish in your node's run_list:

{
  "run_list": [
    "recipe[aem::publish]"
  ]
}

aem::dispatcher

Include aem::dispatcher in your node's run_list:

{
  "run_list": [
    "recipe[aem::dispatcher]"
  ]
}

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (i.e. add-new-recipe)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors

Copyright 2012-2016, Tacit Knowledge, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

aem-cookbook's People

Contributors

bignastybryce avatar danvalencia avatar ericachelis avatar pdunnavant avatar psukhe avatar tas50 avatar tmaier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aem-cookbook's Issues

AEM 6 support

I'm currently working on this, but adding an issue to track it (see the aem6-tests branch).

Add tests for AEM 6 and make any modifications to the cookbook to help support that.

AEM 6.3 Java 8

Hi there,

Has anyone tried using AEM 6.3, Centos 7.3, and Java 8 with this package?

I'm using test Kitchen to test out the build before using Packer to build it on AWS. In both cases, I get an extreme memory leak that crashes either the AWS instance or my local machine when using test kitchen.

I would like to ignore the Packer side of it for this inquiry and focus on the test Kitchen side as it's more standard.

I am using Berks with my cookbook which relies on version 2.2.0:

depends 'aem', '~> 2.2.0'

My kitchen.yml defines a Vagrant box using chef-solo as its provisioner I wanted to use solo because that's what Packer uses:

---
driver:
  name: vagrant
  customize:
    memory: 1024

provisioner:
  name: chef_solo
  require_chef_omnibus: 12

platforms:
  - name: centos-7.3

suites:
  - name: default
    driver:
      name: vagrant
      customize:
        memory: 12228
      network:
        - [ 'forwarded_port', { guest: 4502, host: 4502 } ]
    run_list:
      - recipe[aem_author::default]

My attributes are:

#
## Base AEM
#

default['aem']['aem_options'] = {
  'JAVA_HOME' => '/usr/java/default',
  'RUNAS_USER' => 'crx',
  'CQ_HEAP_MIN' => '8192',
  'CQ_HEAP_MAX' => '10240',
  'CQ_PERMGEN' => '3072'
}

default['aem']['download_url'] = 'S3_BUCKET/aem/aem-quickstart-6.3.0.jar'
default['aem']['version'] = '6.3.0'

default['aem']['author']['uid'] = 1001
default['aem']['author']['gid'] = 1001

#
## Base Java
#

default['java']['jdk_version'] = '8'
default['java']['install_flavor'] = 'oracle'
default['java']['jdk']['7']['x86_64']['url'] = 'S3_BUCKET/java/jdk-8u144-linux-x64.tar.gz'
default['java']['jdk']['7']['x86_64']['checksum'] = 'e8a341ce566f32c3d06f6d0f0eeea9a0f434f538d22af949ae58bc86f2eeaae4'
default['java']['oracle']['accept_oracle_download_terms'] = true

And my recipe:

aem_user = node['aem']['aem_options']['RUNAS_USER']

#
## User
#

group aem_user do
  gid node['aem']['author']['gid']
end

user aem_user do
  comment 'AEM author user'
  system true
  uid node['aem']['author']['uid']
  gid node['aem']['author']['gid']
  shell '/bin/bash'
  home "/home/#{aem_user}"
  manage_home true
end

#
## Opts
#

jar_opts = []
jar_opts << 'author'
jar_opts << node['d-aem']['default_jar_opts']

node.default['aem']['jar_opts'] = ["-r #{jar_opts.flatten.compact.uniq.join(',')}"]

include_recipe 'aem::author'

The Chef output is all correct, it hangs at the last step when trying to query the AEM URL:

 ▲ chef/cookbooks/aem_author kitchen list                                                                                                                                                                            
Instance           Driver   Provisioner  Verifier  Transport  Last Action    Last Error
default-centos-73  Vagrant  ChefSolo     Busser    Ssh        <Not Created>  <None>

 ▲ chef/cookbooks/aem_author kitchen create default-centos-73
-----> Starting Kitchen (v1.16.0)
-----> Creating <default-centos-73>...
       Bringing machine 'default' up with 'virtualbox' provider...
       ==> default: Importing base box 'bento/centos-7.3'...
==> default: Matching MAC address for NAT networking...
       ==> default: Checking if box 'bento/centos-7.3' is up to date...
       ==> default: Setting the name of the VM: default-centos-73_default_1504805662222_24833
       ==> default: Clearing any previously set network interfaces...
       ==> default: Preparing network interfaces based on configuration...
           default: Adapter 1: nat
       ==> default: Forwarding ports...
           default: 4502 (guest) => 4502 (host) (adapter 1)
           default: 22 (guest) => 2222 (host) (adapter 1)
       ==> default: Running 'pre-boot' VM customizations...
       ==> default: Booting VM...
       ==> default: Waiting for machine to boot. This may take a few minutes...
           default: SSH address: 127.0.0.1:2222
           default: SSH username: vagrant
           default: SSH auth method: private key
           default:
           default: Vagrant insecure key detected. Vagrant will automatically replace
           default: this with a newly generated keypair for better security.
           default:
           default: Inserting generated public key within guest...
           default: Removing insecure key from the guest if it's present...
           default: Key inserted! Disconnecting and reconnecting using new SSH key...
       ==> default: Machine booted and ready!
       ==> default: Checking for guest additions in VM...
       ==> default: Setting hostname...
       ==> default: Mounting shared folders...
           default: /tmp/omnibus/cache =><HOME>/.kitchen/cache
       ==> default: Machine not provisioned because `--no-provision` is specified.
       [SSH] Established
       Vagrant instance <default-centos-73> created.
       Finished creating <default-centos-73> (0m45.32s).
-----> Kitchen is finished. (0m45.76s)

 ▲ chef/cookbooks/aem_author kitchen converge default-centos-73

... all good here

 * bash[wait for URL: http://localhost:4502/libs/cq/core/content/login.html] action run[2017-09-07T17:39:43+00:00] INFO: Processing bash[wait for URL: http://localhost:4502/libs/cq/core/content/login.html] action run (/tmp/kitchen/cache/cookbooks/aem/providers/url_watcher.rb line 39)

           [execute]  is running.
              Waiting for URL...
               is running.
              Waiting for URL...
               is running.
              Waiting for URL...
               is running.
              Waiting for URL...
               is running.
              Waiting for URL...
               is running.
              Waiting for URL...
               is running.
              Waiting for URL...
               is running.
              Waiting for URL...

Memory usage goes up from here and consumes the machine.

Logging in:

 ▲ chef/cookbooks/aem_author kitchen login default-centos-73
Last login: Thu Sep  7 17:35:07 2017 from 10.0.2.2
[vagrant@default-centos-73 ~]$ curl localhost:4502
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 </title>
</head>
<body>
<h2>HTTP ERROR: 404</h2>
<p>Problem accessing /. Reason:
<pre>    Not Found</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>

bump ark dependency to ~> 0.9.1

Would it be possible to bump the ark dependency to at least 0.9.1? I'm trying to create a local wrapper where our environments lowest ark community version 0.9.1. I've had successful converges locally of author & publish.

No resource or method named `aem_jar_installer' for `Chef::Recipe "author"

NoMethodError

No resource or method named aem_jar_installer' forChef::Recipe "author"'

Cookbook Trace:

/var/chef/site-cookbooks/aem-cookbook-master/recipes/author.rb:22:in `from_file'

Relevant File Content:

/var/chef/site-cookbooks/aem-cookbook-master/recipes/author.rb:

15: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16: # See the License for the specific language governing permissions and
17: # limitations under the License.
18:
19: include_recipe "aem::_base_aem_setup"
20:
21: unless node[:aem][:use_yum]
22>> aem_jar_installer "author" do
23: download_url node[:aem][:download_url]
24: default_context node[:aem][:author][:default_context]
25: port node[:aem][:author][:port]
26: action :install
27: end
28: end
29:
30: unless node[:aem][:license_url].nil?
31: remote_file "#{node[:aem][:author][:default_context]}/license.properties" do

Running handlers:
[2014-07-14T10:31:17+01:00] ERROR: Running exception handlers
Running handlers complete

[2014-07-14T10:31:17+01:00] ERROR: Exception handlers complete
[2014-07-14T10:31:17+01:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 1.906949103 seconds
[2014-07-14T10:31:17+01:00] ERROR: No resource or method named aem_jar_installer' forChef::Recipe "author"'
[2014-07-14T10:31:17+01:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Issue creating user with group

AEM 6 with SP2.

Fails to add user

Error message:

javax.jcr.RepositoryException: Cannot remove &apos;peterpan&apos; from group everyone

Fix:

Add membership to group everyone to curl command.

  :add_user => {
    :aem55 => 'curl -u <%= admin_user %>:<%= admin_password %> -FcreateUser= -FauthorizableId=<%= user %> -Frep:password=<%= password %> -Fmembership=<%= group %> -Fmembership=everyone http://localhost:<%= port %>/libs/granite/security/post/authorizables'
  }

Original code

        aem_user user['name'] do
          password user['password']

          # port node[:aem][:author][:port]
          port '3000'
          admin_user node[:aem][:author][:admin_user]
          admin_password node[:aem][:author][:admin_password]

          aem_version node[:aem][:version]
          group user['group']

          action :add
        end

HTTP request & response

C-13-#000000 -> [POST /libs/granite/security/post/authorizables HTTP/1.1 ]
C-13-#000057 -> [Authorization: Basic YWRtaW46YWRtaW4= ]
C-13-#000096 -> [User-Agent: curl/7.29.0 ]
C-13-#000121 -> [Host: localhost:3000 ]
C-13-#000143 -> [Accept: */* ]
C-13-#000156 -> [Content-Length: 477 ]
C-13-#000177 -> [Expect: 100-continue ]
C-13-#000199 -> [Content-Type: multipart/form-data; boundary=----------------------------db5bcbd7b9f2 ]
C-13-#000285 -> [ ]
S-13-#000000 -> [HTTP/1.1 100 Continue ]
S-13-#000023 -> [ ]
C-13-#000287 -> [------------------------------db5bcbd7b9f2 ]
C-13-#000331 -> [Content-Disposition: form-data; name="createUser" ]
C-13-#000382 -> [ ]
C-13-#000384 -> [ ]
C-13-#000386 -> [------------------------------db5bcbd7b9f2 ]
C-13-#000430 -> [Content-Disposition: form-data; name="authorizableId" ]
C-13-#000485 -> [ ]
C-13-#000487 -> [peterpan ]
C-13-#000497 -> [------------------------------db5bcbd7b9f2 ]
C-13-#000541 -> [Content-Disposition: form-data; name="rep:password" ]
C-13-#000594 -> [ ]
C-13-#000596 -> [12341234 ]
C-13-#000606 -> [------------------------------db5bcbd7b9f2 ]
C-13-#000650 -> [Content-Disposition: form-data; name="membership" ]
C-13-#000701 -> [ ]
C-13-#000703 -> [eon-de-admins ]
C-13-#000718 -> [------------------------------db5bcbd7b9f2-- ]
S-13-#000025 -> [HTTP/1.1 500 Server Error ]
S-13-#000052 -> [Date: Thu, 23 Apr 2015 23:40:52 GMT ]
S-13-#000089 -> [X-Content-Type-Options: nosniff ]
S-13-#000122 -> [Set-Cookie: cq-authoring-mode=TOUCH;Path=/ ]
S-13-#000166 -> [Expires: Thu, 01 Jan 1970 00:00:00 GMT ]
S-13-#000206 -> [Content-Type: text/html;charset=UTF-8 ]
S-13-#000245 -> [Transfer-Encoding: chunked ]
S-13-#000273 -> [Server: Jetty(8.1.14.v20131031) ]
S-13-#000306 -> [ ]
S-13-#000308 -> [8C7 ]
S-13-#000313 -> [<html>]
S-13-#000320 -> [<head>]
S-13-#000327 -> [    <title>Error while processing null</title>]
S-13-#000374 -> [</head>]
S-13-#000382 -> [    <body>]
S-13-#000393 -> [    <h1>Error while processing null</h1>]
S-13-#000434 -> [    <table>]
S-13-#000446 -> [        <tbody>]
S-13-#000462 -> [            <tr>]
S-13-#000479 -> [                <td>Status</td>]
S-13-#000511 -> [                <td><div id="Status">500</div></td>]
S-13-#000563 -> [            </tr>]
S-13-#000581 -> [            <tr>]
S-13-#000598 -> [                <td>Message</td>]
S-13-#000631 -> [                <td><div id="Message">javax.jcr.RepositoryException: Cannot remove &apos;peterpan&apos; from group everyone</div></td>]
S-13-#000766 -> [            </tr>]
S-13-#000784 -> [            <tr>]
S-13-#000801 -> [                <td>Location</td>]
S-13-#000835 -> [                <td><img src="/libs/cq/linkchecker/resources/linkcheck_o.gif" alt="invalid link: " title="invalid link: " border="0"><img src=]
S-13-#000976 -> ["/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>]
S-13-#001043 -> [            </tr>]
S-13-#001061 -> [            <tr>]
S-13-#001078 -> [                <td>Parent Location</td>]
S-13-#001119 -> [                <td><img src="/libs/cq/linkchecker/resources/linkcheck_o.gif" alt="invalid link: " title="invalid link: " border="0"><img src=]
S-13-#001260 -> ["/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>]
S-13-#001327 -> [            </tr>]
S-13-#001345 -> [            <tr>]
S-13-#001362 -> [                <td>Path</td>]
S-13-#001392 -> [                <td><div id="Path"></div></td>]
S-13-#001439 -> [            </tr>]
S-13-#001457 -> [            <tr>]
S-13-#001474 -> [                <td>Referer</td>]
S-13-#001507 -> [                <td><img src="/libs/cq/linkchecker/resources/linkcheck_o.gif" alt="invalid link: " title="invalid link: " border="0"><img src=]
S-13-#001648 -> ["/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></td>]
S-13-#001715 -> [            </tr>]
S-13-#001733 -> [            <tr>]
S-13-#001750 -> [                <td>ChangeLog</td>]
S-13-#001785 -> [                <td><div id="ChangeLog">&lt;pre&gt;&lt;/pre&gt;</div></td>]
S-13-#001860 -> [            </tr>]
S-13-#001878 -> [        </tbody>]
S-13-#001895 -> [    </table>]
S-13-#001908 -> [    <p><img src="/libs/cq/linkchecker/resources/linkcheck_o.gif" alt="invalid link: " title="invalid link: " border="0">Go Back<img src="/libs]
S-13-#002049 -> [/cq/linkchecker/resources/linkcheck_c.gif" border="0"></p>]
S-13-#002109 -> [    <p><img src="/libs/cq/linkchecker/resources/linkcheck_o.gif" alt="invalid link: " title="invalid link: " border="0">Modified Resource<img ]
S-13-#002250 -> [src="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></p>]
S-13-#002320 -> [    <p><img src="/libs/cq/linkchecker/resources/linkcheck_o.gif" alt="invalid link: " title="invalid link: " border="0">Parent of Modified Res]
S-13-#002461 -> [ource<img src="/libs/cq/linkchecker/resources/linkcheck_c.gif" border="0"></p>]
S-13-#002541 -> [    </body>]
S-13-#002553 -> [</html> ]

VagrantBox no longer exists

Hey,

I have bring this up, but the vagrant box no longer exists.

When i try to switch the box out following this guide, the box gets up, but then throws:

could not find recipe default for cookbook aem

Any ideas?

Dispatcher modules is being downloaded having extra tar.gz as an extension

*****Provided below attributes for dispatcher *****
default[:aem][:dispatcher][:dispatcher_file_cookbook] = 'dispatcher-apache2.2-4.2.2.so'
default[:aem][:dispatcher][:webserver_type] = 'apache2.2'
default[:aem][:dispatcher][:version] = '4.2.2'

Logs are as below while running cookbook for aem 6.1 on ubuntu .

ark("dispatcher-apache2.2-linux-x86-64-4.2.2.tar.gz") do
provider LWRP provider ark from cookbook ark
action [:cherry_pick]
updated true
updated_by_last_action true
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :ark
cookbook_name "aem"
url "https://www.adobeaemcloud.com/content/companies/public/adobe/dispatcher/dispatcher/_jcr_content/top/download_24/file.res/dispatcher-apache2.2-linux-x86-64-4.2.2.tar.gz"
creates "modules/dispatcher-apache2.2-*4.2.2.so"
path "/usr/lib/apache2/modules"
extension "tar.gz"
release_file "/var/chef/cache/dispatcher-apache2.2-linux-x86-64-4.2.2.tar.gz.tar.gz"

ERROR: ark[dispatcher-apache2.2-linux-x86-64-4.2.2.tar.gz] (/var/chef/cache/cookbooks/aem/providers/dispatcher.rb line 57) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[cherry_pick modules/dispatcher-apache2.2-*4.2.2.so from /var/chef/cache/dispatcher-apache2.2-linux-x86-64-4.2.2.tar.gz.tar.gz] (/var/chef/cache/cookbooks/ark/providers/default.rb line 243) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '2'
clone3 ---- Begin output of /bin/tar xzf /var/chef/cache/dispatcher-apache2.2-linux-x86-64-4.2.2.tar.gz.tar.gz -C /usr/lib/apache2/modules modules/dispatcher-apache2.2-*4.2.2.so --strip-components=1 ----

`supports managed_home` broken in Chef 13

-----> Converging <publish-centos-72>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 5.6.4...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
-----> Installing Chef Omnibus (always install latest version)
       Downloading https://omnitruck.chef.io/install.sh to file /tmp/install.sh
       Trying wget...
       Download complete.
       el 7 x86_64
       Getting information for chef stable  for el...
       downloading https://omnitruck.chef.io/stable/chef/metadata?v=&p=el&pv=7&m=x86_64
         to file /tmp/install.sh.22751/metadata.txt
       trying wget...
       sha1	65c046c91a7186a28af9642e3cffcd72296cf602
       sha256	b8397ea2a33a3f4c860daac1cb0714a11d8dad5287b0eb7054e8432d484f9f2c
       url	https://packages.chef.io/files/stable/chef/13.1.31/el/7/chef-13.1.31-1.el7.x86_64.rpm
       version	13.1.31
       downloaded metadata file looks valid...
       /tmp/omnibus/cache/chef-13.1.31-1.el7.x86_64.rpm already exists, verifiying checksum...
       Comparing checksum with sha256sum...
       checksum compare succeeded, using existing file!
       
       WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
       
       You are installing an omnibus package without a version pin.  If you are installing
       on production servers via an automated process this is DANGEROUS and you will
       be upgraded without warning on new releases, even to new major releases.
       Letting the version float is only appropriate in desktop, test, development or
       CI/CD environments.
       
       WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
       
       Installing chef 
       installing with rpm...
       warning: /tmp/omnibus/cache/chef-13.1.31-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
       Preparing...                          ################################# [100%]
       Updating / installing...
          1:chef-13.1.31-1.el7               ################################# [100%]
       Thank you for installing Chef!
       Transferring files to <publish-centos-72>
       Starting Chef Client, version 13.1.31
       resolving cookbooks for run list: ["inlet_aem::publish"]
       Synchronizing Cookbooks:
         - aem (2.2.0)
         - apache2 (3.3.0)
         - ark (0.8.2)
         - iptables (4.2.0)
         - java (1.50.0)
         - apt (6.1.2)
         - windows (3.1.1)
         - homebrew (4.2.0)
         - ohai (5.1.0)
         - inlet_aem (1.0.0)
       Installing Cookbook Gems:
       Compiling Cookbooks...
       /tmp/kitchen/cache/cookbooks/ark/resources/default.rb:32: warning: constant ::Fixnum is deprecated
       /tmp/kitchen/cache/cookbooks/ark/resources/default.rb:43: warning: constant ::Fixnum is deprecated
       Recipe: aem::_base_aem_setup
         * yum_package[libcurl-devel] action install (up to date)
         * yum_package[gcc] action install (up to date)
         * chef_gem[curb] action install (up to date)
         
         ================================================================================
         Recipe Compile Error in /tmp/kitchen/cache/cookbooks/inlet_aem/recipes/publish.rb
         ================================================================================
         
         NoMethodError
         -------------
         undefined method `supports' for Chef::Resource::User::LinuxUser
         
         Cookbook Trace:
         ---------------
           /tmp/kitchen/cache/cookbooks/aem/recipes/_base_aem_setup.rb:62:in `block in from_file'
           /tmp/kitchen/cache/cookbooks/aem/recipes/_base_aem_setup.rb:57:in `from_file'
           /tmp/kitchen/cache/cookbooks/aem/recipes/publish.rb:19:in `from_file'
           /tmp/kitchen/cache/cookbooks/inlet_aem/recipes/publish.rb:11:in `from_file'
         
         Relevant File Content:
         ----------------------
         /tmp/kitchen/cache/cookbooks/aem/recipes/_base_aem_setup.rb:
         
          55:    end
          56:  else
          57:    user 'crx' do
          58:      comment 'crx/aem role user'
          59:      system true
          60:      shell '/bin/bash'
          61:      home '/home/crx'
          62>>     supports manage_home: true
          63:      action :create
          64:    end
          65:  end
          66:  
          67:  directory '/home/crx/.ssh' do
          68:    owner 'crx'
          69:    group 'crx'
          70:    mode 0700
          71:  end
         
         System Info:
         ------------
         chef_version=13.1.31
         platform=centos
         platform_version=7.2.1511
         ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
         program_name=chef-client worker: ppid=22873;start=13:34:59;
         executable=/opt/chef/bin/chef-client
         
         
         Running handlers:
       [2017-06-30T13:35:02+00:00] ERROR: Running exception handlers
       [2017-06-30T13:35:02+00:00] ERROR: Running exception handlers
         Running handlers complete
       [2017-06-30T13:35:02+00:00] ERROR: Exception handlers complete
       [2017-06-30T13:35:02+00:00] ERROR: Exception handlers complete
         Chef Client failed. 0 resources updated in 03 seconds
       [2017-06-30T13:35:02+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2017-06-30T13:35:02+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2017-06-30T13:35:02+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2017-06-30T13:35:02+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2017-06-30T13:35:02+00:00] ERROR: undefined method `supports' for Chef::Resource::User::LinuxUser
       [2017-06-30T13:35:02+00:00] ERROR: undefined method `supports' for Chef::Resource::User::LinuxUser
       [2017-06-30T13:35:02+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
       [2017-06-30T13:35:02+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

#64 fixes this.

chef_gem 'curb' deprecated

I get the following warning in my log

==> author: [2015-04-01T00:27:28+02:00] WARN: chef_gem[curb] chef_gem compile_time installation is deprecated
==> author: [2015-04-01T00:27:28+02:00] WARN: chef_gem[curb] Please set `compile_time false` on the resource to use the new behavior.
==> author: [2015-04-01T00:27:28+02:00] WARN: chef_gem[curb] or set `compile_time true` on the resource if compile_time behav

This is the result of the following code at

chef_gem 'curb' do
action :nothing
end.run_action(:install)

chef_gem 'curb' do
  action :nothing
end.run_action(:install)

aem_jar_installer

Hi, I am executing your aem-cookbook for author but getting following error.

NoMethodError

No resource or method named aem_jar_installer' for Chef::Recipe "author"'

Please provide any solution.

Thanks
Praveen

Dynamic creation of replication agents does not work on AWS opsworks

Hi,
Wondering if there is a way to get the replication agent configuration to be set up dynamically when using this recipe on AWS Opsworks?

Has anyone tried?

I have been able to build the different instances author/publish/dispatcher on my AWS Opswork stack using this recipe, but for some reason the dynamic discovery does not work.

From what I gather, Opswork offers limited support for chef search, but it should still be able to provide the search with the instance role/layer.

Any thougths?

http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-chef11-10.html#workingcookbook-chef11-10-search

As an example the following search works on Opsworks:
author = search(:node, "role:author").first
Chef::Log.info("author private IP is '#{author['private_ip']}'")
Chef::Log.info("author hostname is '#{author['hostname']}'")
log ("Found author host: '#{author['private_dns_name']}'")

Thanks,

-Luis

Flatten attributes in attributes/default.rb

Assigning attributes as hashes can cause some odd behavior during the merge. The attributes should be flattened to single values per assignment where possible. I know this takes a lot more typing, and I also know that I was the one who did it like this in the first place. I can only plead youth(!?) and ignorance. Might as well change the keys to strings instead of symbols while you're at it, to make foodcritic happy.

Curl command for removing replicator agent broken

:remove => 'curl -u <%=local_user%>:<%=local_password%> -X DELETE http://localhost:<%=local_port%>/etc/replication/agents.<%=server%>/<%=h%>',

The following curl command is broken:

curl -u <%=local_user%>:<%=local_password%> -X DELETE http://localhost:<%=local_port%>/etc/replication/agents.<%=server%>/<%=h%>

it serializes the hash h on the end of the string (<%=h%>). This will lead to a failure on command execution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.