Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added dynamodb installation script #24

Merged
merged 2 commits into from
Jan 16, 2023
Merged
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
5 changes: 3 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ tasks:
command: source ./install-kubectl.sh
- name: Install Terraform
command: source ./install-terraform.sh
- name: Install Dynamodb
command: source ./install-dynamodb-local.sh
- name: Install Visual Studio Code extensions
command: source ./install-vsextensions.sh
vscode:
extensions:
- ms-python.python
- aws-toolkit-vscode.aws-toolkit-vscode
- ms-mssql.mssql
- amazon-dynamodb.aws-dynamodb-toolkit

- amazon-dynamodb.aws-dynamodb-toolkit
github:
prebuilds:
master: true
23 changes: 23 additions & 0 deletions install-dynamodb-local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

#!/bin/bash


echo "Installing Java"
brew install openjdk

echo "java is installed sucessfully.... :) "
echo " "
echo " "
Comment on lines +8 to +10
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can add \n for newline, if you wanted to.

Suggested change
echo "java is installed sucessfully.... :) "
echo " "
echo " "
echo "java is installed sucessfully.... :) \n\n"


mkdir ./dynamolocal && cd ./dynamolocal


echo "Downloading the DynamoDB tar file"
wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz
tar xzf dynamodb_local_latest.tar.gz
rm -f dynamodb_local_latest.tar.gz

echo " "
echo "Dynamodb-local is installed and ready for use.... :) "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be useful to add the command to start, how to ping the local installation, and a link to the docs.

Suggested change
echo "Dynamodb-local is installed and ready for use.... :) "
echo "Dynamodb-local is installed and ready for use.... :)
To run DynamoDB locally: java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
To point AWS CLI to Local DynamoDB: aws dynamodb list-tables --endpoint-url http://localhost:8000
For more details, see the documentation: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html#DynamoDBLocal.DownloadingAndRunning.title
"


Copy link
Collaborator

@loujaybee loujaybee Jan 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would also be quite cool if we started a Makefile for the project to keep scripts together

If we added:

start-dynamodb-local:
	cd dynamolocal && java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb

To a root file called Makefile then we can have the command: make start-dynamodb-local that will run this command for us in a shorthand. Not necessary for this PR though, I've also made an issue:


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought: I guess we could also look into installing: https://github.com/localstack/localstack

1 change: 1 addition & 0 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ source ./setup-env-variables.sh
./open-cloud-dashboards.sh
source ./install-kubectl.sh
source ./install-terraform.sh
source ./install-dynamodb-local.sh