Skip to content

Commit 27a4ad6

Browse files
committed
Fix quick-start-containers.sh architecture inconsistencies
- Remove pod-based approach that was conflicting with host networking - Use consistent standalone container architecture - Fix port conflicts between pod and host networking - Remove unnecessary workspace volume mount - Improve cleanup to handle both old pod and new standalone containers - Update help text to reflect new container management commands The script now successfully deploys without port conflicts and matches the working manual deployment approach.
1 parent 589dd89 commit 27a4ad6

File tree

1 file changed

+8
-18
lines changed

1 file changed

+8
-18
lines changed

quick-start-containers.sh

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ BLUE='\033[0;34m'
1313
NC='\033[0m' # No Color
1414

1515
# Configuration
16-
POD_NAME="ci-analysis-pod"
1716
OLLAMA_CONTAINER="ollama"
1817
AGENT_CONTAINER="ci-analysis-agent"
1918
OLLAMA_VOLUME="ollama-data"
@@ -57,10 +56,10 @@ check_podman() {
5756
cleanup_existing() {
5857
print_status "Cleaning up existing containers..."
5958

60-
# Stop and remove containers if they exist
61-
if podman pod exists "$POD_NAME" 2>/dev/null; then
62-
podman pod stop "$POD_NAME" 2>/dev/null || true
63-
podman pod rm "$POD_NAME" 2>/dev/null || true
59+
# Stop and remove pod if it exists (from previous versions)
60+
if podman pod exists "ci-analysis-pod" 2>/dev/null; then
61+
podman pod stop "ci-analysis-pod" 2>/dev/null || true
62+
podman pod rm "ci-analysis-pod" 2>/dev/null || true
6463
fi
6564

6665
# Remove individual containers if they exist
@@ -77,13 +76,6 @@ cleanup_existing() {
7776
print_success "Cleanup completed"
7877
}
7978

80-
# Function to create pod
81-
create_pod() {
82-
print_status "Creating pod '$POD_NAME'..."
83-
podman pod create --name "$POD_NAME" -p "$AGENT_PORT:$AGENT_PORT" -p "$OLLAMA_PORT:$OLLAMA_PORT"
84-
print_success "Pod '$POD_NAME' created"
85-
}
86-
8779
# Function to create Ollama volume
8880
create_volume() {
8981
print_status "Creating volume '$OLLAMA_VOLUME'..."
@@ -100,7 +92,7 @@ start_ollama() {
10092
print_status "Starting Ollama container..."
10193
podman run -d \
10294
--name "$OLLAMA_CONTAINER" \
103-
--pod "$POD_NAME" \
95+
-p "$OLLAMA_PORT:$OLLAMA_PORT" \
10496
-v "$OLLAMA_VOLUME:/root/.ollama" \
10597
-e OLLAMA_HOST=0.0.0.0:$OLLAMA_PORT \
10698
ollama/ollama:latest
@@ -147,7 +139,6 @@ start_agent() {
147139
--network host \
148140
-e OLLAMA_API_BASE="http://localhost:$OLLAMA_PORT" \
149141
-e LOG_LEVEL=INFO \
150-
-v "$(pwd):/app/workspace:Z" \
151142
ci-analysis-agent:latest
152143

153144
print_success "CI Analysis Agent container started"
@@ -204,9 +195,9 @@ show_status() {
204195
echo "🎯 Quick Commands:"
205196
echo " • View logs: podman logs -f $AGENT_CONTAINER"
206197
echo " • Check Ollama models: podman exec $OLLAMA_CONTAINER ollama list"
207-
echo " • Stop all: podman pod stop $POD_NAME"
208-
echo " • Start all: podman pod start $POD_NAME"
209-
echo " • Remove all: podman pod rm -f $POD_NAME"
198+
echo " • Stop containers: podman stop $OLLAMA_CONTAINER $AGENT_CONTAINER"
199+
echo " • Start containers: podman start $OLLAMA_CONTAINER $AGENT_CONTAINER"
200+
echo " • Remove containers: podman rm -f $OLLAMA_CONTAINER $AGENT_CONTAINER"
210201
echo ""
211202
echo "📖 For more information, see: CONTAINERIZED-DEPLOYMENT.md"
212203
echo "================================================================="
@@ -279,7 +270,6 @@ main() {
279270
fi
280271

281272
# Start deployment
282-
create_pod
283273
create_volume
284274
start_ollama
285275

0 commit comments

Comments
 (0)