forked from fonttools/fontbakery
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
setting up a local kubernetes deployment
(issue fonttools#1306)
- Loading branch information
1 parent
c739b2c
commit 65530a4
Showing
6 changed files
with
119 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# envvars_setup.sh | ||
PROJECT=fontbakery | ||
GCLOUD="sudo /home/felipe/devel/prebuilt/google-cloud-sdk/bin/gcloud" | ||
DOCKER="sudo docker" | ||
|
||
# update_database: | ||
$DOCKER build -t rethinkdb-2.3.5 containers/rethinkdb | ||
$DOCKER tag rethinkdb-2.3.5 gcr.io/$PROJECT/rethinkdb-2.3.5 | ||
$GCLOUD docker -- push gcr.io/$PROJECT/rethinkdb-2.3.5 | ||
kubectl delete rc rethinkdb-rc | ||
kubectl create -f services/rethinkdb-driver-service.yaml | ||
kubectl create -f services/rethinkdb-rc.yaml | ||
kubectl create -f services/rethinkdb-admin-service.yaml | ||
|
||
# update flask service | ||
# Note: This will affect the publicly accessinble IP address. | ||
kubectl delete svc flaskapp-service | ||
kubectl create -f services/flask-service.yaml | ||
|
||
# update_frontend: | ||
$DOCKER build -t fb-dashboard-1 containers/web | ||
$DOCKER tag fb-dashboard-1 gcr.io/$PROJECT/fb-dashboard-1 | ||
$GCLOUD docker -- push gcr.io/$PROJECT/fb-dashboard-1 | ||
kubectl delete rc dashboard-rc | ||
kubectl create -f services/dashboard-rc.yaml | ||
|
||
|
||
# -> "kill all": | ||
kubectl delete svc rabbitmq-service | ||
kubectl delete rc rabbitmq-controller | ||
kubectl delete job job-fb-worker-1 | ||
kubectl delete job job-fb-dispatcher-1 | ||
|
||
# update_queue_service: | ||
kubectl delete svc rabbitmq-service | ||
kubectl delete rc rabbitmq-controller | ||
kubectl create -f services/rabbitmq-service.yaml | ||
kubectl create -f services/rabbitmq-controller.yaml | ||
|
||
# update_workers: | ||
$DOCKER build -t job-fb-worker-1 .. | ||
$DOCKER tag job-fb-worker-1 gcr.io/$PROJECT/job-fb-worker-1 | ||
$GCLOUD docker -- push gcr.io/$PROJECT/job-fb-worker-1 | ||
kubectl delete job job-fb-worker-1 | ||
kubectl create -f jobs/worker_local.yaml | ||
|
||
# update_dispatcher: | ||
$DOCKER build -t job-fb-dispatcher-1 containers/dispatcher | ||
$DOCKER tag job-fb-dispatcher-1 gcr.io/$PROJECT/job-fb-dispatcher-1 | ||
$GCLOUD docker -- push gcr.io/$PROJECT/job-fb-dispatcher-1 | ||
kubectl delete job job-fb-dispatcher-1 | ||
kubectl create -f jobs/dispatcher_local.yaml | ||
|
||
# overall status: | ||
kubectl get jobs | ||
kubectl get pods | ||
kubectl get svc | ||
kubectl get rc | ||
|
||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: job-fb-dispatcher-1 | ||
spec: | ||
completions: 1 | ||
parallelism: 1 | ||
template: | ||
metadata: | ||
name: job-fb-dispatcher-1 | ||
spec: | ||
containers: | ||
- name: c | ||
image: gcr.io/fontbakery/job-fb-dispatcher-1 | ||
env: | ||
- name: QUEUE | ||
value: job1 | ||
- name: FONTBAKERY_LOCAL_DEVEL | ||
value: 1 | ||
restartPolicy: OnFailure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: job-fb-worker-1 | ||
spec: | ||
completions: 8 | ||
parallelism: 8 | ||
template: | ||
metadata: | ||
name: job-fb-worker-1 | ||
spec: | ||
containers: | ||
- name: c | ||
image: gcr.io/fontbakery/job-fb-worker-1 | ||
env: | ||
- name: QUEUE | ||
value: job1 | ||
restartPolicy: OnFailure |