Skip to content

Commit 5a99196

Browse files
committed
chore: add detailed docs for deployment options, added re-deploy action workflow
1 parent 6e23344 commit 5a99196

File tree

2 files changed

+75
-5
lines changed

2 files changed

+75
-5
lines changed

.github/workflows/re-deploy.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Re-deploy CI
2+
run-name: Re-deploying - ${{ github.event.inputs.version }} by @${{ github.actor }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
tag:
8+
description: 'Image tag'
9+
required: true
10+
11+
jobs:
12+
update-kustomize:
13+
name: Deploy
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout Kustomize
18+
uses: actions/checkout@v4
19+
with:
20+
token: ${{ secrets.ARGOCD_PAT }}
21+
repository: switcherapi/switcher-deployment
22+
ref: master
23+
24+
- name: Set up arkade-get
25+
uses: alexellis/arkade-get@master
26+
with:
27+
kubectl: latest
28+
kustomize: latest
29+
30+
- name: Update GitOps repository
31+
run: |
32+
cd switcher-gitops/base
33+
echo RELEASE_TIME=`date` > environment-properties.env
34+
kustomize edit set image trackerforce/switcher-gitops:latest=trackerforce/switcher-gitops:${{ github.event.inputs.tag }}
35+
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
36+
git config --global user.name "${{ github.actor }}"
37+
git add .
38+
git commit -m "[argocd] switcher-gitops: ${{ github.event.inputs.tag }}"
39+
git push

README.md

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ GitOps Domain Snapshot Orchestrator for Switcher API
1111
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=switcherapi_switcher-gitops&metric=alert_status)](https://sonarcloud.io/dashboard?id=switcherapi_switcher-gitops)
1212
[![Known Vulnerabilities](https://snyk.io/test/github/switcherapi/switcher-gitops/badge.svg)](https://snyk.io/test/github/switcherapi/switcher-gitops)
1313
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
14+
[![Docker Hub](https://img.shields.io/docker/pulls/trackerforce/switcher-gitops.svg)](https://hub.docker.com/r/trackerforce/switcher-gitops)
1415
[![Slack: Switcher-HQ](https://img.shields.io/badge/slack-@switcher/hq-blue.svg?logo=slack)](https://switcher-hq.slack.com/)
1516

1617
</div>
@@ -24,12 +25,33 @@ GitOps Domain Snapshot Orchestrator for Switcher API
2425

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

30-
# Deploying locally
31+
# Getting Started
3132

32-
## Requirements
33+
## Using Swither API Cloud
34+
35+
Switcher GitOps is available as a cloud-hosted service. You can sign up for a free account at [Switcher API Cloud](https://cloud.switcherapi.com).
36+
37+
1. Create and Configure a new Domain
38+
2. Select the Domain and click on the Menu toolbar
39+
3. Under Integrations, select Switcher GitOps
40+
4. Follow the instructions to set up the repository
41+
42+
## Self-hosted: Deploying to Kubernetes
43+
44+
### Requirements
45+
- Kubernetes cluster
46+
- Helm 3
47+
- Switcher API & Switcher Management
48+
- Git Token (read/write access) for the repository
49+
50+
Find detailed instructions on how to deploy Switcher GitOps to Kubernetes [here](https://github.com/switcherapi/helm-charts).
51+
52+
## Development: Deploying locally
53+
54+
### Requirements
3355
- Docker & docker-compose
3456
- Switcher API & Switcher Management
3557
- Git Token (read/write access) for the repository
@@ -39,8 +61,17 @@ Set SWITCHER_GITOPS_JWT_SECRET for Switcher API and SWITCHER_API_JWT_SECRET for
3961

4062
2. [Start](https://github.com/switcherapi/switcher-api?tab=readme-ov-file#running-switcher-api-from-docker-composer-manifest-file) Switcher API and Switcher Management
4163
3. Start Switcher GitOps `docker-compose -d up`<br>
42-
You might need to remove mongodb setting from docker-compose.yml if lauching the full Switcher API stack from the step 2.
64+
You might need to remove mongodb setting from docker-compose.yml if launching the full Switcher API stack from step 2.
65+
66+
## Development: Running locally
67+
68+
### Requirements
69+
- Go [check version in go.mod]
70+
- MongoDB +7.0
4371

72+
1. Clone the repository
73+
2. Configure the environment variables in the `.env.test` file
74+
3. `make run` to start the application
4475

4576
# Integrated tests
4677

0 commit comments

Comments
 (0)