diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000..321aff5 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:latest + +WORKDIR /app + +COPY . . + +USER root + +RUN chmod +x main.sh +RUN bash main.sh + +ENTRYPOINT [ "/bin/bash","-c" ] +CMD [ "bash" ] \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml index ae5b73d..2dda909 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,24 +1,26 @@ +image: + file: .gitpod.Dockerfile tasks: - - name: Setup environment variables - command: | - source ./setup-env-variables.sh - gp sync-done env-setup - - name: Install AWS CLI - command: | - gp sync-await env-setup - ./install-aws-cli.sh - gp sync-done aws-cli - - name: Setup default aws-vault & Open Dashboards - command: | - gp sync-await aws-cli - ./collect-credentials.sh - ./open-cloud-dashboards.sh - - name: Install kubectl - command: source ./install-kubectl.sh - - name: Install Terraform - command: source ./install-terraform.sh - - name: Install Dynamodb - command: source ./install-dynamodb-local.sh + # - name: Setup environment variables + # command: | + # source ./setup-env-variables.sh + # gp sync-done env-setup + # - name: Install AWS CLI + # command: | + # gp sync-await env-setup + # ./install-aws-cli.sh + # gp sync-done aws-cli + # - name: Setup default aws-vault & Open Dashboards + # command: | + # gp sync-await aws-cli + # ./collect-credentials.sh + # ./open-cloud-dashboards.sh + # - name: Install kubectl + # 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: diff --git a/install-aws-cli.sh b/install-aws-cli.sh index 9f083e3..d748722 100755 --- a/install-aws-cli.sh +++ b/install-aws-cli.sh @@ -14,5 +14,7 @@ rm awscliv2.zip cd "${OLD_DIR}" || exit 1 rm -rf "${TMP_DIR}" +# show aws-cli version +aws --version echo "AWS CLI is installed & configured successfully." echo "Now, you can start using aws." diff --git a/install-dynamodb-local.sh b/install-dynamodb-local.sh index eaaa974..5e43a5b 100644 --- a/install-dynamodb-local.sh +++ b/install-dynamodb-local.sh @@ -1,19 +1,10 @@ #!/bin/bash - -echo "Installing Java" -brew install openjdk - -echo "java is installed sucessfully.... :) " -echo " " -echo " " - 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 +wget https://s3.us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz tar xzf dynamodb_local_latest.tar.gz rm -f dynamodb_local_latest.tar.gz diff --git a/install-kubectl.sh b/install-kubectl.sh index a3bdddc..b0b46cd 100644 --- a/install-kubectl.sh +++ b/install-kubectl.sh @@ -28,5 +28,7 @@ fi cd "${OLD_DIR}" || exit 1 rm -rf "${TMP_DIR}" +# show kubectl version +kubectl version --client echo "kubectl is installed & configured successfully." echo "Now, you can start using kubectl." diff --git a/install-terraform.sh b/install-terraform.sh index 3dfde40..a921f75 100644 --- a/install-terraform.sh +++ b/install-terraform.sh @@ -21,5 +21,7 @@ rm terraform_${TF_VERSION}_linux_amd64.zip cd "${OLD_DIR}" || exit 1 rm -rf "${TMP_DIR}" +# show terraform version +terraform --version echo "Terraform is installed & configured successfully." echo "Now, you can start using terraform." diff --git a/main.sh b/main.sh index 2f8a6ed..64ae174 100755 --- a/main.sh +++ b/main.sh @@ -1,9 +1,12 @@ #!/bin/bash +source ./update.sh source ./setup-env-variables.sh -./install-aws-cli.sh -./collect-credentials.sh -./open-cloud-dashboards.sh +source ./install-aws-cli.sh + +# ./collect-credentials.sh +# ./open-cloud-dashboards.sh + source ./install-kubectl.sh source ./install-terraform.sh source ./install-dynamodb-local.sh \ No newline at end of file diff --git a/setup-env-variables.sh b/setup-env-variables.sh index 4e72129..915bb08 100755 --- a/setup-env-variables.sh +++ b/setup-env-variables.sh @@ -3,4 +3,10 @@ export AWS_DEFAULT_REGION=us-east-1 export AWS_VAULT_BACKEND=file export AWS_VAULT_FILE_PASSPHRASE= -brew install aws-vault + +# Download & Install aws-vault +curl -L -o /usr/local/bin/aws-vault https://github.com/99designs/aws-vault/releases/download/v6.6.2/aws-vault-linux-amd64 +chmod 755 /usr/local/bin/aws-vault + +# show aws-vault version +aws-vault --version \ No newline at end of file diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..2d0fc7e --- /dev/null +++ b/update.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +apt-get update +#apt-get upgrade -y +apt-get install -y curl unzip wget jq build-essential file git git-lfs sudo + +# JAVA Installation +echo "Installing Java" +wget https://download.oracle.com/java/19/latest/jdk-19_linux-x64_bin.deb +apt-get install -y ./jdk-19_linux-x64_bin.deb +update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-19/bin/java 1 +update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-19/bin/javac 1 +update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk-19/bin/jar 1 +### next three lines not necessary +update-alternatives --config java +update-alternatives --config javac +update-alternatives --config jar + +java -version +echo "java is installed sucessfully.... :) " +echo " " +echo " " \ No newline at end of file