-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclone-openstack.sh
More file actions
executable file
·202 lines (183 loc) · 6.23 KB
/
clone-openstack.sh
File metadata and controls
executable file
·202 lines (183 loc) · 6.23 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#!/bin/bash
GITHUB_ORG="https://github.com/openstack"
echo "=========================================="
echo "Cloning OpenStack Enterprise-Scale Subset"
echo "=========================================="
# ============================================
# TIER 1: Core Services (The "Applications")
# ============================================
CORE_SERVICES=(
"nova" # Compute - massive, calls everything
"keystone" # Identity - everyone calls this
"glance" # Images - called by Nova
"neutron" # Networking - complex plugins
"cinder" # Block storage
"swift" # Object storage
"heat" # Orchestration (IaC engine)
"horizon" # Django-based dashboard
"placement" # Resource tracking (split from Nova)
)
# ============================================
# TIER 2: Extended Services (More complexity)
# ============================================
EXTENDED_SERVICES=(
"barbican" # Secrets management
"designate" # DNS as a service
"octavia" # Load balancing (uses Nova underneath)
"manila" # Shared filesystem
"ironic" # Bare metal provisioning
"magnum" # Container orchestration on k8s
"trove" # Database as a service
"sahara" # Big data processing
"murano" # Application catalog
"zaqar" # Messaging service
)
# ============================================
# TIER 3: Oslo Libraries (Shared dependencies)
# Every service depends on multiple Oslo libs
# ============================================
OSLO_LIBS=(
"oslo.config"
"oslo.messaging"
"oslo.db"
"oslo.service"
"oslo.log"
"oslo.middleware"
"oslo.policy"
"oslo.serialization"
"oslo.utils"
"oslo.i18n"
"oslo.concurrency"
"oslo.cache"
"oslo.context"
"oslo.versionedobjects"
"oslo.rootwrap"
"oslo.privsep"
)
# ============================================
# TIER 4: Python Clients (Per-service SDKs)
# ============================================
CLIENTS=(
"python-novaclient"
"python-keystoneclient"
"python-glanceclient"
"python-neutronclient"
"python-cinderclient"
"python-swiftclient"
"python-heatclient"
"python-openstackclient" # Unified CLI, depends on ALL clients
"python-barbicanclient"
"python-designateclient"
"python-octaviaclient"
"python-manilaclient"
"python-ironicclient"
"python-magnumclient"
"python-troveclient"
)
# ============================================
# TIER 5: Deployment & IaC
# ============================================
DEPLOYMENT=(
"devstack" # Dev environment scripts
"openstack-ansible" # Ansible-based deployment
"kolla" # Container-based deployment
"kolla-ansible" # Ansible for Kolla
"tripleo-common" # TripleO shared code
"heat-templates" # Heat orchestration templates
"tripleo-heat-templates" # TripleO deployment templates
)
# ============================================
# TIER 6: Testing & CI Infrastructure
# ============================================
TESTING=(
"tempest" # Integration test suite
"grenade" # Upgrade testing
"tempest-plugins" # Additional tempest tests
"devstack-gate" # CI gate scripts
)
# ============================================
# TIER 7: Supporting Libraries & Tools
# ============================================
SUPPORTING=(
"requirements" # Global requirements coordination
"governance" # Project governance docs
"releases" # Release management
"taskflow" # Task/workflow library
"stevedore" # Dynamic plugin loading
"cliff" # Command-line framework
"pbr" # Python build system
"debtcollector" # Deprecation library
"futurist" # Async utilities
)
# ============================================
# Function to clone with error handling
# ============================================
clone_repo() {
local repo=$1
if [ -d "$repo" ]; then
echo " [SKIP] $repo (already exists)"
else
echo " [CLONE] $repo"
git clone --depth 1 "$GITHUB_ORG/$repo.git" 2>/dev/null
if [ $? -eq 0 ]; then
echo " ✓ Success"
else
echo " ✗ Failed (may not exist or private)"
fi
fi
}
# ============================================
# Clone everything by tier
# ============================================
echo ""
echo "TIER 1: Core Services (${#CORE_SERVICES[@]} repos)"
for repo in "${CORE_SERVICES[@]}"; do
clone_repo "$repo"
done
echo ""
echo "TIER 2: Extended Services (${#EXTENDED_SERVICES[@]} repos)"
for repo in "${EXTENDED_SERVICES[@]}"; do
clone_repo "$repo"
done
echo ""
echo "TIER 3: Oslo Libraries (${#OSLO_LIBS[@]} repos)"
for repo in "${OSLO_LIBS[@]}"; do
clone_repo "$repo"
done
echo ""
echo "TIER 4: Python Clients (${#CLIENTS[@]} repos)"
for repo in "${CLIENTS[@]}"; do
clone_repo "$repo"
done
echo ""
echo "TIER 5: Deployment & IaC (${#DEPLOYMENT[@]} repos)"
for repo in "${DEPLOYMENT[@]}"; do
clone_repo "$repo"
done
echo ""
echo "TIER 6: Testing Infrastructure (${#TESTING[@]} repos)"
for repo in "${TESTING[@]}"; do
clone_repo "$repo"
done
echo ""
echo "TIER 7: Supporting Libraries (${#SUPPORTING[@]} repos)"
for repo in "${SUPPORTING[@]}"; do
clone_repo "$repo"
done
# ============================================
# Summary
# ============================================
echo ""
echo "=========================================="
echo "SUMMARY"
echo "=========================================="
TOTAL=$((${#CORE_SERVICES[@]} + ${#EXTENDED_SERVICES[@]} + ${#OSLO_LIBS[@]} + ${#CLIENTS[@]} + ${#DEPLOYMENT[@]} + ${#TESTING[@]} + ${#SUPPORTING[@]}))
echo "Total repositories targeted: $TOTAL"
echo ""
echo "Directory structure:"
find . -maxdepth 1 -type d | grep -v '^\.$' | wc -l | xargs echo " Actual repos cloned:"
echo ""
echo "Next steps:"
echo " 1. Run dependency analysis: ./analyze-dependencies.sh"
echo " 2. Generate architecture diagram"
echo ""