switcher-gitops

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2024 License: MIT

README


Switcher GitOps
GitOps Domain Snapshot Orchestrator for Switcher API

Master CI Quality Gate Status Known Vulnerabilities Docker Hub


About

Switcher GitOps is used to orchestrate Domain Snapshots for Switcher API. It allows managing feature flags and configurations lifecycle.

  • Manages Switchers with GitOps workflow (repository as a source of truth)
  • Repository synchronization allows integrated tools such as Switcher API Management and Switcher Slack App to work in sync
  • Flexible settings allow you to define the best workflow for your organization
  • Orchestrates accounts per Domain environments allowing seamless integration with any branching strategy

Getting Started

Using Swither API Cloud

Switcher GitOps is available as a cloud-hosted service. You can sign up for a free account at Switcher API Cloud.

  1. Create and Configure a new Domain
  2. Select the Domain and click on the Menu toolbar
  3. Under Integrations, select Switcher GitOps
  4. Follow the instructions to set up the repository

Self-hosted: Deploying to Kubernetes

Requirements
  • Kubernetes cluster
  • Helm 3
  • Switcher API & Switcher Management
  • Git Token (read/write access) for the repository

Find detailed instructions on how to deploy Switcher GitOps to Kubernetes here.

Development: Deploying locally

Requirements
  • Docker & docker-compose
  • Switcher API & Switcher Management
  • Git Token (read/write access) for the repository
  1. Configure Switcher API to allow Switcher GitOps to access the API
    Set SWITCHER_GITOPS_JWT_SECRET for Switcher API and SWITCHER_API_JWT_SECRET for Switcher GitOps.

  2. Start Switcher API and Switcher Management

  3. Start Switcher GitOps docker-compose -d up
    You might need to remove mongodb setting from docker-compose.yml if launching the full Switcher API stack from step 2.

Development: Running locally

Requirements
  • Go [check version in go.mod]
  • MongoDB +7.0
  1. Clone the repository
  2. Configure the environment variables in the .env.test file
  3. make run to start the application

Integrated tests

Set up PAT (Personal Access Token) for Switcher GitOps to access the repository. You can either create a fine-grained token with only the necessary permissions such as Content (Read and Write) and Metadata (Read) or use a personal token with full access.

Once you have the token, you can set it up in the .env.test environment file by including the following:

GIT_USER=[YOUR_GIT_USER]
GIT_TOKEN=[YOUR_GIT_TOKEN]
GIT_TOKEN_READ_ONLY=[YOUR_GIT_TOKEN_READ_ONLY]
GIT_REPO_URL=[YOUR_GIT_REPO_URL]
GIT_BRANCH=[YOUR_GIT_BRANCH]

Directories

Path Synopsis
src
db

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL