Coder Social home page Coder Social logo

alonsoir / weave-gitops Goto Github PK

View Code? Open in Web Editor NEW

This project forked from weaveworks/weave-gitops

0.0 1.0 0.0 19.65 MB

Weave GitOps core

License: Mozilla Public License 2.0

Go 83.37% Makefile 0.73% Shell 1.47% TypeScript 14.05% HTML 0.03% JavaScript 0.05% Dockerfile 0.09% Smarty 0.20%

weave-gitops's Introduction

weave-gitops

Weave GitOps

Coverage Status Test status LICENSE Contributors Release FOSSA Status

Overview

Weave GitOps enables an effective GitOps workflow for continuous delivery of applications into Kubernetes clusters. It is based on CNCF Flux, a leading GitOps engine.

Getting Started

CLI Installation

Mac / Linux

curl -L "https://github.com/weaveworks/weave-gitops/releases/download/v0.4.1/gitops-$(uname)-$(uname -m)" -o gitops
chmod +x gitops
sudo mv ./gitops /usr/local/bin/gitops
gitops version

Please see the getting started guide.

CLI Reference

Weave GitOps
Command line utility for managing Kubernetes applications via GitOps.

Usage:
  gitops [command]

Available Commands:
  app         Add or status application
  flux        Use flux commands
  help        Help about any command
  install     Install or upgrade Weave GitOps
  ui          Manages Weave GitOps UI
  uninstall   Uninstall Weave GitOps
  version     Display Weave GitOps version

Flags:
  -h, --help               Help for gitops
      --namespace string   The namespace scope for this operation (default "wego-system").
  -v, --verbose            Enable verbose output

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

For more information please see the docs

CLI/API development

To set up a development environment for the CLI

  1. Install go v1.16
  2. Install buf
  3. make or make unit-tests to ensure everything built correctly.

unit testing

We are using Ginko for our unit tests. To execute the all the unit tests, run make unit-tests.

To run a single test, you will need to set the KUBEBUILDER_ASSESTS environment variable to point to the directory containing our mock K8s objects.

export KUBEBUILDER_ASSETS=$(git rev-parse --show-toplevel)/tools/bin/envtest
go test github.com/weaveworks/weave-gitops/pkg/kube

or

export KUBEBUILDER_ASSETS=$(git rev-parse --show-toplevel)/tools/bin/envtest
cd pkg/kube
go test

Executing a subset of tests

Ginkgo allows you to run a subset of Describe/Context/It specs. See Focused Specs for more information

Setup golangci-lint in your editor

Link for golangci-lint editor integration: https://golangci-lint.run/usage/integrations/

For VSCode, use these editor configuration flags:

    "go.lintFlags": [
        "--fast",
    ],

UI Development

To set up a development environment for the UI

  1. Install go v1.16
  2. Install Node.js version 14.15.1
  3. Make sure your $GOPATH is added to your $PATH in your bashrc or zshrc file, then install reflex for automated server builds: go get github.com/cespare/reflex
  4. Go through the Weave GitOps getting started docs here: https://docs.gitops.weave.works/docs/getting-started/
  5. Run npm install on this repo.
  6. Make sure GitOps is installed on a fresh kind cluster for this repo by running kind delete cluster, kind create cluster, and finally gitops install.
  7. To start up the HTTP server with automated re-compliation, run make api-dev
  8. Run npm start to start the frontend dev server (with hot-reloading)

Lint frontend code with make ui-lint - using Prettier (https://prettier.io/) will get you on the right track!

Run frontend tests with make ui-test - update CSS snapshots with npm run test -- -u

Check dependency vulnerabilities with make ui-audit

Recommended Snippets

To create a new styled React component (with typescript):

{
  "Export Default React Component": {
    "prefix": "tsx",
    "body": [
      "import * as React from 'react';",
      "import styled from 'styled-components'",
      "",
      "type Props = {",
      "  className?: string",
      "}",
      "",
      "function ${1:} ({ className }: Props) {",
      "  return (",
      "    <div className={className}>",
      "      ${0}",
      "    </div>",
      "  );",
      "}",
      "",
      "export default styled(${1:}).attrs({ className: ${1:}.name })``"
    ],
    "description": "Create a default-exported, styled React Component."
  }
}

FAQ

Please see our Weave GitOps Core FAQ

Contribution

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

License scan details

FOSSA Status

weave-gitops's People

Contributors

jrryjcksn avatar j-thompson12 avatar jpellizzari avatar luizbafilho avatar josecordaz avatar iahmad9 avatar rokshana-b avatar weave-e2e-quickstart avatar yiannistri avatar foot avatar sarataha avatar joshri avatar d3nn avatar pzfreo avatar sympatheticmoose avatar github-actions[bot] avatar callisto13 avatar mewzherder avatar bigkevmcd avatar alinagoaga avatar skarlso avatar squaremo avatar stefanprodan avatar

Watchers

James Cloos avatar

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.