Skip to content

Commit 56ffb3f

Browse files
authored
Merge pull request #76 from dminnear-rh/remove-common
Use patternizer to remove common from this repo
2 parents a05c8cf + c058868 commit 56ffb3f

33 files changed

+174
-1442
lines changed

Makefile

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
1+
include Makefile-common
2+
13
# Azure gpu vars
24
GPU_VM_SIZE ?= Standard_NC8as_T4_v3
35
GPU_REPLICAS ?= 1
46
OVERRIDE_ZONE ?=
57

6-
.PHONY: default
7-
default: help
8-
9-
.PHONY: help
10-
##@ Pattern tasks
11-
12-
# No need to add a comment here as help is described in common/
13-
help:
14-
@make -f common/Makefile MAKEFILE_LIST="Makefile common/Makefile" help
15-
16-
%:
17-
make -f common/Makefile $*
18-
19-
.PHONY: install
20-
install: operator-deploy post-install ## installs the pattern and loads the secrets
21-
@echo "Installed"
22-
238
.PHONY: create-gpu-machineset
249
create-gpu-machineset: ## Creates a gpu machineset for AWS
2510
ansible-playbook ansible/playbooks/create-gpu-machineset.yaml
@@ -28,12 +13,3 @@ create-gpu-machineset: ## Creates a gpu machineset for AWS
2813
create-gpu-machineset-azure: ## Creates an Azure GPU machineset (overrides: GPU_VM_SIZE, GPU_REPLICAS, OVERRIDE_ZONE)
2914
ansible-playbook ansible/playbooks/create-gpu-machineset-azure.yaml \
3015
-e "gpu_vm_size=$(GPU_VM_SIZE) gpu_replicas=$(GPU_REPLICAS) override_zone=$(OVERRIDE_ZONE)"
31-
32-
.PHONY: post-install
33-
post-install: ## Post-install tasks
34-
make load-secrets
35-
@echo "Done"
36-
37-
.PHONY: test
38-
test:
39-
@make -f common/Makefile PATTERN_OPTS="-f values-global.yaml -f values-hub.yaml" test

Makefile-common

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
MAKEFLAGS += --no-print-directory
2+
ANSIBLE_STDOUT_CALLBACK ?= null # null silences all ansible output. Override this with default, minimal, oneline, etc. when debugging.
3+
ANSIBLE_RUN := ANSIBLE_STDOUT_CALLBACK=$(ANSIBLE_STDOUT_CALLBACK) ansible-playbook $(EXTRA_PLAYBOOK_OPTS)
4+
DOCS_URL := https://validatedpatterns.io/blog/2025-08-29-new-common-makefile-structure/
5+
6+
.PHONY: help
7+
help: ## Print this help message
8+
@echo "For a complete guide to these targets and the available overrides, please visit $(DOCS_URL)"
9+
@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)
10+
11+
##@ Pattern Install Tasks
12+
.PHONY: show
13+
show: ## Shows the template that would be applied by the `make install` target
14+
@$(ANSIBLE_RUN) rhvp.cluster_utils.show
15+
16+
.PHONY: operator-deploy
17+
operator-deploy operator-upgrade: ## Installs/updates the pattern on a cluster (DOES NOT load secrets)
18+
@$(ANSIBLE_RUN) rhvp.cluster_utils.operator_deploy
19+
20+
.PHONY: install
21+
install: pattern-install ## Installs the pattern onto a cluster (Loads secrets as well if configured)
22+
23+
.PHONY: uninstall ## Prints a notice that patterns cannot currently be uninstalled
24+
uninstall:
25+
@echo "Uninstall is not possible at the moment so this target is empty. We are working to implement it as well as we can."
26+
27+
.PHONY: pattern-install
28+
pattern-install:
29+
@$(ANSIBLE_RUN) rhvp.cluster_utils.install
30+
31+
.PHONY: load-secrets
32+
load-secrets: ## Loads secrets onto the cluster (unless explicitly disabled in values-global.yaml)
33+
@$(ANSIBLE_RUN) rhvp.cluster_utils.load_secrets
34+
35+
##@ Validation Tasks
36+
.PHONY: validate-prereq
37+
validate-prereq: ## verify pre-requisites
38+
@$(ANSIBLE_RUN) rhvp.cluster_utils.validate_prereq
39+
40+
.PHONY: validate-origin
41+
validate-origin: ## verify the git origin is available
42+
@$(ANSIBLE_RUN) rhvp.cluster_utils.validate_origin
43+
44+
.PHONY: validate-cluster
45+
validate-cluster: ## Do some cluster validations before installing
46+
@$(ANSIBLE_RUN) rhvp.cluster_utils.validate_cluster
47+
48+
.PHONY: validate-schema
49+
validate-schema: ## validates values files against schema in common/clustergroup
50+
@$(ANSIBLE_RUN) rhvp.cluster_utils.validate_schema
51+
52+
.PHONY: argo-healthcheck
53+
argo-healthcheck: ## Checks if all argo applications are synced
54+
@$(ANSIBLE_RUN) rhvp.cluster_utils.argo_healthcheck

ansible/playbooks/templates/gpu-machineset.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ spec:
5050
deviceIndex: 0
5151
iamInstanceProfile:
5252
id: {{ clusterId }}-worker-profile
53-
instanceType: g5.2xlarge
53+
instanceType: g6.2xlarge
5454
kind: AWSMachineProviderConfig
5555
metadata:
5656
creationTimestamp: null

common/.ansible-lint

Lines changed: 0 additions & 21 deletions
This file was deleted.

common/.github/dependabot.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

common/.github/linters/.gitleaks.toml

Lines changed: 0 additions & 4 deletions
This file was deleted.

common/.github/linters/.markdown-lint.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

common/.github/workflows/pattern-sh-ci.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

common/.github/workflows/superlinter.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

common/.gitignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)