werf
A solution for implementing efficient and consistent software delivery to Kubernetes facilitating best practices.
Top Related Projects
Successor: https://github.com/fluxcd/flux2
Declarative Continuous Deployment for Kubernetes
Easy and Repeatable Kubernetes Development
The Kubernetes Package Manager
Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery.
Quick Overview
Werf is a powerful GitOps tool designed for building and deploying applications to Kubernetes. It provides a seamless integration between Git, Docker, and Kubernetes, allowing developers to define their entire application delivery process as code. Werf aims to simplify and streamline the CI/CD pipeline for Kubernetes-based applications.
Pros
- Integrated approach: Combines building, deploying, and releasing processes in a single tool
- GitOps-native: Leverages Git as the single source of truth for application delivery
- Flexible and customizable: Supports various CI systems and deployment scenarios
- Efficient image building: Uses advanced caching mechanisms to speed up the build process
Cons
- Steep learning curve: Requires understanding of multiple technologies (Git, Docker, Kubernetes)
- Complex configuration: May require extensive setup for advanced use cases
- Limited to Kubernetes: Not suitable for non-Kubernetes deployment targets
- Resource-intensive: Can be demanding on system resources during build and deploy processes
Getting Started
To get started with Werf, follow these steps:
-
Install Werf:
curl -sSL https://werf.io/install.sh | bash
-
Initialize a new Werf project in your repository:
werf init
-
Configure your application in
werf.yaml
:project: my-app configVersion: 1 --- image: app dockerfile: Dockerfile
-
Build and deploy your application:
werf converge
For more detailed instructions and advanced usage, refer to the official Werf documentation at https://werf.io/documentation/.
Competitor Comparisons
Successor: https://github.com/fluxcd/flux2
Pros of Flux
- Native GitOps approach with automatic synchronization between Git and Kubernetes clusters
- Supports multi-tenancy and works well with multiple clusters and environments
- Integrates seamlessly with Helm for managing Kubernetes releases
Cons of Flux
- Steeper learning curve for teams new to GitOps practices
- Limited support for non-Kubernetes deployments
- Requires additional tools for advanced CI/CD pipelines
Code Comparison
Flux configuration example:
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: podinfo
namespace: flux-system
spec:
interval: 1m
url: https://github.com/stefanprodan/podinfo
ref:
branch: master
Werf configuration example:
project: myapp
configVersion: 1
deploy:
namespace: myapp
helmRelease:
name: myapp
values: {}
Both Flux and Werf offer powerful deployment solutions, but they cater to different use cases. Flux excels in GitOps-driven Kubernetes deployments, while Werf provides a more flexible approach for various deployment scenarios. The choice between them depends on your specific project requirements and team preferences.
Declarative Continuous Deployment for Kubernetes
Pros of Argo CD
- More mature and widely adopted in the Kubernetes ecosystem
- Supports multiple deployment strategies (e.g., blue/green, canary)
- Provides a user-friendly web UI for visualizing and managing deployments
Cons of Argo CD
- Requires more setup and configuration compared to Werf
- Limited built-in CI capabilities, often requiring integration with external CI tools
- Steeper learning curve for newcomers to GitOps and Kubernetes
Code Comparison
Argo CD application manifest:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: myapp
spec:
destination:
namespace: default
server: https://kubernetes.default.svc
project: default
source:
path: k8s
repoURL: https://github.com/example/myapp.git
targetRevision: HEAD
Werf configuration:
configVersion: 1
project: myapp
deploy:
namespace: default
helmRelease: myapp
helmChart: .helm
Both tools aim to simplify Kubernetes deployments, but Argo CD focuses on GitOps principles and continuous delivery, while Werf provides a more integrated approach to building and deploying applications. Argo CD is better suited for complex, multi-environment deployments, whereas Werf excels in simplifying the development-to-production pipeline for smaller teams or projects.
Easy and Repeatable Kubernetes Development
Pros of Skaffold
- Broader ecosystem support with integrations for various build tools and deployment options
- Faster development cycles with hot reloading and file sync capabilities
- More extensive documentation and community resources
Cons of Skaffold
- Steeper learning curve for complex configurations
- Less focus on GitOps practices and CI/CD integration
- May require additional tools for advanced deployment scenarios
Code Comparison
Skaffold configuration example:
apiVersion: skaffold/v2beta28
kind: Config
build:
artifacts:
- image: my-app
deploy:
kubectl:
manifests:
- k8s/*.yaml
Werf configuration example:
project: my-project
configVersion: 1
deploy:
namespace: my-namespace
kubectl:
manifests:
- .helm/templates/*.yaml
Both tools aim to simplify Kubernetes development and deployment workflows, but they have different approaches. Skaffold focuses on rapid development cycles and flexibility, while Werf emphasizes GitOps practices and seamless CI/CD integration. Skaffold offers a wider range of build and deployment options, making it suitable for diverse project requirements. Werf, on the other hand, provides a more opinionated approach with built-in GitOps support and tighter integration with CI/CD pipelines.
The Kubernetes Package Manager
Pros of Helm
- Widely adopted and supported by the Kubernetes community
- Extensive ecosystem with a large number of pre-built charts
- Simpler learning curve for basic deployments
Cons of Helm
- Less integrated with CI/CD pipelines out of the box
- Requires manual management of chart versions and dependencies
- Limited built-in support for advanced deployment strategies
Code Comparison
Helm chart example:
apiVersion: v2
name: my-app
version: 1.0.0
dependencies:
- name: mysql
version: 8.8.3
repository: https://charts.bitnami.com/bitnami
Werf configuration example:
configVersion: 1
project: my-app
deploy:
helmRelease: my-app
helmChart: .helm
namespace: default
Werf offers a more integrated approach with built-in GitOps practices and advanced deployment features, while Helm provides a standardized package manager for Kubernetes resources. Werf includes native support for building and publishing container images, whereas Helm focuses primarily on templating and deploying Kubernetes manifests. Both tools have their strengths, with Helm being more widely adopted and Werf offering a more comprehensive solution for the entire application lifecycle.
Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery.
Pros of Gitness
- More active development with frequent updates and contributions
- Broader feature set including built-in CI/CD capabilities
- Stronger focus on enterprise-level Git management and collaboration
Cons of Gitness
- Larger codebase and potentially more complex setup
- Less specialized for container-based deployments
- Steeper learning curve for users new to Git management systems
Code Comparison
Gitness (Go):
func (s *Service) CreateRepository(ctx context.Context, repo *types.Repository) error {
return s.db.CreateRepository(ctx, repo)
}
Werf (Go):
func (c *Conveyor) BuildStages(ctx context.Context) error {
return c.buildStages(ctx)
}
Both projects use Go, but Gitness focuses on Git repository management, while Werf emphasizes container build and deployment processes. Gitness's code often deals with repository operations, whereas Werf's code typically involves stage building and deployment logic.
Gitness offers a more comprehensive Git management solution with integrated CI/CD features, making it suitable for larger teams and enterprise environments. Werf, on the other hand, excels in container-based deployments and may be more appropriate for projects primarily focused on containerized applications and simpler deployment workflows.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
werf is a CNCF Sandbox CLI tool to implement full-cycle CI/CD to Kubernetes easily. werf integrates into your CI system and leverages familiar and reliable technologies, such as Git, Dockerfile, Helm, and Buildah.
What makes werf special:
- Complete application lifecycle management: build and publish container images, test, deploy an application to Kubernetes, distribute release artifacts and clean up the container registry.
- Ease of use: use Dockerfiles and Helm chart for configuration and let werf handle all the rest.
- Advanced features: automatic build caching and content-based tagging, enhanced resource tracking and extra capabilities in Helm, a unique container registry cleanup approach, and more.
- Gluing common technologies: Git, Buildah, Helm, Kubernetes, and your CI system of choice.
- Production-ready: werf has been used in production since 2017; thousands of projects rely on it to build & deploy various apps.
Quickstart
The quickstart guide shows how to set up the deployment of an example application (a cool voting app in our case) using werf.
Installation
The installation guide helps set up and use werf both locally and in your CI system.
Documentation
Detailed usage and reference for werf are available in documentation in multiple languages.
Developers can get all the necessary knowledge about application delivery in Kubernetes (including basic understanding of K8s primitives) in the werf guides. They provide ready-to-use examples for popular frameworks, including Node.js (JavaScript), Spring Boot (Java), Django (Python), Rails (Ruby), and Laravel (PHP).
Community & support
Please feel free to reach developers/maintainers and users via GitHub Discussions for any questions regarding werf. You're also welcome on Stack Overflow: when you tag a question with werf
, our team is notified and comes to help you.
Your issues are processed carefully if posted to issues at GitHub.
For questions that may require a more detailed and prompt discussion, you can use:
- #werf channel in the CNCFâs Slack workspace;
- werf_io Telegram chat. (There is a Russian-speaking Telegram chat werf_ru as well.)
Follow @werf_io to stay informed about all important project's news, new articles, etc.
Contributing
This contributing guide outlines the process to help get your contribution accepted.
License
Apache License 2.0, see LICENSE.
Featured in
Top Related Projects
Successor: https://github.com/fluxcd/flux2
Declarative Continuous Deployment for Kubernetes
Easy and Repeatable Kubernetes Development
The Kubernetes Package Manager
Gitness is an Open Source developer platform with Source Control management, Continuous Integration and Continuous Delivery.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot