Welcome!

@DevOpsSummit Authors: Kelly Burford, Automic Blog, Derek Weeks, Liz McMillan, Elizabeth White

Related Topics: @DevOpsSummit, Microservices Expo, @CloudExpo

@DevOpsSummit: Blog Feed Post

Declarative vs. Imperative Models By @ScriptRock | @DevOpsSummit [#DevOps]

DevOps has converged on several prominent themes including continuous software delivery, automation, & configuration management

Declarative vs. Imperative Models for Configuration Management: Which Is Really Better?

As a group of concepts, DevOps has converged on several prominent themes including continuous software delivery, automation, and configuration management (CM). These integral pieces often form the pillars of an organization’s DevOps efforts, even as other bigger pieces like overarching best practices and guidelines are still being tried and tested. Being that DevOps is a relatively new paradigm - movement - methodology - [insert your own label here], standards around it have yet to be codified and set in stone. Organizations are left to identify tools and approaches most suitable for their use cases, and will either swear by or disparage them depending on their level of success.

In terms of CM, it's a given that one particular methodology may work for a company but not for another. However, seldom do differing approaches generate as much dissent as the declarative and imperative models for CM. The recurring debate over which is superior has garnered staunch supporters on both sides and warrants a closer inspection.

Defining Declarative and Imperative Models
Differences between the declarative and imperative models can be summed up in one sentence: imperative focuses on how and declarative focuses on what. In a software engineering context, declarative programming means writing code to describe what the program should do as opposed to how it should do it. One describes what needs to happen; the minutiae for making it so are left to the system. In contrast, imperative programming involves writing code that follows explicit steps to solving a problem, completing a task, or achieving a desired result. It's telling the system specifically how to do something with the expectation that the desired outcome will result.

An example of imperative vs. declarative code. Image courtesy of Puppet Labs.

Imperative/declarative constructs also carry over to IT domains such as CM. In fact, a particular CM tool's approach is greatly influenced by the underlying language upon which it was built (which is in turn either imperative or declarative by nature).

The following is a list of prominent offerings and their respective approaches to CM:

Declarative Imperative
X
X
X
X X
X X

Puppet, for instance, is declarative: the sysadmin describes a desired end state and the tool attempts to reach it. Its domain-specific-language (DSL) is used for creating high-level descriptions of desired server state, as opposed to instructions and actions to be carried out. Manifests-- Puppet files that contain configuration information-- can be used any number of times to achieve the same results. If the desired end state has already been reached, Puppet simply ignores the item in question. Users need only worry about the desired end state of the system to be configured, not the sequence of steps required to get there.

Here's an example of a Puppet Manifest resource declaration:

This entry describes an end state containing a file called /tmp/test123 with the contents "This is a test". If a matching file (and contents) is found on the target system, Puppet assumes the desired end state has already been reached. Subsequently, one doesn't need to worry about the Manifest executing this piece numerous times.

In contrast, Chef (Puppet's arch-nemesis) is imperative. Users define commands and their execution order in configuration instructions called Recipes, which can in turn be organized into Cookbooks for easier management.

Take a look at the following Chef Recipe:

This Recipe checks for JDK 7 on the target node-- if it exists, Chef will install OpenJDK 7. If not, a warning is raised. Note that Chef Recipes are structured as sequential lists of commands, as opposed to Puppet Manifests, which only contain descriptions of desired end states.

A growing trend among CM vendors is to make their offerings open to either model, thereby winning the hearts of both camps. Even tools like Chef that are primarily imperative in nature can be set up in a declarative manner:

In contrast to the previous example, the above Recipe describes a desired end state as opposed to listing a series of commands to be executed.

Sizing Up The Big Boys: How Does Puppet Compare to Chef?

So which model is better for CM? To address this question one needs to qualify for who and what. Also-- given the current buzz level and adoption rate of DevOps, it's no surprise that pundits are progressing in sophistication: conversations around DevOps have evolved from what it is to how to do it. And how to do it depends on who you're asking.

Let's therefore analyze the debate from three perspectives: that of a programmer, sysadmin, and full stack developer.


Passionate about writing efficient, structured, and easy-to-understand code, the programmer isn't the biggest fan of declarative models that employ unwieldy abstractions. He's accustomed to dictating how things should happen with for loops, conditional statements, variables, and the like. The business logic of the software he works on is mostly imperative in nature.

Best Fit: Imperative CM tools like Chef


The sysadmin likes to run a tight shop, and for good reason: if infrastructure goes down, the company screeches to a halt. He's a Bash wizard, proficient in Python and Perl, and prefers using them over learning new languages like Ruby. He prefers the declarative over the imperative model, but is cognizant of the challenges the former has in managing dynamic cloud infrastructures.

Best Fit: Hybrid CM tools like Ansible, or SaltStack


The full stack developer can traverse the stack with ease and loves the idea of abstracting infrastructure to code. A Ruby/RoR ninja, she's a fan of both Chef and Puppet. She can appreciate the merits of each model; to her, either type of tool makes her job of continuously building and releasing quality software faster, more efficient, and less error-prone.

Best Fit: Either model. Puppet, Chef, and SaltStack are viable options.


Note that our programmer could just as likely be a Python pro and thus highly proficient with Ansible (whose modules are written in Python). Whatever the case, matching an organization's IT skills makeup to the appropriate model/tool is a pragmatic approach for determining which is more suitable. If a firm is into traditional software development with programmers at the helm, an imperative tool might be the best fit. A fast-moving SaaS on a schedule of continuous rollouts will appreciate the flexibility and scalability of a well-implemented declarative CM solution. A shop that swears on Ruby and has the expertise to boot may choose to "cook" with certain tools, overriding the model debate entirely.

A key point to remember is that both declarative and imperative models are fallible: the former requires trusting that desired states have been reached (with little means of verification), while the latter requires complicated troubleshooting when things go awry. Both models can be problematic in certain edge scenarios; subsequently, no individual tool should be implemented as the be-all and end-all for CM, regardless of which approach has been adopted. The chosen solution should instead comprise only part of the CM toolchain, with another rounding it out as an overwatch, making sure all CM and automation tools are performing as expected.

GuardRail serves this purpose: by providing total systems visibility through robust scanning, monitoring, and comparison capabilities, our platform bridges the crucial gap between expecting your systems/environment to be a certain way and actually verifying that it meets those expectations.

Try GuardRail for Free

In short, competing vendors vying for mind and market share will passionately champion their offering's respective approach. Though debates around declarative/imperative models take on new levels of intensity and fervor in commercial CM arena, the truth is that many tools possess qualities from both-- albeit they may be based more heavily in one mode. Therefore it's perhaps more useful to think of the declarative and imperative models as a spectrum of possibilities with respective solutions falling closer to either end.

Source(s):

http://searchdatacenter.techtarget.com/news/2240187079/Declarative-vs-imperative-The-DevOps-automation-debate

http://sharknet.us/2014/02/15/automated-configuration-management-language-choice/

http://devops.com/features/approaches-to-application-release-automation/

http://networkenhancers.blogspot.com/2014/10/what-is-difference-between-declarative.html

http://cloudn1n3.blogspot.com/2014/11/from-devops-to-puppet-part-2.html

http://www.laurencegellert.com/2012/08/what-is-a-full-stack-developer/

https://ifireball.wordpress.com/2015/01/03/comparison-of-puppet-and-ansible/

http://docs.saltstack.com/en/latest/ref/states/ordering.html

Read the original blog entry...

More Stories By ScriptRock Blog

ScriptRock makes GuardRail, a DevOps-ready platform for configuration monitoring.

Realizing we were spending way too much time digging up, cataloguing, and tracking machine configurations, we began writing our own scripts and tools to handle what is normally an enormous chore. Then we took the concept a step further, giving it a beautiful interface and making it simple enough for our bosses to understand. We named it GuardRail after its function — to allow businesses to move fast and stay safe.

GuardRail scans and tracks much more than just servers in a datacenter. It works with network hardware, Cloud service providers, CloudFlare, Android devices, infrastructure, and more.

@DevOpsSummit Stories
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering management. To date, IBM has launched more than 50 cloud data centers that span the globe. He has been building advanced technology, delivering “as a service” solutions, and managing infrastructure services for the past 20 years.
The past few years have brought a sea change in the way applications are architected, developed, and consumed—increasing both the complexity of testing and the business impact of software failures. How can software testing professionals keep pace with modern application delivery, given the trends that impact both architectures (cloud, microservices, and APIs) and processes (DevOps, agile, and continuous delivery)? This is where continuous testing comes in. D
Modern software design has fundamentally changed how we manage applications, causing many to turn to containers as the new virtual machine for resource management. As container adoption grows beyond stateless applications to stateful workloads, the need for persistent storage is foundational - something customers routinely cite as a top pain point. In his session at @DevOpsSummit at 21st Cloud Expo, Bill Borsari, Head of Systems Engineering at Datera, explored how organizations can reap the benefits of the cloud without losing performance as containers become the new paradigm.
Digital transformation is about embracing digital technologies into a company's culture to better connect with its customers, automate processes, create better tools, enter new markets, etc. Such a transformation requires continuous orchestration across teams and an environment based on open collaboration and daily experiments. In his session at 21st Cloud Expo, Alex Casalboni, Technical (Cloud) Evangelist at Cloud Academy, explored and discussed the most urgent unsolved challenges to achieve full cloud literacy in the enterprise world.
The 22nd International Cloud Expo | 1st DXWorld Expo has announced that its Call for Papers is open. Cloud Expo | DXWorld Expo, to be held June 5-7, 2018, at the Javits Center in New York, NY, brings together Cloud Computing, Digital Transformation, Big Data, Internet of Things, DevOps, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportunity. Submit your speaking proposal today!
In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). According to the survey, a quarter of the respondents have already deployed Docker containers and nearly as many (23 percent) are employing the AWS Lambda serverless computing framework. It’s clear: serverless is here to stay. The adoption does come with some needed changes, within both application development and operations. That means serverless is also changing the way we leverage public clouds. Truth-be-told, many enterprise IT shops were so happy to get out of the management of physical servers within a data center that many limitations of the existing public IaaS clouds were forgiven. However, now that we’ve lived a few years with public IaaS clouds, developers and CloudOps pros are giving a huge thumbs down to the ...
Kubernetes is an open source system for automating deployment, scaling, and management of containerized applications. Kubernetes was originally built by Google, leveraging years of experience with managing container workloads, and is now a Cloud Native Compute Foundation (CNCF) project. Kubernetes has been widely adopted by the community, supported on all major public and private cloud providers, and is gaining rapid adoption in enterprises. However, Kubernetes may seem intimidating and complex to learn. This is because Kubernetes is more of a toolset than a ready solution. Hence it’s essential to know when and how to apply the appropriate Kubernetes constructs.
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterprises are using some form of XaaS – software, platform, and infrastructure as a service.
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterprises are using some form of XaaS – software, platform, and infrastructure as a service.
DevOps at Cloud Expo – being held June 5-7, 2018, at the Javits Center in New York, NY – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real results. Among the proven benefits, DevOps is correlated with 20% faster time-to-market, 22% improvement in quality, and 18% reduction in dev and ops costs, according to research firm Vanson-Bourne. It is changing the way IT works, how businesses interact with customers, and how organizations are buying, building, and delivering software.
All clouds are not equal. To succeed in a DevOps context, organizations should plan to develop/deploy apps across a choice of on-premise and public clouds simultaneously depending on the business needs. This is where the concept of the Lean Cloud comes in - resting on the idea that you often need to relocate your app modules over their life cycles for both innovation and operational efficiency in the cloud.
@DevOpsSummit at Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, is co-located with 22nd Cloud Expo | 1st DXWorld Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait for long development cycles that produce software that is obsolete at launch. DevOps may be disruptive, but it is essential.
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive over the long term. A total of 88% of Fortune 500 companies from a generation ago are now out of business. Only 12% still survive. Similar percentages are found throughout enterprises of all sizes.
SYS-CON Events announced today that T-Mobile exhibited at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. As America's Un-carrier, T-Mobile US, Inc., is redefining the way consumers and businesses buy wireless services through leading product and service innovation. The Company's advanced nationwide 4G LTE network delivers outstanding wireless experiences to 67.4 million customers who are unwilling to compromise on quality and value. Based in Bellevue, Washington, T-Mobile US provides services through its subsidiaries and operates its flagship brands, T-Mobile and MetroPCS. For more information, visit https://www.t-mobile.com.
SYS-CON Events announced today that Cedexis will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Cedexis is the leader in data-driven enterprise global traffic management. Whether optimizing traffic through datacenters, clouds, CDNs, or any combination, Cedexis solutions drive quality and cost-effectiveness. For more information, please visit https://www.cedexis.com.
SYS-CON Events announced today that Google Cloud has been named “Keynote Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Companies come to Google Cloud to transform their businesses. Google Cloud’s comprehensive portfolio – from infrastructure to apps to devices – helps enterprises innovate faster, scale smarter, stay secure, and do more with data than ever before.
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In their session at 21st Cloud Expo, Jenny Hung, E2E Engineer Manager at Yahoo Gemini, Haoran Zhao, Software Engineer at Oath Gemini, and Lin Zhang, Software Engineer at Oath (Yahoo), will describe the technical challenges and the principles we followed to build a reliable and scalable test automation infrastructure across desktops, mobile apps, and mobile web platforms on the cloud. We also share some...
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm. In their Day 3 Keynote at 20th Cloud Expo, Chris Brown, a Solutions Marketing Manager at Nutanix, and Mark Lavi, a Nutanix DevOps Solution Architect, explored the ways that Nutanix technologies empower teams to react faster than ever before and connect teams in ways that were either too complex or simply impossible with traditional infrastructures.
SYS-CON Events announced today that Vivint to exhibit at SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California. As a leading smart home technology provider, Vivint offers home security, energy management, home automation, local cloud storage, and high-speed Internet solutions to more than one million customers throughout the United States and Canada. The end result is a smart home solution that saves you time and money and ultimately simplifies your life.
SYS-CON Events announced today that Opsani will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Opsani is the leading provider of deployment automation systems for running and scaling traditional enterprise applications on container infrastructure.
Every few years, a disruptive force comes along that prompts us to reframe our understanding of what something means, or how it works. For years, the notion of what a computer is and how you make one went pretty much unchallenged. Then virtualization came along, followed by cloud computing, and most recently containers. Suddenly the old rules no longer seemed to apply, or at least they didn’t always apply. These disruptors made us reconsider our IT worldview.
SYS-CON Events announced today that Nirmata will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Nirmata provides a comprehensive platform, for deploying, operating, and optimizing containerized applications across clouds, powered by Kubernetes. Nirmata empowers enterprise DevOps teams by fully automating the complex operations and management of application containers and its underlying resources. Nirmata not only simplifies deployment and management of Kubernetes clusters but also facilitates delivery and operations of applications by continuously monitoring the application and infrastructure for changes, and auto-tuning the application based on pre-defined policies. Using Nirmata, enterprises can accelerate their journey towards becoming cloud-native.
SYS-CON Events announced today that Opsani to exhibit at SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California. Opsani is creating the next generation of automated continuous deployment tools designed specifically for containers. How is continuous deployment different from continuous integration and continuous delivery? CI/CD tools provide build and test. Continuous Deployment is the means by which qualified changes in software code or architecture are automatically deployed to production as soon as they are ready. Adding continuous deployment to your toolchain is the final step to providing push button deployment for your developers.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, will discuss how from store operations and optimization to employee training and insights, all ultimately create the best customer experience both online and in-store.
The next XaaS is CICDaaS. Why? Because CICD saves developers a huge amount of time. CD is an especially great option for projects that require multiple and frequent contributions to be integrated. But… securing CICD best practices is an emerging, essential, yet little understood practice for DevOps teams and their Cloud Service Providers. The only way to get CICD to work in a highly secure environment takes collaboration, patience and persistence. Building CICD in the cloud requires rigorous architectural and coordination work to minimize the volatility of the cloud environment and leverage the security features of the cloud to the benefit of the CICD pipeline.