Compare commits
11 Commits
main
...
cj/agentap
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1dbdad101d | ||
|
|
2ecdbddf8f | ||
|
|
fa8147e1bb | ||
|
|
4aa4448d81 | ||
|
|
3829a20756 | ||
|
|
15a16f279b | ||
|
|
a6aca54728 | ||
|
|
b2c1ff0770 | ||
|
|
41e86b8715 | ||
|
|
4f22907ed4 | ||
|
|
65ccc6ff48 |
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -o errexit
|
||||
#set -o errexit
|
||||
set -o pipefail
|
||||
set -x
|
||||
|
||||
port=${1:-3284}
|
||||
|
||||
@ -10,18 +11,30 @@ port=${1:-3284}
|
||||
agentapi_started=false
|
||||
|
||||
echo "Waiting for agentapi server to start on port $port..."
|
||||
for i in $(seq 1 150); do
|
||||
for j in $(seq 1 3); do
|
||||
sleep 0.1
|
||||
if curl -fs -o /dev/null "http://localhost:$port/status"; then
|
||||
echo "agentapi response received ($j/3)"
|
||||
start=$(date +%s)
|
||||
while true; do
|
||||
if curl -f "http://localhost:$port/status"; then
|
||||
agentapi_started=true
|
||||
elapsed=$(($(date +%s) - start))
|
||||
echo "$(date): agentapi server started after $elapsed seconds"
|
||||
break
|
||||
else
|
||||
echo "agentapi server not responding ($i/15)"
|
||||
continue 2
|
||||
echo "$(date): agentapi server not responding"
|
||||
agentapi_pid=$(pidof agentapi)
|
||||
if [ -z "$agentapi_pid" ]; then
|
||||
echo "$(date): agentapi process not found"
|
||||
else
|
||||
echo "$(date): agentapi pid: $agentapi_pid"
|
||||
fi
|
||||
boundary_pid=$(pidof boundary)
|
||||
if [ -z "$boundary_pid" ]; then
|
||||
echo "$(date): boundary process not found"
|
||||
else
|
||||
echo "$(date): boundary pid: $boundary_pid"
|
||||
fi
|
||||
sleep 1
|
||||
continue
|
||||
fi
|
||||
done
|
||||
agentapi_started=true
|
||||
break
|
||||
done
|
||||
|
||||
if [ "$agentapi_started" != "true" ]; then
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -x
|
||||
|
||||
use_prompt=${1:-false}
|
||||
port=${2:-3284}
|
||||
|
||||
@ -338,8 +338,8 @@ locals {
|
||||
}
|
||||
|
||||
module "agentapi" {
|
||||
source = "registry.coder.com/coder/agentapi/coder"
|
||||
version = "2.0.0"
|
||||
source = "github.com/coder/registry//registry/coder/modules/agentapi?ref=cj%2Fagentapi%2Fdebug"
|
||||
# version = "2.0.0"
|
||||
|
||||
agent_id = var.agent_id
|
||||
web_app_slug = local.app_slug
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
BOLD='\033[0;1m'
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
set -x
|
||||
|
||||
command_exists() {
|
||||
command -v "$1" > /dev/null 2>&1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user