Open gwilton opened 10 years ago
Thanks for the details! Sorry it hasn't gone smoothly this week. It might be a few days before we have a solution but we'll dig in to see if we can ascertain what might have gone wrong.
Hey man, thanks for the quick follow-up. I enjoy using Ironfan and will do what I can to help. If I figure anything out I will let you know. If anyone is running a working homebase with Ironfan6 it would be great to see how the Gemfile and knife.rb looks. What ruby version is being used, maybe even a gem list. An example of a fully working realm configuration would help. Thanks.
P.S. Every knife cluster command says... "no realm-specific Gemfile found. using default Gemfile." What does this mean?
I was able to gather more information. At least for the bootstrapping issue. The reason I am able to bootstrap a realm named "sandbox" and nothing else works, is because i have a EC2 Key Pair with the name of "sandbox". You will find in the resource data object below that during the bootstrap process the realm looks for a identity_file with name of #{cluster}.pem when it should be #{realm}-{cluster}.pem. If #{cluster}.pem happens to exist, you will not get an ERROR but you still have to provide the proper identity_file and username with the -i -x option.
$ knife cluster bootstrap qa-sandbox-app-0
no realm-specific Gemfile found. using default Gemfile.
Inventorying servers in qa realm, sandbox cluster, app facet, servers 0
sandbox: Loading chef
sandbox: Loading ec2
sandbox: Reconciling DSL and provider information
+------------------+-------+---------+----------+------------+-----+-------+------------+--------------+---------------+------------+-----------+
| Name | Chef? | State | Flavor | AZ | Env | Realm | MachineID | Public IP | Private IP | Created On | relevant? |
+------------------+-------+---------+----------+------------+-----+-------+------------+--------------+---------------+------------+-----------+
| qa-sandbox-app-0 | yes | running | m1.large | us-east-1a | qa | qa | i-7a2fd85b | 54.80.213.11 | 10.214.21.194 | 2014-03-23 | true |
+------------------+-------+---------+----------+------------+-----+-------+------------+--------------+---------------+------------+-----------+
Preparing shared resources:
sandbox: Loading chef
sandbox: Loading ec2
sandbox: Reconciling DSL and provider information
Loaded information for 3 computer(s) in cluster sandbox
sandbox: ensuring security group permissions
qa-sandbox: ensuring access from qa-sandbox to qa-sandbox
ssh: ensuring tcp access from 0.0.0.0/0 to 22..22
Running bootstrap on qa-sandbox-app-0...
Bootstrapping the node redoes its initial setup -- only do this on an aborted launch.
Are you absolutely certain that you want to perform this action? (Type 'Yes' to confirm) Yes
qa-sandbox-app-0: Running bootstrap
Bootstrapping Chef on ec2-54-80-213-11.compute-1.amazonaws.com
Failed to authenticate ubuntu - trying password auth
Enter your password:
WARNING: Error running [#<Ironfan::Broker::Computer(server=#<Ironfan::Dsl::Server(name="0", components=c{ }, run_list_items=c{ role[systemwide], role[ssh], role[set_hostname], role[volumes], role[package_set], role[org_base], role[org_users], role[org_final], role[tuning], volumes::build_raid, role[app], role[qa-sandbox-cluster], role[qa-sandbox-app-facet] }, clouds=c{ ec2 }, volumes=c{ ephemeral0, ephemeral1, md0 }, security_groups=c{ }, environment=:qa, realm_name="qa", cluster_role=#
Hi,
Over this past week i been trying to integrated with Ironfan 6.0.x. I been running into numerous problems along the way. At the moment I can successfully launch instances to EC2 but every other functionality seems to be failing. Here are the problems I am having, maybe someone on here can help.
Dependencies
So my Gemfile looks like this... The ironfan_homebase seems to be stuck on ironfan4, did what I could here to integrate with ironfan6.
Clusters & Realms Definition
It seems like defining a cluster under ironfan_homebase/clusters is going away and now is all being done in ironfan_homebase/realms. I was able to put something together with the following documentation (https://github.com/infochimps-labs/ironfan/blob/master/NOTES-REALM.md).
I created a realm 'ironfan_homebase/realms/q1.rb' That looks like this.
Launching EC2 instance
I am able to launch the instance in EC2 without a problem. But the moment I try to bootstrap the instance I get an ERROR. I try playing around with many different cluster/realms definitions. The only time I get a different result is if the cluster is named "sandbox" (I know, very strange see below).
Bootstrapping instance
When cluster name is "control"
When cluster name is "sandbox"
When cluster name is "sandbox"
When the cluster has a name of "sandbox", I get prompted for a password. So it seems that the ssh key is not properly being set. So i use the -i option and provide the generated key under "ironfan_homebase/knife/credentials/ec2_keys/" to get by this. The system begins to bootstrap but never completes successfully. I get this console prompt window asking me to enter the chef_server_url which I can't. I do see that chef-client is installed on the instance.
knife cluster kick
So lets assume some how the bootstrap above at least installed the chef-client. Lets try to do a kick. I follow the same method as bootstrapping and provide the -i option. That fails and i am not sure why is trying to use my local username of 'wilton' to kick, that should be ubuntu. Ignoring that and going to provide the -x option.
knife cluster ssh
Same issue trying to use cluster ssh. I have to provide both -i -x option to get a successful authentication.
$ knife cluster ssh q1-sandbox-worker-0 -i knife/credentials/ec2_keys/q1-sandbox.pem uptime no realm-specific Gemfile found. using default Gemfile. Inventorying servers in q1 realm, sandbox cluster, worker facet, servers 0 sandbox: Loading chef sandbox: Loading ec2 sandbox: Reconciling DSL and provider information WARNING: Failed to connect to -- Net::SSH::AuthenticationFailed: Authentication failed for user wilton@ec2-54-82-77-79.compute-1.amazonaws.com@ec2-54-82-77-79.compute-1.amazonaws.com
$ knife cluster ssh q1-sandbox-worker-0 -i knife/credentials/ec2_keys/q1-sandbox.pem -x ubuntu uptime no realm-specific Gemfile found. using default Gemfile. Inventorying servers in q1 realm, sandbox cluster, worker facet, servers 0 sandbox: Loading chef sandbox: Loading ec2 sandbox: Reconciling DSL and provider information q1-sandbox-worker-0 17:34:05 up 18 min, 1 user, load average: 0.15, 0.15, 0.14
Conclusion
I know this is a lot of information. I been trying to get this working for a while. However, i am not too familiar with the Ironfan internal code to dig to deep, but i will give it a shot this weekend. I am at the point that if i can't figure this out i will have to go back to using ironfan3/4 with chef 0.10.x.
I am thinking there are a few issues here...
These will be the three thing i will be looking into this weekend and try to fix. I would really appreciate some help here. Thank you!