From e05f9a7dea92f67f4864824c0dd8da59f6a2ef7c Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Mon, 14 Feb 2022 20:58:59 +0000 Subject: [PATCH] GCP: Minor cleanups --- content/GCP/06_running_analysis.ipynb | 227 ++++++++++++--------- content/GCP/08_cleaning_up_resources.ipynb | 2 +- 2 files changed, 126 insertions(+), 103 deletions(-) diff --git a/content/GCP/06_running_analysis.ipynb b/content/GCP/06_running_analysis.ipynb index f5bfdd1..e6adc25 100644 --- a/content/GCP/06_running_analysis.ipynb +++ b/content/GCP/06_running_analysis.ipynb @@ -62,9 +62,9 @@ "````{admonition} Exercise\n", "\n", "Using the console navigate to the \"Compute Engine\" service and create a new VM with the following properties.\n", - " * Call the VM \"essentials\"\n", - " * Allow the VM \"Full\" access to \"Storage\". This can be found under \"Identity and API\" on the \"create an instance\" page and then selecting \"Set access for each API\" and change \"Storage\" to \"Full\". **This will allow the VM to create, read, write, and delete all storage buckets in the project\"**\n", - " * Select a bit larger VM by changing the machine type to something larger, for example an \"e2-standard-2\".\n", + " * Call the VM instance \"essentials\"\n", + " * Allow the VM instance \"Full\" access to \"Storage\". This can be found under \"Identity and API\" on the \"create an instance\" page and then selecting \"Set access for each API\" and change \"Storage\" to \"Full\". **This will allow the VM to create, read, write, and delete all storage buckets in the project\"**\n", + " * Select a bit larger VM instance by changing the machine type to \"e2-standard-2\".\n", "````" ] }, @@ -151,10 +151,11 @@ "Hit:2 http://deb.debian.org/debian buster InRelease\n", "Hit:3 http://deb.debian.org/debian buster-updates InRelease\n", "Hit:4 http://deb.debian.org/debian buster-backports InRelease\n", - "Get:5 http://packages.cloud.google.com/apt cloud-sdk-buster InRelease [6780 B]\n", - "Hit:6 http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-buster InRelease\n", + "Hit:5 http://packages.cloud.google.com/apt cloud-sdk-buster InRelease\n", + "Get:6 http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-buster InRelease [5553 B]\n", "Hit:7 http://packages.cloud.google.com/apt google-compute-engine-buster-stable InRelease\n", - "Fetched 6780 B in 1s (8978 B/s)\n", + "Get:8 http://packages.cloud.google.com/apt google-cloud-packages-archive-keyring-buster/main amd64 Packages [389 B]\n", + "Fetched 5942 B in 1s (7839 B/s)33m0m\u001b[33m\n", "Reading package lists... Done\n", "Building dependency tree \n", "Reading state information... Done\n", @@ -200,12 +201,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "bucket: essentials-learner-2022-02-07 region: us-west2\n" + "bucket: essentials-learner-2022-02-14 region: us-west2\n" ] } ], "source": [ - "BUCKET=\"essentials-${USER}-$(date +%F)\"\n", + "BUCKET=\"essentials-$USER-$(date +%F)\"\n", "REGION=\"us-west2\"\n", "echo \"bucket: $BUCKET region: $REGION\"" ] @@ -220,12 +221,12 @@ "name": "stdout", "output_type": "stream", "text": [ - "Creating gs://essentials-learner-2022-02-07/...\n" + "Creating gs://essentials-learner-2022-02-14/...\n" ] } ], "source": [ - "gsutil mb -b on -l $REGION --pap enforced \"gs://$BUCKET\"" + "gsutil mb -b on -l $REGION --pap enforced gs://$BUCKET" ] }, { @@ -246,7 +247,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "gs://essentials-learner-2022-02-07/\n" + "gs://essentials-learner-2022-02-14/\n" ] } ], @@ -288,7 +289,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 6, "id": "96db6a66-3fbf-419a-b8c8-dbb27639e990", "metadata": {}, "outputs": [], @@ -298,7 +299,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 7, "id": "36554c99-ba08-4733-8ef2-e68d42d0d2b7", "metadata": {}, "outputs": [ @@ -307,11 +308,9 @@ "output_type": "stream", "text": [ "Cloning into 'CLASS-Examples'...\n", - "remote: Enumerating objects: 4, done.\u001b[K\n", - "remote: Counting objects: 100% (4/4), done.\u001b[K\n", - "remote: Compressing objects: 100% (4/4), done.\u001b[K\n", - "remote: Total 70 (delta 0), reused 1 (delta 0), pack-reused 66\u001b[K\n", - "Unpacking objects: 100% (70/70), done.\n" + "remote: Enumerating objects: 86, done.\u001b[K\n", + "remote: Total 86 (delta 0), reused 0 (delta 0), pack-reused 86\u001b[K\n", + "Unpacking objects: 100% (86/86), done.\n" ] } ], @@ -329,7 +328,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 8, "id": "90c1cda7-60d4-44bb-84f8-e776a77a94ab", "metadata": {}, "outputs": [], @@ -350,7 +349,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 9, "id": "55b628d5-6e5c-45a5-9cd3-c129db9cdcd2", "metadata": {}, "outputs": [ @@ -359,13 +358,13 @@ "output_type": "stream", "text": [ "total 28\n", - "-rw-r--r-- 1 learner learner 964 Feb 7 16:04 ReadMe.md\n", - "-rw-r--r-- 1 learner learner 72 Feb 7 16:04 clean.sh\n", - "-rw-r--r-- 1 learner learner 280 Feb 7 16:04 download.sh\n", - "-rw-r--r-- 1 learner learner 314 Feb 7 16:04 get-index.sh\n", - "-rw-r--r-- 1 learner learner 613 Feb 7 16:04 process_sat.py\n", - "-rw-r--r-- 1 learner learner 76 Feb 7 16:04 search.json\n", - "-rw-r--r-- 1 learner learner 783 Feb 7 16:04 search.py\n" + "-rw-r--r-- 1 learner learner 964 Feb 14 20:30 ReadMe.md\n", + "-rw-r--r-- 1 learner learner 72 Feb 14 20:30 clean.sh\n", + "-rw-r--r-- 1 learner learner 280 Feb 14 20:30 download.sh\n", + "-rw-r--r-- 1 learner learner 314 Feb 14 20:30 get-index.sh\n", + "-rw-r--r-- 1 learner learner 613 Feb 14 20:30 process_sat.py\n", + "-rw-r--r-- 1 learner learner 76 Feb 14 20:30 search.json\n", + "-rw-r--r-- 1 learner learner 783 Feb 14 20:30 search.py\n" ] } ], @@ -387,7 +386,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 10, "id": "e56ab74a-ae6d-4602-a26b-4a2656bd40cd", "metadata": {}, "outputs": [ @@ -436,7 +435,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 11, "id": "bbe85b75-c7cd-40ed-a3b0-37cbd0a5f52e", "metadata": {}, "outputs": [ @@ -454,7 +453,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 12, "id": "18a9b71c-5871-4ce2-a202-b48ad04e8d38", "metadata": {}, "outputs": [ @@ -468,7 +467,7 @@ "feature is enabled by default but requires that compiled crcmod be\n", "installed (see \"gsutil help crcmod\").\n", "\n", - "/ [1 files][731.9 MiB/731.9 MiB] 63.0 MiB/s \n", + "/ [1 files][731.9 MiB/731.9 MiB] \n", "Operation completed over 1 objects/731.9 MiB. \n" ] } @@ -487,7 +486,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 13, "id": "2cdaf24c-c4aa-4e80-9236-939e7c982916", "metadata": {}, "outputs": [], @@ -505,7 +504,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 14, "id": "b005876c-f9af-43d6-80c6-f04295413b9b", "metadata": {}, "outputs": [ @@ -514,7 +513,7 @@ "output_type": "stream", "text": [ "total 2.5G\n", - "-rw-r--r-- 1 learner learner 2.5G Feb 7 16:04 index.csv\n" + "-rw-r--r-- 1 learner learner 2.5G Feb 14 20:32 index.csv\n" ] } ], @@ -532,7 +531,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 15, "id": "ffe969db-d207-44fe-8957-8d129c76ee8f", "metadata": {}, "outputs": [ @@ -575,7 +574,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 16, "id": "c5e300c3-e1f3-4cd4-9679-77725e61c4db", "metadata": {}, "outputs": [ @@ -619,7 +618,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 17, "id": "c9872510-4265-4b0e-aeb5-5a829ff69b24", "metadata": {}, "outputs": [ @@ -649,7 +648,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 18, "id": "6912a9ec-0f9b-4500-ba20-d4280592b323", "metadata": {}, "outputs": [ @@ -680,7 +679,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 19, "id": "3572c518-df83-4906-bfa6-a37bde2a5063", "metadata": {}, "outputs": [ @@ -715,7 +714,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 20, "id": "cccec3e1-0dcd-4e3b-a059-a884f5219b66", "metadata": { "scrolled": true, @@ -729,16 +728,16 @@ "+++ gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_ANG.txt...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B1.TIF...\n", - "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B10.TIF...\n", - "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B3.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B11.TIF...\n", - "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B4.TIF...\n", + "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B10.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B2.TIF...\n", - "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B6.TIF...\n", + "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B3.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B5.TIF...\n", + "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B6.TIF...\n", + "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B4.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B7.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B8.TIF...\n", - "==> NOTE: You are downloading one or more large file(s), which would\n", + "==> NOTE: You are downloading one or more large file(s), which would \n", "run significantly faster if you enabled sliced object downloads. This\n", "feature is enabled by default but requires that compiled crcmod be\n", "installed (see \"gsutil help crcmod\").\n", @@ -746,19 +745,19 @@ "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_B9.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_BQA.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20201007_20201016_01_T1/LC08_L1TP_025033_20201007_20201016_01_T1_MTL.txt...\n", - "| [14/14 files][952.9 MiB/952.9 MiB] 100% Done 18.6 MiB/s ETA 00:00:00 \n", + "\\ [14/14 files][952.9 MiB/952.9 MiB] 100% Done \n", "Operation completed over 14 objects/952.9 MiB. \n", "+++ gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1\n", - "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_ANG.txt...\n", - "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B3.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B1.TIF...\n", + "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B10.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B4.TIF...\n", + "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B3.TIF...\n", + "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_ANG.txt...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B11.TIF...\n", - "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B10.TIF...\n", - "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B2.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B5.TIF...\n", - "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B7.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B6.TIF...\n", + "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B7.TIF...\n", + "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B2.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B8.TIF...\n", "==> NOTE: You are downloading one or more large file(s), which would \n", "run significantly faster if you enabled sliced object downloads. This\n", @@ -768,7 +767,7 @@ "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_B9.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_BQA.TIF...\n", "Copying gs://gcp-public-data-landsat/LC08/01/025/033/LC08_L1TP_025033_20210519_20210528_01_T1/LC08_L1TP_025033_20210519_20210528_01_T1_MTL.txt...\n", - "- [14/14 files][ 1.0 GiB/ 1.0 GiB] 100% Done 19.1 MiB/s ETA 00:00:00 \n", + "| [14/14 files][ 1.0 GiB/ 1.0 GiB] 100% Done 37.1 MiB/s ETA 00:00:00 \n", "Operation completed over 14 objects/1.0 GiB. \n" ] } @@ -787,7 +786,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 21, "id": "a37c1567-14b5-4dc7-bc27-d1b84411fce1", "metadata": {}, "outputs": [ @@ -796,9 +795,9 @@ "output_type": "stream", "text": [ "total 2564796\n", - "drwxr-xr-x 2 learner learner 4096 Feb 7 16:07 \u001b[0m\u001b[01;34mLC08_L1TP_025033_20201007_20201016_01_T1\u001b[0m\n", - "drwxr-xr-x 2 learner learner 4096 Feb 7 16:08 \u001b[01;34mLC08_L1TP_025033_20210519_20210528_01_T1\u001b[0m\n", - "-rw-r--r-- 1 learner learner 2626336574 Feb 7 16:04 index.csv\n" + "drwxr-xr-x 2 learner learner 4096 Feb 14 20:33 \u001b[0m\u001b[01;34mLC08_L1TP_025033_20201007_20201016_01_T1\u001b[0m\n", + "drwxr-xr-x 2 learner learner 4096 Feb 14 20:33 \u001b[01;34mLC08_L1TP_025033_20210519_20210528_01_T1\u001b[0m\n", + "-rw-r--r-- 1 learner learner 2626336574 Feb 14 20:32 index.csv\n" ] } ], @@ -818,7 +817,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 22, "id": "0c027e92-ae6f-4152-b8d6-5a70172de3e2", "metadata": {}, "outputs": [ @@ -852,9 +851,35 @@ "cat process_sat.py" ] }, + { + "cell_type": "markdown", + "id": "b8ba76ef-f0af-413a-99eb-33697ec87238", + "metadata": {}, + "source": [ + "This code writes to the output folder, so let's create it" + ] + }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 25, + "id": "0d6f55c9-3e2c-47d7-b4d0-b984fedc110e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "mkdir: created directory 'output/'\n" + ] + } + ], + "source": [ + "mkdir -v output/" + ] + }, + { + "cell_type": "code", + "execution_count": 23, "id": "77999a80-7cfd-46d3-86a6-05d199f7e66d", "metadata": {}, "outputs": [ @@ -885,7 +910,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 24, "id": "b5a2b29b-9c1d-4376-a3eb-4a3dc4bac160", "metadata": { "scrolled": true, @@ -896,7 +921,6 @@ "name": "stdout", "output_type": "stream", "text": [ - "mkdir: created directory 'output/'\n", "Reading package lists... Done\n", "Building dependency tree \n", "Reading state information... Done\n", @@ -942,8 +966,8 @@ "0 upgraded, 79 newly installed, 0 to remove and 2 not upgraded.\n", "Need to get 46.8 MB of archives.\n", "After this operation, 172 MB of additional disk space will be used.\n", - "Get:1 http://deb.debian.org/debian buster/main amd64 poppler-data all 0.4.9-2 [1473 kB]\n", - "Get:2 http://security.debian.org/debian-security buster/updates/main amd64 libicu63 amd64 63.1-6+deb10u2 [8300 kB]\n", + "Get:1 http://security.debian.org/debian-security buster/updates/main amd64 libicu63 amd64 63.1-6+deb10u2 [8300 kB]\n", + "Get:2 http://deb.debian.org/debian buster/main amd64 poppler-data all 0.4.9-2 [1473 kB]\n", "Get:3 http://deb.debian.org/debian buster/main amd64 fonts-dejavu-core all 2.37-1 [1068 kB]\n", "Get:4 http://deb.debian.org/debian buster/main amd64 fontconfig-config all 2.13.1-2 [280 kB]\n", "Get:5 http://deb.debian.org/debian buster/main amd64 gdal-data all 2.4.0+dfsg-1 [744 kB]\n", @@ -951,26 +975,26 @@ "Get:7 http://deb.debian.org/debian buster/main amd64 libgfortran5 amd64 8.3.0-6 [581 kB]\n", "Get:8 http://deb.debian.org/debian buster/main amd64 libblas3 amd64 3.8.0-2 [148 kB]\n", "Get:9 http://deb.debian.org/debian buster/main amd64 liblapack3 amd64 3.8.0-2 [2110 kB]\n", - "Get:10 http://security.debian.org/debian-security buster/updates/main amd64 libtiff5 amd64 4.1.0+git191117-2~deb10u3 [271 kB]\n", - "Get:11 http://security.debian.org/debian-security buster/updates/main amd64 liburiparser1 amd64 0.9.1-1+deb10u1 [48.1 kB]\n", - "Get:12 http://security.debian.org/debian-security buster/updates/main amd64 libnss3 amd64 2:3.42.1-1+deb10u5 [1160 kB]\n", - "Get:13 http://security.debian.org/debian-security buster/updates/main amd64 libpq5 amd64 11.14-0+deb10u1 [171 kB]\n", - "Get:14 http://security.debian.org/debian-security buster/updates/main amd64 python3-lxml amd64 4.3.2-1+deb10u4 [1163 kB]\n", - "Get:15 http://deb.debian.org/debian buster/main amd64 libarpack2 amd64 3.7.0-2 [102 kB]\n", - "Get:16 http://deb.debian.org/debian buster/main amd64 libsuperlu5 amd64 5.2.1+dfsg1-4 [161 kB]\n", - "Get:17 http://deb.debian.org/debian buster/main amd64 libarmadillo9 amd64 1:9.200.7+dfsg-1 [88.6 kB]\n", - "Get:18 http://deb.debian.org/debian buster/main amd64 libcharls2 amd64 2.0.0+dfsg-1 [64.3 kB]\n", - "Get:19 http://deb.debian.org/debian buster/main amd64 libxml2 amd64 2.9.4+dfsg1-7+deb10u2 [689 kB]\n", - "Get:20 http://deb.debian.org/debian buster/main amd64 libdap25 amd64 3.20.3-1 [557 kB]\n", - "Get:21 http://deb.debian.org/debian buster/main amd64 libdapclient6v5 amd64 3.20.3-1 [202 kB]\n", - "Get:22 http://deb.debian.org/debian buster/main amd64 libdapserver7v5 amd64 3.20.3-1 [131 kB]\n", - "Get:23 http://deb.debian.org/debian buster/main amd64 libepsilon1 amd64 0.9.2+dfsg-4 [42.0 kB]\n", - "Get:24 http://deb.debian.org/debian buster/main amd64 libfontconfig1 amd64 2.13.1-2 [346 kB]\n", - "Get:25 http://deb.debian.org/debian buster/main amd64 libfreexl1 amd64 1.0.5-3 [34.1 kB]\n", - "Get:26 http://deb.debian.org/debian buster/main amd64 libfyba0 amd64 4.1.1-6 [114 kB]\n", - "Get:27 http://deb.debian.org/debian buster/main amd64 libgeos-3.7.1 amd64 3.7.1-1 [735 kB]\n", - "Get:28 http://deb.debian.org/debian buster/main amd64 libgeos-c1v5 amd64 3.7.1-1 [299 kB]\n", - "Get:29 http://deb.debian.org/debian buster/main amd64 proj-data all 5.2.0-1 [6986 kB]\n", + "Get:10 http://deb.debian.org/debian buster/main amd64 libarpack2 amd64 3.7.0-2 [102 kB]\n", + "Get:11 http://deb.debian.org/debian buster/main amd64 libsuperlu5 amd64 5.2.1+dfsg1-4 [161 kB]\n", + "Get:12 http://deb.debian.org/debian buster/main amd64 libarmadillo9 amd64 1:9.200.7+dfsg-1 [88.6 kB]\n", + "Get:13 http://deb.debian.org/debian buster/main amd64 libcharls2 amd64 2.0.0+dfsg-1 [64.3 kB]\n", + "Get:14 http://deb.debian.org/debian buster/main amd64 libxml2 amd64 2.9.4+dfsg1-7+deb10u2 [689 kB]\n", + "Get:15 http://deb.debian.org/debian buster/main amd64 libdap25 amd64 3.20.3-1 [557 kB]\n", + "Get:16 http://deb.debian.org/debian buster/main amd64 libdapclient6v5 amd64 3.20.3-1 [202 kB]\n", + "Get:17 http://deb.debian.org/debian buster/main amd64 libdapserver7v5 amd64 3.20.3-1 [131 kB]\n", + "Get:18 http://deb.debian.org/debian buster/main amd64 libepsilon1 amd64 0.9.2+dfsg-4 [42.0 kB]\n", + "Get:19 http://deb.debian.org/debian buster/main amd64 libfontconfig1 amd64 2.13.1-2 [346 kB]\n", + "Get:20 http://deb.debian.org/debian buster/main amd64 libfreexl1 amd64 1.0.5-3 [34.1 kB]\n", + "Get:21 http://deb.debian.org/debian buster/main amd64 libfyba0 amd64 4.1.1-6 [114 kB]\n", + "Get:22 http://security.debian.org/debian-security buster/updates/main amd64 libtiff5 amd64 4.1.0+git191117-2~deb10u3 [271 kB]\n", + "Get:23 http://deb.debian.org/debian buster/main amd64 libgeos-3.7.1 amd64 3.7.1-1 [735 kB]\n", + "Get:24 http://security.debian.org/debian-security buster/updates/main amd64 liburiparser1 amd64 0.9.1-1+deb10u1 [48.1 kB]\n", + "Get:25 http://deb.debian.org/debian buster/main amd64 libgeos-c1v5 amd64 3.7.1-1 [299 kB]\n", + "Get:26 http://security.debian.org/debian-security buster/updates/main amd64 libnss3 amd64 2:3.42.1-1+deb10u5 [1160 kB]\n", + "Get:27 http://deb.debian.org/debian buster/main amd64 proj-data all 5.2.0-1 [6986 kB]\n", + "Get:28 http://security.debian.org/debian-security buster/updates/main amd64 libpq5 amd64 11.14-0+deb10u1 [171 kB]\n", + "Get:29 http://security.debian.org/debian-security buster/updates/main amd64 python3-lxml amd64 4.3.2-1+deb10u4 [1163 kB]\n", "Get:30 http://deb.debian.org/debian buster/main amd64 libproj13 amd64 5.2.0-1 [225 kB]\n", "Get:31 http://deb.debian.org/debian buster/main amd64 libjbig0 amd64 2.1-3.1+b2 [31.0 kB]\n", "Get:32 http://deb.debian.org/debian buster/main amd64 libjpeg62-turbo amd64 1:1.5.2-2+deb10u1 [133 kB]\n", @@ -1021,11 +1045,11 @@ "Get:77 http://deb.debian.org/debian buster/main amd64 python3-pyparsing all 2.2.0+dfsg1-2 [89.6 kB]\n", "Get:78 http://deb.debian.org/debian buster/main amd64 python3-snuggs all 1.4.3-1 [7228 B]\n", "Get:79 http://deb.debian.org/debian buster/main amd64 python3-rasterio amd64 1.0.21-1 [818 kB]\n", - "Fetched 46.8 MB in 5s (8830 kB/s) \n", + "Fetched 46.8 MB in 1s (79.1 MB/s) \n", "Extracting templates from packages: 100%\n", "Preconfiguring packages ...\n", "Selecting previously unselected package poppler-data.\n", - "(Reading database ... 57683 files and directories currently installed.)\n", + "(Reading database ... 57852 files and directories currently installed.)\n", "Preparing to unpack .../00-poppler-data_0.4.9-2_all.deb ...\n", "Unpacking poppler-data (0.4.9-2) ...\n", "Selecting previously unselected package fonts-dejavu-core.\n", @@ -1351,13 +1375,12 @@ } ], "source": [ - "mkdir -v output/\n", "sudo apt-get install python3-rasterio --yes" ] }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 26, "id": "b9e367a0-26ce-42ce-bb04-6a432f41876e", "metadata": {}, "outputs": [ @@ -1394,7 +1417,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 27, "id": "db9f26aa-6317-4834-8bf1-972c8b3cc032", "metadata": {}, "outputs": [ @@ -1403,8 +1426,8 @@ "output_type": "stream", "text": [ "total 192M\n", - "-rw-r--r-- 1 learner learner 192M Feb 7 16:09 \u001b[0m\u001b[01;35mresult-LC08_L1TP_025033_20201007_20201016_01_T1.png\u001b[0m\n", - "-rw-r--r-- 1 learner learner 910 Feb 7 16:09 result-LC08_L1TP_025033_20201007_20201016_01_T1.png.aux.xml\n" + "-rw-r--r-- 1 learner learner 192M Feb 14 20:36 \u001b[0m\u001b[01;35mresult-LC08_L1TP_025033_20201007_20201016_01_T1.png\u001b[0m\n", + "-rw-r--r-- 1 learner learner 910 Feb 14 20:36 result-LC08_L1TP_025033_20201007_20201016_01_T1.png.aux.xml\n" ] } ], @@ -1424,7 +1447,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 28, "id": "9345472f-4ef3-490b-a80e-2462cd534c89", "metadata": {}, "outputs": [ @@ -1432,7 +1455,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "essentials-learner-2022-02-07\n" + "essentials-learner-2022-02-14\n" ] } ], @@ -1442,7 +1465,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 29, "id": "27dfae96-faf2-4d5d-8a78-97781841f172", "metadata": {}, "outputs": [ @@ -1450,7 +1473,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "gs://essentials-learner-2022-02-07/\n" + "gs://essentials-learner-2022-02-14/\n" ] } ], @@ -1470,7 +1493,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 30, "id": "681e6b1d-98bb-448a-a57e-f5674214effd", "metadata": {}, "outputs": [ @@ -1498,7 +1521,7 @@ } ], "source": [ - "gsutil -m cp -r \"output\" \"gs://$BUCKET\"" + "gsutil -m cp -r output gs://$BUCKET" ] }, { @@ -1511,7 +1534,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 31, "id": "248c47be-625f-44f5-a6b6-919e8d8baafd", "metadata": {}, "outputs": [ @@ -1519,17 +1542,17 @@ "name": "stdout", "output_type": "stream", "text": [ - "gs://essentials-learner-2022-02-07/output/\n" + "gs://essentials-learner-2022-02-14/output/\n" ] } ], "source": [ - "gsutil ls \"gs://$BUCKET\"" + "gsutil ls gs://$BUCKET" ] }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 32, "id": "b1ea18e9-5861-4479-9948-3303952dee8a", "metadata": {}, "outputs": [ @@ -1537,14 +1560,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "191.58 MiB 2022-02-07T16:09:41Z gs://essentials-learner-2022-02-07/output/result-LC08_L1TP_025033_20201007_20201016_01_T1.png\n", - " 910 B 2022-02-07T16:09:39Z gs://essentials-learner-2022-02-07/output/result-LC08_L1TP_025033_20201007_20201016_01_T1.png.aux.xml\n", + "191.58 MiB 2022-02-14T20:36:53Z gs://essentials-learner-2022-02-14/output/result-LC08_L1TP_025033_20201007_20201016_01_T1.png\n", + " 910 B 2022-02-14T20:36:51Z gs://essentials-learner-2022-02-14/output/result-LC08_L1TP_025033_20201007_20201016_01_T1.png.aux.xml\n", "TOTAL: 2 objects, 200890195 bytes (191.58 MiB)\n" ] } ], "source": [ - "gsutil ls -lh \"gs://$BUCKET/output\"" + "gsutil ls -lh gs://$BUCKET/output" ] }, { diff --git a/content/GCP/08_cleaning_up_resources.ipynb b/content/GCP/08_cleaning_up_resources.ipynb index 7666d40..f4b7bc1 100644 --- a/content/GCP/08_cleaning_up_resources.ipynb +++ b/content/GCP/08_cleaning_up_resources.ipynb @@ -61,7 +61,7 @@ "\n", "```{admonition} Exercise\n", "\n", - " * Try to delete the storage **bucket* on your own\n", + " * Try to delete the storage **bucket** on your own\n", "```\n", "\n", "Navigate to the **Cloud Storage** service and in the **browser** page and remove the *essentials* Bucket."