diff --git a/.gitpod.yml b/.gitpod.yml index ae5b73d..1d442bd 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -21,6 +21,10 @@ tasks: command: source ./install-dynamodb-local.sh - name: Install Visual Studio Code extensions command: source ./install-vsextensions.sh + - name: Install PostgreSQL + command: source ./install-postgres.sh + - name: Install Google Cloud SDK + command: source ./install-gcloud.sh vscode: extensions: - ms-python.python diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..44a2f07 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +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 + +run-postgres: + psql -U postgres + +run-gcp-sdk: + gcloud init + +list-tools: + which aws + which aws-vault + which java + which psql + which gcloud diff --git a/README.md b/README.md index da7d990..7111b07 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,9 @@ Description: Meet requirements of Andrew Brown's Cloud Bootcamp (see [issue](htt - [x] Setup AWS CLI and AWS Vault - [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/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) - [ ] SAM CLI (?) - [ ] Honeycomb (?) - [ ] Install DynamodDB Local (https://github.com/openupthecloud/open-cloud-dev-box/issues/16) @@ -60,6 +63,8 @@ Description: Meet requirements of Andrew Brown's Cloud Bootcamp (see [issue](htt - [ ] AWS Secrets Manager integration (https://github.com/openupthecloud/open-cloud-dev-box/issues/27) **Developer Experience** +- [x] Add VS Code extensions (https://github.com/openupthecloud/open-cloud-dev-box/pull/20) +- [ ] Wizard Configuration Setup - [ ] Add VS Code extensions (https://github.com/openupthecloud/open-cloud-dev-box/issues/17) - [ ] Wizard Configuration Setup (https://github.com/openupthecloud/open-cloud-dev-box/issues/28) - [ ] Add DevContainer support (https://github.com/openupthecloud/open-cloud-dev-box/issues/18) diff --git a/install-gcloud.sh b/install-gcloud.sh new file mode 100644 index 0000000..eecde08 --- /dev/null +++ b/install-gcloud.sh @@ -0,0 +1,19 @@ +#!/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 + +# 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 +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!" 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