- The document introduces Chef server and client/server model where the Chef server stores and distributes cookbooks and configuration to clients running chef-client.
- It discusses Chef terminology like nodes, which are systems being configured by Chef, and roles which allow grouping common configuration for types of nodes.
- Steps are provided to setup a workstation, install Chef, and configure it to use a Hosted Chef server. Cookbooks and a role are uploaded, and a node is bootstrapped to apply the configuration.
- Additional sections cover creating cloud instances with knife plugins for Brightbox and Rackspace clouds, then bootstrapping the instances to apply the Chef configuration.
Kubernetes: Wie Chefkoch.de mit Containern arbeitetPer Bernhardt
Container erfreuen sich in letzter Zeit enormer Beliebtheit, da sie Systemadministratoren und Entwicklern eine einfache und gemeinsame Verwaltung Ihrer Infrastruktur ermöglichen. Je nachdem wie die Systemlandschaft aufgebaut ist und wie viel Traffic sie bedienen muss, reicht ein einfaches „docker build + docker run“ aber nicht mehr, um die Container in allen Lebensphasen einer Anwendung verwenden zu können. In diesem Vortrag möchte ich zeigen, weshalb wir uns bei Chefkoch.de deshalb für die Einführung des Orchestrierungs-Tools Kubernetes entschieden haben und wie wir damit Container sowohl in der Entwicklung als auch in allen Testphasen und letztendlich auch in Produktion verwenden.
Presentation given at the Atlanta Puppet Camp in December 2014 about how MailChimp uses a combination of DSL tooling, editor plugins, peer review, and Jenkins to do continuous deployment of puppet modules to their infrastructure. Slide sources available at https://github.com/woneill/puppetcamp_atlanta_2014
Kubernetes: Wie Chefkoch.de mit Containern arbeitetPer Bernhardt
Container erfreuen sich in letzter Zeit enormer Beliebtheit, da sie Systemadministratoren und Entwicklern eine einfache und gemeinsame Verwaltung Ihrer Infrastruktur ermöglichen. Je nachdem wie die Systemlandschaft aufgebaut ist und wie viel Traffic sie bedienen muss, reicht ein einfaches „docker build + docker run“ aber nicht mehr, um die Container in allen Lebensphasen einer Anwendung verwenden zu können. In diesem Vortrag möchte ich zeigen, weshalb wir uns bei Chefkoch.de deshalb für die Einführung des Orchestrierungs-Tools Kubernetes entschieden haben und wie wir damit Container sowohl in der Entwicklung als auch in allen Testphasen und letztendlich auch in Produktion verwenden.
Presentation given at the Atlanta Puppet Camp in December 2014 about how MailChimp uses a combination of DSL tooling, editor plugins, peer review, and Jenkins to do continuous deployment of puppet modules to their infrastructure. Slide sources available at https://github.com/woneill/puppetcamp_atlanta_2014
'Ansible Roles done right' is a talk about "Applying TDD while writing roles. Automatic tests powered by Continuous Integration + containers. Quick demo of the new ansible-container." Funny title: "When your applications don't have tests, at least your infrastructure does..."
You know how HTTP caching works but need more? In this talk we look into ways to cache personalized content. We will look at Edge Side Includes (ESI) to tailor caching rules of fragments, and at the user context concept to differentiate caches not by individual user but by permission groups.
Horizontal scaling in the Cloud is the way to adapt resources to load of systems. The Cloud allows users to scale virtually indefinitely, or enough for their needs.
This way the number of servers follows trend of requests, and TCO (Total Cost of Owneship) of IT infrastructure can be reduced. Nonetheless companies can avoid dealing with capacity planning and pre-provisioning issues.
This talk will show how to use Python and Rackspace/OpenStack API and SDK to implement an event-based scaling solution (software released under the open-source Apache License: stay tuned).
Creating and Deploying Static Sites with HugoBrian Hogan
Most web sites don’t have data that changes, so why power them with a database and take the performance hit? In this talk we’ll explore static site generation using Hugo, an open-source static site generator. You’ll learn how to make a master layout for all pages, and how to use Markdown to create your content pages quickly.
Then we’ll explore how to deploy the site we made to production. We’ll automate the entire process. When you’re done, you’ll be able to build and deploy static web sites quickly with minimal tooling.
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)Wesley Beary
Cloud computing scared the crap out of me - the quirks and nightmares of provisioning cloud computing, dns, storage, ... on AWS, Terremark, Rackspace, ... - I mean, where do you even start?
Since I couldn't find a good answer, I undertook the (probably insane) task of creating one. fog gives you a place to start by creating abstractions that work across many different providers, greatly reducing the barrier to entry (and the cost of switching later). The abstractions are built on top of solid wrappers for each api. So if the high level stuff doesn't cut it you can dig in and get the job done. On top of that, mocks are available to simulate what clouds will do for development and testing (saving you time and money).
You'll get a whirlwind tour of basic through advanced as we create the building blocks of a highly distributed (multi-cloud) system with some simple Ruby scripts that work nearly verbatim from provider to provider. Get your feet wet working with cloud resources or just make it easier on yourself as your usage gets more complex, either way fog makes it easy to get what you need from the cloud.
The OpenStack Edition adds my concerns about OpenStack API development, including things that have already been fixed and things that we haven't yet encountered. Hopefully this consumer perspective can help shed light on some rough spots.
->Introduction
->>What is Ansible?
->>Ansible history
->Basic concepts
->>Inventory
->>Playbook
->>Role
->>Module
->>Plugin
->Diving into Ansible roles
->>Getting started
->>Create a role
->>Roles under the hood
->>How to use roles?
MUST WATCH PPT FOR ALL MY TAMIL FRIEND\’S & THOSE WHO ARE HUMANITY ARDENTER\’S
What had happened for past 60 years & now whats happening to them in srilanka ?
what for they are fighting ?How they are struggling ?Who are they?" They are none other than our own blood relations our own brothers and sisters"
We all know how well we lead our life!!! But do you all know how they lead their
Day to Day life?"Average of 7 Tamils die per day in those 60 years."WHAT WE ARE GOING TO DO FOR THEM ?WHAT IS OUR EACH AND EVERYONE\’S PART IN THEIR LIFE? IN WHAT WAY WE ARE GOING TO ASSIST THEM?
PLEASE FRIENDS THINK OF IT AND PLS SPEND YOUR VALUABLE TIME FOR WATCHING THIS PPT & SPREAD AWARENESS SO OTHER\’S CAN COME OUT WITH SOME GOOD IDEOLOGIES !PLS PLS PLS ! ! !
'Ansible Roles done right' is a talk about "Applying TDD while writing roles. Automatic tests powered by Continuous Integration + containers. Quick demo of the new ansible-container." Funny title: "When your applications don't have tests, at least your infrastructure does..."
You know how HTTP caching works but need more? In this talk we look into ways to cache personalized content. We will look at Edge Side Includes (ESI) to tailor caching rules of fragments, and at the user context concept to differentiate caches not by individual user but by permission groups.
Horizontal scaling in the Cloud is the way to adapt resources to load of systems. The Cloud allows users to scale virtually indefinitely, or enough for their needs.
This way the number of servers follows trend of requests, and TCO (Total Cost of Owneship) of IT infrastructure can be reduced. Nonetheless companies can avoid dealing with capacity planning and pre-provisioning issues.
This talk will show how to use Python and Rackspace/OpenStack API and SDK to implement an event-based scaling solution (software released under the open-source Apache License: stay tuned).
Creating and Deploying Static Sites with HugoBrian Hogan
Most web sites don’t have data that changes, so why power them with a database and take the performance hit? In this talk we’ll explore static site generation using Hugo, an open-source static site generator. You’ll learn how to make a master layout for all pages, and how to use Markdown to create your content pages quickly.
Then we’ll explore how to deploy the site we made to production. We’ll automate the entire process. When you’re done, you’ll be able to build and deploy static web sites quickly with minimal tooling.
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)Wesley Beary
Cloud computing scared the crap out of me - the quirks and nightmares of provisioning cloud computing, dns, storage, ... on AWS, Terremark, Rackspace, ... - I mean, where do you even start?
Since I couldn't find a good answer, I undertook the (probably insane) task of creating one. fog gives you a place to start by creating abstractions that work across many different providers, greatly reducing the barrier to entry (and the cost of switching later). The abstractions are built on top of solid wrappers for each api. So if the high level stuff doesn't cut it you can dig in and get the job done. On top of that, mocks are available to simulate what clouds will do for development and testing (saving you time and money).
You'll get a whirlwind tour of basic through advanced as we create the building blocks of a highly distributed (multi-cloud) system with some simple Ruby scripts that work nearly verbatim from provider to provider. Get your feet wet working with cloud resources or just make it easier on yourself as your usage gets more complex, either way fog makes it easy to get what you need from the cloud.
The OpenStack Edition adds my concerns about OpenStack API development, including things that have already been fixed and things that we haven't yet encountered. Hopefully this consumer perspective can help shed light on some rough spots.
->Introduction
->>What is Ansible?
->>Ansible history
->Basic concepts
->>Inventory
->>Playbook
->>Role
->>Module
->>Plugin
->Diving into Ansible roles
->>Getting started
->>Create a role
->>Roles under the hood
->>How to use roles?
MUST WATCH PPT FOR ALL MY TAMIL FRIEND\’S & THOSE WHO ARE HUMANITY ARDENTER\’S
What had happened for past 60 years & now whats happening to them in srilanka ?
what for they are fighting ?How they are struggling ?Who are they?" They are none other than our own blood relations our own brothers and sisters"
We all know how well we lead our life!!! But do you all know how they lead their
Day to Day life?"Average of 7 Tamils die per day in those 60 years."WHAT WE ARE GOING TO DO FOR THEM ?WHAT IS OUR EACH AND EVERYONE\’S PART IN THEIR LIFE? IN WHAT WAY WE ARE GOING TO ASSIST THEM?
PLEASE FRIENDS THINK OF IT AND PLS SPEND YOUR VALUABLE TIME FOR WATCHING THIS PPT & SPREAD AWARENESS SO OTHER\’S CAN COME OUT WITH SOME GOOD IDEOLOGIES !PLS PLS PLS ! ! !
MUST WATCH PPT FOR ALL MY TAMIL FRIEND\'S & THOSE WHO ARE HUMANITY ARDENTER\'S
What had happened for past 60 years & now whats happening to them in srilanka ?
what for they are fighting ?How they are struggling ?Who are they?" They are none other than our own blood relations our own brothers and sisters"
We all know how well we lead our life!!! But do you all know how they lead their
Day to Day life?"Average of 7 Tamils die per day in those 60 years."WHAT WE ARE GOING TO DO FOR THEM ?WHAT IS OUR EACH AND EVERYONE\'S PART IN THEIR LIFE? IN WHAT WAY WE ARE GOING TO ASSIST THEM?
PLEASE FRIENDS THINK OF IT AND PLS SPEND YOUR VALUABLE TIME FOR WATCHING THIS PPT & SPREAD AWARENESS SO OTHER\'S CAN COME OUT WITH SOME GOOD IDEOLOGIES !PLS PLS PLS ! ! !
Chef is tool to automate infrastructure mainly used in cloud platform for provisioning, monitoring and managing complex infra.
Introductory part of chef.
SOCIALIZE YOUR SAP ERP THROUGH INTEGRATE D DIGITAL EXPERIENCE PLATFORMSAndrea Fontana
Maximize the value of your SAP ERP information by delivering integrated, social business context to your Digital Experience
platform users. Attend this session to understand the business value you can achieve as ERP managed processes are an
integral part of your digital experience solution. Learn how to technically interweave your SAP processes as an integral part of the community and surface the results in business context; bringing the information when and where your users need it. We'll outline technical best practices approaches used in customer deployments where WebSphere Portal and Connections become the dashboard where information managed by SAP is integrated and delivered in business context to Digital Experience users. Consider how you can achieve greater, more productive results for users through integrated SAP ERP, Digital Experience and Connections services.
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef
This talk is an exploration of how to build Chef Server 12 clusters with Chef Provisioning, including premium features like Chef Reporting and Chef Analytics. I will cover several new capabilities and tools in the Chef ecosystem that makes it easier than ever before to build and manage scalable Chef Server clusters.
https://youtu.be/HUQA1Ikm5Iw
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Chef
Part 2 of a 6 part series introducing you to the fundamentals of Chef.
This session includes:
* Node Setup
* Chef Resources and Recipes
After viewing this webinar you will be able to:
- Login to the node in your Chef Training Lab
- Install Chef nodes using "knife bootstrap"
- Explain how knife bootstrap configures a node to use the - Organization created in the previous section
- Explain the basic configuration needed to run chef-client
- Describe in detail what a cookbook is
- Create a new cookbook
- Explain what a recipe is
- Describe how to use the package, service, and template - resources
- Upload a cookbook to the Chef Server
- Explain what a run list is, and how to set it for a node - via knife
- Explain the output of a chef-client run
Video of this webinar can be found at the following URL
https://www.youtube.com/watch?v=S5lHUpzoCYo&list=PL11cZfNdwNyPnZA9D1MbVqldGuOWqbumZ
Slide links:
- https://lumberjack.rareloop.com
- https://docs.lumberjack.rareloop.com
- https://github.com/Rareloop/lumberjack-bedrock-installer
- https://github.com/Rareloop/lumberjack
- https://github.com/Rareloop/lumberjack-validation
- https://github.com/Rareloop/hatchet
- https://lizkeogh.com/2017/08/31/reflecting-reality/amp
- https://www.upstatement.com/timber
- https://roots.io/bedrock
- https://scotch.io/bar-talk/s-o-l-i-d-the-first-five-principles-of-object-oriented-design
- https://github.com/zendframework/zend-diactoros
- https://www.php-fig.org
- http://php-di.org
---
Often WordPress themes are not easy to change, maintain or fun to work on. This can rule WordPress out as a viable option for bespoke, non-trivial websites.
In this talk we’ll dive into how this happens & look at how we can benefit from software engineering techniques to help make your code easier to change. I’ll also show how using Lumberjack, a powerful MVC framework built on Timber, can be used to power-up your themes.
NGINX Can Do That? Test Drive Your Config File!Jeff Anderson
I have had countless conversations with developers, projects managers, and even executives that end up being about nginx and what it can do. Usually, the phrase "nginx can do that?" comes up. More often than not, the answer is YES. What happens though, is the nginx config file can get unwieldy. How can we assert that it will behave how it needs to over time? How can we avoid introducing inadvertent regressions?
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013Amazon Web Services
AWS OpsWorks lets you model your application with layers that define the building blocks of your application: load balancers, application servers, databases, etc. But did you know that you can also extend OpsWorks layers or build your own custom layers? Whether you need to perform a specific task or install a new software package, OpsWorks gives you the tools to install and configure your instances consistently, and evolve them in an automated and predictable fashion through your application’s lifecycle. We'll dive into the development process including how to use attributes, recipes, and lifecycle events; show how to develop your environment locally; and provide troubleshooting steps that reduce your development time.
How I Learned to Stop Worrying and Love the Cloud - Wesley Beary, Engine YardSV Ruby on Rails Meetup
Wesley Beary: Cloud computing scared the crap out of me - the quirks and nightmares
of provisioning computing and storage on AWS, Terremark, Rackspace,
etc - until I took the bull by the horns. Let me now show you how I
tamed that bull.
Learn how to easily get started cloud computing with fog. It gives you
the reins within any Ruby application or script. If you can control
your infrastructure choices, you can make better choices in
development and get what you need in production.
You'll get an overview of fog and concrete examples to give you a head
start on your own provisioning workflow.
Experinces and learning from early work with the new Opscode Chef pre-release 0.8 client and server. Using Opscode Knife to manage the chef-server.
Slides from the Jan 20, 2010 Bay Area Chef Meetup (http://www.meetup.com/The-Bay-Area-Chef-User-Group/calendar/12127576/)
A talk I gave at the recent Advanced AWS Meeup - this is a detailed guide to how I installed and set up Spinnaker to work with our infrastructure at Stitch Fix. I go over the various problems I ran into and how I solved them. I hope this can be useful for others setting up, or interested in setting up Spinnaker for their purposes.
**Big thanks to Armory for recording the talks! Video for this talk can be found here: https://youtu.be/ywzPblFpIE0 (I'm the second speaker)**
Similar to Cloud Automation with Opscode Chef (20)
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Cloud Automation with Opscode Chef
1. ← First steps with Chef (first-steps-with-chef.html)
More than one website → (more-than-one-website.html)
Getting started with Chef
By Andy Gale (http://andy-gale.com)
2. Introducing Chef Server
This chapter will extend on the building blocks of the previous chapter and introduce better ways of working
than just SSH and using Chef in a client and server model.
Chef client and server
As well as using Chef on a single box with chef-solo it is also possible to use Chef in a client/server model.
The Chef server stores and distributes our cookbooks and other Chef configuration when contacted by a
client running the chef-client command. The chef-client command is the client/server version of chef-solo.
Storing the configuration inside a Chef Server instead of inside a file like web.json as we did in the previous
chapter allows us to easily manage the configuration of our servers from our workstation instead. This has an
obvious advantage when dealing with a large number of servers and allows us to easily provision new servers
with knife.
Node
At this point it's prudent to introduce you to some Chef terminology. A computer, virtual machine or cloud
instance you are running chef-solo or chef-client on is called a node. This differs slightly from what Chef
calls a client. A client can also be your workstation that you don't run chef-client on but do use knife to
manage your Chef server with.
Workstation setup
Windows users! Sorry, Windows workstation instructions will be added to this chapter shortly.
We will now setup your workstation so you can edit you Chef recipes in your favourite text editor.
Install curl if it is not already installed. Then install Chef.
Install Chef
Sponsored by Brightbox
(http://brightbox.com/)
Chapters
Introducing Chef Server - Getting started with Chef 1 of 16
1 03/17/2015 10:40 PM
2. $ curl -L https://www.opscode.com/chef/install.sh | sudo bash
Thank you for installing Chef!
Save some typing by adding the various Chef commands to your $PATH.
$ echo 'export PATH="/opt/chef/embedded/bin:$PATH"' >> ~/.bash_profile && source ~/.bash_profile
Hosted Chef
Opscode, the makers of Chef, provide a service called Hosted Chef (http://www.opscode.com/hosted-chef/)
which is a Chef Server as a service. They offer a free tier which is good for 5 nodes so is ideal to help us get
started.
Follow the instructions to sign up on the website and log in.
Now we've signed up we will download some files that will allow us to use our Hosted Chef account with knife.
Visit https://manage.opscode.com/organizations (https://manage.opscode.com/organizations).
Click the Generate knife config link. Download the knife.rb file that is generated.
Then click the Regenerate validation key link. Press OK to the alert and download the .pem file.
Now visit https://www.opscode.com/account/password (https://www.opscode.com/account/password).
Introducing Chef Server - Getting started with Chef 2 of 16
2 03/17/2015 10:40 PM
3. Press the Get a new key button and download the .pem file.
Using Hosted Chef
We'll now use Hosted Chef along with the chef repository we made in the previous chapter. Firstly, let's
download our chef repository.
$ wget http://gettingstartedwithchef.com/downloads/cp1.tgz
--2013-06-09 13:36:15-- http://gettingstartedwithchef.com/downloads/cp1.tgz
Resolving gettingstartedwithchef.com (gettingstartedwithchef.com)... 80.68.93.116
Connecting to gettingstartedwithchef.com (gettingstartedwithchef.com)|80.68.93.116|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 300046 (293K) [text/plain]
Saving to: ‘cp1.tgz’
100%[===============================================================================>] 300,046 1.7
8MB/s in 0.2s
2013-06-09 13:36:15 (1.78 MB/s) - ‘cp1.tgz’ saved [300046/300046]
$ tar zxf cp1.tgz
$ cd chef-repo
We now have everything we need, so let's start using Hosted Chef. Firstly, we need to tell knife to use Hosted
Chef. To do this we need to copy the files we just downloaded from Hosted Chef to our repository.
$ mv ~/Downloads/*.pem .chef/
$ mv ~/Downloads/knife.rb .chef/
Let's check that knife can talk to Hosted Chef.
$ knife client list
org_name-validator
Introducing Chef Server - Getting started with Chef 3 of 16
3 03/17/2015 10:40 PM
4. "org_name" will be whatever you entered as your organisation name when signing up for Hosted Chef.
Uploading Cookbooks
Before we can configure our node with chef-client, we need to upload our cookbooks to the Chef server. We
do that with knife.
$ knife cookbook upload --all
Uploading apache2 [1.6.0]
Uploading apt [1.9.0]
Uploading aws [0.100.6]
Uploading build-essential [1.3.4]
Uploading chef_handler [1.1.4]
Uploading database [1.3.12]
Uploading iis [1.6.6]
Uploading mysql [2.1.2]
Uploading openssl [1.0.2]
Uploading php [1.1.8]
Uploading phpapp [0.1.0]
Uploading postgresql [2.2.2]
Uploading powershell [1.1.2]
Uploading windows [1.12.4]
Uploading xfs [1.1.0]
Uploading xml [1.2.0]
Uploading yum [3.0.4]
Uploading yum-epel [0.2.0]
Uploaded all cookbooks.
Roles
We used a single JSON file to configure our node with chef-solo but what if we have multiple nodes? We
should probably find a better solution to this. A Chef role allows us to group configuration for types of nodes
together. We'll expand on this in a later chapter but for now we'll create a role for our WordPress setup.
$ knife role create phpapp
You may receive the following error if you do not have an EDITOR environment variable set.
ERROR: RuntimeError: Please set EDITOR environment variable
You can resolve this quickly with the --editor option. e.g. --editor vi or --editor nano etc.
We are then presented with the basic structure of the role as a JSON file.
Introducing Chef Server - Getting started with Chef 4 of 16
4 03/17/2015 10:40 PM
5. {
"name": "phpapp",
"description": "",
"json_class": "Chef::Role",
"default_attributes": {
},
"override_attributes": {
},
"chef_type": "role",
"run_list": [
],
"env_run_lists": {
}
}
We'll go through what the fields actually mean. The name you can probably guess - the name of the role. It's
a good idea to put something descriptive in the description field. You may remember that we discussed
attributes in the last chapter, default_attributes allows us to set attributes and override_attributes lets us
specify attributes that override attributes defined as defaults elsewhere. We've already created a run_list in
our JSON file in the last chapter so let's add that first. It's safe to ignore the fields that have not been
mentioned for now.
{
"name": "phpapp",
"description": "",
"json_class": "Chef::Role",
"default_attributes": {
},
"override_attributes": {
},
"chef_type": "role",
"run_list": [
"recipe[apt]", "recipe[phpapp]"
],
"env_run_lists": {
}
}
Enter our run list, highlighted in green. We should now specify some attributes. We don't need to specify the
attributes for the mysql cookbook as it creates secure random passwords automatically in chef-client mode.
Our phpapp cookbook requires us to specify a password attribute so let's add that to default_attributes.
Introducing Chef Server - Getting started with Chef 5 of 16
5 03/17/2015 10:40 PM
6. {
"name": "phpapp",
"description": "",
"json_class": "Chef::Role",
"default_attributes": {
"phpapp": {"db_password": "212b09752d173876a84d374333ae1ffe"}
},
"override_attributes": {
},
"chef_type": "role",
"run_list": [
"recipe[apt]", "recipe[phpapp]"
],
"env_run_lists": {
}
}
Add the code in green above. Save the file. The role will be uploaded to Hosted Chef and knife will display the
following message.
Created role[phpapp]
Let's confirm the role is on the server.
$ knife role list
phpapp
Finally, we should download the role from the server and place it into our roles directory for safe keeping.
$ knife role show phpapp -d -Fjson > roles/phpapp.json
Having the file in our chef repository allows us to edit the role at our leisure and check it into version control
systems such as Git, something we'll get to in a later chapter. We can upload the file to Hosted Chef again
using the following command.
$ knife role from file roles/phpapp.json
Updated Role phpapp!
We're now ready to bootstrap our new node with knife.
Bootstrapping a node with Knife
Now use your cloud control panel or your virtual machine software to create a new Ubuntu box.
If you are using a new Rackspace Cloud instance replace "password" with the root password and
"hostname" with it's hostname or IP address and run the following command.
Introducing Chef Server - Getting started with Chef 6 of 16
6 03/17/2015 10:40 PM
7. $ knife bootstrap --run-list "role[phpapp]" --json-attributes "{"phpapp": {"server_name": "intro.
hellofutu.re"}}" --ssh-user root --ssh-password password hostname
Otherwise the knife bootstrap command you need will be specific to your setup. To use a ssh key and sudo
before executing the bootstrap you might use the following command, replacing hostname with the hostname
or IP address of the machine you intend to bootstrap. You can find more details of the options knife bootstrap
(http://docs.opscode.com/knife_bootstrap.html) accepts in the documentation.
$ knife bootstrap --run-list "role[phpapp]" --json-attributes "{"phpapp": {"server_name": "intro.
hellofutu.re"}}" --sudo hostname
You'll see some output along these lines.
Bootstrapping Chef on intro.hellofutu.re
..
intro.hellofutu.re
intro.hellofutu.re Chef Client finished, 61 resources updated
intro.hellofutu.re
And if you visit your new node in your web browser you'll see the following.
Introducing Chef Server - Getting started with Chef 7 of 16
7 03/17/2015 10:40 PM
8. That's fairly impressive I'm sure you'll agree! But it gets better. We can use knife to create the cloud instances
for us as well!
Creating cloud instances with Knife
Knife plugins extend its functionality and make knife even more useful! Amongst other things, knife plugins
allow us to automatically create cloud instances before we bootstrap them. You can view the full list of official
knife plugins over at docs.opscode.com (http://docs.opscode.com/plugin_knife.html).
Brightbox
Brightbox are a UK based cloud provider. You can sign up with them here (https://manage.brightbox.com
/signup).
$ sudo /opt/chef/embedded/bin/gem install knife-brightbox
...
Successfully installed knife-brightbox-0.3.0
Now we need to set some details in .chef/knife.rb (which is inside your Chef Repository). Open it up in your
favourite text editor.
Introducing Chef Server - Getting started with Chef 8 of 16
8 03/17/2015 10:40 PM
9. knife[:brightbox_client_id] = "xxx-xxxxx"
knife[:brightbox_secret] = "xxxxxxxxxxxxxxx"
Add the code in green but enter your API client id and secret which you can obtain from your Brightbox
account settings page.
Save the file.
We can test to see if that's worked using the following command.
$ knife brightbox flavor list
ID Name Handle Architecture RAM Disk Cores
typ-4nssg High IO Nano nano.high-io 0-bit 512 MB 20 GB 2
typ-c8awf Standard Nano nano 0-bit 512 MB 20 GB 1
typ-b1gmb Standard Mini mini 0-bit 1024 MB 40 GB 2
typ-iqisj High IO Mini mini.high-io 0-bit 1024 MB 40 GB 4
typ-urtky High IO Small small.high-io 0-bit 2048 MB 80 GB 4
typ-8fych Standard Small small 0-bit 2048 MB 80 GB 2
typ-qdiwq High IO Medium medium.high-io 0-bit 4096 MB 160 GB 8
typ-1j0zf Standard Medium medium 0-bit 4096 MB 160 GB 4
typ-mlbt7 High IO Large large.high-io 0-bit 8192 MB 320 GB 8
typ-1e0xr Standard Large large 0-bit 8192 MB 320 GB 4
typ-wdicw High IO XL xl.high-io 0-bit 16384 MB 640 GB 8
typ-a4aqc Standard XL xl 0-bit 16384 MB 640 GB 4
typ-lr76m High IO XXL xxl.high-io 0-bit 32768 MB 1280 GB 8
typ-vs01b Standard XXL xxl 0-bit 32768 MB 1280 GB 4
We can get a list of images (operating systems) with the following command.
$ knife brightbox image list
ID Name Status
img-t3xyp Blank Disk Image public
img-r726y FreeBSD 9.0 minimal public
img-hnigl Windows 2008 Server R2 public
img-g8ia6 ubuntu-raring-13.04-amd64-server public
img-u3ttt ubuntu-raring-13.04-i386-server public
img-6isnq ubuntu-raring-daily-amd64-server public
img-rttkx ubuntu-raring-daily-i386-server public
img-nhjvo ubuntu-saucy-daily-amd64-server public
img-q1ts8 ubuntu-saucy-daily-i386-server public
So let's provision and bootstrap a cloud instance with Brightbox.
Heads up! Before you can bootstrap with Brightbox you need to enter your SSH public key in the
dashboard.
We'll use the flavor "typ-c8awf" and the Ubuntu 13.04 image "img-g8ia6".
Introducing Chef Server - Getting started with Chef 9 of 16
9 03/17/2015 10:40 PM
10. $ knife brightbox server create --flavor typ-c8awf --image img-g8ia6 --run-list "role[phpapp]" --distr
o chef-full
After a while we'll see the following result.
xxx.xxx.xx.xx Chef Client finished, 73 resources updated
xxx.xxx.xx.xx
Instance ID: srv-5ple0
Name:
Flavor: typ-c8awf
Image: ubuntu-raring-13.04-amd64-server
Public IP Address: 109.107.35.66
Private IP Address: 10.242.34.174
Environment: _default
Run List: role[phpapp]
Visit the Public IP Address in your browser and you'll see the WordPress install page.
Rackspace Cloud
We'll start by creating a Rackspace Cloud instance. First we need to install the knife-rackspace plugin.
$ sudo /opt/chef/embedded/bin/gem install knife-rackspace
...
Successfully installed knife-rackspace-0.7.0
Now we need to set some details in .chef/knife.rb (which is inside your Chef Repository). Open it up in your
favourite text editor.
knife[:rackspace_api_username] = "testorg"
knife[:rackspace_api_key] = "APIKEY"
Add the green lines above. Remember to replace testorg and APIKEY with your Rackspace username and
API key.
If you don't live in America you will need to specify an alternative authentication URL. Below is an example for
the UK. Valid regions are: "dfw" "ord" "lon" and "syd".
knife[:rackspace_api_username] = "testorg"
knife[:rackspace_api_key] = "APIKEY"
knife[:rackspace_auth_url] = "https://lon.identity.api.rackspacecloud.com/v2.0"
Save knife.rb. We can test to see if that's worked using the following command.
Introducing Chef Server - Getting started with Chef 10 of 16
10 03/17/2015 10:40 PM
11. $ knife rackspace flavor list
ID Name VCPUs RAM Disk
2 512MB Standard Instance 1 512 20 GB
3 1GB Standard Instance 1 1024 40 GB
4 2GB Standard Instance 2 2048 80 GB
5 4GB Standard Instance 2 4096 160 GB
6 8GB Standard Instance 4 8192 320 GB
7 15GB Standard Instance 6 15360 620 GB
8 30GB Standard Instance 8 30720 1200 GB
We can get a list of available images (operating systems) with the following command.
$ knife rackspace image list
ID Name
32b7d027-8a40-458b-9e73-bd719d660df6 Arch 2013.6
e0ed4adb-3a00-433e-a0ac-a51f1bc1ea3d CentOS 6.4
81877a6e-9e87-4b1f-93f3-b176e25f3c4a Debian 7 (Wheezy)
f3a23d0a-de1b-4eb7-994f-5f0de9d8d7a0 Fedora 19 (Schrodinger's Cat)
ccaf99bc-472a-46ea-a125-d3ecfca66695 FreeBSD 9.1
bb8c27f9-f3cf-4606-9a88-8a2123e02290 Gentoo 13.2
8958846f-679b-454e-9232-20d3792fc5d7 OpenSUSE 12.3
16e6c0ae-f881-4180-95b0-3450fe3f8e96 Red Hat Enterprise Linux 6.4
23cebbc9-3219-4a27-9210-d63e1af7181b Ubuntu 13.04 (Raring Ringtail)
48df4181-040e-4821-8723-d9e4ba908d2f Windows Server 2008 R2 SP1
We can now provision and bootstrap a server with the following command. From the commands above we
know we want a flavor of "2" and the Ubuntu 13.04 image which is catchily entitled
"23cebbc9-3219-4a27-9210-d63e1af7181b".
$ knife rackspace server create --flavor 2 --image 23cebbc9-3219-4a27-9210-d63e1af7181b --run-list "ro
le[phpapp]"
...
After a while your instance will be created, bootstrapped and Chef will be run and something similar to below
will be displayed.
Introducing Chef Server - Getting started with Chef 11 of 16
11 03/17/2015 10:40 PM
12. 192.168.9.199 Chef Client finished, 61 resources updated
192.168.9.199
Instance ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Host ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Name: rs-xxxxxxxxxxxxxxxxx
Flavor: 512MB Standard Instance
Image: Ubuntu 13.04 (Raring Ringtail)
Metadata: []
Public DNS Name: 192-168-9-199.static.cloud-ips.com
Public IP Address: 192.168.9.199
Private IP Address: 10.9.3.199
Password: xxxxxxxxxxxx
Environment: _default
Run List: role[phpapp]
Visit the Public IP Address in your browser and you will once again see the WordPress install page.
We can even use knife to clean up our servers. Get a list of servers with the following command.
$ knife rackspace server list
Instance ID Name Public IP Private IP Flavor Image State
xxxxxxxx rs-x 192.168.9.199 10.9.1.199 2 23cebbc9-3219-4a27-9210-d63e1af7181b active
We can delete the server we just created with the following command. We also need to remove references to
the server from our Hosted Chef account. We do this with the --purge option. Replace INSTANCE_ID with the
value under Instance ID from the server list command above.
$ knife rackspace server delete --purge INSTANCE_ID
Instance ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Host ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Name: rs-xxxxxxxxxxxxxxxxx
Flavor: 512MB Standard Instance
Image: Ubuntu 13.04 (Raring Ringtail)
Public IP Address: 192.168.9.199
Private IP Address: 10.9.1.199
Do you really want to delete this server? (Y/N) y
WARNING: Deleted server xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
WARNING: Deleted node rs-xxxxxxxxxxxxxxxxx
WARNING: Deleted client rs-xxxxxxxxxxxxxxxxx
Amazon Cloud
We can also use knife to bootstrap Amazon EC2 instances. First install the plugin.
Introducing Chef Server - Getting started with Chef 12 of 16
12 03/17/2015 10:40 PM
13. $ sudo /opt/chef/embedded/bin/gem install knife-ec2
...
Successfully installed knife-ec2-0.6.4
You need to obtain the following information for your Amazon AWS account. It can all be found or set-up
inside the Amazon AWS console.
access key id
secret access key
name of the ssh key you want to use
an Ubuntu 12.04 or 13.04 AMI
the AWS region you want to use
the name of a security group that allows SSH and web access
We should now configure knife with those details. Open .chef/knife.rb.
knife[:aws_access_key_id] = "XXXXXXXXXXXXXXXXXXXX"
knife[:aws_secret_access_key] = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
knife[:aws_ssh_key_id] = "sshkey"
Add the lines in green, entering your access key id, secret access key and ssh key name without .pem. Save
the file.
We can now access a list of cloud instances with the following command. Cloud servers will be listed whether
they have been created with knife or not.
$ knife ec2 server list
Instance ID Name Public IP Private IP Flavor Image SSH Key Security Groups State
I have no servers listed. This is because my servers reside in the region eu-west-1. We can specify a region
by using the option --region.
$ knife ec2 server list --region eu-west1
Instance ID Name Public IP Private IP Flavor Image SSH Key Security Groups State
i-xxxxxxxx serr01 x.x.x.x x.x.x.x m1.small ami-3d160149 sshkey www, default running
I can use knife to provision and bootstrap a cloud instance with the following command.
$ knife ec2 server create --run-list "role[phpapp]" -I ami-3d160149 --region eu-west-1 -G www,default
-x ubuntu --node-name server01 --identity-file ~/.ssh/sshkey.pem
...
After a while we'll see the following result.
Introducing Chef Server - Getting started with Chef 13 of 16
13 03/17/2015 10:40 PM
14. ec2-x-x-x-x.eu-west-1.compute.amazonaws.com Chef Client finished, 57 resources updated
ec2-x-x-x-x.eu-west-1.compute.amazonaws.com
Instance ID: i-xxxxxxxx
Flavor: m1.small
Image: ami-3d160149
Region: eu-west-1
Availability Zone: eu-west-1a
Security Groups: www, default
Security Group Ids: default
Tags: {"Name"=>"server01"}
SSH Key: sshkey
Root Device Type: ebs
Root Volume ID: vol-xxxxxxxx
Root Device Name: /dev/sda1
Root Device Delete on Terminate: true
Public DNS Name: ec2-x-x-x-x.eu-west-1.compute.amazonaws.com
Public IP Address: x.x.x.x
Private DNS Name: ip-x-x-x-x.eu-west-1.compute.internal
Private IP Address: x.x.x.x
Environment: _default
Run List: role[phpapp]
Visit the Public DNS Name in your browser and you'll see the WordPress install page.
You can also delete instances you no longer need with knife. Using the instance ID from the output of the
server create command above, we can delete the instance we just made using the following command.
$ knife ec2 server delete --purge --region eu-west-1 i-xxxxxxxx --node-name server01
Instance ID: i-xxxxxxxx
Flavor: m1.small
Image: ami-xxxxxxxx
Region: eu-west-1
Availability Zone: eu-west-1a
SSH Key: sshkey
Root Device Type: ebs
Do you really want to delete this server? (Y/N) y
WARNING: Deleted server i-xxxxxxxx
WARNING: Deleted node server01
WARNING: Deleted client server01
The command used some extra options, here's why:
--purge
ensures the server is also deleted from our Hosted Chef account
--node-name
required when using --purge if the server name is different from the instance ID
--region
Introducing Chef Server - Getting started with Chef 14 of 16
14 03/17/2015 10:40 PM
16. 08378526
Created with Twitter Bootstrap (http://twitter.github.com/bootstrap/) and Bootswatch Cerulean.
(http://bootswatch.com/cerulean/)
Introducing Chef Server - Getting started with Chef 16 of 16
16 03/17/2015 10:40 PM