Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
19 changes: 19 additions & 0 deletions install-gcloud.sh
Original file line number Diff line number Diff line change
@@ -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!"
21 changes: 21 additions & 0 deletions install-postgres.sh
Original file line number Diff line number Diff line change
@@ -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