How Armory Makes Spinnaker Better
Tags: devops
Published: 2021-09-09 14:59:25

## Introduction

Successful teams innovate often and deliver frequently. But because they move so fast, one of their challenges is ensuring that the rapid pace of releases doesn’t break their product. As more and more features are added, the risk of broken releases increases. 

As a solution, DevOps teams often look to [Spinnaker](https://spinnaker.io/)—an open source deployment tool that helps teams to deploy quickly and consistently. But there’s an even more powerful solution available. [Armory](https://www.armory.io/)—which is built on top of Spinnaker—gives teams all the benefits of Spinnaker, but adds mission-critical feature extensions and enterprise-grade stability.

In this article, we'll see how Armory's enhancement of Spinnaker ensures that modern applications can be deployed safely.


## Application Deployment Struggles

The first challenge to achieving a successful product rollout is understanding that unit, integration, and performance tests in isolated environments don’t always guarantee a successful release—and won’t completely prevent unforeseen issues in production. Issues can _still_ occur due to reasons such as:



* Real-life user interactions and transactions can’t be emulated precisely in isolated environments, resulting in edge cases being missed in production.
* Third-party client applications that integrate with the developed API often can’t be tested for functionality and performance.
* Small—but critical—differences between the testing and production environments, such as IP addresses, configuration settings, firewall rules, and more can cause the application to fail.

Over time, robust deployment patterns have evolved to provide a safe way to address these above challenges. These include deployment models like blue-green, rolling, and canary, as shown below:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/out202o1w0hfe997r0ac.png)


* A **Blue-Green** deployment creates a fully instantiated clone of the application stack in the target environment. During the release, the load balancer is simply reconfigured to redirect all application traffic to this new version. Rollback is fast and simple in a blue-green deployment, as only the load balancer needs reconfiguration.
* A **Rolling deployment** deploys progressively with automated validation and health checks in each step. In a rolling deployment model, the new application services are added to the shared load balancer and the traffic will start to be shared between the old and new applications. Automated validation in each new replica helps determine if the release is still on track or if rollback is necessary.
* Finally, in a **Canary deployment**, a new application replica is added to the load balancer, and the load balancer is configured to pass only a specific percentage of the application traffic to the new replica. Once configured, a full analysis of the traffic volume, response times, or activity on the replica is performed. If the analysis is successful, this deployment generally continues as a Rolling deployment.

Deciding which of the above deployment models is the best for your team depends on the complexity of the application, the risk of degraded performance or outage, and your team’s capability to implement full analysis versus simple post-deployment tests.

In general, however, a sound deployment infrastructure and process should be:



* **Controlled**: This involves partially deploying an application, validating each step of that deployment, and incrementally completing that deployment or safely rolling back. Such control will reduce the impact if the deployment fails.
* **Simple**: Small deployment code size reduces the risk of issues during deployment. By decreasing the likelihood of introducing bugs, confidence in the deployment process increases.
* **Robust**: The deployment infrastructure should be a secure, stable, and scalable solution.


## What is Spinnaker?

[Spinnaker](https://spinnaker.io/) is a popular open source, dedicated Continuous Deployment (CD) tool that can provide fast, safe, and repeatable application deployment of any size. It was created and open-sourced by Netflix and has since had contributions made by industry giants like Google.

As a specialized CD tool, Spinnaker simplifies the integration with your cloud infrastructure by letting you directly manage the clusters, server groups, load balancers, and applications. Spinnaker natively implements the industry-standard deployment patterns described above, including a full deployment flow with validation steps, manual approval, and parallel deployments.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fjjup26bcblw6ffpushj.png)

 Sample deployment pipeline in Spinnaker

Unlike Continuous Integration (CI) tools—which focus on the pre-deployment build phase—Spinnaker focuses on deployment capability. It expects the application to be already compiled, tested, and packaged in the build phase with CI tools such as Jenkins, CircleCI, Bamboo, and so on.

