├── .gitpod.yml ├── LICENSE ├── README.md ├── assets └── open-cloud-dev-box-graphic.jpg ├── collect-credentials.sh ├── install-aws-cli.sh ├── install-dynamodb-local.sh ├── install-gcloud.sh ├── install-kubectl.sh ├── install-postgres.sh ├── install-terraform.sh ├── install-vsextensions.sh ├── main.sh ├── open-cloud-dashboards.sh └── setup-env-variables.sh /.gitpod.yml: -------------------------------------------------------------------------------- 1 | tasks: 2 | - name: Setup environment variables 3 | command: | 4 | source ./setup-env-variables.sh 5 | gp sync-done env-setup 6 | - name: Install AWS CLI 7 | command: | 8 | gp sync-await env-setup 9 | ./install-aws-cli.sh 10 | gp sync-done aws-cli 11 | - name: Setup default aws-vault & Open Dashboards 12 | command: | 13 | gp sync-await aws-cli 14 | ./collect-credentials.sh 15 | ./open-cloud-dashboards.sh 16 | - name: Install kubectl 17 | command: source ./install-kubectl.sh 18 | - name: Install Terraform 19 | command: source ./install-terraform.sh 20 | - name: Install Dynamodb 21 | command: source ./install-dynamodb-local.sh 22 | - name: Install Visual Studio Code extensions 23 | command: source ./install-vsextensions.sh 24 | - name: Install PostgreSQL 25 | command: source ./install-postgres.sh 26 | - name: Install Google Cloud SDK 27 | command: source ./install-gcloud.sh 28 | vscode: 29 | extensions: 30 | - ms-python.python 31 | - aws-toolkit-vscode.aws-toolkit-vscode 32 | - ms-mssql.mssql 33 | - amazon-dynamodb.aws-dynamodb-toolkit 34 | github: 35 | prebuilds: 36 | master: true 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Open Up The Cloud 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Open Cloud Dev Box 2 | 3 | Open Cloud Dev Box is a project that makes learning cloud faster, easier and safer. By having a preconfigured, isolated development environment based in a container, and compatible with various cloud-based development environment services like [Gitpod](http://gitpod.io/) + Codespaces you're safe to explore, play and learn the cloud without worrying about breaking your machine. Additionally, configurations include security best practices and standards. 4 | 5 | ![Cloud Dev Box Logo](assets/open-cloud-dev-box-graphic.jpg) 6 | 7 | ## Motivations 8 | 9 | 1. No more wasted time setting up your environment 10 | 2. No more broken environments (isolated environment) 11 | 3. Secure, by default (best practice security) 12 | 4. Extensible and personalisable 13 | 14 | ## Getting Started 15 | 16 | - [Open in Gitpod](https://gitpod.io/#github.com/openupthecloud/open-cloud-dev-box) 17 | - Open in Codespaces (coming soon) 18 | - Open locally (coming soon) 19 | 20 | ## Compatibilities 21 | 22 | Open Cloud Dev Box is intended to be configured to work across platform / standards: 23 | 24 | 1. [devcontainer.json](https://code.visualstudio.com/docs/devcontainers/containers) 25 | 2. [.gitpod.yml](https://www.gitpod.io/docs/references/gitpod-yml) 26 | 3. [devfile](https://devfile.io) 27 | 4. [Score Dev](https://score.dev) 28 | 29 | Allowing you to make use of both cloud-based development environments + local running container-based environments. 30 | 31 | ## Backlog / Roadmap 32 | 33 | ### 🏔 Milestone 1: Basic setup for Cloud Bootcamp 34 | 35 | Description: Meet requirements of Andrew Brown's Cloud Bootcamp (see [issue](https://github.com/openupthecloud/open-cloud-dev-box/issues/6), and [course outline](https://docs.google.com/document/d/19XMyd5zCk7S9QT2q1_Cg-wvbnBwOge7EgzgvtVCgcz0/edit#heading=h.wkvwyzh618s9)). Other tools can be added in future. 36 | 37 | **Install all necessary tools** 38 | 39 | - [x] Setup AWS CLI and AWS Vault 40 | - [x] Install AWS CLI (https://github.com/openupthecloud/open-cloud-dev-box/pull/7) 41 | - [x] Install DynamodDB Local (https://github.com/openupthecloud/open-cloud-dev-box/pull/24) 42 | - [x] Install GCP SDK (https://github.com/openupthecloud/open-cloud-dev-box/pull/25) 43 | - [x] Install PostgreSQL (https://github.com/openupthecloud/open-cloud-dev-box/pull/25) 44 | - [ ] SAM CLI (?) 45 | - [ ] Honeycomb (?) 46 | - [ ] Install DynamodDB Local (https://github.com/openupthecloud/open-cloud-dev-box/issues/16) 47 | - [ ] Install Momento (https://github.com/openupthecloud/open-cloud-dev-box/issues/15) 48 | 49 | **Add compatibility across main cloud providers + local** 50 | - [ ] Add Docker base image support (https://github.com/openupthecloud/open-cloud-dev-box/issues/29) 51 | - [x] Setup flow with Gitpod 52 | - [ ] Setup Codespaces compatibility (https://github.com/openupthecloud/open-cloud-dev-box/issues/18) 53 | - [ ] Setup configuration to work locally with devcontainer (https://github.com/openupthecloud/open-cloud-dev-box/issues/18) 54 | 55 | ### 🏔 Milestone 2: Improve security posture + developer experience 56 | 57 | **Extra installations** 58 | - [x] Install Terraform (https://github.com/openupthecloud/open-cloud-dev-box/pull/7) 59 | - [x] Install kubectl (https://github.com/openupthecloud/open-cloud-dev-box/pull/7) 60 | 61 | **Setup secrets management tools** 62 | - [ ] 1Password secrets integration (https://github.com/openupthecloud/open-cloud-dev-box/issues/27) 63 | - [ ] AWS Secrets Manager integration (https://github.com/openupthecloud/open-cloud-dev-box/issues/27) 64 | 65 | **Developer Experience** 66 | - [x] Add VS Code extensions (https://github.com/openupthecloud/open-cloud-dev-box/pull/20) 67 | - [ ] Wizard Configuration Setup 68 | - [ ] Add VS Code extensions (https://github.com/openupthecloud/open-cloud-dev-box/issues/17) 69 | - [ ] Wizard Configuration Setup (https://github.com/openupthecloud/open-cloud-dev-box/issues/28) 70 | - [ ] Add DevContainer support (https://github.com/openupthecloud/open-cloud-dev-box/issues/18) 71 | 72 | ### New to Cloud Development Environments? 73 | 74 | If you're new to Cloud Development Environments, what they are, why they exist, why companies use them, the benefits, to see where this project could go in the future, take a look at the following links and resources for some ideas. 75 | 76 | **Definitions** 77 | 78 | 1. [Cloud development environments (CDEs)](https://www.gitpod.io/cde) 79 | 2. [The year of the Cloud Development Environment](https://redmonk.com/jgovernor/2022/12/01/the-year-of-the-cloud-development-environment/) 80 | 81 | **Products** 82 | 83 | 1. [Microsoft - GitHub’s Engineering Team has moved to Codespaces](https://github.blog/2021-08-11-githubs-engineering-team-moved-) 84 | 2. [Google - Introducing Cloud Workstations: Managed and Secure Development environments in the cloud 85 | ](https://cloud.google.com/blog/products/application-development/introducing-cloud-workstations) 86 | 3. [AWS - Announcing Amazon CodeCatalyst, a Unified Software Development Service](https://aws.amazon.com/blogs/aws/announcing-amazon-codecatalyst-preview-a-unified-software-development-service/) 87 | 4. [JetBrains - How To Get Started With Space Cloud Dev Environments](https://blog.jetbrains.com/space/2022/10/26/get-started-with-space-dev-environments/) 88 | 89 | **Companies who “built their own”** 90 | 91 | 1. [Shopify - Shopifys Cloud Development Journey](https://shopify.engineering/shopifys-cloud-development-journey) 92 | 2. [Slack - Remote Development At Slack](https://slack.engineering/remote-development-at-slack/) 93 | 3. [Uber - DevPod: Improvind Developer Productivity at Uber](https://www.uber.com/blog/devpod-improving-developer-productivity-at-uber/) 94 | 95 | ### Contribute? 96 | 97 | We are looking for contributors, for more information, see [this issue](https://github.com/openupthecloud/open-cloud-dev-box/issues/21). 98 | -------------------------------------------------------------------------------- /assets/open-cloud-dev-box-graphic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openupthecloud/open-cloud-dev-box/0a4583a46ace5f564f049ad77203e24d1622e7f8/assets/open-cloud-dev-box-graphic.jpg -------------------------------------------------------------------------------- /collect-credentials.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | aws-vault add default 4 | -------------------------------------------------------------------------------- /install-aws-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # update AWS CLI 4 | OLD_DIR="$PWD" 5 | TMP_DIR="$(mktemp -d)" 6 | echo "Updating AWS" 7 | cd "${TMP_DIR}" || exit 1 8 | 9 | curl -fSsl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" 10 | unzip -qq awscliv2.zip 11 | sudo ./aws/install --update 12 | rm awscliv2.zip 13 | 14 | cd "${OLD_DIR}" || exit 1 15 | rm -rf "${TMP_DIR}" 16 | 17 | echo "AWS CLI is installed & configured successfully." 18 | echo "Now, you can start using aws." 19 | -------------------------------------------------------------------------------- /install-dynamodb-local.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | 5 | echo "Installing Java" 6 | brew install openjdk 7 | 8 | echo "java is installed sucessfully.... :) " 9 | echo " " 10 | echo " " 11 | 12 | mkdir ./dynamolocal && cd ./dynamolocal 13 | 14 | 15 | echo "Downloading the DynamoDB tar file" 16 | wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz 17 | tar xzf dynamodb_local_latest.tar.gz 18 | rm -f dynamodb_local_latest.tar.gz 19 | 20 | echo " " 21 | echo "Dynamodb-local is installed and ready for use.... :) " 22 | 23 | -------------------------------------------------------------------------------- /install-gcloud.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Install dependencies 4 | gp sync-await apt-get-lock 5 | sudo apt-get install apt-transport-https ca-certificates gnupg -y 6 | gp sync-done apt-get-lock 7 | 8 | # Add the GCP package repository 9 | 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 | 11 | # Add the GCP public key to the system's list of trusted keys 12 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - 13 | 14 | # Update package list and install the Cloud SDK 15 | gp sync-await apt-get-lock 16 | sudo apt-get update && sudo apt-get install google-cloud-cli -y 17 | gp sync-done apt-get-lock 18 | 19 | echo "Google Cloud SDK installed successfully!" 20 | -------------------------------------------------------------------------------- /install-kubectl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if command -v /usr/local/bin/kubectl &>/dev/null; then 4 | echo "kubectl is already installed" 5 | exit 6 | fi 7 | 8 | # Setup kubectl 9 | 10 | echo "Setting-up kubectl" 11 | OLD_DIR="$PWD" 12 | TMP_DIR="$(mktemp -d)" 13 | cd "${TMP_DIR}" || exit 1 14 | 15 | # Get the Stable version of k8s 16 | KUBE_REL=$(curl -L -s https://dl.k8s.io/release/stable.txt) 17 | 18 | curl -LO "https://dl.k8s.io/release/${KUBE_REL}/bin/linux/amd64/kubectl" 19 | KUBE_SHA=$(curl -sL "https://dl.k8s.io/release/${KUBE_REL}/bin/linux/amd64/kubectl.sha256") 20 | 21 | echo "${KUBE_SHA} kubectl" >kubectl.sha256 22 | 23 | if sha256sum -c kubectl.sha256; then 24 | chmod +x kubectl 25 | sudo mv kubectl /usr/local/bin/kubectl 26 | fi 27 | 28 | cd "${OLD_DIR}" || exit 1 29 | rm -rf "${TMP_DIR}" 30 | 31 | echo "kubectl is installed & configured successfully." 32 | echo "Now, you can start using kubectl." 33 | -------------------------------------------------------------------------------- /install-postgres.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | 5 | run_with_sudo() { 6 | if [ $(id -u) -eq 0 ]; then 7 | "$@" 8 | else 9 | sudo "$@" 10 | fi 11 | } 12 | 13 | if dpkg -s postgresql &> /dev/null; then 14 | echo "PostgreSQL is already installed." 15 | exit 0 16 | fi 17 | 18 | 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' 19 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | run_with_sudo apt-key add - 20 | run_with_sudo apt-get update 21 | run_with_sudo apt-get -y install postgresql -------------------------------------------------------------------------------- /install-terraform.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if command -v /usr/local/bin/terraform &>/dev/null; then 4 | echo "Terraform is already installed" 5 | exit 6 | fi 7 | 8 | # Get the stable version of Terraform 9 | TF_VERSION=$(curl -sL https://releases.hashicorp.com/terraform/index.json | jq -r '.versions[].builds[].version' | egrep -v 'rc|beta|alpha' | tail -1) 10 | 11 | echo "Setting-up Terraform" 12 | OLD_DIR="$PWD" 13 | TMP_DIR="$(mktemp -d)" 14 | cd "${TMP_DIR}" || exit 1 15 | 16 | curl -LO "https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip" 17 | unzip terraform_${TF_VERSION}_linux_amd64.zip 18 | sudo mv -f terraform /usr/local/bin/ 19 | rm terraform_${TF_VERSION}_linux_amd64.zip 20 | 21 | cd "${OLD_DIR}" || exit 1 22 | rm -rf "${TMP_DIR}" 23 | 24 | echo "Terraform is installed & configured successfully." 25 | echo "Now, you can start using terraform." 26 | -------------------------------------------------------------------------------- /install-vsextensions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Set options to exit the script immediately if any command returns a non-zero exit status, 4 | # and to continue even if a command fails with a pipe error. 5 | set -e 6 | set -o pipefail 7 | 8 | # Define an array of extension names to be installed. 9 | extensions=( 10 | ms-python.python 11 | aws-toolkit-vscode.aws-toolkit-vscode 12 | ms-mssql.mssql 13 | amazon-dynamodb.aws-dynamodb-toolkit 14 | ) 15 | 16 | # Iterate over the array of extensions and install each one using the 'code' command. 17 | # Use the '|| true' trick to make the script continue even if an extension fails to install. 18 | for extension in "${extensions[@]}"; do 19 | code --install-extension "$extension" || true 20 | done 21 | -------------------------------------------------------------------------------- /main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source ./setup-env-variables.sh 4 | ./install-aws-cli.sh 5 | ./collect-credentials.sh 6 | ./open-cloud-dashboards.sh 7 | source ./install-kubectl.sh 8 | source ./install-terraform.sh 9 | source ./install-dynamodb-local.sh -------------------------------------------------------------------------------- /open-cloud-dashboards.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | gp preview $(aws-vault login default) --external 4 | -------------------------------------------------------------------------------- /setup-env-variables.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export AWS_DEFAULT_REGION=us-east-1 4 | export AWS_VAULT_BACKEND=file 5 | export AWS_VAULT_FILE_PASSPHRASE= 6 | brew install aws-vault 7 | --------------------------------------------------------------------------------