-
-
Save AgentO3/7775957 to your computer and use it in GitHub Desktop.
Here is how I have setup my local dev. I place these files in my a folder call vividcortex and I checkout the GitHub repos into that folder. I can just cd into that main vividcortex folder and run bash startup.sh. This will start all the services with one bash command.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VC_CUSTOMER_DSN=root@tcp(127.0.0.1:12830)/customers?charset=utf8 | |
VC_SHARD_DSN=root@tcp({host}:12830)/template?charset=utf8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
maxconn 4000 | |
defaults | |
mode http | |
retries 3 | |
timeout http-request 10s | |
log global | |
option httplog | |
option dontlognull | |
option http-server-close | |
option forwardfor except 127.0.0.0/8 | |
option redispatch | |
timeout queue 1m | |
timeout connect 10s | |
timeout client 5m | |
timeout server 5m | |
timeout http-keep-alive 10s | |
timeout check 10s | |
backend apiv2hosts | |
reqrep ^([^\ ]*)\ /api/v2/hosts(.*) \1\ /hosts\2 | |
server b *:9991 check | |
backend apiv2metrics | |
reqrep ^([^\ ]*)\ /api/v2/metrics(.*) \1\ /metrics\2 | |
server c *:9992 check | |
backend apiv2faults | |
reqrep ^([^\ ]*)\ /api/v2/faults(.*) \1\ /faults\2 | |
server d *:9993 check | |
backend apiv2events | |
reqrep ^([^\ ]*)\ /api/v2/events(.*) \1\ /events\2 | |
server d *:9994 check | |
backend webapp | |
server e *:8080 check | |
backend mysql | |
mode tcp | |
option tcpka | |
server db01 *:12830 | |
frontend api 127.0.0.1:8098 | |
mode http | |
#acl wants_edgar path_beg /api | |
#use_backend apiedgar if wants_edgar | |
acl wants_hosts path_beg /api/v2/hosts | |
use_backend apiv2hosts if wants_hosts | |
acl wants_metrics path_beg /api/v2/metrics | |
use_backend apiv2metrics if wants_metrics | |
acl wants_faults path_beg /api/v2/faults | |
use_backend apiv2faults if wants_faults | |
acl wants_events path_beg /api/v2/events | |
use_backend apiv2events if wants_events | |
default_backend webapp | |
frontend db *:3306 | |
mode tcp | |
default_backend mysql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api-proxy: haproxy -f haproxy.cfg | |
api-host: api-hosts --listen-address=:9991 --pm-listen-address=:9981 | |
api-metrics: api-metrics --listen-address=:9992 --pm-listen-address=:9982 | |
api-faults: api-faults --listen-address=:9993 --pm-listen-address=:9983 | |
api-events: api-events --listen-address=:9994 --pm-listen-address=:9984 | |
memcached: memcached |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#su root -c "/usr/sbin/apachectl restart" | |
echo "Updating API" | |
go get -u github.com/VividCortex/api-metrics/... | |
go get -u github.com/VividCortex/api-faults/... | |
go get -u github.com/VividCortex/api-hosts/... | |
go get -u github.com/VividCortex/api-events/... | |
go install github.com/VividCortex/api-metrics/ | |
go install github.com/VividCortex/api-faults/ | |
go install github.com/VividCortex/api-hosts/ | |
go install github.com/VividCortex/api-events/ | |
echo "Starting VividCortex" | |
echo "Starting MySQL" | |
./schema/run.sh | |
./schema/run.sh observations | |
#./schema/run.sh sample2 | |
#./schema/run.sh sample3 | |
echo "Api and Proxy" | |
foreman start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment