Giter VIP home page Giter VIP logo

weaveworks / weave-gitops Goto Github PK

View Code? Open in Web Editor NEW
858.0 35.0 141.0 237.38 MB

Weave GitOps provides insights into your application deployments, and makes continuous delivery with GitOps easier to adopt and scale across your teams.

Home Page: https://docs.gitops.weave.works/

License: Apache License 2.0

Go 6.69% Makefile 0.07% Shell 0.09% TypeScript 4.72% HTML 0.03% JavaScript 0.41% Dockerfile 0.03% Starlark 0.01% CSS 0.01% Smarty 0.03% MDX 87.91%
gitops flux flux2 cloudnative k8s ui

weave-gitops's Introduction

Weave GitOps

Test status LICENSE Contributors Release FOSSA Status OpenSSF Best Practices

Weave GitOps is a simple, open source developer platform for people who want cloud native applications but who don't have Kubernetes expertise. Experience how easy it is to enable GitOps and run your apps in a cluster. Use Git to collaborate with team members making new deployments easy and secure. Start with what developers need to run apps, and then easily extend to define and run your own enterprise platform.

From Kubernetes run Weave GitOps to get:

  1. Application Operations: manage and automate deployment pipelines for apps and more
  2. Platforms: the easy way to have your own custom PaaS on cloud or on premise
  3. Extensions: coordinate Kubernetes rollouts with eg. VMs, databases, and cloud services

Our vision is that all cloud native applications should be easy for developers, and that operations should be automated and secure. Weave GitOps is a highly extensible tool to achieve this by placing Kubernetes and GitOps at the core and building a platform around that.

Weave GitOps defaults are Flux as the GitOps engine, Kustomize, Helm, Sops, and Kubernetes CAPI. If you use Flux already, then you can easily add Weave GitOps to create a platform management overlay.

Weave GitOps Open Source provides:

  • Continuous Delivery through GitOps for apps and infrastructure.
  • Support for GitHub, GitLab, and Bitbucket; S3-compatible buckets as a source; all major container registries; and all CI workflow providers.
  • A secure, pull-based mechanism, operating with least amount of privileges, and adhering to Kubernetes security policies.
  • Compatibility with any conformant Kubernetes version and common ecosystem technologies such as Helm, Kustomize, RBAC, Prometheus, OPA, Kyverno, etc.
  • Multitenancy, multiple Git repositories, multiple clusters.
  • Alerts and notifications.

Manage and view applications all in one place.

Application Page

Easily see your continuous deployments and what is being produced via GitOps. There are multiple views for debugging as well as being able to sync your latest Git commits directly from the UI.

Reconciliation Page

Check out the Graph view.

Graph View

Review the yaml file.

Yaml View

See your entire source landscape whether it is a git repository, helm repository, or bucket.

Sources view

Quickly see the health of your reconciliation deployment runtime. These are the workers that are ensuring your software is running on the Kubernetes cluster.

Flux Runtime

Getting Started

CLI Installation

Mac / Linux

curl --silent --location "https://github.com/weaveworks/weave-gitops/releases/download/v0.38.0/gitops-$(uname)-$(uname -m).tar.gz" | tar xz -C /tmp
sudo mv /tmp/gitops /usr/local/bin
gitops version

Alternatively, users can use Homebrew:

brew tap weaveworks/tap
brew install weaveworks/tap/gitops

Please see the getting started guide.

CLI Reference

Command line utility for managing Kubernetes applications via GitOps.

Usage:
  gitops [command]

Examples:

  # Get help for gitops add cluster command
  gitops add cluster -h
  gitops help add cluster

  # Get the version of gitops along with commit, branch, and flux version
  gitops version

  To learn more, you can find our documentation at https://docs.gitops.weave.works/


Available Commands:
  beta        This component contains unstable or still-in-development functionality
  check       Validates flux compatibility
  completion  Generate the autocompletion script for the specified shell
  create      Creates a resource
  get         Display one or many Weave GitOps resources
  help        Help about any command
  version     Display gitops version

Flags:
  -e, --endpoint WEAVE_GITOPS_ENTERPRISE_API_URL   The Weave GitOps Enterprise HTTP API endpoint can be set with WEAVE_GITOPS_ENTERPRISE_API_URL environment variable
  -h, --help                                       help for gitops
      --insecure-skip-tls-verify                   If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
      --kubeconfig string                          Paths to a kubeconfig. Only required if out-of-cluster.
      --namespace string                           The namespace scope for this operation (default "flux-system")
  -p, --password WEAVE_GITOPS_PASSWORD             The Weave GitOps Enterprise password for authentication can be set with WEAVE_GITOPS_PASSWORD environment variable
  -u, --username WEAVE_GITOPS_USERNAME             The Weave GitOps Enterprise username for authentication can be set with WEAVE_GITOPS_USERNAME environment variable

Use "gitops [command] --help" for more information about a command.

For more information please see the docs

FAQ

Please see our Weave GitOps OSS FAQ

Contribution

Need help or want to contribute? Please see the links below.

License scan details

FOSSA Status

weave-gitops's People

Contributors

ahussein3 avatar alichaddad avatar alinagoaga avatar asmaanabilbakr avatar bigkevmcd avatar callisto13 avatar davidstauffer avatar dependabot[bot] avatar enekofb avatar foot avatar iahmad9 avatar j-thompson12 avatar jmickey avatar josecordaz avatar joshri avatar jpellizzari avatar jrryjcksn avatar luizbafilho avatar makkes avatar opudrovs avatar ranatrk avatar rokshana-b avatar samra10 avatar sarataha avatar thegostkasper avatar waleedhammam avatar weave-e2e-quickstart avatar weave-gitops-bot avatar yiannistri avatar yitsushi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

weave-gitops's Issues

Integrating other UIs with WeGO UI

Question
We will have the MCCP UI, a team workspaces UI and the flux UI. How should we integrate these UIs so they appear seamless to the user?

Timebox
1 week


Outcome
Writeup your findings here. Please include the following (if any have been created) :

  • Screenshots
  • Design/architecture diagrams
  • WEP
  • PR/FAQ

Use repo created by another team/process

Short description
As a App developer I want to use wego with a repo created by my corp IT so that wego doesn't require permissions to create a repo

Acceptance criteria

  • blank repo before running wego
  • post running wego, my repo has the proper directory layout
  • add an app to the repo, it gets deployed into my cluster.

Work breakdown
(optional)Task breakdown of the work

  • create X
  • design X
  • ...

Determine wego cluster status

In order to decide what actions to take when deploying to a cluster, we need to know if the cluster is:

  • unmodified
  • has flux2 installed
  • has wego installed

We need a library call that will return one of: "unmodified", "flux2", "wego" (or similar choices)

Add additional targets to existing wego installation

Short description
As an Application Developer, I want to run my application in multiple k8s clusters so that I can ensure the same repository can be used across target clusters and that WeGO works correctly in minikube and k3s.

Given a kind cluster with WeGO installed
And a WeGO app added to the cluster
And a k3s cluster
And a minikube cluster
When I install the WeGO GORT into the k3s cluster
And I install the GORT into the minikube cluster
Then I can add the same app to the new clusters from the same Git repository
And it will function normally in all three clusters

Define/create Bill-of-materials for wego

In order to pull and install the correct dependencies, we need a description of all dependency locations and versions. We can use the dependencies.toml model from wkp but it would likely be worthwhile to see if the state of the art has moved on.

CLI --dry-run option to `wego add`

Short description
As a SRE I want to see what configuration wego would apply to the cluster for a particular commit -- without it actually performing any actions so that I can verify what manifests, repositories, secrets, etc will be created

Acceptance criteria

  • issuing --dry-run doesn't modify my cluster
  • issuing --dry-run doesn't create or modify any repositories
  • displays manifests that will be added to my cluster and repo
  • prints the steps that would be performed without the --dry-run flag

