Skip to content

Commit

Permalink
02: prereq
Browse files Browse the repository at this point in the history
  • Loading branch information
katilp committed Oct 14, 2024
1 parent 8f70082 commit 729f4b9
Show file tree
Hide file tree
Showing 3 changed files with 127 additions and 0 deletions.
1 change: 1 addition & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ contact: '[email protected]' # FIXME
# Order of episodes in your lesson
episodes:
- 01-intro.md
- 02-storage.md

# Information for Learners
learners:
Expand Down
125 changes: 125 additions & 0 deletions episodes/02-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
title: "Persistent storage"
teaching: 10
exercises: 5
---

:::::::::::::::::::::::::::::::::::::: questions

- How to create a Google Cloud Storage bucket?
- Why it done separately from the cluster?

::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::: objectives

- Learn to create a Google Cloud Storage bucket
- Understand the persistant storage costs.

::::::::::::::::::::::::::::::::::::::::::::::::

## Storage for the output files

The processing workflow writes the output files to a storage from which they can be downloaded afterwards.

For this tutorial, we use a Google Cloud Storage (GCS) bucket.

::::::::::::::::::::::::::::::::::::: callout

The storage is created separately from the cluster resources. You can then delete the cluster just after the processing and avoid unnecessary costs, but keep the output files.

::::::::::::::::::::::::::::::::::::::::::::::::

## Prerequisites

### GCP account and project

Make sure that you are in the GCP account and project that you intend to use for this work. In your Linux terminal, type

```bash
gcloud config list
```

The output shows your account and project.

:::::::::::::::::::::::::::::::::::::::::: spoiler

### How to change them?

If they are not what you expect (in case you have many), change them with

```bask
gcloud config set account <ACCOUNT>
```

and

```bash
gcloud config set project <PROJECT_ID>
```

#### Accounts

You can can check the credentialed accounts with

```bash
gcloud auth list
```

If you get none or your account does not appear in the list, run

```bash
gcloud init
```

and follow the steps in the output.

#### Projects

List the projects within the active account with

```bash
gcloud projects list
```

::::::::::::::::::::::::::::::::::::::::::::::::

### Billing account?

If this is your first project or you created it from the Google Cloud Console Web UI, it will have a billing account linked to it.

If you created the project from the command line without specifying the billing account, you can link it to an existing account.

First list the billing accounts

```bash
gcloud billing accounts list
```

Take the account id from the output, and check if your project is linked to it

```bash
gcloud billing projects list --billing-account <ACCOUNT_ID>
```

If not, link your project to this account with
gcloud billing projects link <PROJECT_ID> --billing-account <ACCOUNT_ID>
```bash

```

### Enabling services

### Decide your region



::::::::::::::::::::::::::::::::::::: keypoints

- Google Cloud Storage bucket can be used to store the output files.
- The storage cost depends on the volume stored.
- The download


::::::::::::::::::::::::::::::::::::::::::::::::

1 change: 1 addition & 0 deletions learners/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ title: 'Reference'

GCP - [Google Cloud Platform](https://cloud.google.com/)
GKE - [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine)
GCS - [Google Cloud Storage](https://cloud.google.com/storage)
K8s - [Kubernetes](https://kubernetes.io/)

0 comments on commit 729f4b9

Please sign in to comment.