-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.sh
More file actions
65 lines (56 loc) · 2.26 KB
/
setup.sh
File metadata and controls
65 lines (56 loc) · 2.26 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
#!/bin/bash
# AKS Mentions Bot Setup Script
# This script helps you set up the project from templates
set -e
echo "🚀 Setting up AKS Mentions Bot from templates..."
# Check if we're in the right directory
if [ ! -f "azure.yaml" ]; then
echo "❌ Error: azure.yaml not found. Please run this script from the project root directory."
exit 1
fi
# Copy environment template
if [ ! -f ".env" ]; then
echo "📝 Copying .env.example to .env..."
cp .env.example .env
echo "✅ Created .env - please edit with your API keys"
else
echo "ℹ️ .env already exists, skipping..."
fi
# Copy Kubernetes templates
if [ ! -f "k8s/deployment.local.yaml" ]; then
echo "📝 Copying deployment template..."
cp k8s/deployment.template.yaml k8s/deployment.local.yaml
echo "✅ Created k8s/deployment.local.yaml - please edit with your values"
else
echo "ℹ️ k8s/deployment.local.yaml already exists, skipping..."
fi
if [ ! -f "k8s/secrets.local.yaml" ]; then
echo "📝 Copying secrets template..."
cp k8s/secrets.template.yaml k8s/secrets.local.yaml
echo "✅ Created k8s/secrets.local.yaml - please edit with your values"
else
echo "ℹ️ k8s/secrets.local.yaml already exists, skipping..."
fi
# Copy infrastructure template
if [ ! -f "infra/main.parameters.local.json" ]; then
echo "📝 Copying infrastructure parameters template..."
cp infra/main.parameters.template.json infra/main.parameters.local.json
echo "✅ Created infra/main.parameters.local.json"
else
echo "ℹ️ infra/main.parameters.local.json already exists, skipping..."
fi
echo ""
echo "🎉 Setup complete! Next steps:"
echo ""
echo "1. Edit .env with your API keys and configuration"
echo "2. Edit k8s/deployment.local.yaml with your Azure resource names"
echo "3. Edit k8s/secrets.local.yaml with your Key Vault and identity details"
echo "4. Run 'azd up' to deploy everything to Azure"
echo ""
echo "📚 See README.md for detailed configuration instructions"
echo ""
echo "🔒 Note: All .local.* files are gitignored to protect your secrets"
echo "💡 The 'azd up' command will automatically:"
echo " - Deploy infrastructure (AKS, ACR, Key Vault, etc.)"
echo " - Build and push your container image"
echo " - Deploy to Kubernetes using your .local.yaml files"