Maintaining EC2 Servers with Chef Server
NickName:Lui Ask DateTime:2015-02-04T12:52:42

Maintaining EC2 Servers with Chef Server

I have a hosted chef account working with AWS EC2 instances.

The instances can connect to hosted chef by way of chef-client and run the inital run_list that is presetly a role called servers. Everything runs and installs correctly on initial provision.

I should also mention I have autoscaling on ec2 instances that increses the amount of instances provisioned on an 'as needed' basis and this works fine.

I found one talk that sort of makes sense but seems a bit more involved. https://www.youtube.com/watch?v=yHub6E4DNvg

My questions are around how to maintain the servers after initial provisioning. First, if I have an update to my role to include more cookbooks or configuration, and how would I push this out to say X amount servers in a simple way.

Second, how would chef server know if a node has failed and notify the admin?

Any guidance?

Copyright Notice:Content Author:「Lui」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/28313741/maintaining-ec2-servers-with-chef-server

Answers
Tensibai 2015-02-04T13:31:48

That's quite vast question ...\n\nFor the easy one: failing node => the solution is to use report handlers see the doc here\n\nFor the keep in desired state, the idea is to have chef run periodically on the nodes, so it keep enforcing the conf defined in cookbooks, any change will be updated accordingly. (that's the way chef has been concepted).\n\nIf you want more control on which server run when you can:\n\n\nuse the push-jobs addon (commercial addon, not free) \nuse some orchestration tool (I personnaly use rundeck for adhoc runs in addition to periodic runs).\n\n\nThere's a lot of way to do this and which one to use is a question of preference and environment.",


More about “Maintaining EC2 Servers with Chef Server” related questions

Maintaining EC2 Servers with Chef Server

I have a hosted chef account working with AWS EC2 instances. The instances can connect to hosted chef by way of chef-client and run the inital run_list that is presetly a role called servers.

Show Detail

Install Chef-Server 11 on EC2 Instance

I am using hosted Chef for quite some time. Wanted to explore the opensource chef server. hence I am trying to setup my Chef-Server 11 on EC2 instance. I have Chef-server running and I can access ...

Show Detail

Using Cloudformation with a Chef Server

I'm exploring some disaster recovery scenarios and how to comeback from them quickly. Disasters like our root AWS account being hacked, or all of Oregon going down. Basically situations where we ne...

Show Detail

One chef client multiple chef servers

I have a chef client (in windows) which already pointing to a chef server .Now we got a new chef server .Without disturbing the current setup , how can we make chef client point to both the chef se...

Show Detail

chef bootstraping ec2 uses the wrong ip in future

We mainly do not use ec2 but we do have a few servers. Normally I will bring up a new blank box and boostrap it using the public ip: knife boostrap -N my-new-ec2-box -x root 123.456.789.0 I will ...

Show Detail

How do I deploy an entire environment (group of servers) using Chef?

I have an environment (Graphite) that looks like the following: N worker servers 1 relay server that forwards work to these worker servers 1 web server that can query the relay server. I would li...

Show Detail

knife ec2 create server & chef Nodes

After running knife ec2 create server I expected there to be a Node in chef, but there isn't. What's the typical process for keeping chef and ec2 in sync?

Show Detail

Deploy Build Servers toolchain using Puppet, Chef or Ansible

We have this issue. We want to automate the deployment of our Continuous Delivery Build Server Tool chain using a Configuration Management tool such us Puppet, Chef or Ansible. More precisely we ...

Show Detail

Deployment on EC2 using poolparty and Chef server

Does anyone have done the rails application deployment on EC2 using poolpary gems and Chef server(not Chef solo). Please share your experiences if you know some blogs or code links(except poolparty...

Show Detail

Configure chef zero server with existing chef server

I wish to use chef zero with vagrant for provisioning developer environments. These developers are involved in application development and are not involved in maintaining chef recipes. I have a c...

Show Detail