-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathMakefile
More file actions
152 lines (124 loc) · 5.13 KB
/
Makefile
File metadata and controls
152 lines (124 loc) · 5.13 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# Makefile for the Agentic Platform
# Run `make help` to see available commands
.PHONY: help install test test-unit test-cov lint security labs clean
PORT ?= 8080
#==============================================================================
# Help
#==============================================================================
help:
@echo "Agentic Platform - Make Commands"
@echo ""
@echo "Setup & Testing:"
@echo " make install Install dependencies"
@echo " make test Run all tests"
@echo " make test-unit Run unit tests only"
@echo " make test-cov Run tests with coverage"
@echo " make lint Run linter"
@echo " make security Run gitleaks"
@echo ""
@echo "Run Locally:"
@echo " make dev:deps Start local dependencies (Postgres, Redis, LiteLLM, etc.)"
@echo " make dev:deps-stop Stop local dependencies"
@echo " make dev <name> [PORT=<port>] Run agent or MCP server locally"
@echo " make service <name> Run a gateway service locally"
@echo ""
@echo "Build & Deploy:"
@echo " make build <name> Build container image"
@echo " make deploy-eks <name> Build + deploy to EKS"
@echo " make deploy-ac <name> Build + deploy to AgentCore"
@echo ""
@echo "Available:"
@echo " Agents: agentic_chat, agentic_rag, jira_agent, langgraph_chat, strands_glue_athena"
@echo " MCP: bedrock_kb_mcp_server"
@echo " Services: memory_gateway, retrieval_gateway"
@echo ""
@echo "Other:"
@echo " make labs Start Jupyter Lab"
@echo " make clean Clean cache files"
#==============================================================================
# Setup & Testing
#==============================================================================
install:
uv sync
test:
uv run pytest
test-unit:
uv run pytest tests/unit/
test-cov:
uv run pytest --cov=src/agentic_platform --cov-report=term-missing
lint:
uv run ruff check src/
security:
gitleaks detect .
#==============================================================================
# Run Locally
#==============================================================================
# make dev:deps
dev\:deps:
docker compose up -d
# make dev:deps-stop
dev\:deps-stop:
docker compose down
# make dev agentic_chat
dev:
$(eval NAME := $(filter-out $@,$(MAKECMDGOALS)))
@if [ -z "$(NAME)" ]; then echo "Usage: make dev <name>"; exit 1; fi
cd src && uv run --env-file agentic_platform/agent/$(NAME)/.env -- \
uvicorn agentic_platform.agent.$(NAME).server:app --reload --port $(PORT)
# make dev:mcp bedrock_kb_mcp_server
dev\:mcp:
$(eval NAME := $(filter-out $@,$(MAKECMDGOALS)))
@if [ -z "$(NAME)" ]; then echo "Usage: make dev:mcp <name>"; exit 1; fi
cd src && uv run --env-file agentic_platform/mcp_server/$(NAME)/.env -- \
python -m agentic_platform.mcp_server.$(NAME).server
# make service memory_gateway
service:
$(eval NAME := $(filter-out $@,$(MAKECMDGOALS)))
@if [ -z "$(NAME)" ]; then echo "Usage: make service <name>"; exit 1; fi
cd src && uv run --env-file agentic_platform/service/$(NAME)/.env -- \
uvicorn agentic_platform.service.$(NAME).server:app --reload
#==============================================================================
# Build & Deploy
#==============================================================================
# make build agentic-chat
build:
$(eval NAME := $(filter-out $@,$(MAKECMDGOALS)))
@if [ -z "$(NAME)" ]; then echo "Usage: make build <name>"; exit 1; fi
./deploy/build-container.sh $(NAME) agent
# make build:mcp bedrock-kb-mcp-server
build\:mcp:
$(eval NAME := $(filter-out $@,$(MAKECMDGOALS)))
@if [ -z "$(NAME)" ]; then echo "Usage: make build:mcp <name>"; exit 1; fi
./deploy/build-container.sh $(NAME) mcp_server
# make deploy-eks agentic-chat
deploy-eks:
$(eval NAME := $(filter-out $@,$(MAKECMDGOALS)))
@if [ -z "$(NAME)" ]; then echo "Usage: make deploy-eks <name>"; exit 1; fi
./deploy/build-container.sh $(NAME) agent
./deploy/deploy-application.sh $(NAME) agent
# make deploy-eks:mcp bedrock-kb-mcp-server
deploy-eks\:mcp:
$(eval NAME := $(filter-out $@,$(MAKECMDGOALS)))
@if [ -z "$(NAME)" ]; then echo "Usage: make deploy-eks:mcp <name>"; exit 1; fi
./deploy/build-container.sh $(NAME) mcp_server
./deploy/deploy-mcp-server.sh $(NAME)
# make deploy-ac agentic_chat
deploy-ac:
$(eval NAME := $(filter-out $@,$(MAKECMDGOALS)))
@if [ -z "$(NAME)" ]; then echo "Usage: make deploy-ac <name>"; exit 1; fi
./deploy/build-container.sh $(NAME) agent
cd infrastructure/stacks/agentcore-runtime && terraform apply -var-file="$(NAME).tfvars" -auto-approve
deploy-gateways:
./deploy/deploy-gateways.sh --build
#==============================================================================
# Other
#==============================================================================
labs:
uv run jupyter lab
clean:
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
find . -type d -name ".pytest_cache" -exec rm -rf {} + 2>/dev/null || true
find . -type f -name "*.pyc" -delete 2>/dev/null || true
# Catch-all for positional arguments
%:
@: