c-buisson / chef-server Goto Github PK
View Code? Open in Web Editor NEWChef-server container for Docker.
Chef-server container for Docker.
I'm trying to work my way through the Chef tutorials, using this docker image as a self-hosted server.
I ran the server using:
docker run --privileged -e CHEF_PORT=443 --name chef-server -d -v ~/chef-logs:/var/log -v ~/install-chef-out:/root -p 443:443 cbuisson/chef-server
and then fetched the SSL certs using:
knife ssl fetch
in my working directory on the same machine.
I then ran:
knife ssl check
per the instructions on the Chef site, which produced this error:
Connecting to host localhost:443
ERROR: The SSL cert is signed by a trusted authority but is not valid for the given hostname
ERROR: You are attempting to connect to: 'localhost'
ERROR: The server's certificate belongs to 'ebb63c73161d'
TO FIX THIS ERROR:
The solution for this issue depends on your networking configuration. If you
are able to connect to this server using the hostname ebb63c73161d
instead of localhost, then you can resolve this issue by updating chef_server_url
in your configuration file.
If you are not able to connect to the server using the hostname ebb63c73161d
you will have to update the certificate on the server to use the correct hostname.
It looks like the ssl certs are being generated using the docker-internal hostname. Is this a known issue? How do I get around it?
Hi,
Thank you for this great Docker container.
I am trying to bring up the WebUI on this container however, when I try to install chef-manage I get this error:
` * apt_package[chef-manage] action install
================================================================================
Error executing action `install` on resource 'apt_package[chef-manage]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb ----
STDOUT: Selecting previously unselected package chef-manage.
(Reading database ... 75837 files and directories currently installed.)
Preparing to unpack .../chef-manage_2.5.4-1_amd64.deb ...
Unpacking chef-manage (2.5.4-1) ...
STDERR: dpkg: dependency problems prevent configuration of chef-manage:
chef-manage depends on chef-server-core (>= 12.14.0); however:
Version of chef-server-core on system is 12.13.0-1.
dpkg: error processing package chef-manage (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
chef-manage
---- End output of dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb ----
Ran dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb returned 1
Resource Declaration:
---------------------
# In /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb
88: package pkg do
89: provider value_for_platform_family(
90: ['debian'] => Chef::Provider::Package::Dpkg,
91: ['rhel', 'suse'] => Chef::Provider::Package::Rpm,
92: )
93: source lazy { pkg_file }
94: notifies :create, "ruby_block[addon_install_notification_#{pkg}]", :immediate
95: end
96: end
Compiled Resource:
------------------
# Declared in /var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb:88:in `block in from_file'
apt_package("chef-manage") do
package_name "chef-manage"
provider Chef::Provider::Package::Dpkg
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :package
cookbook_name "private-chef"
recipe_name "add_ons_wrapper"
source #<Chef::DelayedEvaluator:0x0000000740d948@/var/opt/opscode/local-mode-cache/cookbooks/private-chef/recipes/add_ons_wrapper.rb:93>
end
Platform:
---------
x86_64-linux
Running handlers:
dpkg: error processing package chef-manage (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
chef-manage
---- End output of dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb ----
Ran dpkg -i /var/opt/opscode/local-mode-cache/chef-manage_2.5.4-1_amd64.deb returned 1`
Do you know what the problem / solution might be?
Thanks
root@0889284a91ff:~/chef-repo/.chef# knife client list
ERROR: The data in your request was invalid
Response: <html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx/1.4.4</center>
</body>
</html>
current_dir = File.dirname(__FILE__)
node_name 'admin'
chef_server_url 'http://172.17.0.3:443' >> Docker container
validation_client_name 'chef-validator'
validation_key "#{current_dir}/chef-validator.pem"
client_key "#{current_dir}/admin.pem"
docker stop, then docker start has container failing and exiting with (3).
I have running your chef-server and another docker images with knife acting as a workstation. When I try to list the node, I'm getting 404 Not Found. I have followed the below tutorial to set my workstation and everything looks configured, however I'm not sure why I'm getting 404.
My workstation configuration is:
root@ec33ddcd4e34:~/chef-repo# chef -v
Chef Development Kit Version: 0.6.0
chef-client version: 12.3.0
berks version: 3.2.4
kitchen version: 1.4.0
Can you give me a hint where I can start checking the config?
Thanks,
Jorge
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.