forked from radius-project/resource-types-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenvironment.mk
More file actions
56 lines (48 loc) · 2.62 KB
/
Copy pathenvironment.mk
File metadata and controls
56 lines (48 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# ------------------------------------------------------------
# Copyright 2025 The Radius Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ------------------------------------------------------------
##@ Environment Setup
# Environment Setup:
# make install-radius # Install Radius CLI
# make create-cluster # Create a local k3d Kubernetes cluster for testing
# make delete-cluster # Delete the local k3d Kubernetes cluster
RAD_VERSION ?=
.PHONY: install-radius-cli
install-radius-cli: ## Install the Radius CLI. Optionally specify a version number, e.g., "make install-radius RAD_VERSION=0.48.0" or "make install-radius RAD_VERSION=edge"
@echo -e "$(ARROW) Installing Radius..."
wget -q "https://raw.githubusercontent.com/radius-project/radius/main/deploy/install.sh" -O - | /bin/bash $(if $(RAD_VERSION),-s $(RAD_VERSION))
.PHONY: create-radius-cluster
create-radius-cluster: ## Create a local k3d Kubernetes cluster with a default Radius workspace/group/environment.
@echo -e "$(ARROW) Creating local k3d cluster and installing Radius..."
@.github/scripts/create-cluster.sh
@.github/scripts/verify-ucp-readiness.sh
@echo -e "$(ARROW) Creating workspace and environment..."
@.github/scripts/create-workspace.sh
.PHONY: clean
clean: ## Delete the local k3d cluster, Radius config, Bicep extensions (*.tgz), and bicepconfig.json files
@echo -e "$(ARROW) Deleting Radius config file at ~/.rad/config.yaml..."
@rm -f ~/.rad/config.yaml
@echo -e "$(ARROW) Deleting Bicep extension files (*.tgz)..."
@find . -name "*.tgz" -type f -delete
@echo -e "$(ARROW) Deleting bicepconfig.json files..."
@find . -name "bicepconfig.json" -type f -delete
@echo -e "$(ARROW) Deleting k3d cluster..."
@k3d cluster delete
.PHONY: configure-azure-provider
configure-azure-provider: ## Configure Radius Azure workspace, environment, credential, and deployment target (requires AZURE_* env vars)
@.github/scripts/configure-azure-provider.sh
.PHONY: cleanup-azure-resources
cleanup-azure-resources: ## Delete Azure resource group created for tests (uses AZURE_TEST_STATE_FILE or AZURE_RESOURCE_GROUP)
@.github/scripts/cleanup-azure-resources.sh