-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
K8s - Dragonfly - Create solution (#1959)
* Create smoke tests * changes * fix scheduler * Update version to 2.0.7 * Create k8s solution * application.yaml and Makefile fix * create Readme * Fix comments * Delete logo.png * Add files via upload * Fix comments * Fix newlines and add trigger * Fix Co-authored-by: Dmitrii Ganochenko <[email protected]> Co-authored-by: Armando Miani <[email protected]>
- Loading branch information
1 parent
1bb7690
commit 5968c85
Showing
34 changed files
with
1,965 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
include ../crd.Makefile | ||
include ../gcloud.Makefile | ||
include ../var.Makefile | ||
include ../images.Makefile | ||
|
||
CHART_NAME := dragonfly | ||
APP_ID ?= $(CHART_NAME) | ||
WAIT_FOR_READY_TIMEOUT := 900 | ||
|
||
TRACK ?= 2.0 | ||
MYSQL_TAG ?= 5.7 | ||
REDIS_TAG ?= 5.0 | ||
EXPORTER_TAG ?= exporter | ||
METRICS_EXPORTER_TAG ?= v0.5.1 | ||
|
||
|
||
SOURCE_REGISTRY ?= marketplace.gcr.io/google | ||
IMAGE_DRAGONFLY_MANAGER ?= $(SOURCE_REGISTRY)/dragonfly-manager2:$(TRACK) | ||
IMAGE_DRAGONFLY_SCHEDULER ?= $(SOURCE_REGISTRY)/dragonfly-scheduler2:$(TRACK) | ||
IMAGE_DRAGONFLY_SEEDPEER ?= $(SOURCE_REGISTRY)/dragonfly-seed-peer2:$(TRACK) | ||
IMAGE_DRAGONFLY_DFGET ?= $(SOURCE_REGISTRY)/dragonfly-dfget2:$(TRACK) | ||
IMAGE_MYSQL ?= $(SOURCE_REGISTRY)/mysql5:$(MYSQL_TAG) | ||
IMAGE_REDIS ?= $(SOURCE_REGISTRY)/redis5:$(REDIS_TAG) | ||
IMAGE_MYSQL_EXPORTER ?= $(SOURCE_REGISTRY)/mysql5:$(EXPORTER_TAG) | ||
IMAGE_REDIS_EXPORTER ?= $(SOURCE_REGISTRY)/redis5:$(EXPORTER_TAG) | ||
IMAGE_PROMETHEUS_TO_SD ?= k8s.gcr.io/prometheus-to-sd:$(METRICS_EXPORTER_TAG) | ||
|
||
|
||
# Main image | ||
image-$(CHART_NAME) := $(call get_sha256,$(IMAGE_DRAGONFLY_MANAGER)) | ||
|
||
# List of images used in application | ||
ADDITIONAL_IMAGES := mysql mysql-exporter redis redis-exporter prometheus-to-sd scheduler seedpeer dfget | ||
|
||
# Additional images variable names should correspond with ADDITIONAL_IMAGES list | ||
|
||
image-scheduler := $(call get_sha256,$(IMAGE_DRAGONFLY_SCHEDULER)) | ||
image-seedpeer := $(call get_sha256,$(IMAGE_DRAGONFLY_SEEDPEER)) | ||
image-dfget := $(call get_sha256,$(IMAGE_DRAGONFLY_DFGET)) | ||
image-prometheus-to-sd := $(call get_sha256,$(IMAGE_PROMETHEUS_TO_SD)) | ||
image-mysql := $(call get_sha256,$(IMAGE_MYSQL)) | ||
image-mysql-exporter := $(call get_sha256,$(IMAGE_MYSQL_EXPORTER)) | ||
image-redis := $(call get_sha256,$(IMAGE_REDIS)) | ||
image-redis-exporter := $(call get_sha256,$(IMAGE_REDIS_EXPORTER)) | ||
image-prometheus-to-sd := $(call get_sha256,$(IMAGE_PROMETHEUS_TO_SD)) | ||
|
||
C2D_CONTAINER_RELEASE := $(call get_c2d_release,$(image-$(CHART_NAME))) | ||
|
||
BUILD_ID := $(shell date --utc +%Y%m%d-%H%M%S) | ||
RELEASE ?= $(C2D_CONTAINER_RELEASE)-$(BUILD_ID) | ||
|
||
NAME ?= $(APP_ID)-1 | ||
|
||
# Additional variables | ||
ifdef METRICS_EXPORTER_ENABLED | ||
METRICS_EXPORTER_ENABLED_FIELD = , "metrics.exporter.enabled": $(METRICS_EXPORTER_ENABLED) | ||
endif | ||
|
||
APP_PARAMETERS ?= { \ | ||
"name": "$(NAME)", \ | ||
"namespace": "$(NAMESPACE)" \ | ||
$(METRICS_EXPORTER_ENABLED_FIELD) \ | ||
} | ||
|
||
# c2d_deployer.Makefile provides the main targets for installing the application. | ||
# It requires several APP_* variables defined above, and thus must be included after. | ||
include ../c2d_deployer.Makefile | ||
|
||
|
||
# Build tester image | ||
app/build:: .build/$(CHART_NAME)/tester |
Oops, something went wrong.