Skip to content

Update docs on running getsentry locally #11428

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions develop-docs/development/environment/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ After installation you should be able to run `devenv bootstrap` which will guide

When you're done with setup, you'll want to also review the <Link to="/development/workflow/">development workflow</Link>.


## Keeping your environment up-to-date

Simply run `devenv sync` inside of your sentry or getsentry repo.

NOTE: After running `devenv sync` you may need to restart your terminal to continue.


## Running the Development Server

The `devservices` ensure that you have all the services required for local development running. See the [devservices docs](/services/devservices/) for more information on managing services.
Expand Down Expand Up @@ -108,6 +106,8 @@ sentry devservices up snuba

See also: <Link to="/sentry-vs-getsentry/">Sentry vs Getsentry</Link>

Before running `getsentry`, you might need to run `devenv sync` inside the `getsentry` directory if you have previously run `sentry` locally, as there might be differences between the environments.

Just like running `sentry` (see above), you can start the `devservices` using the following command in the `getsentry` folder:

```shell
Expand All @@ -122,26 +122,24 @@ getsentry devserver --workers

**Note**: You **cannot** have both sentry and getsentry devserver running at the same time.

After the server warms up for a little while, you must access it
at [http://dev.getsentry.net:8000](http://dev.getsentry.net:8000/).
Using localhost doesn't work.
After the server warms up, access it at [http://dev.getsentry.net:8000](http://dev.getsentry.net:8000/). Using localhost won't work. Note that the **http** protocol is used, not **https**. If you encounter a certificate error while accessing it locally, it might be because your browser has remembered that `dev.getsentry.net` previously used the https protocol (possibly while running `yarn dev-ui`) and is now redirecting all http requests to https. To resolve this, open the site in an **incognito window** of your browser.

If you need to overwrite configuration options for your local
environment, you can create `getsentry/conf/settings/devlocal.py` and put the
configuration option overrides there. This module will be automatically imported
by `dev.py` if it exists.

To enable the ingest workers, follow the steps described <Link to="#ingestion-pipeline-relay">here</Link> and run

```shell
getsentry devserver --workers --ingest
```


## Running siloed instances

By default `sentry devserver` will run a monolith mode application server. You can also run ``devserver`` with siloed application instances. Before you do, you need to <Link to="/database-migrations/#cloning-a-monolith-database">create split silo databases</Link>.
By default `sentry devserver` will run a monolith mode application server. You can also run `devserver` with siloed application instances. Before you do, you need to <Link to="/database-migrations/#cloning-a-monolith-database">create split silo databases</Link>.

The devserver command supports `--silo` option that lets you create siloed instances. Any workers, consumers, or celery-beat processes will be started with the same silo mode.
The devserver command supports `--silo` option that lets you create siloed instances. Any workers, consumers, or celery-beat processes will be started with the same silo mode.

```shell
# Start control silo servers
Expand All @@ -150,6 +148,7 @@ sentry devserver --silo=control --celery-beat --workers
# Start region silo servers
sentry devserver --silo=region --celery-beat --workers --ingest
```

Siloed servers have the following port assignments:

- 8000 - Webpack
Expand Down
Loading