Skip to content
Snippets Groups Projects
Commit dfcb5249 authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

improve service start

parent 4c0ca6f5
Branches
Tags
No related merge requests found
package server
import (
"fmt"
"net/http"
)
func routeGetStreams(w http.ResponseWriter, r *http.Request) {
fmt.Println(r.RequestURI)
keys := r.URL.Query()
from := keys.Get("from")
filter := keys.Get("filter")
......
c:\opt\consul\nomad run receiver_tcp.nmd
c:\opt\consul\nomad run authorizer.nmd
c:\opt\consul\nomad run discovery.nmd
c:\opt\consul\nomad run broker.nmd
c:\opt\consul\nomad run nginx.nmd
c:\opt\consul\nomad run file_transfer.nmd
c:\opt\consul\nomad run discovery.nmd
c:\opt\consul\nomad run authorizer.nmd
ping 192.0.2.1 -n 1 -w 3000 > nul
......@@ -16,10 +12,18 @@ if %i% EQU 20 (
goto :error
)
ping 192.0.2.1 -n 1 -w 1000 >nul
curl --silent --fail 127.0.0.1:8400/asapo-discovery/asapo-mongodb --stderr - | findstr 127.0.0.1 || goto :repeat
if %i% EQU 1 (
c:\opt\consul\nomad run receiver_tcp.nmd
c:\opt\consul\nomad run broker.nmd
c:\opt\consul\nomad run file_transfer.nmd
ping 192.0.2.1 -n 1 -w 3000 > nul
)
curl --silent --fail 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.1 --stderr - | findstr 127.0.0.1 || goto :repeat
curl --silent --fail 127.0.0.1:8400/asapo-discovery/v0.1/asapo-broker?protocol=v0.1 --stderr - | findstr 127.0.0.1 || goto :repeat
curl --silent --fail 127.0.0.1:8400/asapo-discovery/v0.1/asapo-file-transfer?protocol=v0.1 --stderr - | findstr 127.0.0.1 || goto :repeat
echo discovery ready
echo services ready
goto :clean
......
nomad run receiver_tcp.nmd
nomad run authorizer.nmd
nomad run discovery.nmd
nomad run broker.nmd
nomad run nginx.nmd
while true
do
sleep 1
echo starting nginx and discovery
curl --silent 127.0.0.1:8400/asapo-discovery/asapo-mongodb --stderr - | grep 127.0.0.1 || continue
echo nginx and discovery started
break
done
nomad run file_transfer.nmd
nomad run receiver_tcp.nmd
nomad run broker.nmd
while true
do
sleep 1
echo starting services
curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-receiver?protocol=v0.1 --stderr - | grep 127.0.0.1 || continue
echo nginx,discovery, recevier started
echo recevier started
curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-broker?protocol=v0.1 --stderr - | grep 127.0.0.1 || continue
echo broker started
curl --silent 127.0.0.1:8400/asapo-discovery/v0.1/asapo-file-transfer?protocol=v0.1 --stderr - | grep 127.0.0.1 || continue
......
......@@ -5,6 +5,6 @@
"AuthorizationServer": "localhost:8400/asapo-authorizer",
"PerformanceDbName": "db_test",
"Port":5005,
"LogLevel":"info",
"LogLevel":"debug",
"CheckResendInterval":0
}
\ No newline at end of file
......@@ -7,5 +7,5 @@
"CheckResendInterval":0,
"PerformanceDbName": "db_test",
"Port":{{ env "NOMAD_PORT_broker" }},
"LogLevel":"info"
"LogLevel":"debug"
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment