Giter Club home page Giter Club logo

confluence's Introduction

Confluence Cookbook

Cookbook Version Build Status OpenCollective OpenCollective License

Description

Installs/Configures an instance of Atlassian Confluence.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

Platforms

  • RHEL/CentOS 6, 7
  • Ubuntu 14.04, 16.04

Cookbooks

JDK/JRE

The Atlassian Confluence Linux installer will automatically configure a bundled JRE.

If you prefer Confluence standalone installation, then you have to manage JDK/JRE 8 (Supported Platforms) on this node. It can be done with java cookbook and appropricate attributes:

node.default['java']['jdk_version'] = "8"
include_recipe 'java'

Attributes

These attributes are under the node['confluence'] namespace.

Attribute Description Type Default
checksum SHA256 checksum for Confluence install String auto-detected by library method
home_path home directory for Confluence user String /var/atlassian/application-data/confluence
install_path location to install Confluence String /opt/atlassian/confluence
install_type Confluence install type - "installer", "standalone" String installer
url URL for Confluence install String auto-detected by library method
user user running Confluence String confluence
version Confluence version to install String 6.1.2

--Notice:-- If ['confluence']['install_type'] is set to installer, then the installer will try to upgrade your Confluence instance located in ['confluence']['install_path'] (if it exists) to the ['confluence']['version'].

If you want to avoid an unexpected upgrade, just set or override ['confluence']['version'] attribute value to that of your current confluence version.

Confluence Database Attributes

These attributes are under the node['confluence']['database'] namespace.

Attribute Description Type Default
host FQDN or IP of database server ("127.0.0.1" automatically installs ['database']['type'] server) String "127.0.0.1"
name Confluence database name String confluence
password Confluence database user password String changeit
port Confluence database port Fixnum 3306 for MySQL, 5432 for PostgreSQL
type Confluence database type - "mysql", "postgresql", or "hsqldb" String mysql
user Confluence database user String confluence

Confluence JVM Attributes

These attributes are under the node['confluence']['jvm'] namespace.

Attribute Description Type Default
minimum_memory JVM minimum memory String 512m
maximum_memory JVM maximum memory String 768m
maximum_permgen JVM maximum PermGen memory String 256m
java_opts additional JAVA_OPTS to be passed to Confluence JVM during startup String ""
bundled_jre prefer JRE bundled with linux installer Boolean true

Confluence Autotune Attributes

These attributes are under the node['confluence']['autotune'] namespace. Autotune automatically determines appropriate settings for certain attributes. This feature is inspired by the autotune recipe in the https://github.com/afklm/jira cookbook. This initial version only supports JVM min and max memory size tuning.

There are several tuning types that can be set:

  • 'mixed' - Confluence and DB run on the same system
  • 'dedicated' - Confluence has the system all to itself
  • 'shared' - Confluence shares the system with the DB and other applications

Total available memory is auto discovered using Ohai but can be overridden by setting your own value in kB.

Attribute Description Type Default
enabled Whether or not to autotune settings. Boolean false
type Type of tuning to apply. One of 'mixed', 'dedicated' and 'shared'. String mixed
total_memory Total system memory to use for autotune calculations. String Ohai value

Confluence Tomcat Attributes

These attributes are under the node['confluence']['tomcat'] namespace.

Attribute Description Type Default
port Tomcat HTTP port Fixnum 8090

Recipes

  • recipe[confluence] Installs/configures Atlassian Confluence
  • recipe[confluence::apache2] Installs/configures Apache 2 as proxy (ports 80/443)
  • recipe[confluence::database] Installs/configures MySQL/Postgres server, database, and user for Confluence
  • recipe[confluence::linux_installer] Installs/configures Confluence via Linux installer"
  • recipe[confluence::linux_standalone] Installs/configures Confluence via Linux standalone archive"
  • recipe[confluence::tomcat_configuration] Configures Confluence's built-in Tomcat
  • recipe[confluence::crowd_sso] Configures user authentication with Crowd single sign-on

Usage

Confluence Data Bag

For security purposes it is recommended to use data bag for storing secrets like passwords and database credentials.

You can override any attributes from the ['confluence'] namespace using the confluence/confluence data bag. It could be either encrypted or not encrypted by your choice.

Example:

{
  "id": "confluence",
  "confluence": {
    "database": {
      "type": "postgresql",
      "name": "confluence_db",
      "user": "confluence_user",
      "password": "confluence_db_password"
    }
  }
}

Note - "confluence" nesting level is required!

These credentials will be used for your Confluence installation instead of appropriate attribute values.

Data bag's and item's names are optional and can be changed by overriding attributes ['confluence']['data_bag_name'] and ['confluence']['data_bag_item']

Confluence Server Installation

The simplest method is via the default recipe, which uses node['confluence']['install_type'] to determine best method.

  • Optionally (un)encrypted data bag or set attributes
    • knife data bag create confluence
    • knife data bag edit confluence confluence --secret-file=path/to/secret
  • Add recipe[confluence] to your node's run list.

Custom Confluence Configurations

Using individual recipes, you can use this cookbook to configure Confluence to fit your environment.

  • Optionally (un)encrypted data bag or set attributes
    • knife data bag create confluence
    • knife data bag edit confluence confluence --secret-file=path/to/secret
  • Add individual recipes to your node's run list.

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

confluence's People

Contributors

alexbacchin avatar alzayatm avatar anuriq avatar axelrtgs avatar bflad avatar d3mash avatar damacus avatar esciara avatar gsreynolds avatar jessehub avatar jmaziarz avatar jmelowry avatar johnroesler avatar josephholsten avatar katbyte avatar kitchen-porter avatar legal90 avatar mvdkleijn avatar obazoud avatar patcon avatar powerschill avatar ramereth avatar renovate[bot] avatar tas50 avatar wolf31o2 avatar xorima avatar xorimabot avatar yasuharu519 avatar zmaupin 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

confluence's Issues

[meta] atlassian_application library cookbook?

I'm sure you guys have thought about this as well, but bflad started all these repos with a very consistent style, and it seems that atlassian has more and more strived to make the converge on a single way of running all its apps.

I haven't worked extensively with any cookbooks besides confluence and jira, but I thought I'd start this issue to at least discuss the idea of working toward this :) Maybe it's a silly idea and too much abstraction, but it seems that we're porting almost every change between the two cookbooks so far :)

Eager to hear from folks who've worked with more atlassian apps

cc: @bflad @legal90 @ramonskie @gsreynolds @mvdkleijn @linc01n

Generate `database_connection` in helper library

The database_connection hash is generated on the fly in confluence::database:
https://github.com/bflad/chef-confluence/blob/master/recipes/database.rb#L22-L43