Design materials

  • Screenshots
  • Design diagrams
  • WEP
  • PR/FAQ

Work breakdown
(optional)Task breakdown of the work

  • Separate out generation of manifests so that they can be displayed rather than applied
  • Display output

deploy an app into two different environments with changes between them

Short description
As a SRE I want to deploy MCCP into dev using sqlite and into UAT with postgress so that I can use gitops across environments

Acceptance criteria

  • Deploy MCCP v1 in dev with slqlite and using a shared config repo deploy in staging with external DB
  • single configuration repo with both environments
  • all manifests in git

Design materials

  • Screenshots
  • Design diagrams
  • WEP
  • PR/FAQ

Work breakdown
(optional)Task breakdown of the work

  • create X
  • design X
  • ...

e2e tests: initial kind setup

Setup Github workflows to install and create a kind cluster.

The initial test can be a simple kubectl get pods -A

Stage 2: Enable WeGo Platform gitops

Define, manage, and update weave gitops platform definitions in git repository:

start by extending a weve gitops app repository, by adding a new /platform directory

install prometheus and configure to capture metrics from flux components (profiles)

Short description
As an SRE I want to query metrics from gitops so that I can use it as an aid in troubleshooting my wego environment

Acceptance criteria

  • prometheus is installed
  • user can query metrics from SC, HC, NC, KC
  • manifest(s) for the installed prometheus are in the platform repo (or folder in the monorepo case) ("platform apps"?)

Design materials

  • WEP See TBD

Work breakdown
(optional)Task breakdown of the work

  • create X
  • design X
  • ...

View applications deployed into a cluster (SRE view)

Short description
As an application operator, I would like to go the core UI and see the status of all my applications -- whether they are in sync, healthy, or there are errors.
After I've deployed something, I would like to see the status of the deployment.
(See weave cloud deploy page for related example)

Acceptance criteria

  • ?
  • ?

Work breakdown
(optional)Task breakdown of the work

  • create X
  • design X
  • ...

WeGO and impact to DORA metrics

Question
What are 2 or 3 ways WeGO can have a positive impact on users Deployment Frequency, Lead Time For changes, MTTR, Change Failure Rate.

Short description
DORA identified the following metrics as key attributes for measuring a team/product health:

  • Deployment Frequency
  • Lead Time For changes
  • MTTR
  • Change Failure Rate.

Timebox
3 days

Questions

  • Most of the benefit is provided by GitOps in general. What, if anything, does wego add above just GitOps.
  • Is this already covered by existing white papers and work Cornelia is already doing?

Outcome
Writeup your findings here. Please include the following (if any have been created) :

  • Screenshots
  • Design/architecture diagrams
  • WEP
  • PR/FAQ

Wego install (Cluster wide)

Connect a repository to an "empty" cluster. Via a running weave gitops runtime.

Prerequisites:

"empty" cluster: Not configured with gitops runtime

Architecture Design:

Acceptance Criteria:

GitOps runtime is installed into a cluster
Connected to a repo wego creates in github

Future:

  • need to be able to attach to existing repo
  • need to be able to recreate this install from config stored in git (reconstitute the cluster)

Based on a declarative configuration

  • abstraction layering is an issue
  • generate an "weave gitops install spec" ?
  • can be used to reconstitute the system

Access keys specific to wego

Currently in the ci we are using our keys for dockerhub, aws and a github token for changelog. It would be nice to have keys from accounts that wont disappear when an employee leaves.

wego add command

The wego add command should add a new workload repo into the cluster.

  1. call flux twice as following:
flux create source git podinfo \
  --url=https://github.com/stefanprodan/podinfo \
  --branch=master \
  --interval=30s \
  --export > ./clusters/my-cluster/podinfo-source.yaml