By specializing in only the deployment phase, Spinnaker provides better control of this process and ensures a better outcome for complex deployments. (For a more detailed comparison, check out this analysis of [Spinnaker over Jenkins X for Enterprise](https://www.armory.io/blog/spinnaker-over-jenkins-x-for-enterprise/)).

As a deployment tool, Spinnaker integrates as a simple step in your CI/CD deployment pipeline and can be triggered based on Git events. The complexity of the build phase, which includes packaging and testing the application, is left to the CI tool. Meanwhile, the focus of Spinnaker is to provide a fully controlled deployment process, ensuring strict validation between each stage of the deployment and application release.

Finally, with native support for multi-cloud environments such as AWS, GCE, Azure, and also Kubernetes, Spinnaker offers simple configuration of the services and deployment steps as well as secret management for your application.

It’s clear that Spinnaker has a lot to offer, but there are certain use cases where Spinnaker _alone_—without enterprise-grade enhancements—may not be a good fit.


## Limitations of Spinnaker

Open source projects can be powerful options, but they rely on community support and engagement. Compared to a commercial solution, **there’s no guarantee of timely assistance when things go wrong**.

If your organization’s infrastructure is mainly on-premise and not using Kubernetes or cloud-native tools, vanilla Spinnaker could be **lacking the tools needed to manage deployments**. In this case, you would need to build those tools yourself.

If your business is subject to strict compliance regulations, Spinnaker might **lack the advanced security controls** needed for your deployment pipeline configuration. 

And finally, although Spinnaker has a strong Role-based Access Control (RBAC) feature, power users have a wide variety of permissions and can write pipeline configurations alone and run those without review and approval. They can even overwrite anyone else’s configuration without oversight. This **lack of fine-grained permissions** can be an issue for organizations where one team is responsible for managing security and the application team is responsible for deployment.

For companies in need of a solution to these limitations, that’s where Armory comes in.


## Armory-powered Spinnaker

Armory is a feature-packed, enterprise-grade, reliable deployment solution with Spinnaker at its core. Armory is suitable for organizations that have hit the limitations of Spinnaker or are looking for an easier way to maintain Spinnaker.

As Armory is built on top of Spinnaker, it already includes all of Spinnaker's main features, while addressing some critical limitations.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lowry030bar402k6v4zq.png)


[Armory architecture](https://docs.armory.io/docs/overview/architecture/) expands on Spinnaker by using external agents and a custom halyard configuration module. Its bundled-in set of microservices bring robust and resilient tools which enable users to manage deployments more easily than with Spinnaker alone. This allows it to make better use of the Kubernetes resources and to scale in several dimensions like the number of users, application pipelines, rate of deployments, or cluster target size. When it comes to Kubernetes cluster deployment and management, Armory Spinnaker can manage clusters spanning thousands of nodes.

With Armory, you can centrally manage all of your Spinnaker pipelines as code by using the [Armory Pipelines as Code](https://docs.armory.io/docs/spinnaker-user-guides/using-dinghy/) feature. This feature decreases the time to set up a new pipeline in Spinnaker and provides the ability for review and change management of the pipeline configuration itself. For businesses limited by vanilla Spinnaker's lack of advanced security controls, the pipeline configuration management afforded by Armory is a god-send. This feature also integrates with GitHub to let you track all the code changes made to the pipeline configuration. By using Configuration as Code in GitHub, you’ll benefit from all version control systems patterns such as: 




* Enforcement of branching and merging only via approved pull requests, bringing oversight of any changes made to the deployment pipelines by another person.
* Enforcement of syntax and security tests performed on the configuration code before the merge. (Note that this is different from and complementary to the Armory Policy Engine.)

The [Armory Policy Engine](https://www.armory.io/armory-enterprise-spinnaker/policy-engine/) extends the Spinnaker RBAC framework and allows enterprises to balance deployment velocity with control over the delivery process. Armory implements the policy using hooks during the pipeline configuration and execution. The Policy Engine helps to create a [division of ownership](https://www.armory.io/blog/deployment-policies-with-spinnaker/) between the app owners (owning the pipeline configuration and deployments) with the compliance owners (ensuring the security of the organization). This addresses the compliance limitation of vanilla Spinnaker by allowing Spinnaker users to maintain their deployment pipelines within the guardrails defined by the security team.

There’s a [Terraform plugin](https://www.armory.io/armory-enterprise-spinnaker/terraform-integration/) available for Armory to manage additional cloud and on-prem infrastructure. The terraform plugin is simply another type of Task that Spinnaker can execute, and Armory uses a wide range of locations for the terraform manifests:


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lk53tzymgjmh6dhet2bf.png)
Armory Terraform manifest locations

Finally, Armory provides certified releases and paid support (from Development to Enterprise level support) to ensure that the system is always stable and operational.


## Implementing Armory

There are three ways you can start using Armory in your organization:



1. An **on-site model** where you deploy armory within your environment and maintain it. This would be suitable for companies with a strict perimeter security like an on-prem setup and have the resources and expertise to support it.
2. An **on-site managed enterprise service** where Armory’s professional technical team will install and maintain the Spinnaker/Armory setup for you. This would be suitable for organizations looking to gain expertise with Armory while not wanting to manage it alone.
3. Armory Deployments (Multi-cloud and Hybrid) let you deploy your workloads to major cloud providers and on-prem data centers, using cloud drivers that connect Spinnaker to all of your deployment targets.


## Conclusion

Spinnaker is a great choice for CD, and Armory extends Spinnaker's already-robust deployment features to make it even better. To try out Armory, you can install Armory Enterprise for Spinnaker in a Lightweight Kubernetes environment using an open source command-line tool called [Minnaker](https://docs.armory.io/docs/installation/minnaker/). You can even install Armory to get [up and running in 10 minutes](https://www.armory.io/blog/armory-enterprise-install-in-10-minutes/). For the more adventurous, you can [request a demo](https://www.armory.io/demo-request/).