GithubHelp home page GithubHelp logo

alfrescolabs / chef-alfresco Goto Github PK

View Code? Open in Web Editor NEW
43.0 34.0 24.0 1.58 MB

A build automation tool that provides a modular, configurable and extensible way to install an Alfresco architecture

License: Other

Ruby 73.79% Shell 14.67% HTML 11.54%
alfresco chef automation

chef-alfresco's Introduction

chef-alfresco

Chef Alfresco Logo

Build Status

chef-alfresco is a Chef cookbook that provides a modular, configurable and extensible way to install an Alfresco node/stack; alfresco::default parses node['alfresco']['components'] and includes other alfresco::* recipes accordingly.

It is tested on Centos 7.x and Ubuntu 14.04 (soon on Centos 6.7)

To know more about attribute definition and overriding, check CHEF-ATTRIBUTES.md To get a list of packaged installed, their sources and versions, check PACKAGES.md

Graph of cookbooks dependencies

For a comprehensive documentation on how to use and test chef-alfresco, please visit our Wiki

How to contribute

To avoid any problem on master, we are implementing git-flow. To contribute, follow this:

  1. Fork this repository
  2. Make your changes
  3. Test your changes
  4. Make a pull request to alfresco/develop

Credits

This project is a fork of the original chef-alfresco developed by Fletcher Nichol; the code have been almost entirely rewritten, however the original implementation still works with Community 4.0.x versions and provides a different approach to Alfresco installation (using Alfresco Linux installer).

A big thanks to Nichol for starting this effort!

License and Author

Copyright 2016, Alfresco

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.

chef-alfresco's People

Contributors

altomkins avatar amohammedalfresco avatar corsarof avatar dmonteiro-alfresco avatar enzor avatar fnichol avatar maoo avatar marcomancuso avatar paul-snively avatar philipmeadows avatar pullr avatar sashman avatar skopf avatar toniblyx 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

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

chef-alfresco's Issues

Depenency Issue! yum-repoforge uses what looks like a dead resource "mirror list".

Test builds are breaking because yum is unable to build a mirror list.

Example error:
amazon-ebs: +[rpmforge]
amazon-ebs: +name=RHEL $releasever - RPMforge.net - dag
amazon-ebs: +enabled=1
amazon-ebs: +gpgcheck=1
amazon-ebs: +gpgkey=http://apt.sw.be/RPM-GPG-KEY.dag.txt
amazon-ebs: +mirrorlist=http://mirrorlist.repoforge.org/el7/mirrors-rpmforge
--- cut--
amazon-ebs: execute[yum-makecache-rpmforge](/tmp/packer-chef-client/local-mode-cache/cache/cookbooks/yum/providers/repository.rb line 69) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'

The url / resource http://mirrorlist.repoforge.org/el7/mirrors-rpmforge returns 0 bytes "no list".

Alfresco files:
metadata.rb:
depends 'yum-repoforge', ">= 0.5.1"
recipes/package-repositories.rb:
include_recipe 'yum-repoforge::default'

The resource used by the dependency yum-repoforge is considered dead according to the CentOS wiki.

See:
https://wiki.centos.org/AdditionalResources/Repositories
“RPMForge/RepoForge - This is a dead project. Not maintained. DO NOT USE. ”

See also :
chef-boneyard/yum-repoforge#13

Looks as if the maintainer has recognized the issue.

evaluate installing extras (media viewer amp/jar?)

Although this is targetted more for packer.io where trying to pre-install software directly onto the image, putting a ticket within the chef-alfresco to see if this is something that could, and/or should, be part of the chef install process.

Test/example amp that is very common:
http://share-extras.github.io/addons/media-viewers/
https://github.com/share-extras/media-viewers/releases

unsure of other amps that may be useful (outlook email preview feature, etc).

Adding SSL

proxy.tar.gz
proxy.tar.gz.txt
nginx.conf.txt

We are using a wrapper cookbook to generate a separate Nginx proxy instance in AWS for our Alfresco stack.

Our wrapper includes the Alfresco Chef cookbook which I believe includes the “nginx 2.7.6” cookbook from the Chef Supermarket.

I was able to get a good http configuration set up using the template parameters, but have been unsuccessful in getting a configuration with SSL options enabled. We have tried adding the SSL parameter section to both attributes/default.rb and to a separate included recipe in recipes/_nginx-conf.rb. Neither seems to work.

Would you have any words of wisdom on how to get this enabled or be able to assist us in doing so? I have attached the current wrapper cookbook and generated nginx.conf file.

