Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

chef-alfresco, working with packer.io #1

Closed
dhartford opened this issue Mar 27, 2014 · 20 comments
Closed

chef-alfresco, working with packer.io #1

dhartford opened this issue Mar 27, 2014 · 20 comments

Comments

@dhartford
Copy link

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

@maoo
Copy link
Contributor

maoo commented Mar 27, 2014

chef-swftools is the one I'm using - https://github.com/maoo/vagrant-alfresco-boxes/blob/master/Berksfile

As you see, vagrant-alfresco-boxes is exactly what Packer.io can deliver. I'd first divide chef recipes in 2 categories: pre-packaged and provisioning-time (I'm sure you can come up with better names :-) ). The more we move into the first category, the faster provisioning-time will be.

As per the ambition of making Alfresco 'industrial-oriented', I'm in! :-)

@maoo
Copy link
Contributor

maoo commented Mar 27, 2014

I think that Berkshelf plays a key role because it allows us to reuse existing Chef recipes; found this interesting article:

http://engineering.cotap.com/post/78783269747/hello-world-using-packer-chef-and-berkshelf-on-ec2

@dhartford
Copy link
Author

One of the immediate challenges is I'm working from a CentOS environment (target RHEL for customers), so everything that is ubuntu/apt specific will need to be adjusted for a wider audience.

This may be good as part of the review as, for example, the swftools project has newer binaries, but not necessarily apt/rpm/yum versions. I haven't tried chef 'ark', but some of the chef recipes I've seen used that for direct binary installs of any 'less common' tools like swftools: http://www.swftools.org/download.html

Works with Centos 6.5 checklist:
[DONE] java - yes
[DONE] tomcat - with changes (brianwb cookbook for tomcat, opscode cookbook issue COOK-4467), https://github.com/dhartford/chef-tomcat
[REVIEW] openoffice - with changes, needs a review: https://github.com/dhartford/chef-openoffice
[DONE] imagemagick - yes
[DONE] mysql - yes
[DONE] swftools - no, updated to resolve: https://github.com/dhartford/chef-swftools
[DONE] Transitive dependencies - nokogiri issue where I left off...see notes below.

@dhartford
Copy link
Author

nokogiri/xml workaround when used with chef-solo/packer.io:

symptom: no such version or candidate for libxml....

Create a chef-solo job for just xml::ruby and run it prior to your normal chef-solo jobs.

In the normal chef-solo jobs, set:
"json" :{
"xml" : {
"compiletime" : "true"
}
}

@dhartford
Copy link
Author

maven when getting mysql-connector java

symptom: no such file or directory

It is actually talking about the mvn command, need to explicitly list "maven" in your run_list.

@dhartford
Copy link
Author

Possible modification needed (either with bryanwb tomcat cookbook or chef-alfresco cookbook) - Alfresco Repository chef issue, [alfresco-global] template when trying to put alfresco-global.properties.

symptom: EnclosingDirectoryDoesNotExist -> Parent directory /usr/local/tomcat/default/shared/classes does not exist (when using bryanwb tomcat that is setup for /usr/local/tomcat/default).

/usr/local/tomcat/default/webapps exists, but not the 'shared' folder. Should have that folder created. Possible ownership conflict as bryanwb uses 'tomcat7' owner, may be source of conflict compared to tomcat_user in opscode tomcat (which does not work in CentOS 6.x).

@maoo
Copy link
Contributor

maoo commented Mar 30, 2014

Thanks dhartford, I'll try to fix them this week! I'll make the mentioned
items configurable.

On 28 March 2014 21:59, dhartford notifications@github.com wrote:

Possible modification needed (either with bryanwb tomcat cookbook or
chef-alfresco cookbook) - Alfresco Repository chef issue, [alfresco-global]
template when trying to put alfresco-global.properties.

symptom: EnclosingDirectoryDoesNotExist -> Parent directory
/usr/local/tomcat/default/shared/classes does not exist (when using bryanwb
tomcat that is setup for /usr/local/tomcat/default).

/usr/local/tomcat/default/webapps exists, but not the 'shared' folder.
Should have that folder created. Possible ownership conflict as bryanwb
uses 'tomcat7' owner, may be source of conflict compared to tomcat_user in
opscode tomcat (which does not work in CentOS 6.x).

Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-38967353
.

Maurizio Pillitu
Technical Consultant
Mobile: +31615655668
Skype: m.pillitu

http://university.alfresco.com/
http://university.alfresco.com/https://twitter.com/#!/maoohttp://blog.session.ithttp://www.linkedin.com/in/mpillituhttp://www.youtube.com/alfresco101

@dhartford
Copy link
Author

