Skip to content

uknbr/go-live

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playground

Components

Getting started

  1. Clone repository
  2. Start Cluster
./cluster.sh
  1. Build & Load images
./build.sh

CD

Simple CD with ArgoCD

Setup

# Create namespace
kubectl create namespace argocd

# Deploy Argo manifests
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# Wait for deployment
kubectl wait --namespace argocd --for=condition=Ready pod --selector=app.kubernetes.io/name=argocd-repo-server --timeout=180s

Security

# Credentials
export argo_port=8888
export argo_user=admin
export argo_pass=$(kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-server -o name | cut -d'/' -f 2)

# Disable Web auth (optional)
kubectl patch deploy argocd-server -n argocd -p '[{"op": "add", "path": "/spec/template/spec/containers/0/command/-", "value": "--disable-auth"}]' --type json

# Forward port
kubectl port-forward svc/argocd-server -n argocd ${argo_port}:80
  • Declarative
# Apply manifests
kubectl apply -f cd/proj.yml
kubectl apply -f cd/app-echo.yml
kubectl apply -f cd/app-live.yml

# List created resources
kubectl -n argocd get AppProjects
kubectl -n argocd get Applications
  • CLI
argocd login localhost:${argo_port} --insecure --username ${argo_user} --password ${argo_pass}
argocd app list
argocd app get api
argocd app sync api
  • UI

alt text

Test

alt text

API load test with Vegeta

echo "GET http://localhost/api/v1/info" | vegeta attack -rate=100/s -duration=15s | tee results.bin | vegeta report
cat results.bin | vegeta plot > report.html

alt text