From c44baade034a17ff6a32f369e3dbdd667e5b4be3 Mon Sep 17 00:00:00 2001 From: Timothy Middelkoop Date: Fri, 4 Feb 2022 22:39:24 +0000 Subject: [PATCH] GCP: Remove from git workflow and replace with wget+unzip --- content/GCP/06_running_analysis.ipynb | 103 ++++++++++++++++++++------ 1 file changed, 80 insertions(+), 23 deletions(-) diff --git a/content/GCP/06_running_analysis.ipynb b/content/GCP/06_running_analysis.ipynb index 72780cd..82474b4 100644 --- a/content/GCP/06_running_analysis.ipynb +++ b/content/GCP/06_running_analysis.ipynb @@ -233,12 +233,12 @@ "source": [ "## Get Example Code\n", "\n", - "We will now install `git` and use it to download the example code into your home directory. For those of you who are unfamiliar with git, it is a way to collaboratively manage files and we will only be using it to download the example that we will be using. " + "We will now install `wget` and `unzip` and use it to download the example code into your home directory. " ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 1, "id": "05fadd30-4f35-4a93-b713-cc132131b948", "metadata": {}, "outputs": [ @@ -249,18 +249,37 @@ "Reading package lists... Done\n", "Building dependency tree \n", "Reading state information... Done\n", - "git is already the newest version (1:2.20.1-2+deb10u3).\n", - "0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.\n" + "Suggested packages:\n", + " zip\n", + "The following NEW packages will be installed:\n", + " unzip wget\n", + "0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.\n", + "Need to get 1074 kB of archives.\n", + "After this operation, 3915 kB of additional disk space will be used.\n", + "Get:1 http://deb.debian.org/debian buster/main amd64 wget amd64 1.20.1-1.1 [902 kB]\n", + "Get:2 http://deb.debian.org/debian buster/main amd64 unzip amd64 6.0-23+deb10u2 [172 kB]\n", + "Fetched 1074 kB in 0s (40.4 MB/s)\n", + "Selecting previously unselected package wget.\n", + "(Reading database ... 57683 files and directories currently installed.)\n", + "Preparing to unpack .../wget_1.20.1-1.1_amd64.deb ...\n", + "Unpacking wget (1.20.1-1.1) ...\n", + "Selecting previously unselected package unzip.\n", + "Preparing to unpack .../unzip_6.0-23+deb10u2_amd64.deb ...\n", + "Unpacking unzip (6.0-23+deb10u2) ...\n", + "Setting up wget (1.20.1-1.1) ...\n", + "Setting up unzip (6.0-23+deb10u2) ...\n", + "Processing triggers for mime-support (3.62) ...\n", + "Processing triggers for man-db (2.8.5-2) ...\n" ] } ], "source": [ - "sudo apt-get install --yes git" + "sudo apt-get install --yes wget unzip" ] }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 1, "id": "96db6a66-3fbf-419a-b8c8-dbb27639e990", "metadata": {}, "outputs": [], @@ -268,9 +287,17 @@ "cd ~" ] }, + { + "cell_type": "markdown", + "id": "bebfa80a-85c7-4040-82d8-ff495b51324d", + "metadata": {}, + "source": [ + "Download the zip file `-nv` to make the output less verbose." + ] + }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 2, "id": "36554c99-ba08-4733-8ef2-e68d42d0d2b7", "metadata": {}, "outputs": [ @@ -278,15 +305,45 @@ "name": "stdout", "output_type": "stream", "text": [ - "Cloning into 'CLASS-Examples'...\n", - "remote: Enumerating objects: 66, done.\u001b[K\n", - "remote: Total 66 (delta 0), reused 0 (delta 0), pack-reused 66\u001b[K\n", - "Unpacking objects: 100% (66/66), done.\n" + "2022-02-04 22:33:37 URL:https://github.internet2.edu/_codeload/CLASS/CLASS-Examples/zip/v1 [5482/5482] -> \"v1.zip\" [1]\n" + ] + } + ], + "source": [ + "wget -nv https://github.internet2.edu/CLASS/CLASS-Examples/archive/v1.zip" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "7418ed55-9f57-4e15-b9c7-8fe39e59ec29", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Archive: v1.zip\n", + "b3d47595a1679f3416774de87f76d5a2b9fe65bf\n", + " creating: CLASS-Examples-1/\n", + " inflating: CLASS-Examples-1/.gitignore \n", + " creating: CLASS-Examples-1/bayeswave/\n", + " extracting: CLASS-Examples-1/bayeswave/.gitignore \n", + " inflating: CLASS-Examples-1/bayeswave/ReadMe.md \n", + " inflating: CLASS-Examples-1/bayeswave/bayeswave-job.yaml \n", + " creating: CLASS-Examples-1/landsat/\n", + " inflating: CLASS-Examples-1/landsat/ReadMe.md \n", + " inflating: CLASS-Examples-1/landsat/clean.sh \n", + " inflating: CLASS-Examples-1/landsat/combine.py \n", + " inflating: CLASS-Examples-1/landsat/download.sh \n", + " inflating: CLASS-Examples-1/landsat/get-index.sh \n", + " inflating: CLASS-Examples-1/landsat/search.json \n", + " inflating: CLASS-Examples-1/landsat/search.py \n" ] } ], "source": [ - "git clone https://github.internet2.edu/CLASS/CLASS-Examples.git" + "unzip v1.zip" ] }, { @@ -299,12 +356,12 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 4, "id": "90c1cda7-60d4-44bb-84f8-e776a77a94ab", "metadata": {}, "outputs": [], "source": [ - "cd ~/CLASS-Examples/landsat/" + "cd ~/CLASS-Examples-1/landsat/" ] }, { @@ -314,13 +371,13 @@ "source": [ "Your prompt should now change showing the current directory as follows.\n", "```\n", - "learner@essentials:~/CLASS-Examples/landsat$\n", + "learner@essentials:~/CLASS-Examples-1/landsat$\n", "```" ] }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 6, "id": "55b628d5-6e5c-45a5-9cd3-c129db9cdcd2", "metadata": {}, "outputs": [ @@ -329,13 +386,13 @@ "output_type": "stream", "text": [ "total 28\n", - "-rw-r--r-- 1 learner learner 960 Jan 21 21:32 ReadMe.md\n", - "-rw-r--r-- 1 learner learner 72 Jan 21 21:32 clean.sh\n", - "-rw-r--r-- 1 learner learner 613 Jan 21 21:32 combine.py\n", - "-rw-r--r-- 1 learner learner 280 Jan 21 21:32 download.sh\n", - "-rw-r--r-- 1 learner learner 314 Jan 21 21:32 get-index.sh\n", - "-rw-r--r-- 1 learner learner 76 Jan 21 21:32 search.json\n", - "-rw-r--r-- 1 learner learner 783 Jan 21 21:32 search.py\n" + "-rw-r--r-- 1 learner learner 960 Dec 13 20:53 ReadMe.md\n", + "-rw-r--r-- 1 learner learner 72 Dec 13 20:53 clean.sh\n", + "-rw-r--r-- 1 learner learner 613 Dec 13 20:53 combine.py\n", + "-rw-r--r-- 1 learner learner 280 Dec 13 20:53 download.sh\n", + "-rw-r--r-- 1 learner learner 314 Dec 13 20:53 get-index.sh\n", + "-rw-r--r-- 1 learner learner 76 Dec 13 20:53 search.json\n", + "-rw-r--r-- 1 learner learner 783 Dec 13 20:53 search.py\n" ] } ],