flux create kustomization podinfo \
  --source=podinfo \
  --path="./kustomize" \
  --prune=true \
  --validation=client \
  --interval=5m \
  --export > ./clusters/my-cluster/podinfo-kustomization.yaml
  1. commit those files and create a pull request

helm option will be added in another task

TBD

  • will we require the user to be in the cluster repo? if so how can we handle the wego add . suggestion mark made ?

Programmatically create WeGO Git Repository

Configuring an application in wego can require creating a repository (if an existing repository is not specified). The new repository should have the structure currently being defined for wego applications (TBD).

We should be able to create repositories via clone or fork.

UI dry run ability

Short description
As a SRE I want to see what wego will do without it actually performing any actions so that I can verify what manifests, repositories, secrets, etc will be created

Acceptance criteria

  • using dry run mode doesn't modify my cluster
  • using dry run mode doesn't create or modify any repositories
  • displays manifests that will be added to my cluster and repo
  • prints the steps that would be performed without using dry run mode

Design materials

  • Screenshots
  • Design diagrams
  • WEP
  • PR/FAQ

Work breakdown
(optional)Task breakdown of the work

  • create X
  • design X
  • ...

Spike: How do we update wego and flux components?

Short description

As a SRE I want to update wego/flux k8s cluster so that I'm running the latest code.

Flux does this by downloading new version and reinstalling...

wego upgrade

For now we will only support one previous version when upgrading. A PR will be created in the wego platform repository (assuming only one repository needs to be updated). The cluster/target will be upgraded when the PR is merged.

Discussion

Upgrading a Weave GitOps installation

The process of upgrading Weave GitOps for a single cluster consists of two pieces:

  • Upgrading flux controller resources
  • Upgrading resources generated by Weave GitOps

Flux Controller Resources

Flux controller resources should not constitute a significant problem since flux supports upgrading them by simply downloading a new flux version and re-installing flux. As we don't expect users to modify the core flux manifests, the only reason we store them at all is so that upgrading can be done via pull request. We'll simply need to run flux install --export and overwrite the existing flux manifests in the platform repository with the new ones generated by the install.

Resources Generated by Weave GitOps

Resources generated by wego app add are potentially a bit more complicated in that we expect users may modify them (to change the sync interval, for example). It would be a much better user experience if we were to keep any such changes during the upgrade. According to the flux migration timetable, any breaking changes to the CRDs will come with associated conversion mechanisms. So, we should be able to run/apply such mechanisms during an upgrade when such a change occurs. As of yet, it isn't clear what such mechanisms will look like so we will have to plan to be flexible if/when breaking changes occur. In the absence of such breaking changes, we should be able to leave flux-generated resources alone. The only resource we may have to update is our own app resource. That should be a relatively straightforward change, though, since the app resource has no user-serviceable parts.

Pull Requests

