Skip to content
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

docs: clarify the difference between developer environments #484

Merged
merged 2 commits into from
Jul 19, 2019
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
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ After you run the server container, the journalist interface API will be running

To ensure that file decryption works, please import [this test private key](https://raw.githubusercontent.com/freedomofpress/securedrop/0a901362b84a5378fba80e9cd0ffe4542bdcd598/securedrop/tests/files/test_journalist_key.sec) into your GnuPG keyring. Submissions in the SecureDrop server dev environment can be decrypted with this test key.


## Run the tests and checks

To run everything, run:
Expand All @@ -107,6 +106,37 @@ To run everything, run:
make check
```

## Comparison of developer environments

### Developer environment on non-Qubes

* Ran by `run.sh`
* Uses temporary configuration directories by default
* Requests/responses to the Journalist API are sent directly via HTTP (and Tor is not used)
* Does not use `split-gpg`

### Developer environment on Qubes

* Ran by directly invoking the client `python -m securedrop_client` in the `sd-svs` AppVM
* Requires that `make all` in the `securedrop-workstation` repository has completed successfully
* For convienient access to network in order to clone the repository and push branches, you'll need to add a NetVM (`sys-firewall`)
* Uses `~/.securedrop_client` as its configuration directory
* Requests/responses proxied via the `securedrop-proxy` RPC service (and Tor is used)
* `split-gpg` is used with the key configured in the `sd-gpg` AppVM

### Packaged code on Qubes

* Requires that `make all` in the `securedrop-workstation` repository has completed successfully
* Uses `~/.securedrop_client` as its configuration directory
* Requests/responses proxied via the `securedrop-proxy` RPC service (and Tor is used)
* `split-gpg` is used with the key configured in the `sd-gpg` AppVM
* To run the client from the packaged code in Qubes, see the [documentation here](https://github.com/freedomofpress/securedrop-workstation/#using-the-securedrop-client)
* Using a version of this application installed from a deb package in Qubes,
you can debug issues by looking at the log file in
`~/.securedrop_client/logs/client.log`
* You can also add additional log lines in the running code in
`/opt/venvs/securedrop-client/lib/python3.5/site-packages/securedrop_client/`

## Generate and run database migrations

```bash
Expand All @@ -122,7 +152,6 @@ This project aims to have at most one migration per release. There may be cases
but developers should merge their migration into the latest migration that has been generated since the last
release. The above mentioned autogenerate command will not do this for you.


## Making a Release

**Note:** These are the release guidelines for pre-production alpha releases. Production release tags must
Expand All @@ -132,12 +161,3 @@ be signed with the SecureDrop release key.
2. Commit the changes with commit message `securedrop-client $new_version_number` and make a PR.
3. You should confirm via a manual debian package build and manual testing in Qubes that there are no regressions (this is limited pre-release QA).
4. Once your PR is approved, you can add a tag and push: `git tag $new_version_number`.

## Qubes Debugging

Using a version of this application installed from a deb package in Qubes,
you can debug issues by looking at the log file in
`~/.securedrop_client/logs/client.log`.

You can also add additional log lines in the running code in
`/opt/venvs/securedrop-client/lib/python3.5/site-packages/securedrop_client/`.