Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade geodesic base image version (#464) #465

Merged
merged 2 commits into from
Jul 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If applicable, add screenshots to help explain your problem.
**Ennvironment:**

- OS: [e.g. macOS, Ubuntu]
- Kiosk version: [e.g. 1.8.0]
- Kiosk version: [e.g. 1.8.1]
- `kubectl version`:
- `helm version`:
- `helmfile version`:
Expand Down
23 changes: 18 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
FROM cloudposse/build-harness:0.39.0 as build-harness
FROM cloudposse/build-harness:1.3.0 as build-harness

FROM cloudposse/geodesic:0.135.0
FROM cloudposse/geodesic:1.2.1-alpine

RUN apk add --update dialog libqrencode

ENV DOCKER_IMAGE="vanvalenlab/kiosk-console"
ENV DOCKER_TAG="latest"

# Geodesic banner
# Banner is what is displayed at startup and on every command line
# in order to distinguish this image from other similar images
ENV BANNER="deepcell"
ENV BANNER_FONT="Larry 3D 2.flf"

# Disable cloudposse motd
# Disable message of the day
ENV MOTD_URL=""

# Shell customization
# options for `less`. `R` allows ANSI color codes to be displayed while stripping out
# other control codes that can cause `less` to mess up the screen formatting
ENV LESS=R

# Enable `direnv`
# TODO: Use preferring YAML configuration files instead.
ENV DIRENV_ENABLED=true

# Silence make
ENV MAKE="make -s"

Expand Down Expand Up @@ -50,6 +60,9 @@ ENV GCP_TRAINING_GPU_TYPE="nvidia-tesla-v100"
ENV GKE_MACHINE_TYPE="n1-standard-1"
ENV GPU_MACHINE_TYPE="n1-highmem-2"
ENV CONSUMER_MACHINE_TYPE="n1-standard-2"
# gcp auth plugin is deprecated as of k8s 1.22, use the gke auth plugin instead
# https://cloud.google.com/blog/products/containers-kubernetes/kubectl-auth-changes-in-gke
ENV USE_GKE_GCLOUD_AUTH_PLUGIN="false"

# Deployment config
ENV CLOUD_PROVIDER=""
Expand Down Expand Up @@ -78,4 +91,4 @@ COPY rootfs/ /
# Enable the menu
RUN ln -s /usr/local/bin/menu.sh /etc/profile.d/ΩΩ.menu.sh

WORKDIR /conf/
ENV GEODESIC_WORKDIR=/conf
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Tracked Image
Start a terminal shell and install the DeepCell Kiosk wrapper script:

```bash
docker run -e DOCKER_TAG=1.8.0 vanvalenlab/kiosk-console:1.8.0 | sudo bash
docker run -e DOCKER_TAG=1.8.1 vanvalenlab/kiosk-console:1.8.1 | sudo bash
```

To start the kiosk, just run `kiosk-console` from the terminal shell.
Expand Down
4 changes: 1 addition & 3 deletions conf/charts/frontend/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{{- if (.Values.hpa.enabled) }}
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "fullname" . }}
Expand Down
4 changes: 1 addition & 3 deletions conf/charts/redis-consumer/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{{- if (.Values.hpa.enabled) }}
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "fullname" . }}
Expand Down
4 changes: 1 addition & 3 deletions conf/charts/tf-serving/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{{- if (.Values.hpa.enabled) }}
---
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
metadata:
name: {{ template "fullname" . }}
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0230.segmentation-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ releases:
metrics:
- type: Object
object:
metricName: segmentation_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: segmentation_consumer_key_ratio
targetValue: .15
apiVersion: v1
metric:
name: segmentation_consumer_key_ratio
target:
type: Value
value: .15

env:
INTERVAL: 1
Expand Down
14 changes: 8 additions & 6 deletions conf/helmfile.d/0231.segmentation-zip-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ releases:
metrics:
- type: Object
object:
metricName: segmentation_zip_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: segmentation_zip_consumer_key_ratio
targetValue: 2

name: segmentation_consumer_key_ratio
apiVersion: v1
metric:
name: segmentation_consumer_key_ratio
target:
type: Value
value: .15
env:
QUEUE: "segmentation"
CONSUMER_TYPE: "zip"
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0250.caliban-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ releases:
metrics:
- type: Object
object:
metricName: caliban_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: caliban_consumer_key_ratio
targetValue: 1
apiVersion: v1
metric:
name: caliban_consumer_key_ratio
target:
type: Value
value: 1

env:
INTERVAL: 1
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0251.caliban-zip-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ releases:
metrics:
- type: Object
object:
metricName: caliban_zip_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: caliban_zip_consumer_key_ratio
targetValue: 2
apiVersion: v1
metric:
name: caliban_zip_consumer_key_ratio
target:
type: Value
value: 2

env:
QUEUE: "caliban"
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0260.mesmer-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ releases:
metrics:
- type: Object
object:
metricName: mesmer_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: mesmer_consumer_key_ratio
targetValue: 1
apiVersion: v1
metric:
name: mesmer_consumer_key_ratio
target:
type: Value
value: 1

env:
INTERVAL: 1
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0261.mesmer-zip-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ releases:
metrics:
- type: Object
object:
metricName: mesmer_zip_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: mesmer_zip_consumer_key_ratio
targetValue: 1
apiVersion: v1
metric:
name: mesmer_zip_consumer_key_ratio
target:
type: Value
value: 1

env:
QUEUE: "mesmer"
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0270.polaris-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ releases:
metrics:
- type: Object
object:
metricName: polaris_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: polaris_consumer_key_ratio
targetValue: 1
apiVersion: v1
metric:
name: polaris_consumer_key_ratio
target:
type: Value
value: 1

env:
INTERVAL: 1
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0271.polaris-zip-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ releases:
metrics:
- type: Object
object:
metricName: polaris_zip_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: polaris_zip_consumer_key_ratio
targetValue: 1
apiVersion: v1
metric:
name: polaris_zip_consumer_key_ratio
target:
type: Value
value: 1

env:
QUEUE: "polaris"
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0280.spot-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ releases:
metrics:
- type: Object
object:
metricName: spot_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: spot_consumer_key_ratio
targetValue: 1
apiVersion: v1
metric:
name: spot_consumer_key_ratio
target:
type: Value
value: 1

env:
INTERVAL: 1
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0281.spot-zip-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,15 @@ releases:
metrics:
- type: Object
object:
metricName: spot_zip_consumer_key_ratio
target:
apiVersion: v1
describedObject:
kind: Namespace
name: spot_zip_consumer_key_ratio
targetValue: 1
apiVersion: v1
metric:
name: spot_zip_consumer_key_ratio
target:
type: Value
value: 1

env:
QUEUE: "spot"
Expand Down
4 changes: 3 additions & 1 deletion conf/helmfile.d/0300.frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ releases:
- type: Resource
resource:
name: cpu
targetAverageUtilization: 80
target:
type: Utilization
averageUtilization: 80

env:
PORT: 8080
Expand Down
11 changes: 7 additions & 4 deletions conf/helmfile.d/0310.tf-serving.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,15 @@ releases:
metrics:
- type: Object
object:
metricName: tf_serving_gpu_usage
target:
apiVersion: v1
describedObject:
kind: Namespace
name: tf_serving_gpu_usage
targetValue: 70
apiVersion: v1
metric:
name: tf_serving_gpu_usage
target:
type: Value
value: 70

