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

[DT-1048] Remove outdated Brew instructions #2732

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions docs/Brewfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
brew "git"
brew "git-secrets"
brew "jq"
brew "volta"
cask "docker"
cask "google-cloud-sdk"
cask "intellij-idea" # comment this line and uncomment the next line
# cask "intellij-idea-ce" # if you want to install the community edition
cask "postgres-unofficial"
26 changes: 2 additions & 24 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Ensure that you have access to the required team resources. If you encounter a p
DUOS and [Terra](https://terra.bio/) use [Sam](https://github.com/broadinstitute/sam) to abstract identity and access management. To gain access to these services, first create a non-Broad email address through Gmail. This email address will specifically be used for development purposes in our non-prod environments. Next, to register as a new user, click the `Sign in with Google` button in each of the environments with the newly created email address and follow the prompts:
Copy link
Contributor Author

@fboulnois fboulnois Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a follow-up, we can think of a single Data Team getting-started.md in the future. My goal for such a document is that a developer has their environment set up so that they can start developing, which is upstream from running the service locally.


- [Dev](https://bvdp-saturn-dev.appspot.com/)
- [Alpha](https://bvdp-saturn-alpha.appspot.com/)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Environment no longer exists

- [Staging](https://bvdp-saturn-staging.appspot.com/)

For [production](https://app.terra.bio/), you will need to register using a `firecloud.org` email. In order to get an account, you must become suitable, which requires following [these steps](https://docs.google.com/document/d/1DRftlTe-9Q4H-R0jxanVojvyNn1IzbdIOhNKiIj9IpI/edit?usp=sharing).
Expand All @@ -53,29 +52,18 @@ brew bundle --no-lock install
Running the `brew` command above will install the following tools:

1. [Git](https://git-scm.com/) is a version control tool for tracking changes in projects and code.
2. [git-secrets](https://github.com/awslabs/git-secrets) prevents developers from committing passwords and secrets to git.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically installed by BITS

3. [jq](https://stedolan.github.io/jq/) is a command line JSON processing tool.
4. [Docker](https://www.docker.com/) is a tool to deliver software in packages called containers. Docker for MacOS also includes [Kubernetes](https://kubernetes.io/), which deploys groups of containers together in clusters.
5. [Vault](https://www.vaultproject.io/) is an encrypted database used to store many of the team's secrets such as keys and passwords.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer relevant for DUOS

6. [Volta](https://volta.sh/) is a tool to manage installations of [`nodejs`](https://nodejs.org/en/) and its dependencies. The DUOS user interface is built using `nodejs`.
7. [Google Cloud SDK](https://cloud.google.com/sdk) is a command-line interface to Google Cloud services. Once it is installed, you'll need to allow auth access and configure Docker to connect to the appropriate Google Cloud endpoint when necessary, which is done with the configuration below.
8. [IntelliJ IDEA](https://www.jetbrains.com/idea/) is an integrated development environment (IDE) for Java. There are two versions available: **Ultimate** (paid) and **Community** (open-source). We recommend the Ultimate Edition to Broad employees for its database navigation capabilities. Alternatively, the Community Edition has all the features needed for development, and this version can be installed by switching `intellij-idea` with `intellij-idea-ce` in the Brewfile.
9. [Postgres](https://www.postgresql.org/) is an advanced open-source database.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use Docker Postgres instances instead


Unfortunately, some manual configuration is also necessary:

```
# configure vault
export VAULT_ADDR=https://clotho.broadinstitute.org:8200

# launch docker desktop - this installs docker in /usr/local/bin
open -a docker

# launch postgres.app
# 1. click the sidebar icon (bottom left-hand corner) and then click the plus sign
# 2. name the new server, making sure to select version 11 and then initialize it
open -a postgres

# configure google-cloud-sdk
gcloud auth login
gcloud auth application-default login
Expand All @@ -88,7 +76,7 @@ volta setup && volta install ${NODE_VERSION}

## 6. Create GitHub token

The GitHub token verifies team permissions. This token is necessary for the next step, [Login to Vault](#9-login-to-vault). To create a token:
The GitHub token verifies team permissions. To create a token:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the token is unnecessary, the only need for it that I remember was for vault access. Mine has expired and I haven't needed to regenerate one since.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is (rarely) used for some GitHub tasks, such as launching a GitHub Action from the command line and clearing the GitHub cache.


1. Go to the [GitHub Personal Access Token](https://github.com/settings/tokens) page and click **Generate new token**.
2. Give the token a descriptive name, **only** give it the following two scopes and then click **Generate token**.
Expand All @@ -101,17 +89,7 @@ GITHUB_TOKEN=<<GITHUB TOKEN VALUE>>
echo $GITHUB_TOKEN > ~/.github-token
```

## 7. Login to Vault

Vault access tokens can be obtained using the GitHub token from earlier as follows:

```
vault login -method=github token=$(cat ~/.github-token)
```

> Vault access tokens expire after 30 days, so if you get a `403` error trying to use `vault`, re-run the `vault login` command to refresh your access token.

## 8. Code Checkout
## 7. Code Checkout

> It may be useful to create a folder for Broad projects in your home directory.

Expand Down
Loading