Coder Social home page Coder Social logo

ubuntu-18.04-ami-setup-packer's Introduction

Instructions for ubuntu-18.04-ami-setup-packer

The goal of the repository is to spin up Ubuntu (18.04) server with Docker and Docker-compose for web application development, locally and in the cloud (AWS) using Packer and Vagrant with minimal effort.

Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity, and makes the "works on my machine" excuse a relic of the past.

Setting up your local machine

Building a box with Packer (local)

  • RUN https://github.com/kmvinoth/ubuntu-18.04-ami-setup-packer.git
  • Run cd packer-templates
  • Run packer build -only=virtualbox-iso ubuntu-18.04-server.json

This will take sometime because .iso file has to be fetched from the internet. If you already have the iso file locally specify the location of the iso file in the iso_urls array in ubuntu-18.04-server.json

Once, packer finished building the artifacts, you will find the .box file in vagrant_vm directory

Spining up the server with Vagrant (local)

  • Run cd vagrant_vm
  • Run vagrant box add ubuntu-18.04.4-server-amd64.box --name dev-server
  • Run vagrant up
  • Run vagrant ssh to connect to the server
  • Run docker version to check docker installation
  • Run docker-compose --version to check docker-compose installation

Spinning up the server and creating AMI on AWS

I have selected eu-central-1 as my region, feel free to change it to any region.

  • Run export AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY
  • Run export AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY
  • Run packer build -only=amazon-ebs ubuntu-18.04-server.json

ubuntu-18.04-ami-setup-packer's People

Contributors

kmvinoth avatar

Stargazers

 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.