An unfortunate side effect of our choice to allow configuration to be stored in multiple places is that we can't always upgrade everything with a single pull request. For flux-only upgrades without breaking changes, we will only need to create a PR for the platform repository. However, if we change the app resource or a breaking change occurs in the flux CRDs, we'll need to extract the config URL from each app managed by Weave GitOps and create a PR in each referenced repository with the necessary changes. The UI or CLI will have to inform the user of all the repositories that will need PRs reviewed and merged. (It's possible that this issue will be go away if the directory structure changes play out as currently discussed)

Multi-cluster

In a multi-cluster environment there will be applications that are deployed in multiple clusters. The GitOps management resources for the applications (other than the app resource), however, will be segregated by cluster. So, wego upgrade should be able to work just fine on an individual cluster. The only place in which that might be problematic is the app resource, which is shared. This suggests that we'll need to ensure all app changes are backward-compatible (for some number of releases) so that we can upgrade the app resources during an upgrade for a single cluster.

Automated release process

Short description
As a developer, I want to push a tag and a draft release gets created into GitHub.

Acceptance criteria

  • there is a GitHub action that runs the tests, builds the artifacts, collects the changelogs, and creates a release with it.

wego install command

Short description
As a platform operator, I want to install wego into a cluster

Acceptance criteria

  • user is able to specify the branch, the owner, the repo name and the provider flux will use to bootstrap.

CLI: Show the Application Deployment

Show the status of all the objects in the application from the CLI.

wego status application <name> or something like that should show the current deployment status of each of the gitops goals that are a part of that application.

Acceptance criteria

  • wego CLI status call shows if my app has been sync'd
  • wego CLI status call shows if my app has been processed through the kustomize controller (if my app is kustomize based)
  • wego CLI status call shows if my app has been processed through the helm controller (if my app is helm based)
  • wego CLI displays any errors my app received in the GitOps runtime
  • wego CLI displays last time my app was successfully deployed

Design materials

  • UX

Work breakdown
(optional)Task breakdown of the work

  • Check status of all flux components driving application in cluster (source, helm, kustomize controllers)
  • Display results to user via CLI

Posslbily Later:
Task: Determine which resources in the system were installed by WeGO
Task: Extract current status from each resource - deployment successful, health checks successful
Task: Display results to user

Observability Spike: What components do we need in the cluster beyond the gitops runtime?

I believe hooks for monitoring the gitops runtime via Prometheus/Grafana already exist.

I expect we therefore need to provide a base platform stack that includes prometheus, graphana, and alert manager.

As soon as there is a testable/usable version of the flux UI, I expect we will want to install that as well.

Spike goal is to determine what components need to be added, and create initial stories for weave gitops cluster observability.

Deploy MCCP into dev with sqlite and using a shared cluster repo deploy in staging with external DB

Short description
As a SRE I need to deploy the existing MCCP cluster observability tools with sqlite in dev and postgres in UAT so that the UAT environment data lives longer

Given two kind clusters (dev and UAT) with Weave GitOps installed
And the Helm Chart for the MCCP cluster observability tools is in a git repository
And there are two Values.yaml files in distinct directories within the git repository
And the values file for dev defines the db as sqlite
And the values file for UAT defines the db as postgreSQL
When I wego app add the Helm Chart to each cluster
And the paths for the apps point to the distinct directories
Then the MCCP tools are deployed to the dev cluster using sqlite
And the MCCP tools are deployed to the UAT cluster using postgreSQL

Install Weave Gitops

Short description
As a cluster operator I want to install weave gitops into my kubernetes cluster so that application teams can have a gitops repository to manage deployments of that software.

Acceptance criteria

  • user is able to specify the branch, the owner, the repo name and the provider flux will use to bootstrap.

Integrating other UIs with WeGO UI

Question
We will have the MCCP UI, a team workspaces UI and the flux UI. How should we integrate these UIs so they appear seamless to the user?

Timebox
1 week


Outcome
Writeup your findings here. Please include the following (if any have been created) :

  • Screenshots
  • Design/architecture diagrams
  • WEP
  • PR/FAQ

Install an application with a helm release

As an application operator I would like to be able to put a helm chart in the repository and have the software properly installed in my namespace in the cluster.

Example: Postgres

Acceptance Criteria:

  • Validate PR (that it exists and contains the helm chart/release)
  • Library support for PR approval, merge, etc.
  • Chart/Release shows up in cluster after commit and is healthy

Folder Structure Updates

  • Mental model where workloads are in their own folder, and pipelines are kept separately.
  • Flux follows "minimalAPI" we should provide a more full featured api.
  • Application primitive

Document how to deploy sock shop aka microservices-demo in the weave-gitops-docs repo

Short description
As a application dev I want to use GitOps to deploy the sock shop demo so that I can learn about k8s and gitops.

Sockshop repo: https://github.com/microservices-demo/microservices-demo
Version: 0.0.12
Path: deploy/kubernetes/complete-demo.yaml

Acceptance criteria

  • k8s running sock shop
  • There is a doc page showing this as an example helm chart based deployment
  • cluster repo has a source controller pointing at the repo ref
  • make sure it works...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.