From f1d4ca5f67e6092c142d28637ceed7609a375cb4 Mon Sep 17 00:00:00 2001 From: YAYA Date: Tue, 10 Jan 2023 18:40:32 +0100 Subject: [PATCH 01/11] pgCLI included --- .gitpod.yml | 2 ++ install-postgres.sh | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 install-postgres.sh diff --git a/.gitpod.yml b/.gitpod.yml index c083eb5..0acc687 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -19,6 +19,8 @@ tasks: command: source ./install-terraform.sh - name: Install Visual Studio Code extensions command: source ./install-vsextensions.sh + - name: Install PostgreSQL + command: ./install-postgres.sh vscode: extensions: - ms-python.python diff --git a/install-postgres.sh b/install-postgres.sh new file mode 100644 index 0000000..3f3aa1d --- /dev/null +++ b/install-postgres.sh @@ -0,0 +1,21 @@ +#!/bin/sh +set -e +set -u + +run_with_sudo() { + if [ $(id -u) -eq 0 ]; then + "$@" + else + sudo "$@" + fi +} + +if dpkg -s postgresql &> /dev/null; then + echo "PostgreSQL is already installed." + exit 0 +fi + +run_with_sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | run_with_sudo apt-key add - +run_with_sudo apt-get update +run_with_sudo apt-get -y install postgresql \ No newline at end of file From ab17ee748bd9575c8b438ad87da145477a6ecd65 Mon Sep 17 00:00:00 2001 From: YAYA Date: Tue, 10 Jan 2023 19:58:03 +0100 Subject: [PATCH 02/11] source --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 0acc687..6801ff8 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -20,7 +20,7 @@ tasks: - name: Install Visual Studio Code extensions command: source ./install-vsextensions.sh - name: Install PostgreSQL - command: ./install-postgres.sh + command: source ./install-postgres.sh vscode: extensions: - ms-python.python From 4917eb6f94aa9852088358539fa88503a9e87eca Mon Sep 17 00:00:00 2001 From: YAYA Date: Tue, 10 Jan 2023 22:58:54 +0100 Subject: [PATCH 03/11] GCP config --- .gitpod.yml | 4 ++++ install-gcloud.sh | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 install-gcloud.sh diff --git a/.gitpod.yml b/.gitpod.yml index 6801ff8..8fb0a1e 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -21,6 +21,10 @@ tasks: command: source ./install-vsextensions.sh - name: Install PostgreSQL command: source ./install-postgres.sh + - name: Install Google Cloud SDK + command: | + source ./install-google-cloud-sdk.sh + gp sync-done gcloud-setup vscode: extensions: - ms-python.python diff --git a/install-gcloud.sh b/install-gcloud.sh new file mode 100644 index 0000000..ed2df78 --- /dev/null +++ b/install-gcloud.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Install dependencies +sudo apt-get install apt-transport-https ca-certificates gnupg -y + +# Add the GCP package repository +echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list + +# Add the GCP public key to the system's list of trusted keys +curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - + +# Update package list and install the Cloud SDK +sudo apt-get update && sudo apt-get install google-cloud-cli -y + +echo "Google Cloud SDK installed successfully!" + From 236946de16a223dbe1bca9c460b398f765d7f4b6 Mon Sep 17 00:00:00 2001 From: YAYA Date: Tue, 10 Jan 2023 23:37:20 +0100 Subject: [PATCH 04/11] naming --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 8fb0a1e..30a07ba 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -23,7 +23,7 @@ tasks: command: source ./install-postgres.sh - name: Install Google Cloud SDK command: | - source ./install-google-cloud-sdk.sh + source ./install-gcloud.sh gp sync-done gcloud-setup vscode: extensions: From 8dc89515d56cfa88cce9f9e0f34ed2a5cfeb697f Mon Sep 17 00:00:00 2001 From: YAYA Date: Tue, 10 Jan 2023 23:41:45 +0100 Subject: [PATCH 05/11] Info --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 386ebbb..7676e29 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,9 @@ Description: Meet requirements of Andrew Brown's Cloud Bootcamp (see [issue](htt - [x] Install Terraform (https://github.com/openupthecloud/open-cloud-dev-box/pull/7) - [x] Install kubectl (https://github.com/openupthecloud/open-cloud-dev-box/pull/7) - [x] Install AWS CLI (https://github.com/openupthecloud/open-cloud-dev-box/pull/7) -- [ ] Install DynamodDB Local (https://github.com/openupthecloud/open-cloud-dev-box/issues/16) +- [x] Install DynamodDB Local (https://github.com/openupthecloud/open-cloud-dev-box/issues/16) +- [x] Install GCP SDK (https://github.com/openupthecloud/open-cloud-dev-box/pull/25) +- [x] Install PostgreSQL (https://github.com/openupthecloud/open-cloud-dev-box/pull/25) - [ ] Install Momento (https://github.com/openupthecloud/open-cloud-dev-box/issues/15) **Add compatibility across main cloud providers + local** From bb23f7183f7b6d597d9542af144abfb88445439e Mon Sep 17 00:00:00 2001 From: YAYA Date: Tue, 10 Jan 2023 23:42:58 +0100 Subject: [PATCH 06/11] FYI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7676e29..ee3a198 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Description: Meet requirements of Andrew Brown's Cloud Bootcamp (see [issue](htt - [x] Install Terraform (https://github.com/openupthecloud/open-cloud-dev-box/pull/7) - [x] Install kubectl (https://github.com/openupthecloud/open-cloud-dev-box/pull/7) - [x] Install AWS CLI (https://github.com/openupthecloud/open-cloud-dev-box/pull/7) -- [x] Install DynamodDB Local (https://github.com/openupthecloud/open-cloud-dev-box/issues/16) +- [x] Install DynamodDB Local (https://github.com/openupthecloud/open-cloud-dev-box/pull/24) - [x] Install GCP SDK (https://github.com/openupthecloud/open-cloud-dev-box/pull/25) - [x] Install PostgreSQL (https://github.com/openupthecloud/open-cloud-dev-box/pull/25) - [ ] Install Momento (https://github.com/openupthecloud/open-cloud-dev-box/issues/15) From 5c07e93600e754a4add5b6e9bacd817bafcee0f4 Mon Sep 17 00:00:00 2001 From: YAYA Date: Sat, 14 Jan 2023 22:58:07 +0100 Subject: [PATCH 07/11] parallel check --- .gitpod.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 30a07ba..e141e63 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -22,9 +22,7 @@ tasks: - name: Install PostgreSQL command: source ./install-postgres.sh - name: Install Google Cloud SDK - command: | - source ./install-gcloud.sh - gp sync-done gcloud-setup + command: source ./install-gcloud.sh vscode: extensions: - ms-python.python From 54cfee6d6f7083eeedf46c8108f13b6a3e315e40 Mon Sep 17 00:00:00 2001 From: YAYA Date: Mon, 16 Jan 2023 23:15:28 +0100 Subject: [PATCH 08/11] GCP --- install-gcloud.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install-gcloud.sh b/install-gcloud.sh index ed2df78..eecde08 100644 --- a/install-gcloud.sh +++ b/install-gcloud.sh @@ -1,7 +1,9 @@ #!/bin/bash # Install dependencies +gp sync-await apt-get-lock sudo apt-get install apt-transport-https ca-certificates gnupg -y +gp sync-done apt-get-lock # Add the GCP package repository echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list @@ -10,7 +12,8 @@ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.clou curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - # Update package list and install the Cloud SDK +gp sync-await apt-get-lock sudo apt-get update && sudo apt-get install google-cloud-cli -y +gp sync-done apt-get-lock echo "Google Cloud SDK installed successfully!" - From b1b68637f28656a55d17d2db58fde244202ec836 Mon Sep 17 00:00:00 2001 From: YAYA Date: Mon, 16 Jan 2023 23:33:03 +0100 Subject: [PATCH 09/11] we may-require more extensions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ee3a198..bb61d75 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Description: Meet requirements of Andrew Brown's Cloud Bootcamp (see [issue](htt - [ ] AWS Secrets Manager integration **Developer Experience** -- [ ] Add VS Code extensions (https://github.com/openupthecloud/open-cloud-dev-box/issues/17) +- [x] Add VS Code extensions (https://github.com/openupthecloud/open-cloud-dev-box/pull/20) - [ ] Wizard Configuration Setup - [ ] Add DevContainer support (https://github.com/openupthecloud/open-cloud-dev-box/issues/18) From 8e2f81272148d84cd1553980e53bb8baf37d30cd Mon Sep 17 00:00:00 2001 From: YAYA Date: Thu, 19 Jan 2023 01:35:59 +0100 Subject: [PATCH 10/11] makefile init --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..bf8b899 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +# usage: make command +run-dynamodb: + java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb + +run-postgres: + psql -U postgres + +run-gcp-sdk: + gcloud init From 6859ed698530d76c6ce7b55bc665808d03d9359e Mon Sep 17 00:00:00 2001 From: YAYA Date: Thu, 19 Jan 2023 01:43:08 +0100 Subject: [PATCH 11/11] Hm Hm --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bf8b899..44a2f07 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,9 @@ -# usage: make command +setup-aws-cli: + pip install awscli + +setup-aws-vault: + brew install aws-vault + run-dynamodb: java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb @@ -7,3 +12,10 @@ run-postgres: run-gcp-sdk: gcloud init + +list-tools: + which aws + which aws-vault + which java + which psql + which gcloud