github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/scripts/vagrant/single/README.md (about) 1 # Vagrant 2 3 This runs a Kubernetes environment on a single box, using vagrant to provision a VM either locally, or in a cloud environment. 4 5 It includes: 6 - kubernetes (using kind) 7 - etcd (single node) 8 - m3db operator 9 - m3db node (single node) 10 - m3coordinator dedicated (two instances) 11 - prometheus 12 - grafana (accessible localhost:3333, login admin:admin) 13 14 This is useful for benchmarking and similar needs. 15 16 # Local setup 17 18 Start: 19 ```bash 20 ./start_vagrant.sh 21 ``` 22 23 Stop: 24 ```bash 25 ./stop_vagrant.sh 26 ``` 27 28 Reopen tunnels: 29 ```bash 30 ./tunnel_vagrant.sh 31 ``` 32 33 SSH: 34 ```bash 35 ./ssh_vagrant.sh 36 ``` 37 38 # GCP setup 39 40 After authorizing with gcloud, use ~/.ssh/google_compute_engine as the SSH key. 41 42 Start: 43 ```bash 44 PROVIDER="google" GOOGLE_PROJECT_ID="your_google_project_id" GOOGLE_JSON_KEY_LOCATION="your_google_service_account_json_key_as_local_path" USER="$(whoami)" SSH_KEY="your_ssh_key_as_local_path" ./start_vagrant.sh 45 ``` 46 47 Stop: 48 ```bash 49 PROVIDER="google" GOOGLE_PROJECT_ID="your_google_project_id" GOOGLE_JSON_KEY_LOCATION="your_google_service_account_json_key_as_local_path" USER="$(whoami)" SSH_KEY="your_ssh_key_as_local_path" ../shared/stop_vagrant.sh 50 ``` 51 52 Reopen tunnels: 53 ```bash 54 PROVIDER="google" GOOGLE_PROJECT_ID="your_google_project_id" GOOGLE_JSON_KEY_LOCATION="your_google_service_account_json_key_as_local_path" USER="$(whoami)" SSH_KEY="your_ssh_key_as_local_path" ../shared/tunnel_vagrant.sh 55 ``` 56 57 SSH: 58 ```bash 59 PROVIDER="google" GOOGLE_PROJECT_ID="your_google_project_id" GOOGLE_JSON_KEY_LOCATION="your_google_service_account_json_key_as_local_path" USER="$(whoami)" SSH_KEY="your_ssh_key_as_local_path" ../shared/ssh_vagrant.sh 60 ``` 61 62 # Running 63 64 Once setup you can SSH in and turn on write load (scaling to a single replica is roughly equivalent to applying 10,000 writes/sec): 65 ```bash 66 kubectl scale --replicas=1 deployment/promremotebench 67 ``` 68 69 ## Accessing Grafana 70 71 You can access grafana by visiting `http://localhost:3333` and using username `admin` and password `admin`.