github.com/m3db/m3@v1.5.0/scripts/vagrant/multi/README.md (about)

     1  # Vagrant
     2  
     3  This allows comparisons between a feature branch (specified by a `FEATURE_DOCKER_IMAGE` environment variable), and `latest`.
     4  
     5  It includes:
     6  - kubernetes (using kind)
     7  - etcd (single node)
     8  - m3db operator
     9  - m3db node (multi node)
    10  - m3coordinator dedicated (two instances)
    11  - prometheus
    12  - grafana (accessible localhost:3333, login admin:admin)
    13  
    14  # Requirements
    15  Setup vagrant azure provider via [docs](https://github.com/Azure/vagrant-azure).
    16  Or alternatively set up google provider via [docs](https://github.com/mitchellh/vagrant-google).
    17  
    18  # Local setup
    19  
    20  Start:
    21  ```bash
    22  ./start_vagrant.sh
    23  ```
    24  
    25  Stop:
    26  ```bash
    27  ./stop_vagrant.sh
    28  ```
    29  
    30  Reopen tunnels:
    31  ```bash
    32  ./tunnel_vagrant.sh
    33  ```
    34  
    35  SSH:
    36  ```bash
    37  ./ssh_vagrant.sh
    38  ```
    39  
    40  # GCP setup
    41  
    42  After authorizing with gcloud, use ~/.ssh/google_compute_engine as the SSH key.
    43  
    44  Start:
    45  ```bash
    46  FEATURE_DOCKER_IMAGE=quay.io/m3dbtest/m3dbnode:feature 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
    47  ```
    48  
    49  Stop:
    50  ```bash
    51  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
    52  ```
    53  
    54  Reopen tunnels (must provide $MACHINE):
    55  ```bash
    56  MACHINE=primary 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
    57  ```
    58  
    59  SSH (must provide $MACHINE):
    60  ```bash
    61  MACHINE=primary 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
    62  ```
    63  
    64  # AZURE setup
    65  
    66  After authorizing with azure, use preferred key as the SSH key.
    67  
    68  Start:
    69  ```bash
    70  FEATURE_DOCKER_IMAGE=quay.io/m3dbtest/m3dbnode:feature PROVIDER="azure" AZURE_TENANT_ID="tenant-id" AZURE_CLIENT_ID="client-id" AZURE_CLIENT_SECRET="client-secret" AZURE_SUBSCRIPTION_ID="subscription-id" USER="$(whoami)" SSH_KEY="your_ssh_key_as_local_path" ./start_vagrant.sh
    71  ```
    72  
    73  Stop:
    74  ```bash
    75  PROVIDER="azure" AZURE_TENANT_ID="tenant-id" AZURE_CLIENT_ID="client-id" AZURE_CLIENT_SECRET="client-secret" AZURE_SUBSCRIPTION_ID="subscription-id" USER="$(whoami)" SSH_KEY="your_ssh_key_as_local_path" ../shared/stop_vagrant.sh
    76  ```
    77  
    78  Reopen tunnels (must provide $MACHINE):
    79  ```bash
    80  MACHINE=primary PROVIDER="azure" AZURE_TENANT_ID="tenant-id" AZURE_CLIENT_ID="client-id" AZURE_CLIENT_SECRET="client-secret" AZURE_SUBSCRIPTION_ID="subscription-id" USER="$(whoami)" SSH_KEY="your_ssh_key_as_local_path" ../shared/tunnel_vagrant.sh
    81  ```
    82  
    83  SSH (must provide $MACHINE):
    84  ```bash
    85  MACHINE=primary PROVIDER="azure" AZURE_TENANT_ID="tenant-id" AZURE_CLIENT_ID="client-id" AZURE_CLIENT_SECRET="client-secret" AZURE_SUBSCRIPTION_ID="subscription-id" USER="$(whoami)" SSH_KEY="your_ssh_key_as_local_path" ../shared/ssh_vagrant.sh
    86  ```
    87  
    88  # Running
    89  
    90  Once setup you can SSH into the benchmarker vm and turn on write load (scaling to a single replica is roughly equivalent to applying 10,000 writes/sec):
    91  ```bash
    92  kubectl scale --replicas=1 deployment/promremotebench
    93  ```
    94  
    95  ## Accessing Grafana
    96  
    97  You can access grafana by visiting `http://localhost:3333` and using username `admin` and password `admin`.