Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Latest commit

 

History

History
103 lines (79 loc) · 3.49 KB

README.md

File metadata and controls

103 lines (79 loc) · 3.49 KB

everest-dev (Archived)

Note: This repository has been archived and its functionality has been merged into a consolidated repository.

For the latest updates and features, please visit the new repository:

Everest

This repository holds the configuration files for creating a development environment for everest.

tilt.dev builds and deploys all components to a local kubernetes cluster and also watches for changes in each of the components' repo in order to trigger a rebuild/redeploy of the affected components.

Build and runtime logs can be easily accessed using tilt's web UI.

Prerequisites

  1. Install k3d

  2. Install tilt.dev

  3. Clone everest-operator, percona-everest-backend and percona-everest-frontend git repos.

Set up the environment

1. Set up k8s & registry

Option A: Local

k3d cluster create everest-dev --registry-create k3d-registry

Option B: Remote (GKE)

  1. Setup your default gcloud project, e.g.
export CLOUDSDK_CORE_PROJECT=percona-everest
  1. Create GKE cluster
gcloud container clusters create <NAME> --cluster-version 1.27 --preemptible --machine-type n1-standard-4  --num-nodes=3 --zone=europe-west1-c --labels delete-cluster-after-hours=12 --no-enable-autoupgrade
  1. Create Artifacts registry accodring to instructions
  2. Configure access
gcloud auth configure-docker <REGISTRY_REGION>-docker.pkg.dev
  1. Uncomment and edit allow_k8s_contexts and default_registry in the Tiltfile

⚠️ To avoid extra costs do not forget to:

  • Destroy external cluster when not used
  • Cleanup the registry periodically since tilt pushes a new image each time something is changed in the project.

2. Run tilt

  1. Set the paths to the local git repos for everest-operator, percona-everest-backend and percona-everest-frontend
export EVEREST_OPERATOR_DIR=<Path to operator repo>
export EVEREST_BACKEND_DIR=<Path to backend repo>
export EVEREST_FRONTEND_DIR=<Path to frontend repo>
export EVEREST_CLI_DIR=<Path to cli repo>
  1. (Optional) If you want to test a specific version of a given DB operator you can set the following environment variables
export PXC_OPERATOR_VERSION=1.13.0
export PSMDB_OPERATOR_VERSION=1.15.0
export PG_OPERATOR_VERSION=2.3.1
  1. Run tilt
tilt up

The everest UI/API will be available at http://localhost:8080.

Tear down the environment

  1. Tear down tilt
tilt down
  1. Tear down local k8s cluster
k3d cluster delete everest-dev

Notes for frontend development

Rebuilding the frontend takes ~30s which makes this strategy not very efficient for frontend development. Therefore, we recommend frontend developers to run tilt as described in Set up the environment section but then run a local dev instance of the frontend by running make dev from the frontend repo. This dev instance will be available at http://localhost:3000 while still connecting to the everest backend backend running inside k8s.