Skip to content

Commit

Permalink
add coordinator placement command;
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Artoul committed Oct 10, 2018
1 parent b5b4da9 commit 6d518cc
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions scripts/development/m3_stack/start_m3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ echo "Validating namespace"
[ "$(curl -sSf localhost:7201/api/v1/namespace | jq .registry.namespaces.prometheus_metrics.indexOptions.enabled)" == true ]
echo "Done validating namespace"

echo "Initializing topology"
echo "Initializing M3DB topology"
curl -vvvsSf -X POST localhost:7201/api/v1/placement/init -d '{
"num_shards": 64,
"replication_factor": 3,
Expand Down Expand Up @@ -70,12 +70,30 @@ curl -vvvsSf -X POST localhost:7201/api/v1/placement/init -d '{
}
]
}'
echo "Done initializing topology"
echo "Done initializing M3DB topology"

echo "Validating topology"
[ "$(curl -sSf localhost:7201/api/v1/placement | jq .placement.instances.m3db_seed.id)" == '"m3db_seed"' ]
echo "Done validating topology"

echo "Initializing M3Coordinator topology"
curl -vvvsSf -X POST localhost:7201/api/v1/services/m3coordinator/placement/init -d '{
"instances": [
{
"id": "coordinator01",
"zone": "embedded",
"endpoint": "coordinator01:7507",
"hostname": "coordinator01",
"port": 7507
}
]
}'
echo "Done initializing M3Coordinator topology"

echo "Validating M3Coordinator topology"
[ "$(curl -sSf localhost:7201/api/v1/services/m3coordinator/placement | jq .placement.instances.coordinator01.id)" == '"coordinator01"' ]
echo "Done validating topology"

echo "Prometheus available at localhost:9090"
echo "Grafana available at localhost:3000"
echo "Run ./stop.sh to shutdown nodes when done"

0 comments on commit 6d518cc

Please sign in to comment.