Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mylesagray/a-new-hope-app
A scalable app running flower recognition on Bitfusion for the flower auction on Endor.
https://github.com/mylesagray/a-new-hope-app
Last synced: about 1 month ago
JSON representation
A scalable app running flower recognition on Bitfusion for the flower auction on Endor.
- Host: GitHub
- URL: https://github.com/mylesagray/a-new-hope-app
- Owner: mylesagray
- Created: 2020-11-30T09:12:35.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-12T23:29:26.000Z (4 months ago)
- Last Synced: 2024-09-13T12:25:22.784Z (4 months ago)
- Language: Jsonnet
- Size: 1.64 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Runbook
Deploy TKC:
```sh
kubectl apply -f manifests/tkc.yaml
```Apply Pod Security Policy:
```sh
kubectl apply -f manifests/setup-k8s/psp.yaml
```Create three namespaces:
```sh
kubectl create ns argocd
kubectl create ns monitoring
kubectl create ns flower-market
```Deploy secret containing Docker Hub token for image pulls:
```sh
export UN=usernamehere
export PW=passwordhere
export EMAIL=emailherekubectl create secret docker-registry docker-creds \
--namespace kube-system \
--docker-username=$UN \
--docker-password=$PW \
--docker-email=$EMAIL
```Create reg-cred operator to sync imagepullsecrets across namespaces (because, Docker...)
```sh
kubectl apply -f https://raw.githubusercontent.com/mylesagray/home-cluster-gitops/master/manifests/registry-creds/manifest.yaml
```Create ClusterPullSecret CR
```sh
kubectl apply -f manifests/setup-k8s/regcred-crd.yaml
```Define custom metric:
```sh
# Metric for this app is defined at
# kube-prometheus/vendor/kube-prometheus/kube-prometheus-custom-metrics.libsonnet Lines 12-30
```Build Prometheus:
```sh
cd kube-prometheus/
./build.sh
```Deploy Prometheus:
```sh
kubectl apply -f manifests/setup-k8s/prometheus-rbac.yamlkubectl apply -f kube-prometheus/manifests/setup
kubectl apply -f kube-prometheus/manifests
```Deploy Application:
```sh
kubectl apply -f manifests/app
```The HPA algorithm to calculate desired scale is:
```sh
desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]
```