tecracer-chef / artifactory Goto Github PK
View Code? Open in Web Editor NEWChef Artifactory Cookbook
License: Apache License 2.0
Chef Artifactory Cookbook
License: Apache License 2.0
Artifactory by default uses Derby for its database.
The ability to configure alternate databases would be appreciated.
See https://www.jfrog.com/confluence/display/RTF/Changing+the+Default+Storage#ChangingtheDefaultStorage-Overview
This would likely involve adding a dependency to the database cookbook, so that a database and user can be created.
A common use case in provisioning artifactory is to provision a consistent artifactory plugins (typically from the Artifactory Plugin Library). It would be awesome if this recipe could be extended to support. this.
@erichelgeson can you release the latest version to the chef supermarket?
Last one is 0.3.1.
We use chef-guard and now I can't pin/freeze the cookbook.
thnx
systemd is the standard services system in Ubuntu 16.04
I noticed the contents of master are not consistent with what you find on Chef Supermarket. It would be nice to take advantage of your latest work.
Has anyone got this cookbook to work with the latest Java community cookbook? I'm running into a few issues. NoMethodError ------------- undefined method
[]' for nil:NilClass
Cookbook Trace:
---------------
/tmp/kitchen/cache/cookbooks/java/recipes/openjdk.rb:61:in `block in from_file'
/tmp/kitchen/cache/cookbooks/java/recipes/openjdk.rb:57:in `from_file'
/tmp/kitchen/cache/cookbooks/java/recipes/default.rb:22:in `from_file'
/tmp/kitchen/cache/cookbooks/artifactory/recipes/default.rb:12:in `from_file'
/tmp/kitchen/cache/cookbooks/tw-artifactory/recipes/default.rb:66:in `from_file'
Relevant File Content:
----------------------
/tmp/kitchen/cache/cookbooks/java/recipes/openjdk.rb:
54: notifies :write, 'log[jdk-version-changed]', :immediately
55: end
56:
57: java_alternatives 'set-java-alternatives' do
58: java_location jdk.java_home
59: default node['java']['set_default']
60: priority jdk.alternatives_priority
61>> bin_cmds node['java']['jdk'][node['java']['jdk_version']]['bin_cmds']
62: action :set
63: only_if { platform_family?('debian', 'rhel', 'fedora', 'amazon') }
64: end
65:
66: if node['java']['set_default'] && platform_family?('debian')
67: include_recipe 'java::default_java_symlink'
68: end
69:
70: # We must include this recipe AFTER updating the alternatives or else JAVA_HOME
`
I used the latest published version of artifactory cookbook (depends 'artifactory', '~> 0.3.1') successfully in the past in my recipe. Not sure what has changed but now I get an error during knife bootstrap
of my node. Can anyone help me please?
It seems that the latest version of cookbook in github is 0.3.4 which seems to fix this line in attributes/default.rb but I do not know where to access this version from.
mynode.acme.com Starting the first Chef Client run...
mynode.acme.com Starting Chef Client, version 13.7.16
mynode.acme.com resolving cookbooks for run list: ["dev-toolchain-server"]
mynode.acme.com Synchronizing Cookbooks:
mynode.acme.com - gitlab-vault (0.2.0)
mynode.acme.com - postgresql (6.1.1)
mynode.acme.com - java (1.50.0)
mynode.acme.com - postfix (5.0.3)
mynode.acme.com - ark (3.1.0)
mynode.acme.com - build-essential (8.0.4)
mynode.acme.com - chef-vault (3.0.0)
mynode.acme.com - compat_resource (12.19.1)
mynode.acme.com - apache2 (5.0.1)
mynode.acme.com - apt (6.1.4)
mynode.acme.com - artifactory (0.3.1)
mynode.acme.com - gradle (1.5.1)
mynode.acme.com - dpkg_autostart (0.2.0)
mynode.acme.com - dev-toolchain-server (0.2.2)
mynode.acme.com - homebrew (4.3.0)
mynode.acme.com - jenkins (5.0.6)
mynode.acme.com - mingw (2.0.2)
mynode.acme.com - omnibus-gitlab (0.3.16)
mynode.acme.com - ohai (5.2.2)
mynode.acme.com - openssl (8.1.2)
mynode.acme.com - packagecloud (0.3.0)
mynode.acme.com - runit (4.0.4)
mynode.acme.com - seven_zip (2.0.2)
mynode.acme.com - sonarqube (0.3.3)
mynode.acme.com - windows (3.5.1)
mynode.acme.com - yum-epel (3.0.0)
mynode.acme.com Installing Cookbook Gems:
mynode.acme.com Compiling Cookbooks...
mynode.acme.com
mynode.acme.com ================================================================================
mynode.acme.com Recipe Compile Error in /var/chef/cache/cookbooks/artifactory/attributes/default.rb
mynode.acme.com ================================================================================
mynode.acme.com
mynode.acme.com NoMethodError
mynode.acme.com -------------
mynode.acme.com undefined method `artifactory' for #<Chef::Node::Attribute:0x000000000299fa00>
mynode.acme.com
mynode.acme.com Cookbook Trace:
mynode.acme.com ---------------
mynode.acme.com /var/chef/cache/cookbooks/artifactory/attributes/default.rb:5:in `from_file'
mynode.acme.com
mynode.acme.com Relevant File Content:
mynode.acme.com ----------------------
mynode.acme.com /var/chef/cache/cookbooks/artifactory/attributes/default.rb:
mynode.acme.com
mynode.acme.com 1: default['artifactory']['zip_url'] = 'http://dl.bintray.com/content/jfrog/artifactory/artifactory-3.4.1.zip?direct'
mynode.acme.com 2: default['artifactory']['zip_checksum'] = '5019e4a4cac7936b3d4e1fc457d36fff60cdf27de42886184b0b5a844f43f0b0'
mynode.acme.com 3: default['artifactory']['home'] = '/var/lib/artifactory'
mynode.acme.com 4: default['artifactory']['log_dir'] = '/var/log/artifactory'
mynode.acme.com 5>> default['artifactory']['catalina_base'] = ::File.join(artifactory['home'], 'tomcat')
mynode.acme.com 6: default['artifactory']['java']['xmx'] = '1g'
mynode.acme.com 7: default['artifactory']['java']['xms'] = '512m'
mynode.acme.com 8: default['artifactory']['java']['extra_opts'] = '-XX:+UseG1GC'
mynode.acme.com 9:
mynode.acme.com 10: default['artifactory']['user'] = 'artifactory'
mynode.acme.com 11: default['artifactory']['port'] = 8081
mynode.acme.com 12: default['artifactory']['shutdown_port'] = 8015
mynode.acme.com 13: default['artifactory']['install_java'] = true
mynode.acme.com 14:
mynode.acme.com
mynode.acme.com System Info:
mynode.acme.com ------------
mynode.acme.com chef_version=13.7.16
mynode.acme.com platform=ubuntu
mynode.acme.com platform_version=16.04
mynode.acme.com ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]
mynode.acme.com program_name=chef-client worker: ppid=9588;start=14:40:17;
mynode.acme.com executable=/opt/chef/bin/chef-client
mynode.acme.com
mynode.acme.com
mynode.acme.com Running handlers:
mynode.acme.com [2018-02-25T14:40:27-05:00] ERROR: Running exception handlers
mynode.acme.com Running handlers complete
mynode.acme.com [2018-02-25T14:40:27-05:00] ERROR: Exception handlers complete
mynode.acme.com Chef Client failed. 0 resources updated in 10 seconds
mynode.acme.com [2018-02-25T14:40:27-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
mynode.acme.com [2018-02-25T14:40:27-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
mynode.acme.com [2018-02-25T14:40:27-05:00] ERROR: undefined method `artifactory' for #<Chef::Node::Attribute:0x000000000299fa00>
mynode.acme.com [2018-02-25T14:40:27-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
when i run sudo chef-client i get an error stating =>
undefined method `artifactory' for #Chef::Node::Attribute:0x00000000041e2270
/var/chef/cache/cookbooks/artifactory/attributes/default.rb:5:in `from_file'
/var/chef/cache/cookbooks/artifactory/attributes/default.rb:
1: default['artifactory']['zip_url'] = 'http://dl.bintray.com/content/jfrog/artifactory/artifa ctory-3.4.1.zip?direct'
2: default['artifactory']['zip_checksum'] = '5019e4a4cac7936b3d4e1fc457d36fff60cdf27de42886184 b0b5a844f43f0b0'
3: default['artifactory']['home'] = '/var/lib/artifactory'
4: default['artifactory']['log_dir'] = '/var/log/artifactory'
5>> default['artifactory']['catalina_base'] = ::File.join(artifactory['home'], 'tomcat')
6: default['artifactory']['java']['xmx'] = '1g'
7: default['artifactory']['java']['xms'] = '512m'
8: default['artifactory']['java']['extra_opts'] = '-XX:+UseG1GC'
9:
10: default['artifactory']['user'] = 'artifactory'
11: default['artifactory']['port'] = 8081
12: default['artifactory']['shutdown_port'] = 8015
13: default['artifactory']['install_java'] = true
14:
chef_version=13.8.0
platform=ubuntu
platform_version=16.04
ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]
program_name=chef-client worker: ppid=18554;start=07:32:09;
executable=/opt/chef/bin/chef-client
Running handlers:
[2018-03-08T07:32:11+00:00] ERROR: Running exception handlers
Running handlers complete
[2018-03-08T07:32:11+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 01 seconds
[2018-03-08T07:32:11+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2018-03-08T07:32:11+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2018-03-08T07:32:11+00:00] ERROR: undefined method `artifactory' for #<Chef::Node::Attribute:0x0 0000000041e2270>
[2018-03-08T07:32:11+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
So please do let me know what i have to change and what can be done.
i am running it on a ubuntu 16.04 instance
i am a little new to all this
Artifactory documentation mentions the ability to install via deb and rpm packages.
Deb download links can be found at https://bintray.com/jfrog/artifactory-debs/jfrog-artifactory-oss-deb/view
RPM download links can be found at https://bintray.com/jfrog/artifactory-rpms/jfrog-artifactory-oss-rpm/view
The apache cookbook is looking for the file to be named with .conf
: https://github.com/viverae-cookbooks/apache2/blob/master/definitions/apache_site.rb
So the apache_site
command isn't able to symlink the configuration correctly.
Chef-client 13 now throws an error on non standard attribute notation.
Installing Cookbook Gems:
Compiling Cookbooks...
================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/artifactory/attributes/default.rb
================================================================================
NoMethodError
-------------
undefined method `artifactory' for #<Chef::Node::Attribute:0x00000003cedc88>
Cookbook Trace:
---------------
/var/chef/cache/cookbooks/artifactory/attributes/default.rb:5:in `from_file'
Relevant File Content:
----------------------
/var/chef/cache/cookbooks/artifactory/attributes/default.rb:
1: default['artifactory']['zip_url'] = 'http://dl.bintray.com/content/jfrog/artifactory/artifactory-3.4.1.zip?direct'
2: default['artifactory']['zip_checksum'] = '5019e4a4cac7936b3d4e1fc457d36fff60cdf27de42886184b0b5a844f43f0b0'
3: default['artifactory']['home'] = '/var/lib/artifactory'
4: default['artifactory']['log_dir'] = '/var/log/artifactory'
5>> default['artifactory']['catalina_base'] = ::File.join(artifactory['home'], 'tomcat')
6: default['artifactory']['java']['xmx'] = '1g'
7: default['artifactory']['java']['xms'] = '512m'
8: default['artifactory']['java']['extra_opts'] = '-XX:+UseG1GC'
9:
10: default['artifactory']['user'] = 'artifactory'
11: default['artifactory']['port'] = 8081
12: default['artifactory']['shutdown_port'] = 8015
13: default['artifactory']['install_java'] = true
14:
System Info:
------------
chef_version=13.0.113
platform=centos
platform_version=6.8
ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
program_name=chef-client worker: ppid=26221;start=14:42:29;
executable=/opt/chef/bin/chef-client
Running handlers:
[2017-04-11T14:42:33-05:00] ERROR: Running exception handlers
Running handlers complete
[2017-04-11T14:42:33-05:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 03 seconds
[2017-04-11T14:42:33-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2017-04-11T14:42:33-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-04-11T14:42:33-05:00] ERROR: undefined method `artifactory' for #<Chef::Node::Attribute:0x00000003cedc88>
[2017-04-11T14:42:33-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)```
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.