Better secrets management

By moving in chef-server, we should start to use databags and encrypted databags.
we should also provide simple tutorial for the community to build on

alfresco.war contains duplicate libraries

There is a conflict with GoogleDocs integration module version 3.0.4 when used with Alfresco 5.2.0 and along with S3 Connector.

  • commons-codec – 1.9 and 1.10 (introduced by amp)
  • commons-logging – 1.1.3 and 1.2 (introduced by amp)
  • httpclient – 4.3.3 and 4.5.2 (introduced by amp)
  • httpcore – 4.3.2 and 4.4.5 (introduced by amp)
  • jackson-databind – 2.3.2 and 2.8.3 (included in base alfresco.war)

A hot-fix is available for GoogleDocs integration module as version 3.0.4.1 which resolves the issue.

Security Issue(?)

Someone using chef-alfresco had been working with some Chef Engineers and they pointed out possible security issue(?):
Based on consultation with Chef this week and whilst working on some details to build a wrapper for chef-alfresco we came across a security issue.

The problem in a nutshell is that attributes are being used set information that should be set via data bag’s or variables generated during the chef-client run.
Attributes available to anyone with access to the system which is very bad as far as I can tell ;) .
This presents a difficult problem for my team.

Ideally I would like to be able to wrap the chef-alfresco cookbook with our own; without applying any monkey patches,
since this negates the initial advantages gained by wrapping the code as opposed to modifying our own version and trying to keep them in sync.
Ideally we should be able to wrap your cookbook without exposing sensitive information to users.

As an example if you type password into the search criteria in the git hub project you will find a number of examples where default password information is passed into and attribute.
According to Chef attributes should only be used for persistent data and not for values that should be secret or dynamic.

Can provide example if needed

nux_desktop_rpm install failing

