Hi,
I am using the Chef Automate AMI from the Marketplace. I am running into issues when using Elastic IP. During the biscotto setup - https:///biscotti/setup, the Old hostname is sent in the starter_kit.zip instead fo the new Elastic IP. Any ideas how to fix this? Thanks.
Howdy,
The backend services need to know about the FQDN/EIP change, which doesn’t happen automatically. After you launch the instance and associate the EIP, follow the these directions for changing the external hostname to the new FQDN of the instance. After the hostname is changed you’ll want to run chef-marketplace-ctl reconfigure && chef-marketplace-ctl restart biscotti
to make sure that it’s updated with the new FQDN. After that is done the starter kit should contain the correct information. Also note, the setup is only intended to be run a single time, after which you can login to the Chef Automate UI to create new Chef Automate users and can use the Chef server API to create additional Chef server users and orgs.
Thanks, Ryan. I am actually trying to automate this so I will put those commands into a shell script that will be called by UserData script in my CloudFormation template. I will try shortly and let you know. Cheers!
Hi Ryan,
Thanks again, your suggestion to restart the biscotti service worked; I am NOW able to download the starter_kit.zip with the updated EIP. However, I had to remove chef-marketplace-ctl restart because I get the error below. I am not sure if it’s because I am using the AWS AMI: ami-9acb32e2 in US-WEST-2. Any idea why? I can provide the stacktrace if you want. Thanks.
------
[root@ec2-34-216-127-36 ~]# chef-marketplace-ctl reconfigure
Starting Chef Client, version 13.4.24
resolving cookbooks for run list: [“chef-marketplace::default”]
Synchronizing Cookbooks:
-
chef-marketplace (0.0.1)
-
motd (0.6.4)
-
yum-centos (2.3.0)
-
chef-ingredient (2.1.2)
-
hostname (0.4.2)
-
enterprise (0.10.3)
-
chef_handler (3.0.1)
-
compat_resource (12.19.0)
-
hostsfile (2.4.5)
-
runit (3.0.5)
-
packagecloud (0.3.0)
-
yum-epel (2.1.2)
Installing Cookbook Gems:
Compiling Cookbooks…
/var/opt/chef-marketplace/embedded/cookbooks/cache/cookbooks/packagecloud/resources/repo.rb:10: warning: constant ::Fixnum is deprecated
/var/opt/chef-marketplace/embedded/cookbooks/cache/cookbooks/hostsfile/resources/entry.rb:35: warning: constant ::Fixnum is deprecated
Recipe: chef-marketplace::_config_marketplace
- directory[/etc/chef-marketplace] action create (up to date)
================================================================================
Recipe Compile Error in /var/opt/chef-marketplace/embedded/cookbooks/cache/cookbooks/chef-marketplace/recipes/default.rb
================================================================================
NoMethodError
undefined method `-’ for nil:NilClass
Cookbook Trace:
/var/opt/chef-marketplace/embedded/cookbooks/cache/cookbooks/chef-marketplace/recipes/_config_marketplace.rb:16:in `from_file'
/var/opt/chef-marketplace/embedded/cookbooks/cache/cookbooks/chef-marketplace/recipes/config.rb:1:in `from_file'
/var/opt/chef-marketplace/embedded/cookbooks/cache/cookbooks/chef-marketplace/recipes/enable.rb:2:in `from_file'
/var/opt/chef-marketplace/embedded/cookbooks/cache/cookbooks/chef-marketplace/recipes/default.rb:1:in `from_file'
Relevant File Content:
/var/opt/chef-marketplace/embedded/cookbooks/cache/cookbooks/chef-marketplace/recipes/_config_marketplace.rb:
9: owner "root"
10: group “root”
11: mode “0644”
12: action :create_if_missing
13: end
14:
15: if File.exist?("/etc/chef-marketplace/marketplace.rb")
16>> Marketplace.from_file("/etc/chef-marketplace/marketplace.rb")
17: end
18:
19: node.consume_attributes(“chef-marketplace” => Marketplace.save(false))
20:
21: if File.exist?("/etc/chef-marketplace/chef-marketplace-running.json")
22: previous_run = JSON.parse(IO.read("/etc/chef-marketplace/chef-marketplace-running.json"))
23: node.consume_attributes(“previous_run” => previous_run[“chef-marketplace”])
24: end
25:
System Info:
chef_version=13.4.24
platform=centos
platform_version=7.4.1708
ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
program_name=/opt/chef-marketplace/embedded/bin/chef-client
executable=/opt/chef-marketplace/embedded/bin/chef-client
Running handlers:
[2017-12-06T17:44:05+00:00] ERROR: Running exception handlers
[2017-12-06T17:44:05+00:00] ERROR: Running exception handlers
Running handlers complete
[2017-12-06T17:44:05+00:00] ERROR: Exception handlers complete
[2017-12-06T17:44:05+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 02 seconds
[2017-12-06T17:44:05+00:00] FATAL: Stacktrace dumped to /var/opt/chef-marketplace/embedded/cookbooks/cache/chef-stacktrace.out
[2017-12-06T17:44:05+00:00] FATAL: Stacktrace dumped to /var/opt/chef-marketplace/embedded/cookbooks/cache/chef-stacktrace.out
[2017-12-06T17:44:05+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-12-06T17:44:05+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2017-12-06T17:44:05+00:00] FATAL: NoMethodError: undefined method `-’ for nil:NilClass
[2017-12-06T17:44:05+00:00] FATAL: NoMethodError: undefined method `-’ for nil:NilClass