Changed bryanwb tomcat cookbook attribute for user: tomcat_user and group:tomcat_group to be consistent with opscode tomcat cookbook, however it appears the chef-alfresco/...../repository.rb needed some modifications to ensure the directory is created. I'm not a chef expert, so bit of a hack, and not yet fully tested. https://github.com/dhartford/chef-alfresco/tree/patch-1

New symptom: Chef::Exceptions::GroupIDNotFound in share.rb/"share-config-custom.xml" template cannot determine group id for 'tomcat_group'. Found an old reference here that may or may not be similar: https://tickets.opscode.com/browse/CHEF-1699

Resolved, changed bryanwb's tomcat/recipes/ark.rb, below 'user node...' add:
group node['tomcat']['group']

@maoo
Copy link
Contributor

maoo commented Apr 11, 2014

Today I'm going to go through the issues you posted and see if I can make the recipes more configurable, so that you can easily use them from Packer.

I've also finished a Chef Recipe to help me in the usage of Maven - https://github.com/maoo/artifact-deployer ; I would like that chef-alfresco would not contain any of the artifact deployment logic.

Thoughts?
Thanks,
Maurizio

@maoo
Copy link
Contributor

maoo commented Apr 11, 2014

@maoo
Copy link
Contributor

maoo commented Apr 11, 2014

Alfresco and Share are currently working (Enterprise and Community) on the mentioned branches. Solr doesn't work yet, since the XML patching logic is still commented.

I'd personally avoid to patch XML files of downloaded WARs (makes provisioning process more prone to errors), therefore I'd prefer to keep it out and provide artifacts (on a Maven Repository somewhere) that are already configured for HTTP communication (not https, as default).

The artifacts to provide are:

  • Alfresco Repository WAR with a patched web.xml
  • SolrHome ZIP with patched solrcore.properties files

I'll work on these items next week.

@maoo
Copy link
Contributor

maoo commented Apr 12, 2014

Alfresco + Solr is now working (no SSL)
The following items have been tagged (using Berkshelf syntax):

cookbook 'artifact-deployer', git: 'git://github.com/maoo/artifact-deployer.git', tag: 'artifact-deployer-0.1'
cookbook 'alfresco', git: 'git://github.com/maoo/chef-alfresco.git', tag: 'chef-alfresco-0.1.1'

I'm going to start playing with Packer, since now it should be really easy to provide Alfresco boxes using chef-solo as provider; I'll be using vagrant-alfresco-boxes as repository, we can move it later on, if needed.

@maoo
Copy link
Contributor

maoo commented Apr 13, 2014

Here's the first implementation of Packer + Alfresco Chef recipes - https://github.com/maoo/alfresco-boxes/tree/alfresco-boxes-0.1 ; please let me know what you think or if you have any issue

Next week I'd like to test it with "Red Hat Enterprise Linux 6.4 X64", as mentioned in the Alfresco Supported Platforms for 4.2 (http://www.alfresco.com/services/subscription/supported-platforms)

@dhartford
Copy link
Author

I hope to look at this within the next week or so. I've gotten most of the prior version working, and in fact that rewind I think is part of the making it succeed vs fail.

Talking with some people about the enterprise, and I know you mentioned support within the Chef scripts for the enterprise version as well, so excited to be able to actually use the same/similar install process for either community or enterprise!

@maoo
Copy link
Contributor

maoo commented Apr 27, 2014

I've used your chef-tomcat recipe and got it working! Check my last commit Alfresco/alfresco-spk@7f71ab8

I'm still having issues with swftools, did you manage to install all 3rd party packages?

@dhartford
Copy link
Author

I have not done swftools yet, but looks like it wouldn't be hard compared to some of the other example ARK/binary type of chef recipes - I'll see if I can get something started. If you don't hear anything back by 5/5 assume I haven't done anything worthwhile.

@dhartford
Copy link
Author

updated chef-swftools for centos support here: https://github.com/dhartford/chef-swftools
nothing to do with ark, was thinking java library, not system library. Added yum support via yum-repoforge (no 'official' RHEL repo has swftools).

@dhartford
Copy link
Author

updated Centos comment, revisited:
Works with Centos 6.5 checklist:
[DONE] java - yes
[DONE] tomcat - with changes (brianwb cookbook for tomcat, opscode cookbook issue COOK-4467), https://github.com/dhartford/chef-tomcat
[REVIEW] openoffice - with changes, needs a review: https://github.com/dhartford/chef-openoffice
[DONE] imagemagick - yes
[DONE] mysql - yes
[DONE] swftools - no, updated to resolve: https://github.com/dhartford/chef-swftools
[DONE] Transitive dependencies - nokogiri issue...see notes above.

@maoo
Copy link
Contributor

maoo commented Aug 4, 2014

Packer is working with chef-alfresco, please check https://github.com/maoo/alfresco-boxes

@maoo maoo closed this as completed Aug 4, 2014
marcomancuso pushed a commit that referenced this issue Apr 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants