Skip to content
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
28 changes: 2 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
include Makefile-common

# Azure gpu vars
GPU_VM_SIZE ?= Standard_NC8as_T4_v3
GPU_REPLICAS ?= 1
OVERRIDE_ZONE ?=

.PHONY: default
default: help

.PHONY: help
##@ Pattern tasks

# No need to add a comment here as help is described in common/
help:
@make -f common/Makefile MAKEFILE_LIST="Makefile common/Makefile" help

%:
make -f common/Makefile $*

.PHONY: install
install: operator-deploy post-install ## installs the pattern and loads the secrets
@echo "Installed"

.PHONY: create-gpu-machineset
create-gpu-machineset: ## Creates a gpu machineset for AWS
ansible-playbook ansible/playbooks/create-gpu-machineset.yaml
Expand All @@ -28,12 +13,3 @@ create-gpu-machineset: ## Creates a gpu machineset for AWS
create-gpu-machineset-azure: ## Creates an Azure GPU machineset (overrides: GPU_VM_SIZE, GPU_REPLICAS, OVERRIDE_ZONE)
ansible-playbook ansible/playbooks/create-gpu-machineset-azure.yaml \
-e "gpu_vm_size=$(GPU_VM_SIZE) gpu_replicas=$(GPU_REPLICAS) override_zone=$(OVERRIDE_ZONE)"

.PHONY: post-install
post-install: ## Post-install tasks
make load-secrets
@echo "Done"

.PHONY: test
test:
@make -f common/Makefile PATTERN_OPTS="-f values-global.yaml -f values-hub.yaml" test
54 changes: 54 additions & 0 deletions Makefile-common
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
MAKEFLAGS += --no-print-directory
ANSIBLE_STDOUT_CALLBACK ?= null # null silences all ansible output. Override this with default, minimal, oneline, etc. when debugging.
ANSIBLE_RUN := ANSIBLE_STDOUT_CALLBACK=$(ANSIBLE_STDOUT_CALLBACK) ansible-playbook $(EXTRA_PLAYBOOK_OPTS)
DOCS_URL := https://validatedpatterns.io/blog/2025-08-29-new-common-makefile-structure/

.PHONY: help
help: ## Print this help message
@echo "For a complete guide to these targets and the available overrides, please visit $(DOCS_URL)"
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^(\s|[a-zA-Z_0-9-])+:.*?##/ { printf " \033[36m%-35s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

##@ Pattern Install Tasks
.PHONY: show
show: ## Shows the template that would be applied by the `make install` target
@$(ANSIBLE_RUN) rhvp.cluster_utils.show

.PHONY: operator-deploy
operator-deploy operator-upgrade: ## Installs/updates the pattern on a cluster (DOES NOT load secrets)
@$(ANSIBLE_RUN) rhvp.cluster_utils.operator_deploy

.PHONY: install
install: pattern-install ## Installs the pattern onto a cluster (Loads secrets as well if configured)

.PHONY: uninstall ## Prints a notice that patterns cannot currently be uninstalled
uninstall:
@echo "Uninstall is not possible at the moment so this target is empty. We are working to implement it as well as we can."

.PHONY: pattern-install
pattern-install:
@$(ANSIBLE_RUN) rhvp.cluster_utils.install

.PHONY: load-secrets
load-secrets: ## Loads secrets onto the cluster (unless explicitly disabled in values-global.yaml)
@$(ANSIBLE_RUN) rhvp.cluster_utils.load_secrets

##@ Validation Tasks
.PHONY: validate-prereq
validate-prereq: ## verify pre-requisites
@$(ANSIBLE_RUN) rhvp.cluster_utils.validate_prereq

.PHONY: validate-origin
validate-origin: ## verify the git origin is available
@$(ANSIBLE_RUN) rhvp.cluster_utils.validate_origin

.PHONY: validate-cluster
validate-cluster: ## Do some cluster validations before installing
@$(ANSIBLE_RUN) rhvp.cluster_utils.validate_cluster

.PHONY: validate-schema
validate-schema: ## validates values files against schema in common/clustergroup
@$(ANSIBLE_RUN) rhvp.cluster_utils.validate_schema

.PHONY: argo-healthcheck
argo-healthcheck: ## Checks if all argo applications are synced
@$(ANSIBLE_RUN) rhvp.cluster_utils.argo_healthcheck
2 changes: 1 addition & 1 deletion ansible/playbooks/templates/gpu-machineset.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
deviceIndex: 0
iamInstanceProfile:
id: {{ clusterId }}-worker-profile
instanceType: g5.2xlarge
instanceType: g6.2xlarge
kind: AWSMachineProviderConfig
metadata:
creationTimestamp: null
Expand Down
21 changes: 0 additions & 21 deletions common/.ansible-lint

This file was deleted.

9 changes: 0 additions & 9 deletions common/.github/dependabot.yml

This file was deleted.

4 changes: 0 additions & 4 deletions common/.github/linters/.gitleaks.toml

This file was deleted.

6 changes: 0 additions & 6 deletions common/.github/linters/.markdown-lint.yml

This file was deleted.

48 changes: 0 additions & 48 deletions common/.github/workflows/pattern-sh-ci.yml

This file was deleted.

44 changes: 0 additions & 44 deletions common/.github/workflows/superlinter.yml

This file was deleted.

13 changes: 0 additions & 13 deletions common/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion common/.gitleaks.toml

This file was deleted.

Loading