2015/04/20 11:57:14 ui:     amazon: Running handlers:
2015/04/20 11:57:14 ui:     amazon: [2015-04-20T10:57:14+00:00] ERROR: Running exception handlers
2015/04/20 11:57:14 ui:     amazon: Running handlers complete
2015/04/20 11:57:14 ui:     amazon: [2015-04-20T10:57:14+00:00] ERROR: Exception handlers complete
2015/04/20 11:57:14 ui:     amazon: [2015-04-20T10:57:14+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
2015/04/20 11:57:14 ui:     amazon: Chef Client failed. 166 resources updated in 545.27677711 seconds
2015/04/20 11:57:15 ui:     amazon: [2015-04-20T10:57:14+00:00] ERROR: rpm_package[nux_desktop_rpm] (alfresco::3rdparty line 15) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
2015/04/20 11:57:15 ui:     amazon: ---- Begin output of rpm  -i /var/chef/cache/nux-dextop-release.rpm ----
2015/04/20 11:57:15 ui:     amazon: STDOUT:
2015/04/20 11:57:15 ui:     amazon: STDERR: warning: /var/chef/cache/nux-dextop-release.rpm: Header V4 RSA/SHA1 Signature, key ID 85c6cd8a: NOKEY
2015/04/20 11:57:15 ui:     amazon: error: Failed dependencies:
2015/04/20 11:57:15 ui:     amazon: epel-release is needed by nux-dextop-release-0-5.el7.nux.noarch
2015/04/20 11:57:15 ui:     amazon: ---- End output of rpm  -i /var/chef/cache/nux-dextop-release.rpm ----
2015/04/20 11:57:15 ui:     amazon: Ran rpm  -i /var/chef/cache/nux-dextop-release.rpm returned 1
2015/04/20 11:57:15 ui:     amazon: [2015-04-20T10:57:15+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Documentation rehaul

Documentation need to be redone.
This will ease the life of both our internal and external customers

haproxy-config cron job reset default values instead of using it's wrapping cookbook ones

Problem Definition

In our clustered systems we use different way for discovery of other instances.
To do this we run the haproxy-config recipe to regenerate the internal addresses, as we use haproxy for internal service discovery.
Problem is, when used from a wrapper cookbook, will use the default chef-alfresco attributes, and not the ones in the wrapper cookbook itself - de facto resetting all specific configuration we do for other projects.

This may not be entirely solved inside chef-alfresco, but the methodology on how to solve it should be documented and noted in our wiki.
Also,this need to be included in chef-alfresco-internal-lb cookbook, as we are moving all the internal-lb related stuff there.

Mixup of ImageMagick version logic inside transformations.rb recipe

There seems to be an issue with the logic of installing ImageMagick version with enable of use_imagemagick_os_repo or explicit version imagemagick_version via install_imagemagick attributes.

If both use_imagemagick_os_repo and install_imagemagick are set true, it will not install supported/expected version i.e.6.9.5-9

* rpm_package[/tmp/kitchen/cache/ImageMagick-libs-6.9.5-9.x86_64.rpm] action install[2017-09-26T16:17:35+00:00] INFO: Processing rpm_package[/tmp/kitchen/cache/ImageMagick-libs-6.9.5-9.x86_64.rpm] action install (alfresco::transformations line 122)
(skipped due to not_if)
* remote_file[/tmp/kitchen/cache/ImageMagick-6.9.5-9.x86_64.rpm] action create[2017-09-26T16:17:35+00:00] INFO: Processing remote_file[/tmp/kitchen/cache/ImageMagick-6.9.5-9.x86_64.rpm] action create (alfresco::transformations line 128)
(skipped due to not_if)
* rpm_package[/tmp/kitchen/cache/ImageMagick-6.9.5-9.x86_64.rpm] action install[2017-09-26T16:17:35+00:00] INFO: Processing rpm_package[/tmp/kitchen/cache/ImageMagick-6.9.5-9.x86_64.rpm] action install (alfresco::transformations line 134)
(skipped due to not_if)

Exception on Image preview dashlet

Image Preview
04260013 Wrapped Exception (with status template): 04260088 Failed to execute script 'classpath_:alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/images.get.js': 04260087 Failed to execute search: +PATH:"/app:company_home/st:sites/cm:swsdp/cm:documentLibrary//_" +TYPE:"cm:content" +@cm:content.mimetype:image/*

Converge fails due to missing dependency alfresco-rm-core-repo-2.4.amp

The README states that you should be able to converge this cookbook with kitchen converge community but converge fails due to the file alfresco-rm-core-repo-2.4.amp missing on the Nexus repo. There does not appear to be an alfresco-rm-core tree on the Nexus server at all.

================================================================================
           Error executing action `put` on resource 'maven[alfresco-rm-core-repo]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '1'
           ---- Begin output of mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get -DgroupId=org.alfresco -DartifactId=alfresco-rm-core-repo -Dversion=2.4 -Dpackaging=amp  -Ddest=/chef_maven_lwrp20160719-2982-cl0866/alfresco-rm-core-repo.amp -DremoteRepositories=public::::https://artifacts.alfresco.com/nexus/content/groups/public -Dtransitive=false ----
           STDOUT: [INFO] Scanning for projects...
           [INFO]
           [INFO] ------------------------------------------------------------------------
           [INFO] Building Maven Stub Project (No POM) 1
           [INFO] ------------------------------------------------------------------------
           [INFO]
           [INFO] --- maven-dependency-plugin:2.4:get (default-cli) @ standalone-pom ---
           Downloading: https://artifacts.alfresco.com/nexus/content/groups/public/org/alfresco/alfresco-rm-core-repo/2.4/alfresco-rm-core-repo-2.4.amp
[INFO] ------------------------------------------------------------------------
           [INFO] BUILD FAILURE
           [INFO] ------------------------------------------------------------------------
           [INFO] Total time: 2.649s
           [INFO] Finished at: Tue Jul 19 02:22:06 UTC 2016
           [INFO] Final Memory: 13M/106M
           [INFO] ------------------------------------------------------------------------
           [ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.4:get (default-cli) on project standalone-pom: Couldn't download artifact: Failure to find org.alfresco:alfresco-rm-core-repo:amp:2.4 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

chef-alfresco-webserver

To better give the possibility to use the webserver of choice, we need to take all the frontend webservers that this app is using and extrapolate them in a different cookbook, giving a common set of attributes for configuration, and specific attributes for the specific technology.
By default, the frontend webserver will be NginX.
It's main role will be to accept incoming connection on port 80/443 and pass them to the internal load balancer.

Ubuntu 14.04 support

Though the README says Ubuntu 14.04 is supported, I have found a number of changes are necessary to make this work (and I still haven't succeeded).

  • additional tomcat packages have different names on Ubuntu. In my .kitchen.local.yml I need:
    attributes:
      tomcat:
        additional_tomcat_packages:
          - libapr1
          - libtcnative-1

It is also necessary to set node['apt']['compile_time_update'] = true so that apt-get update runs prior to package installation.

Also, the tomcat template appears to have an error, leading to this in the converge:

        * directory[/var/lib/tomcat7-alfresco/webapps] action create[2016-09-16T18:28:05+00:00] INFO: Processing directory[/var/lib/tomcat7-alfresco/webapps] action create (/tmp/kitchen/cache/cookbooks/tomcat/providers/instance.rb line 55)

followed shortly by

         * link[/var/lib/tomcat7-alfresco/webapps] action create[2016-09-16T18:28:05+00:00] INFO: Processing link[/var/lib/tomcat7-alfresco/webapps] action create (/tmp/kitchen/cache/cookbooks/tomcat/providers/instance.rb line 86)
       [2016-09-16T18:28:05+00:00] DEBUG: Providers for generic link resource enabled on node include: [Chef::Provider::Link]
       [2016-09-16T18:28:05+00:00] DEBUG: Provider for action create on resource link[/var/lib/tomcat7-alfresco/webapps] is Chef::Provider::Link


           ===============================================================================
           Error executing action `create` on resource 'link[/var/lib/tomcat7-alfresco/webapps]'
           ================================================================================

           Errno::EISDIR
           -------------
           Is a directory @ unlink_internal - /var/lib/tomcat7-alfresco/webapps

           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/tomcat/providers/instance.rb

            86:       link "#{new_resource.base}/#{name}" do
            87:         to new_resource.instance_variable_get("@#{attr}")
            88:       end
            89:     end

chef 13 Compatibility

Seems that the latest version of chef broke our build, for this reason we pinned the chef version to 12.19.36 .
We need to make chef-alfresco compatible with Chef 13 if possible.

Solr not working

After kitchen converge and login correctly into the env solr is not working

chef-alfresco, working with packer.io

Thanks for enabling the issue tracker!

I will start my testing. Packer.io uses chef-solo, I've found that to be some of the issues. And, in regards to your prior comments, I myself am new to Chef but am ambitious to make Alfresco 'industrial-oriented', easier to setup and get running an new instance for new work.

First find:
readme.md, looks like swftools moved to: https://github.com/fnichol/chef-swftools

haproxy_config.rb - hard coded error codes

in haproxy_config.rb there are error code values that result in:
node.default['haproxy']['frontends']['external']['entries'] << "rspideny . if is_#{error_code}_error"

Having an issue where when webscripts fail with one of these error codes results is error page not handled and user must wait for timeout.

Division into Contextual cookbook

chef-alfresco is too large and monolithic to be maintained properly.
As such, we need to divide it into contextual cookbook, each with specific roles and responsibilities.

List of cookbooks should be:

  • chef-alfresco-webserver
  • chef-alfresco-internal-lb
  • chef-alfresco-core
  • chef-alfresco-appservers
  • chef-alfresco-transformation
  • chef-alfresco-components
  • chef-alfresco-thirdparties
  • chef-alfresco-databases

Many errors and fix, then error

Hi,
I tried to run git clone and kitchen converge, then many errors occurred (and my temporary fixs):

  1. Guest Additions Error
    • $ sudo ln -s /usr/include/ /lib/modules/3.10.0-123.el7.x86_64/build/
  2. Error executing action put on resource 'maven[*]'
  3. Error executing action create on resource 'remote_file[/tmp/kitchen/cache/keystore.jar]'
    • .kitchen.yml(71):"version" : "5.0.d"
  4. Error executing action run on resource 'execute[run-nossl-patch.sh]'
    • the line feed code from CR+LF to LF

...kithen converge is finished.

But http://localhost:8800/share is alfresco error page. I found following error log.

  • /usr/share/tomcat-share/logs/share.log
    • ERROR [org.alfresco.web.site] org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException

Do you have any suggestion to fix it?

My environments:

  • Windows 7 sp1 x64
  • Chef Development Kit Version: 0.6.2
  • chef-client version: 12.3.0
  • berks version: 3.2.4
  • kitchen version: 1.4.0
  • Vagrant 1.7.4
  • VirtualBox 5.0.2

Create documentation for attribute defaults

For each cookbook that chef-alfresco depends on, there should be a clear list of configurable attributes and its default values.

Same goes for all attributes used by alfresco::** recipes.

berks install failing

running berks install is failing with following:
The dependency constraints could not be solved in the time allotted.
Unable to find a solution for demands: alfresco (0.7.27), commons (0.5.4), database (5.0.0), file (2.0.0), maven (1.2.0), tomcat (11.17.3)

tried changing database version to 4.0.6 and it also fails

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.