<commit_before># GCP-specific server setup instructions

These instructions are part of the instructions for
[Setting up `upspinserver`](/doc/server_setup.md).
Please make sure you have read that document first.

## Build `upspinserver-gcp` and `upspin-setupstorage-gcp`

To use Google Cloud Storage fetch the `gcp.upspin.io` repository and use the
`upspinserver-gcp` and `upspin-setupstorage-gcp` variants.

Fetch the repository and its dependencies:

```
local$ go get -d gcp.upspin.io/cmd/...
```

Install the `upspin-setupstorage-gcp` command:

```
local$ go install gcp.upspin.io/cmd/upspin-setupstorage-gcp
```

Build the `upspinserver-gcp` binary:

```
local$ GOOS=linux GOARCH=amd64 go build gcp.upspin.io/cmd/upspinserver-gcp
```

## Create a Google Cloud Project

First create a Google Cloud Project and associated Billing Account by visiting the
[Cloud Console](https://cloud.google.com/console).
See the corresponding documentation
[here](https://support.google.com/cloud/answer/6251787?hl=en) and
[here](https://support.google.com/cloud/answer/6288653?hl=en)
for help.
For the project name, we suggest you use a string similar to your domain.
(We will use `example-com`.)

Then, install the Google Cloud SDK by following
[the official instructions](https://cloud.google.com/sdk/downloads).

Finally, use the `gcloud` tool to enable the required APIs:

```
local$ gcloud components install beta
local$ gcloud config set project example-com
local$ gcloud auth login
local$ gcloud beta services enable iam.googleapis.com
local$ gcloud beta services enable storage_api
```

## Create a Google Cloud Storage bucket

Use the `gcloud` tool to obtain "application default credentials" so that the<commit_msg>doc: add project creation step to GCP instructions<commit_after># GCP-specific server setup instructions

These instructions are part of the instructions for
[Setting up `upspinserver`](/doc/server_setup.md).
Please make sure you have read that document first.

## Build `upspinserver-gcp` and `upspin-setupstorage-gcp`

To use Google Cloud Storage fetch the `gcp.upspin.io` repository and use the
`upspinserver-gcp` and `upspin-setupstorage-gcp` variants.

Fetch the repository and its dependencies:

```
local$ go get -d gcp.upspin.io/cmd/...
```

Install the `upspin-setupstorage-gcp` command:

```
local$ go install gcp.upspin.io/cmd/upspin-setupstorage-gcp
```

Build the `upspinserver-gcp` binary:

```
local$ GOOS=linux GOARCH=amd64 go build gcp.upspin.io/cmd/upspinserver-gcp
```

## Create a Google Cloud Project

First create a Google Cloud Project and associated Billing Account by visiting the
[Cloud Console](https://cloud.google.com/console).
See the corresponding documentation
[here](https://support.google.com/cloud/answer/6251787?hl=en) and
[here](https://support.google.com/cloud/answer/6288653?hl=en)
for help.
For the project name, we suggest you use a string similar to your domain.
(We will use `example-com`.)

Then, install the Google Cloud SDK by following
[the official instructions](https://cloud.google.com/sdk/downloads).

Finally, use the `gcloud` tool to enable the required APIs:

```
local$ gcloud components install beta
local$ gcloud projects create example-com
local$ gcloud config set project example-com
local$ gcloud auth login
local$ gcloud beta services enable iam.googleapis.com
local$ gcloud beta services enable storage_api
```

## Create a Google Cloud Storage bucket

Use the `gcloud` tool to obtain "application default credentials" so that the
{'fraction_non_alphanumeric': 0.10128388017118402, 'fraction_numerical': 0.00912981455064194, 'mean_word_length': 5.024054982817869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2095897', 'n_tokens_mistral': 1072, 'n_tokens_neox': 1037, 'n_words': 385}