### Run Docker Compose Source: https://github.com/getsentry/self-hosted/blob/master/CONTRIBUTING.md After the install script completes, this command starts the self-hosted Sentry services in detached mode and waits for them to be ready. ```bash docker compose up -d --wait ``` -------------------------------- ### Install Testing Dependencies Source: https://github.com/getsentry/self-hosted/blob/master/CONTRIBUTING.md Installs testing dependencies for the self-hosted Sentry project using the 'uv' package manager, ensuring all dependencies are frozen to specific versions. ```bash uv sync --frozen ``` -------------------------------- ### Build and List Docker Images Source: https://github.com/getsentry/self-hosted/blob/master/workstation/README.md Build a Docker image using a specified Dockerfile and tag it. Then, list all images matching the group and phase for verification. ```shell $> docker build -t ${IMAGE_TAG} -f ./${PHASE}install/Dockerfile . $> docker image ls | grep "${GROUP}/${PHASE}install" ``` -------------------------------- ### List Available Workstation Configurations Source: https://github.com/getsentry/self-hosted/blob/master/workstation/README.md Use the `sentry workstations configs` command to list all available workstation configurations within your project. This helps users identify which configurations they can create or connect to. ```shell $> sentry workstations configs --project=$GCP_PROJECT_ID NAME CLUSTER REGION MACHINE TYPE postinstall-standard-us-west us-west us-west1 e2-standard-4 postinstall-large-us-west us-west us-west1 e2-standard-8 preinstall-standard-us-west us-west us-west1 e2-standard-4 preinstall-large-us-west us-west us-west1 e2-standard-8 ``` -------------------------------- ### Authenticate and Set GCP Project Source: https://github.com/getsentry/self-hosted/blob/master/workstation/README.md Log in to Google Cloud and set your project ID. This is necessary before interacting with Google Cloud services. ```shell $> export GCP_PROJECT_ID=my-gcp-project # Obviously, your project is likely to have another name. $> gcloud auth application-default login $> gcloud config set project $GCP_PROJECT_ID $> gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://us-docker.pkg.dev ``` -------------------------------- ### Tag and Push Docker Image to Artifact Registry Source: https://github.com/getsentry/self-hosted/blob/master/workstation/README.md Tag the locally built Docker image with the full Artifact Registry URL and then push it to the registry. This makes the image available for Cloud Workstation configurations. ```shell $> docker tag ${IMAGE_TAG} ${IMAGE_URL} $> docker push ${IMAGE_URL} ``` -------------------------------- ### Generate patch files Source: https://github.com/getsentry/self-hosted/blob/master/optional-modifications/README.md Commands to create patch files by comparing an original file with a modified version. ```bash diff -Naru docker-compose.yml docker-compose.clustered-redis.yml > docker-compose.yml.patch ``` ```bash diff -Naru [original file] [patched file] > [destination file].patch ``` -------------------------------- ### Apply external-kafka patches Source: https://github.com/getsentry/self-hosted/blob/master/optional-modifications/README.md Applies a set of patches for external Kafka configuration from the root directory using the -p0 flag. ```bash patch -p0 < optional-modifications/patches/external-kafka/.env.patch patch -p0 < optional-modifications/patches/external-kafka/config.example.yml.patch patch -p0 < optional-modifications/patches/external-kafka/sentry.conf.example.py.patch patch -p0 < optional-modifications/patches/external-kafka/docker-compose.yml.patch ``` -------------------------------- ### Run Integration Tests Source: https://github.com/getsentry/self-hosted/blob/master/CONTRIBUTING.md Executes the integration tests for the self-hosted Sentry project using 'pytest'. It includes coverage reporting and generates a JUnit XML report for CI integration. ```bash uv run pytest -x --cov --junitxml=junit.xml _integration-test/ ``` -------------------------------- ### Set Environment Variables for Docker Image Build Source: https://github.com/getsentry/self-hosted/blob/master/workstation/README.md Define environment variables for repository group, region, build phase, and image naming conventions. These are used in subsequent Docker build and push commands. ```shell $> export GROUP=sentry-workstation # Pick whatever name you like here. $> export REGION=us # Name your regions as you see fit - these are not tied to GCP definitions. $> export PHASE=pre # Use `pre` for preinstall, `post` for postinstall. $> export REPO=${GROUP}-${REGION} $> export IMAGE_TAG=${GROUP}/${PHASE}install:latest $> export IMAGE_URL=us-docker.pkg.dev/${GCP_PROJECT_ID}/${REPO}/${GROUP}/${PHASE}install:latest ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.