Giter Club home page Giter Club logo

amzn2-dev-environment's Introduction

Amazon Linux 2 Development Environment

This liitle project arose out of a need to have a Linux-based development environment in order to do a pairing exercise for a job interview. Unfortunately my PC is running Windows, and whilst there are options such as WSL, Docker and VirtualBox, these environments don't really cut the mustard of a full Linux desktop system - especially when you want to run a browser against things that can be quite tricky to route outside the workstation, e.g. minikube dashboard.

Having an AWS account, I checked to see if it is possible to run a Linux GUI in EC2, and indeed it is. Upon reading this document, I immediately set about automating the build described such that I could stand it up and tear it back down again with minimum fuss.

How it works

You create an AMI of the environment, then use Terraform to provision it in your AWS account. The deployed environment runs a VNC server to which you connect from your Windows PC via an SSH tunnel.

Note that the following should also work for Macs as there is a TigerVNC viewer for Mac, but you'll need to use the appropriate SSH tools for the system.

Deploying the Environment

This assumes you're running Windows and want to deploy a Linux desktop in your AWS account.

Prerequisites

  • PuTTY - SSH client (including PuTTYgen for creating key pair)
  • Tiger VNC Viewer
  • Hashcorp Packer
  • Hashicorp Terraform
  • AWS Account.
    • Ensure you've configured the AWS CLI with defaults for credentials and the region you want to deploy in. Packer and Terraform will both assume the credentials. Packer only will assume the default region. Terrafrom requires an explict region specified. See main.tf.
    • You will also need a VPC with an Internet Gateway and at least one public subnet.

All of the above software can be installed using chocolatey on Windows:

choco install packer terraform putty tigervnc-viewer -y

Ideally have a hosted zone in Route53 so that Terraform can automatically assign a DNS record to the instance.

Follow this guide to get up and running

  1. Generate SSH keypair
  2. Build the AMI
  3. Provision Infrastructure
  4. Connect to your new environment
  5. Parking/Reusing your instance

amzn2-dev-environment's People

Contributors

fireflycons avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.