annotations:
prometheus.io/path: /monitoring/prometheus/metrics
Expand Down
22 changes: 18 additions & 4 deletions conf/tasks/Makefile.gke
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ gke/create/service-account:
@echo "Creating GKE service account..."
@gcloud iam service-accounts create $(CLOUDSDK_CONTAINER_CLUSTER) --display-name "Deepcell" || \
echo "No need to create service account; it probably already exists."
@gcloud projects add-iam-policy-binding $(CLOUDSDK_CORE_PROJECT) --member serviceAccount:$(GCP_SERVICE_ACCOUNT) --role roles/storage.admin
@gcloud projects add-iam-policy-binding $(CLOUDSDK_CORE_PROJECT) --member serviceAccount:$(GCP_SERVICE_ACCOUNT) --role roles/storage.admin --no-user-output-enabled
ifneq "" "${CERTIFICATE_MANAGER_ENABLED}"
@gcloud projects add-iam-policy-binding $(CLOUDSDK_CORE_PROJECT) --member serviceAccount:$(GCP_SERVICE_ACCOUNT) --role roles/dns.admin
@gcloud projects add-iam-policy-binding $(CLOUDSDK_CORE_PROJECT) --member serviceAccount:$(GCP_SERVICE_ACCOUNT) --role roles/dns.admin --no-user-output-enabled
# @gcloud iam service-accounts add-iam-policy-binding $(GCP_SERVICE_ACCOUNT) \
# --role roles/iam.workloadIdentityUser \
# --member "serviceAccount:$(CLOUDSDK_CORE_PROJECT).svc.id.goog[cert-manager/cert-manager]"
Expand All @@ -206,9 +206,9 @@ endif
## Delete Service Account used by deepcell
gke/destroy/service-account:
@echo "Destroying GKE service-account..."
@gcloud projects remove-iam-policy-binding $(CLOUDSDK_CORE_PROJECT) --member serviceAccount:$(GCP_SERVICE_ACCOUNT) --role roles/storage.admin
@gcloud projects remove-iam-policy-binding $(CLOUDSDK_CORE_PROJECT) --member serviceAccount:$(GCP_SERVICE_ACCOUNT) --role roles/storage.admin --no-user-output-enabled
ifneq "" "${CERTIFICATE_MANAGER_ENABLED}"
@gcloud projects remove-iam-policy-binding $(CLOUDSDK_CORE_PROJECT) --member serviceAccount:$(GCP_SERVICE_ACCOUNT) --role roles/dns.admin
@gcloud projects remove-iam-policy-binding $(CLOUDSDK_CORE_PROJECT) --member serviceAccount:$(GCP_SERVICE_ACCOUNT) --role roles/dns.admin --no-user-output-enabled
endif
@-gcloud iam service-accounts delete $(GCP_SERVICE_ACCOUNT) --quiet
@echo "GKE service-account destruction finished."
Expand Down Expand Up @@ -247,6 +247,19 @@ gke/create/bucket:
@echo " "
@echo " "

## Install GKE Auth Plugin for kubectl
gke/create/authplugin: INSTALL_AUTH_PLUGIN = $(shell echo ${USE_GKE_GCLOUD_AUTH_PLUGIN} | tr "[:upper:]" "[:lower:]")
gke/create/authplugin:
@if [ "true" = "${INSTALL_AUTH_PLUGIN}" ]; then \
echo "Installing the GKE Auth Plugin..."; \
gcloud components install gke-gcloud-auth-plugin --quiet; \
echo "GKE Auth Plugin install complete."; \
else \
echo "GKE Auth Plugin is disabled."; \
fi
@echo " "
@echo " "

## Destroy bucket used by deepcell
gke/destroy/bucket:
gsutil rm -r gs://$(CLOUDSDK_BUCKET) || echo "Bucket not destroyed."
Expand Down Expand Up @@ -285,6 +298,7 @@ gke/create/resources: \

## Create Cluster
gke/create/all: \
gke/create/authplugin \
gke/create/service-account \
gke/create/resources
@echo "GKE cluster created"
Expand Down
2 changes: 1 addition & 1 deletion docs/source/GETTING_STARTED.rst
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ You are now ready to start the Kiosk!

.. code-block:: bash

docker run -e DOCKER_TAG=1.8.0 vanvalenlab/kiosk-console:1.8.0 | sudo bash
docker run -e DOCKER_TAG=1.8.1 vanvalenlab/kiosk-console:1.8.1 | sudo bash

.. note:: This command and the one that follows may need to be preceded by `sudo` depending on your permission settings. This will require you to enter your password.

Expand Down
Loading