GithubHelp home page GithubHelp logo

nathanielvarona / pritunl-aws-vm-server-dev Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 14 KB

Pritunl AWS VM Server with MongoDB Atlas (Free Tier) IaC using Terraform - (for Development Purpose)

Ruby 8.46% HCL 75.43% Shell 16.11%
example free-tier terraform ansible ansible-galaxy ansible-inventory ansible-playbook ansible-roles terraspace

pritunl-aws-vm-server-dev's Introduction

Provision Initial VM using Terraform

Prepare the Environment

Create a copy and fill in the required environment variables fields

cp ./.envrc.dist ./.envrc

Load the environment variables in your current working shell

set -a && source ./.envrc && set +a

Install Terraspace (a Terraform Framework) Requirements

Create a Ruby Environment (Gemset)

rbenv gemset create 3.1.2 pritunl-aws-vm-single-server

Install the required Gemset for Terraspace Framework

bundle install

Install Terraform Vendor Modules from Terraform Registry

terraspace bundle

Provision the VM

Plan and Provision a VM

terraspace all plan
terraspace all up

Monitor the Operations by outputting the logs

terraspace logs -f

Provision Existing VM using Ansible

Ansible Provisioning Requirements

Prepare the Environment

cd ./provisioning
python -m venv ./.venv
source ./.venv/bin/activate

Ansible Base (Core Distribution)

pip install -r requirements.txt

AWS Plugin

ansible-galaxy collection install amazon.aws

AWS Compute Resource Inventory Checks

Show AWS EC2 Resource

ansible-inventory -i aws_ec2.yml --graph
ansible tag_Name_pritunl_vm -i aws_ec2.yml -m ping

Basic Usage

Check for Possible Changes (Dry Run)

ansible-playbook -i aws_ec2.yml main.yml --check

Install the Updates (Approve for any changes)

ansible-playbook -i aws_ec2.yml main.yml

Advance Usage

Only for APT Check/Changes

ansible-playbook -i aws_ec2.yml main.yml --tags "apt" --check

Only for SystemD Check/Changes

ansible-playbook -i aws_ec2.yml main.yml --tags "systemd" --check

TODO

  • Create a Packer Images for Initial VM Provisioning

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.