I'm needing to regenerate this in a wrapper cookbook in order to create a my_confluence::restore recipe customized to our infra. It would be nice if the hash was available via a library method like Confluence.database_connection(node).

Thoughts?

(This probably depends on #55 happening first)

Failing to start due to file permissions

The application fails to start up due to permission issues applied to the application binaries.

I have tested this by changing the permissions of /opt/atlassian/confluence recursively to my Confluence user, then starting it up - which works.

chown -R confluence:confluence /opt/atlassian/confluence/

If I let Chef manage the resource and start up Confluence, it fails with the error:

Oct 14 13:49:31 confluence1 start-confluence.sh[25543]: Server startup logs are located in /opt/atlassian/confluence/logs/catalina.out
Oct 14 13:49:31 confluence1 start-confluence.sh[25543]: touch: cannot touch ‘/opt/atlassian/confluence/logs/catalina.out’: Permission denied

Here are the contents and permissions of the directories and files in question when this cookbook manages the contents:

[root@confluence1 confluence]# ll
total 180
drwxr-xr-x.  2 root       root  4096 Oct 14 13:49 bin
drwxr-xr-x.  3 confluence root  4096 Oct 14 13:49 conf
drwxr-xr-x. 25 root       root  4096 Jun  3  2015 confluence
drwxr-xr-x.  2 root       root  4096 Oct 14 13:49 lib
-rw-r--r--.  1 root       root 58034 Mar 23  2015 LICENSE
drwxr-xr-x.  2 root       root 36864 Oct 14 13:49 licenses
drwx------.  2 confluence root  4096 Mar 23  2015 logs
-rw-r--r--.  1 root       root  1442 Mar 23  2015 NOTICE
-rw-r--r--.  1 root       root  2291 Jun  3  2015 README.html
-rw-r--r--.  1 root       root  1202 Jun  3  2015 README.txt
-rw-r--r--.  1 root       root  6954 Mar 23  2015 RELEASE-NOTES
-rw-r--r--.  1 root       root 16682 Mar 23  2015 RUNNING.txt
drwx------.  2 confluence root  4096 Oct 14 13:49 temp
drwxr-xr-x.  2 root       root     6 Mar 23  2015 webapps
drwx------.  3 confluence root    23 Mar 23  2015 work
[root@confluence1 confluence]# ll logs/
total 188
-rw-r--r--. 1 root root 54348 Oct 14 13:46 catalina.2016-10-14.log
-rw-r--r--. 1 root root 75821 Oct 14 13:46 catalina.out
-rw-r--r--. 1 root root  2195 Oct 14 02:57 gc-2016-10-14_02-57-09.log.0.current
-rw-r--r--. 1 root root  2228 Oct 14 03:35 gc-2016-10-14_03-35-10.log.0.current
-rw-r--r--. 1 root root   578 Oct 14 03:40 gc-2016-10-14_03-40-37.log.0.current
-rw-r--r--. 1 root root   578 Oct 14 03:41 gc-2016-10-14_03-41-29.log.0.current
-rw-r--r--. 1 root root  2226 Oct 14 03:43 gc-2016-10-14_03-43-19.log.0.current
-rw-r--r--. 1 root root  4149 Oct 14 03:53 gc-2016-10-14_03-51-12.log.0.current
-rw-r--r--. 1 root root  6055 Oct 14 04:15 gc-2016-10-14_03-53-53.log.0.current
-rw-r--r--. 1 root root  2226 Oct 14 13:25 gc-2016-10-14_13-25-37.log.0.current
-rw-r--r--. 1 root root  5200 Oct 14 13:46 gc-2016-10-14_13-26-40.log.0.current
-rw-r--r--. 1 root root     0 Oct 14 02:57 host-manager.2016-10-14.log
-rw-r--r--. 1 root root     0 Oct 14 02:57 localhost.2016-10-14.log
-rw-r--r--. 1 root root     0 Oct 14 02:57 manager.2016-10-14.log

I believe this is because of the ark resource assigning the default permissions of root:root.

ark 'confluence' do
  url confluence_artifact_url
  prefix_root File.dirname(node['confluence']['install_path'])
  home_dir node['confluence']['install_path']
  checksum confluence_artifact_checksum
  version node['confluence']['version']
  owner 'root'
  group 'root'
  notifies :restart, 'service[confluence]'
end

https://github.com/parallels-cookbooks/confluence/blob/master/recipes/linux_standalone.rb#L39-L48

The fix would be to change the ark resource's owner to node['confluence']['user']. The more greedy approach would be to also change the group as well. I have tested the change and it does work. Thoughts?

ark 'confluence' do
  ...
  owner node['confluence']['user']
  group 'root'                      # or group node['confluence']['user']
  ...
end

Mysql-related attributes are missing

This issue has been introduced by switching to mysql cookbook version 6 (GH-50).
Starting from version 6, there are no attribute files and recipes in mysql cookbook. It means that these attributes are not defined by default anymore:

  • node['mysql']['data_dir']
  • node['mysql']['server_root_password']

But we still use them in our recipe and it causes a problem for provisioning the new node from the scratch:
https://github.com/bflad/chef-confluence/blob/524690b1fe1ac4b84c6d8c2ebd588ca685b8bae9/recipes/database.rb#L38-L43

We haven't got any errors in the TestKitchen because we have specified some of these attributes in the .kitchen.yml:
https://github.com/bflad/chef-confluence/blob/409d58a10de068669202595e31fde7bb72a871f4/.kitchen.yml#L55-L58
However, if we provision a clean node, thenode['mysql'] namespace will be unreachable.

@patcon @bflad Do you have any thoughts about that? Should we manage mysql root password in our custom namespace? (I don't like that)
Or may be, we should move database management to the LWRP?

option to use java cookbook jre with linux installer

As a person using the linux installer I would like to use the JRE provided by the "java" cookbook.

The default behavior should use the bundled JRE. This behavior can be changed with a confluence cookbook "bundled_jre" attribute set to false.

Would be nice to create Cucumber test to check VM converged

Could use https://github.com/esciara/wonderstuff/tree/6bbbd847fc71258e09e92070df67497b109a5a51/features/step_definitions as an example but without using leibniz (for more info about why, see https://github.com/esciara/wonderstuff#tests).
Could use faraday to check that the title of the home page is "Confluence Setup Wizard - Confluence".
Without leibniz, cucumber tests would have to be run from inside the VM, meaning that ip to use might be that of localhost. But if I remember correctly, Confluence will automatically redirect to the full name of the machine... So might need to add an entry to /etc/hosts/ to make it work.

More restrictive permissions on install_path

Can't find it explicitly stated in the docs, but I think this comment's suggestion holds true for Confluence as well as Jira: https://github.com/afklm/jira/issues/37

I found it alluded to in the "Please note" section

If you executed the Linux Installer with 'root' user privileges, the Linux Installer creates a dedicated Linux user account with username 'confluence', which is used to run Confluence. This account has only:

  • Full write access to your Confluence Home and other important directories.
  • Limited write access to your Confluence Installation Directory.

Installation fails when java installation not included

On 7ed6eef when trying the following test suite in test-kitchen:

- name: confluence-installer-mysql-no-java
  run_list:
  - recipe[confluence]
  attributes:
    mysql:
      server_root_password: iloverandompasswordsbutthiswilldo
      server_repl_password: iloverandompasswordsbutthiswilldo
      server_debian_password: iloverandompasswordsbutthiswilldo

by running bundle exec kitchen test -no-java-ubuntu-1204, it fails with the following log:

-----> Cleaning up any prior instances of <confluence-installer-mysql-no-java-ubuntu-1204>
-----> Destroying <confluence-installer-mysql-no-java-ubuntu-1204>...
Finished destroying <confluence-installer-mysql-no-java-ubuntu-1204> (0m0.00s).
-----> Testing <confluence-installer-mysql-no-java-ubuntu-1204>
-----> Creating <confluence-installer-mysql-no-java-ubuntu-1204>...
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'opscode-ubuntu-12.04'...

�[KProgress: 10%
�[KProgress: 20%
�[KProgress: 40%
�[KProgress: 70%
�[KProgress: 80%
�[KProgress: 90%
�[K==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: confluence-installer-mysql-no-java-ubuntu-1204_default_1397241356947_69573
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (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: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Setting hostname...
Vagrant instance <confluence-installer-mysql-no-java-ubuntu-1204> created.
Finished creating <confluence-installer-mysql-no-java-ubuntu-1204> (0m32.44s).
-----> Converging <confluence-installer-mysql-no-java-ubuntu-1204>...
Preparing files for transfer
Resolving cookbook dependencies with Berkshelf 2.0.14...
Removing non-cookbook files before transfer
-----> Installing Chef Omnibus (latest)
downloading https://www.getchef.com/chef/install.sh
  to file /tmp/install.sh
trying wget...

Downloading Chef  for ubuntu...
downloading https://www.getchef.com/chef/metadata?v=&prerelease=false&p=ubuntu&pv=12.04&m=x86_64
  to file /tmp/install.sh.1149/metadata.txt
trying wget...
url https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.12.2-1_amd64.deb
md5 cedd8a2df60a706e51f58adf8441971b
sha256  af53e7ef602be6228dcbf68298e2613d3f37eb061975992abc6cd2d318e4a0c0
downloaded metadata file looks valid...
downloading https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef_11.12.2-1_amd64.deb
  to file /tmp/install.sh.1149/chef_11.12.2-1_amd64.deb
trying wget...
Comparing checksum with sha256sum...
Installing Chef 
installing with dpkg...
Selecting previously unselected package chef.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 56035 files and directories currently installed.)
Unpacking chef (from .../chef_11.12.2-1_amd64.deb) ...
Setting up chef (11.12.2-1) ...
Thank you for installing Chef!
Transfering files to <confluence-installer-mysql-no-java-ubuntu-1204>
[2014-04-11T18:36:55+00:00] INFO: Forking chef instance to converge...
[2014-04-11T18:36:55+00:00] WARN: 
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
SSL validation of HTTPS requests is disabled. HTTPS connections are still
encrypted, but chef is not able to detect forged replies or man in the middle
attacks.

To fix this issue add an entry like this to your configuration file:

\```
  # Verify all HTTPS connections (recommended)
  ssl_verify_mode :verify_peer

  # OR, Verify only connections to chef-server
  verify_api_cert true
\```

To check your SSL configuration, or troubleshoot errors, you can use the
`knife ssl check` command like so:

\```
  knife ssl check -c /tmp/kitchen/solo.rb
\```

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

Starting Chef Client, version 11.12.2�[0m
[2014-04-11T18:36:55+00:00] INFO: *** Chef 11.12.2 ***
[2014-04-11T18:36:55+00:00] INFO: Chef-client pid: 1231
[2014-04-11T18:36:57+00:00] INFO: Setting the run_list to ["recipe[confluence]"] from CLI options
[2014-04-11T18:36:57+00:00] INFO: Run List is [recipe[confluence]]
[2014-04-11T18:36:57+00:00] INFO: Run List expands to [confluence]
[2014-04-11T18:36:57+00:00] INFO: Starting Chef Run for confluence-installer-mysql-no-java-ubuntu-1204
[2014-04-11T18:36:57+00:00] INFO: Running start handlers
[2014-04-11T18:36:57+00:00] INFO: Start handlers complete.
Compiling Cookbooks...�[0m
[2014-04-11T18:36:58+00:00] INFO: WindowsPackage light-weight resource already initialized -- overriding!
[2014-04-11T18:36:58+00:00] INFO: No confluence data bag found
[2014-04-11T18:36:58+00:00] INFO: No confluence data bag found
[2014-04-11T18:36:58+00:00] WARN: Cloning resource attributes for directory[/var/lib/mysql] from prior resource (CHEF-3694)
[2014-04-11T18:36:58+00:00] WARN: Previous directory[/var/lib/mysql]: /tmp/kitchen/cookbooks/mysql/recipes/_server_debian.rb:34:in `block in from_file'
[2014-04-11T18:36:58+00:00] WARN: Current  directory[/var/lib/mysql]: /tmp/kitchen/cookbooks/mysql/recipes/_server_debian.rb:78:in `from_file'
Recipe: build-essential::debian�[0m
  * execute[apt-get-update-build-essentials] action run�[0m[2014-04-11T18:36:58+00:00] INFO: Processing execute[apt-get-update-build-essentials] action run (build-essential::debian line 22)
[2014-04-11T18:37:08+00:00] INFO: execute[apt-get-update-build-essentials] ran successfully
�[32m
    - execute apt-get update�[0m
�[0m
  * package[autoconf] action install�[0m[2014-04-11T18:37:08+00:00] INFO: Processing package[autoconf] action install (build-essential::debian line 40)
�[32m
    - install version 2.68-1ubuntu2 of package autoconf�[0m
�[0m
  * package[binutils-doc] action install�[0m[2014-04-11T18:37:12+00:00] INFO: Processing package[binutils-doc] action install (build-essential::debian line 40)
�[32m
    - install version 2.22-6ubuntu1.1 of package binutils-doc�[0m
�[0m
  * package[bison] action install�[0m[2014-04-11T18:37:15+00:00] INFO: Processing package[bison] action install (build-essential::debian line 40)
�[32m
    - install version 1:2.5.dfsg-2.1 of package bison�[0m
�[0m
  * package[build-essential] action install�[0m[2014-04-11T18:37:17+00:00] INFO: Processing package[build-essential] action install (build-essential::debian line 40)
 (up to date)�[0m
  * package[flex] action install�[0m[2014-04-11T18:37:17+00:00] INFO: Processing package[flex] action install (build-essential::debian line 40)
�[32m
    - install version 2.5.35-10ubuntu3 of package flex�[0m
�[0m
Recipe: mysql::client�[0m
  * package[mysql-client] action install�[0m[2014-04-11T18:37:19+00:00] INFO: Processing package[mysql-client] action install (mysql::client line 47)
�[32m
    - install version 5.5.35-0ubuntu0.12.04.2 of package mysql-client�[0m
�[0m
  * package[libmysqlclient-dev] action install�[0m[2014-04-11T18:37:36+00:00] INFO: Processing package[libmysqlclient-dev] action install (mysql::client line 47)
�[32m
    - install version 5.5.35-0ubuntu0.12.04.2 of package libmysqlclient-dev�[0m
�[0m
Recipe: mysql::ruby�[0m
  * chef_gem[mysql] action install�[0m[2014-04-11T18:37:40+00:00] INFO: Processing chef_gem[mysql] action install (mysql::ruby line 47)
�[32m
    - install version 2.9.1 of package mysql�[0m
�[0m
[2014-04-11T18:37:55+00:00] INFO: No confluence data bag found
�[0m
================================================================================�[0m
�[31mRecipe Compile Error in /tmp/kitchen/cookbooks/confluence/recipes/default.rb�[0m
================================================================================�[0m

�[0m
NoMethodError�[0m
-------------�[0m
undefined method `[]' for nil:NilClass�[0m

�[0m
Cookbook Trace:�[0m
---------------�[0m
  /tmp/kitchen/cookbooks/confluence/recipes/linux_installer.rb:44:in `block in from_file'
  /tmp/kitchen/cookbooks/confluence/recipes/linux_installer.rb:42:in `from_file'
  /tmp/kitchen/cookbooks/confluence/recipes/default.rb:25:in `from_file'�[0m

�[0m
Relevant File Content:�[0m
----------------------�[0m
/tmp/kitchen/cookbooks/confluence/recipes/linux_installer.rb:

 37:    cwd Chef::Config[:file_cache_path]
 38:    command "./atlassian-confluence-#{node['confluence']['version']}-#{node['confluence']['arch']}.bin -q -varfile atlassian-confluence-response.varfile"
 39:    creates node['confluence']['install_path']
 40:  end
 41:  
 42:  execute 'Generating Self-Signed Java Keystore' do
 43:    command <<-COMMAND
 44>>     #{node['java']['java_home']}/bin/keytool -genkey \
 45:        -alias #{settings['tomcat']['keyAlias']} \
 46:        -keyalg RSA \
 47:        -dname 'CN=#{node['fqdn']}, OU=Example, O=Example, L=Example, ST=Example, C=US' \
 48:        -keypass #{settings['tomcat']['keystorePass']} \
 49:        -storepass #{settings['tomcat']['keystorePass']} \
 50:        -keystore #{settings['tomcat']['keystoreFile']}
 51:      chown #{node['confluence']['user']}:#{node['confluence']['user']} #{settings['tomcat']['keystoreFile']}
 52:    COMMAND
 53:    creates settings['tomcat']['keystoreFile']
�[0m

�[0m

Running handlers:�[0m
[2014-04-11T18:37:55+00:00] ERROR: Running exception handlers
Running handlers complete
�[0m
[2014-04-11T18:37:55+00:00] ERROR: Exception handlers complete
[2014-04-11T18:37:55+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
Chef Client failed. 8 resources updated in 59.616297425 seconds�[0m
[2014-04-11T18:37:55+00:00] ERROR: undefined method `[]' for nil:NilClass
[2014-04-11T18:37:55+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Converge failed on instance <confluence-installer-mysql-no-java-ubuntu-1204>.
------Exception-------
Class: Kitchen::ActionFailed
Message: SSH exited (1) for command: [sudo -E chef-solo --config /tmp/kitchen/solo.rb --json-attributes /tmp/kitchen/dna.json  --log_level info]
---Nested Exception---
Class: Kitchen::SSHFailed
Message: SSH exited (1) for command: [sudo -E chef-solo --config /tmp/kitchen/solo.rb --json-attributes /tmp/kitchen/dna.json  --log_level info]
------Backtrace-------
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:112:in `rescue in run_remote'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:108:in `run_remote'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:48:in `block in converge'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/ssh.rb:47:in `initialize'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:43:in `new'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:43:in `converge'
/Users/my_user_name/.gem/ruby/1.9.3/gems/kitchen-vagrant-0.14.0/lib/kitchen/driver/vagrant.rb:75:in `converge'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:273:in `public_send'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:273:in `block in perform_action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:308:in `call'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:308:in `synchronize_or_call'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:283:in `block in action'
/Users/my_user_name/.rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:282:in `action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:273:in `perform_action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:256:in `converge_action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:246:in `block in transition_to'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:245:in `each'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:245:in `transition_to'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:141:in `verify'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:170:in `block in test'
/Users/my_user_name/.rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:166:in `test'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/command.rb:109:in `public_send'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/command.rb:109:in `block (2 levels) in run_action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
/Users/my_user_name/.gem/ruby/1.9.3/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
----------------------

Cut new release v1.9.0 or v2.0.0

It's been ages since we tagged a release. Happy to do it myself if #35 means people are comfortable giving me push access.

Also, on a related note, it would be really awesome if we started to keep the CHANGELOG up-to-date with changes :)

Unable to upgrade

Hi, was trying to upgrade from 5.3 to 5.6.3, specified the version and check sum, the recipe does download the installer but does not run it. I mean this code:

execute "Installing Confluence #{node['confluence']['version']}" do
  cwd Chef::Config[:file_cache_path]
  command "./atlassian-confluence-#{node['confluence']['version']}-#{node['confluence']['arch']}.bin -q -varfile atlassian-confluence-response.varfile"
  creates node['confluence']['install_path']
end

doesn't run if /opt/atlassian exists.

But even if I move /opt/atlassian to /opt/atlassian.back it creates new users, like confluence[n+1] and the installation fails.

Sync repo and tags with supermarket

  • Git tag for v1.8.0 exists
  • metadata.rb version says 1.7.1
  • supermarket site only released up to 1.7.1
  • changelog says x.y.z pending

Can we clean this up? I forget if i've mentioned it, but stove is great for preventing this sort of thing :)

Cookbook fails when using java cookbook

On 7ed6eef with bundle exec kitchen test -mysql-ubuntu-1204.

Backtrace:

Recipe: java::set_java_home�[0m
  * ruby_block[set-env-java-home] action run�[0m[2014-04-11T19:13:46+00:00] INFO: Processing ruby_block[set-env-java-home] action run (java::set_java_home line 19)
[2014-04-11T19:13:46+00:00] INFO: ruby_block[set-env-java-home] called
�[32m
    - execute the ruby block set-env-java-home�[0m
�[0m
  * directory[/etc/profile.d] action create�[0m[2014-04-11T19:13:46+00:00] INFO: Processing directory[/etc/profile.d] action create (java::set_java_home line 26)
 (up to date)�[0m
  * file[/etc/profile.d/jdk.sh] action create�[0m[2014-04-11T19:13:46+00:00] INFO: Processing file[/etc/profile.d/jdk.sh] action create (java::set_java_home line 30)
[2014-04-11T19:13:46+00:00] INFO: file[/etc/profile.d/jdk.sh] created file /etc/profile.d/jdk.sh
�[32m
    - create new file /etc/profile.d/jdk.sh�[0m[2014-04-11T19:13:46+00:00] INFO: file[/etc/profile.d/jdk.sh] updated file contents /etc/profile.d/jdk.sh
�[32m
    - update content in file /etc/profile.d/jdk.sh from none to 58a2aa�[0m�[37m
        --- /etc/profile.d/jdk.sh   2014-04-11 19:13:46.231437218 +0000�[0m�[37m
        +++ /tmp/.jdk.sh20140411-1243-cq9jzk    2014-04-11 19:13:46.231437218 +0000�[0m�[37m
        @@ -1 +1,2 @@�[0m�[37m
        +export JAVA_HOME=/usr/lib/jvm/java-7-oracle�[0m[2014-04-11T19:13:46+00:00] INFO: file[/etc/profile.d/jdk.sh] mode changed to 755
�[32m
    - change mode from '' to '0755'�[0m
�[0m
Recipe: java::oracle�[0m
  * java_ark[jdk] action install�[0m[2014-04-11T19:13:46+00:00] INFO: Processing java_ark[jdk] action install (java::oracle line 53)
[2014-04-11T19:13:46+00:00] INFO: Adding jdk to /usr/lib/jvm/jdk1.7.0_51
�[32m
    - create dir /usr/lib/jvm and change owner to root�[0mRecipe: <Dynamically Defined Resource>�[0m
  * package[curl] action install�[0m[2014-04-11T19:13:46+00:00] INFO: Processing package[curl] action install (/tmp/kitchen/cookbooks/java/providers/ark.rb line 72)
�[32m
    - install version 7.22.0-3ubuntu4.7 of package curl�[0m
�[0m
�[0m
================================================================================�[0m
�[31mError executing action `install` on resource 'java_ark[jdk]'�[0m
================================================================================�[0m

�[0m
Mixlib::ShellOut::ShellCommandFailed�[0m
------------------------------------�[0m
Expected process to exit with [0], but received '18'
---- Begin output of  curl --create-dirs -L --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz -o /tmp/kitchen/cache/jdk-7u51-linux-x64.tar.gz  ----
STDOUT: 
STDERR: % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0

  0  131M    0  536k    0     0   188k      0  0:11:54  0:00:02  0:11:52  188k
  1  131M    1 1451k    0     0   377k      0  0:05:57  0:00:03  0:05:54  913k
  1  131M    1 2113k    0     0   436k      0  0:05:09  0:00:04  0:05:05  788k
  2  131M    2 3162k    0     0   541k      0  0:04:09  0:00:05  0:04:04  875k
  3  131M    3 4096k    0     0   591k      0  0:03:48  0:00:06  0:03:42  871k
  3  131M    3 4096k    0     0   591k      0  0:03:48  0:00:06  0:03:42  871k
curl: (18) transfer closed with 134005386 bytes remaining to read

---- End output of  curl --create-dirs -L --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz -o /tmp/kitchen/cache/jdk-7u51-linux-x64.tar.gz  ----
Ran  curl --create-dirs -L --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz -o /tmp/kitchen/cache/jdk-7u51-linux-x64.tar.gz  returned 18�[0m

�[0m
Cookbook Trace:�[0m

---------------�[0m
/tmp/kitchen/cookbooks/java/providers/ark.rb:81:in `block in download_direct_from_oracle'
/tmp/kitchen/cookbooks/java/providers/ark.rb:78:in `download_direct_from_oracle'
/tmp/kitchen/cookbooks/java/providers/ark.rb:119:in `block in class_from_file'�[0m

�[0m
Resource Declaration:�[0m

---------------------�[0m

# In /tmp/kitchen/cookbooks/java/recipes/oracle.rb


 53: java_ark "jdk" do
 54:   url tarball_url
 55:   default node['java']['set_default']
 56:   checksum tarball_checksum
 57:   app_home java_home
 58:   bin_cmds bin_cmds
 59:   alternatives_priority 1062
 60:   action :install
 61: end
 62: 
�[0m

�[0m
Compiled Resource:�[0m

------------------�[0m

# Declared in /tmp/kitchen/cookbooks/java/recipes/oracle.rb:53:in `from_file'

java_ark("jdk") do
  action [:install]
  supports {:report=>true, :exception=>true}
  retries 0
  retry_delay 2
  guard_interpreter :default
  cookbook_name :java
  recipe_name "oracle"
  url "http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz"
  default true
  checksum "764f96c4b078b80adaa5983e75470ff2"
  app_home "/usr/lib/jvm/java-7-oracle"
  bin_cmds ["appletviewer", "apt", "ControlPanel", "extcheck", "idlj", "jar", "jarsigner", "java", "javac", "javadoc", "javafxpackager", "javah", "javap", "javaws", "jcmd", "jconsole", "jcontrol", "jdb", "jhat", "jinfo", "jmap", "jps", "jrunscript", "jsadebugd", "jstack", "jstat", "jstatd", "jvisualvm", "keytool", "native2ascii", "orbd", "pack200", "policytool", "rmic", "rmid", "rmiregistry", "schemagen", "serialver", "servertool", "tnameserv", "unpack200", "wsgen", "wsimport", "xjc"]
  alternatives_priority 1062
  owner "root"
  app_home_mode 493
end
�[0m

�[0m
[2014-04-11T19:13:56+00:00] INFO: Running queued delayed notifications before re-raising exception


Running handlers:�[0m
[2014-04-11T19:13:56+00:00] ERROR: Running exception handlers
Running handlers complete
�[0m
[2014-04-11T19:13:56+00:00] ERROR: Exception handlers complete

[2014-04-11T19:13:56+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
Chef Client failed. 11 resources updated in 82.719693942 seconds�[0m
[2014-04-11T19:13:56+00:00] ERROR: java_ark[jdk] (java::oracle line 53) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '18'
---- Begin output of  curl --create-dirs -L --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz -o /tmp/kitchen/cache/jdk-7u51-linux-x64.tar.gz  ----
STDOUT: 
STDERR: % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0

  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0

  0  131M    0  536k    0     0   188k      0  0:11:54  0:00:02  0:11:52  188k
  1  131M    1 1451k    0     0   377k      0  0:05:57  0:00:03  0:05:54  913k
  1  131M    1 2113k    0     0   436k      0  0:05:09  0:00:04  0:05:05  788k
  2  131M    2 3162k    0     0   541k      0  0:04:09  0:00:05  0:04:04  875k
  3  131M    3 4096k    0     0   591k      0  0:03:48  0:00:06  0:03:42  871k
  3  131M    3 4096k    0     0   591k      0  0:03:48  0:00:06  0:03:42  871k
curl: (18) transfer closed with 134005386 bytes remaining to read
---- End output of  curl --create-dirs -L --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz -o /tmp/kitchen/cache/jdk-7u51-linux-x64.tar.gz  ----
Ran  curl --create-dirs -L --cookie "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz -o /tmp/kitchen/cache/jdk-7u51-linux-x64.tar.gz  returned 18
[2014-04-11T19:13:56+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Converge failed on instance <confluence-installer-mysql-ubuntu-1204>.
------Exception-------
Class: Kitchen::ActionFailed
Message: SSH exited (1) for command: [sudo -E chef-solo --config /tmp/kitchen/solo.rb --json-attributes /tmp/kitchen/dna.json  --log_level info]
---Nested Exception---
Class: Kitchen::SSHFailed
Message: SSH exited (1) for command: [sudo -E chef-solo --config /tmp/kitchen/solo.rb --json-attributes /tmp/kitchen/dna.json  --log_level info]
------Backtrace-------
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:112:in `rescue in run_remote'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:108:in `run_remote'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:48:in `block in converge'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/ssh.rb:47:in `initialize'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:43:in `new'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/driver/ssh_base.rb:43:in `converge'
/Users/my_user_name/.gem/ruby/1.9.3/gems/kitchen-vagrant-0.14.0/lib/kitchen/driver/vagrant.rb:75:in `converge'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:273:in `public_send'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:273:in `block in perform_action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:308:in `call'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:308:in `synchronize_or_call'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:283:in `block in action'
/Users/my_user_name/.rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:282:in `action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:273:in `perform_action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:256:in `converge_action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:246:in `block in transition_to'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:245:in `each'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:245:in `transition_to'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:141:in `verify'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:170:in `block in test'
/Users/my_user_name/.rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/benchmark.rb:280:in `measure'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/instance.rb:166:in `test'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/command.rb:109:in `public_send'
/Users/my_user_name/.gem/ruby/1.9.3/gems/test-kitchen-1.2.1/lib/kitchen/command.rb:109:in `block (2 levels) in run_action'
/Users/my_user_name/.gem/ruby/1.9.3/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
/Users/my_user_name/.gem/ruby/1.9.3/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
----------------------

MySQL datasource not set up in Tomcat

Hi,

I tried to actually install (finally... after playing around the environment :) ) a full Confluence server with the cookbook just to realise that the datasource for the MySQL Connector is not set in Tomcat. I guess some other bit could be missing to have it fully work.

For this point in particular, according to this Confluence documentation page, the DataSource Resource element should be set in the server.xml.erb, "within the Context element, directly after the opening <Context.../> line, before Manager". And it is not there:

                <Context path="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
                  <Manager pathname="" />
                </Context>

Also need to add things in the web.xml.erb.

I am quite happy to add this to the cookbook and send a pull request. But will your merge it? I still have pull requests pending.

I am happy to give a hand to have it fully working... and tested.

Em

Allow config of database via tomcat datasource

I'm still new to Java-land, but this would seem helpful in making the wizard a little more straightforward.

Seems then there's no need to copy user and database names and password into the wizard.

Any objections or concerns from those who are more veteran to tomcat?

Reverse proxy should be optional

In most cases a reverse proxy is not needed. If a reverse proxy is needed more than likely it will be configured in a separate cookbook.

Typically you don't create a reverse proxy per product. You would use reverse proxy for JIRA, Confluence and possibly other products. But you won't want a proxy for JIRA, one for Confluence.

IMHO the cookbook will be more useful if it possible to exclude the reverse proxy. Or better, if it is optional.

For testing purposes it may be useful to have reverse proxy as a option I'm not sure.

5.9.9 is out.

Needs new attribute block. I'm assuming it's not desirable to discover and accept new versions immediately?

Move helpers into "Confluence" module

Right now, we've got the settings helper created with:

settings = merge_confluence_settings

This is great when we're using it in the confluence cookbook, but when someone has a wrapper cookbook where it's also being used, it's not very obvious where it's coming from.

@bflad's stash cookbook seems to have a better approach:
https://github.com/bflad/chef-stash/blob/master/recipes/database.rb#L1

I personally feel this would give me clarity, and a hint to the fact that some noteworthy merging is happening:

settings = Confluence.merged_settings(node)

Let's do this? Thoughts?

Unable to log into Confluence after build

Setting up 2 separate servers: webapp & db using this cookbook. After going through the manual configuration steps: putting in the license, setting up the external db, and creating an internal user... I am then unable to log into the instance with the aforementioned internally created user. No errors appear - it just redirects to the same page. Thoughts?

rubocop failed on travis build 41

build link: https://travis-ci.org/bflad/chef-confluence/builds/21911797

Inspecting 33 files
.....CC....CC...CC.C..CCCC.CCC...

Offenses:

files/default/tests/minitest/linux_cluster-standalone_test.rb:2:1: C: Use snake_case for source file names.
files/default/tests/minitest/linux_cluster-war_test.rb:2:1: C: Use snake_case for source file names.
files/default/tests/minitest/windows_cluster-standalone_test.rb:2:1: C: Use snake_case for source file names.
files/default/tests/minitest/windows_cluster-war_test.rb:2:1: C: Use snake_case for source file names.
libraries/confluence.rb:21:7: C: Use nested module/class definitions instead of compact style.
class Chef::Recipe::Confluence
      ^^^^^^^^^^^^^^^^^^^^^^^^
metadata.rb:1:5: C: Put one space between the method name and the first argument.
name              'confluence'
    ^^^^^^^^^^^^^^
metadata.rb:2:11: C: Put one space between the method name and the first argument.
maintainer        'Brian Flad'
          ^^^^^^^^
metadata.rb:3:17: C: Put one space between the method name and the first argument.
maintainer_email  '[email protected]'
                ^^
metadata.rb:4:8: C: Put one space between the method name and the first argument.
license           'Apache 2.0'
       ^^^^^^^^^^^
metadata.rb:5:12: C: Put one space between the method name and the first argument.
description       'Installs/Configures Atlassian Confluence'
           ^^^^^^^
metadata.rb:6:17: C: Put one space between the method name and the first argument.
long_description  IO.read(File.join(File.dirname(__FILE__), 'README.md'))
                ^^
metadata.rb:7:8: C: Put one space between the method name and the first argument.
version           '1.7.1'
       ^^^^^^^^^^^
metadata.rb:8:7: C: Put one space between the method name and the first argument.
recipe            'confluence', 'Installs/configures Atlassian Confluence'
      ^^^^^^^^^^^^
metadata.rb:9:7: C: Put one space between the method name and the first argument.
recipe            'confluence::apache2', 'Installs/configures Apache 2 as proxy (ports 80/443)'
      ^^^^^^^^^^^^
metadata.rb:10:7: C: Put one space between the method name and the first argument.
recipe            'confluence::database', 'Installs/configures MySQL/Postgres server, database, and user for Confluence'
      ^^^^^^^^^^^^
metadata.rb:11:7: C: Put one space between the method name and the first argument.
recipe            'confluence::linux_cluster-standalone', 'Installs/configures Confluence Cluster via Linux standalone archive'
      ^^^^^^^^^^^^
metadata.rb:12:7: C: Put one space between the method name and the first argument.
recipe            'confluence::linux_cluster-war', 'Deploys Confluence Cluster WAR on Linux'
      ^^^^^^^^^^^^
metadata.rb:13:7: C: Put one space between the method name and the first argument.
recipe            'confluence::linux_installer', 'Installs/configures Confluence via Linux installer'
      ^^^^^^^^^^^^
metadata.rb:14:7: C: Put one space between the method name and the first argument.
recipe            'confluence::linux_standalone', 'Installs/configures Confluence via Linux standalone archive'
      ^^^^^^^^^^^^
metadata.rb:15:7: C: Put one space between the method name and the first argument.
recipe            'confluence::linux_war', 'Deploys Confluence WAR on Linux'
      ^^^^^^^^^^^^
metadata.rb:16:7: C: Put one space between the method name and the first argument.
recipe            'confluence::tomcat_configuration', "Configures Confluence's built-in Tomcat"
      ^^^^^^^^^^^^
metadata.rb:17:7: C: Put one space between the method name and the first argument.
recipe            'confluence::windows_cluster-standalone', 'Installs/configures Confluence Cluster via Windows standalone archive'
      ^^^^^^^^^^^^
metadata.rb:18:7: C: Put one space between the method name and the first argument.
recipe            'confluence::windows_cluster-war', 'Deploys Confluence Cluster WAR on Windows'
      ^^^^^^^^^^^^
metadata.rb:19:7: C: Put one space between the method name and the first argument.
recipe            'confluence::windows_installer', 'Installs/configures Confluence via Windows installer'
      ^^^^^^^^^^^^
metadata.rb:20:7: C: Put one space between the method name and the first argument.
recipe            'confluence::windows_standalone', 'Installs/configures Confluence via Windows standalone archive'
      ^^^^^^^^^^^^
metadata.rb:21:7: C: Put one space between the method name and the first argument.
recipe            'confluence::windows_war', 'Deploys Confluence WAR on Windows'
      ^^^^^^^^^^^^
metadata.rb:23:1: C: %w-literals should be delimited by ( and )
%w{ amazon centos redhat scientific ubuntu }.each do |os|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
metadata.rb:27:1: C: %w-literals should be delimited by ( and )
%w{ apache2 database mysql mysql_connector postgresql }.each do |cb|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
metadata.rb:31:1: C: %w-literals should be delimited by ( and )
%w{ java }.each do |cb|
^^^^^^^^^^
recipes/configuration.rb:24:8: C: Put one space between the method name and the first argument.
  owner  node['confluence']['user']
       ^^
recipes/configuration.rb:25:7: C: Put one space between the method name and the first argument.
  mode   '0644'
      ^^^
recipes/linux_cluster-standalone.rb:2:1: C: Use snake_case for source file names.
# Cookbook Name:: confluence
^
recipes/linux_cluster-war.rb:2:1: C: Use snake_case for source file names.
# Cookbook Name:: confluence
^
recipes/linux_installer.rb:30:9: C: Put one space between the method name and the first argument.
  source    node['confluence']['url']
        ^^^^
recipes/linux_installer.rb:31:11: C: Put one space between the method name and the first argument.
  checksum  node['confluence']['checksum']
          ^^
recipes/linux_installer.rb:32:7: C: Put one space between the method name and the first argument.
  mode      '0755'
      ^^^^^^
recipes/linux_installer.rb:33:9: C: Put one space between the method name and the first argument.
  action    :create_if_missing
        ^^^^
recipes/linux_installer.rb:64:7: C: Put one space between the method name and the first argument.
  mode   '0755'
      ^^^
recipes/linux_standalone.rb:32:7: C: Put one space between the method name and the first argument.
  home    node['confluence']['home_path']
      ^^^^
recipes/linux_standalone.rb:33:8: C: Put one space between the method name and the first argument.
  shell   '/bin/bash'
       ^^^
recipes/linux_standalone.rb:35:9: C: Put one space between the method name and the first argument.
  system  true
        ^^
recipes/linux_standalone.rb:36:9: C: Put one space between the method name and the first argument.
  action  :create
        ^^
recipes/linux_standalone.rb:55:9: C: Put one space between the method name and the first argument.
  source    node['confluence']['url']
        ^^^^
recipes/linux_standalone.rb:56:11: C: Put one space between the method name and the first argument.
  checksum  node['confluence']['checksum']
          ^^
recipes/linux_standalone.rb:57:7: C: Put one space between the method name and the first argument.
  mode      '0644'
      ^^^^^^
recipes/linux_standalone.rb:58:9: C: Put one space between the method name and the first argument.
  action    :create_if_missing
        ^^^^
recipes/linux_standalone.rb:86:7: C: Put one space between the method name and the first argument.
  mode   '0755'
      ^^^
recipes/tomcat_configuration.rb:24:8: C: Put one space between the method name and the first argument.
  owner  node['confluence']['user']
       ^^
recipes/tomcat_configuration.rb:25:7: C: Put one space between the method name and the first argument.
  mode   '0755'
      ^^^
recipes/tomcat_configuration.rb:31:8: C: Put one space between the method name and the first argument.
  owner  node['confluence']['user']
       ^^
recipes/tomcat_configuration.rb:32:7: C: Put one space between the method name and the first argument.
  mode   '0640'
      ^^^
recipes/tomcat_configuration.rb:39:8: C: Put one space between the method name and the first argument.
  owner  node['confluence']['user']
       ^^
recipes/tomcat_configuration.rb:40:7: C: Put one space between the method name and the first argument.
  mode   '0644'
      ^^^
recipes/windows_cluster-standalone.rb:2:1: C: Use snake_case for source file names.
# Cookbook Name:: confluence
^
recipes/windows_cluster-war.rb:2:1: C: Use snake_case for source file names.
# Cookbook Name:: confluence
^

33 files inspected, 55 offenses detected

I am working on it.

Chef::Exceptions::RecipeNotFound

Two problems appeared recently:

================================================================================
Recipe Compile Error
================================================================================


Chef::Exceptions::RecipeNotFound
--------------------------------
could not find recipe server for cookbook mysql

and

================================================================================
Recipe Compile Error
================================================================================


Chef::Exceptions::RecipeNotFound
--------------------------------
could not find recipe server for cookbook mysql-chef_gem

This is due to the fact that

So to summarise, solution is to:

  • lock the cookbook versions in metadata.rb:
%w(apache2 mysql_connector postgresql).each do |cb|
  depends cb
end

depends 'database', '~> 2.3'
depends 'mysql', '~> 5.0' 
  • delete the Berksfile.lock
  • run berks install

Add test-kitchen integration tests to travis

Hi there,

Newbie question: I saw that Travis is used, but looking at the current .travis.yml it looks like only foodcritic and rubo tests are run.

Being a newbie I have no idea what the limits to Travis are... And a wild CI dream would be that the cookbook could be tested running a test-kitchen instance, at least to see whether it installs correctly on at least on flavor of linux, even runs Integration tests with serverspec and/or ATDD tests with Cucumber. Even wilder (unreasonable?) dream would be that it does this on all supported flavors of linux when pushed to master.

Possible?

Add a sponsorshop or supporter section to README

Hey guys,

I'm working for a client, Blended Perspectives, that has been very generous with allowing me to contribute to this cookbook. I was wondering whether it might be possible to add a section recognizing organization-level contributions.

### Sponsors

Development of this cookbook has been generously supported in part by the code contributions of the following organizations:

* [University of Pennsylvania](http://www.upenn.edu/)
* [Parallels Inc.](https://www.parallels.com)
* [Blended Perspectives Inc.](http://www.blendedperspectives.com/)

cc: @mrjcleaver

Confluence 6 Collaborative Editing?

Hi Confluence 6 adds collaborative editing and therefore requires additional rules in the proxy.

I note the checksum permits 6.0.1 to be installed, but I didn't see proxy config changes.

Has anyone seen success?

Incorrectly setting JAVA_OPTS variable in setenv.sh

When you set the java_opts attribute, the template adds additional jvm options. When you start the server, it fails because the setenv.sh file is incorrectly formatted.

setenv.sh: line 55: unexpected EOF while looking for matching"'`

When you look at the setenv.sh.erb template, you can see that it's missing the " character at the end.

<% if node['confluence']['jvm']['java_opts'] != '' -%>
JAVA_OPTS="<%= node['confluence']['jvm']['java_opts']%>
export JAVA_OPTS
<% end -%>

https://github.com/parallels-cookbooks/confluence/blob/master/templates/default/setenv.sh.erb#L53

Improve cleanness of the .kitchen.yml

As stated in https://github.com/test-kitchen/kitchen-vagrant/tree/20bba7a4d5c215681c68813828e9ee2f3f0165c6#-default-configuration , kitchen-vagrant has now default for the following platforms:

---
platforms:
- name: ubuntu-10.04
- name: ubuntu-12.04
- name: ubuntu-12.10
- name: ubuntu-13.04
- name: centos-5.9
- name: centos-6.4
- name: debian-7.1.0

Would it be a good idea to clean up the .kitchen.yml for these? Would be a better read. Would have offered a pull for that, but I have two in the queue already and I don't think having too many in the pipe would be good. Unless you have a suggestion on how this could be organised...

Installer Ignores home_path

The confluence installer (at least 5.6.3) sets the confluence user's home directory to /home/confluence. This causes the test looking for it to be set to home_path to fail.

Ensure crowd.properties not world-readable

Haven't tested whether this confuses confluence, but since there's a password in that file, we should probably see if we can restrict access to the confluence user :)

Ensure database cookbook deps satisfied if database type used

This was alluded to here: #43 (comment)

Basically, we're not strictly locking to a version constraint for DB cookbooks as they might not be required, depending on DB type. But we probably want to throw a warning or fail out of the chef run if that DB type is actually used and the chef run is using an improper version

chef-sugar seemingly has a semantic core function to compare versions:
https://github.com/sethvargo/chef-sugar#core-extensions

And this should get the cookbook version easily:
http://stackoverflow.com/a/13710498

Chef 12?

What versions of Chef is this known to work with?

Creates confluence1

Is there a reason I can not pre-create confluence with a standardized UID? We have the user created before confluence role is run, and the end result is we get a confluence1 created as well. Is there some settings to the user we can do to avoid that?

UTF8 is assumed as default

Not a big problem, but I noted that UTF8 is assumed as default in templates when creating Postgres database. If template0 is used during creation I think it will work better.

database.rb should probably look something like this:
postgresql_database settings['database']['name'] do
connection database_connection
connection_limit '-1'
encoding 'utf8'
template 'template0'
action :create
end

From http://www.postgresql.org/docs/9.0/static/manage-ag-templatedbs.html
"Another common reason for copying template0 instead of template1 is that new encoding and locale settings can be specified when copying template0, whereas a copy of template1 must use the same settings it does. This is because template1 might contain encoding-specific or locale-specific data, while template0 is known not to."

Stop storing state in attributes

I can go dig up the reference if there's any objection, but my understanding is that attributes are not recommended for storing state, which is what we're using them for in our arch attr and the confluence::set_attributes_from_version recipe.

Mind if I remove this approach in favour of just using a single helper method in the resource requiring the url/checksum (ark and remote_file, in this case)?

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.