GithubHelp home page GithubHelp logo

mariocj89 / etcaterva-deployment Goto Github PK

View Code? Open in Web Editor NEW

This project forked from etcaterva/deployment

0.0 2.0 0.0 171 KB

Ansible sciprts to setup and configure EtCaterva servers

Python 75.70% JavaScript 24.30%

etcaterva-deployment's Introduction

EtCaterva-Ansible

Set of Ansible recipes to setup and configure EtCaterva servers.

Why this repository?

Because having infrastructure to support physical backups is not cheap, and in the unlikely event of our server getting corrupted or compromised, we'll be able to set up a new one only executing one command.

To implement these 'setup scripts' we have choosen Ansible, due its flexibility, ease of use, and because some members of the team had already experience with it.

Now, we only have to care about losing data, having to maintain logical backups.

How to use it?

Using Ansible is pretty easy. We are aiming for the creation of Ansilbe playbooks to configure certain servers. These playbooks are located in the top level folder.

To install Ansible you can follow the Ansible install guide, or just try with a classic sudo apt-get install ansible (although I had problems with that version, having to install it using sudo pip install ansible).

To run a playbook run:

ansible-playbook -i <path/to/hosts.file> <path/to/playbook>

For example, to run the webservers.yml playbook (to configure the web servers) execute:

ansible-playbook -i hosts_dev webservers.yml

Note: For decrypting one of the variable files you will have to use either --ask-vault-pass or --vault-password-file. For more information see how to run a playbook with vault documentation.

Testing changes

To make tesing the changes easier for us, we have created a script to automate the creation of a Virtual Machine, using Vagrant.

Note: Unfortunately, Ansible can't run on Windows, and given that we use the Ansible provisioner for Vagrant, you won't be able to use this Vagrantfile.

To install Vagrant (Debian):

sudo apt-get install vagrant

If you want to use Vagrant with libvirt (Debian):

# Install some dependencies needed
sudo apt-get install zlib1g-dev
sudo apt-get install nfs-kernel-server
sudo apt-get install libvirt-dev

# Install libvirt and mutate Vagrant plugins
vagrant plugin install vagrant-libvirt
vagrant plugin install vagrant-mutate

# Download the Vagrant box we are going to use, and mutate it for libvirt
vagrant box add ubuntu/trusty64
vagrant mutate ubuntu/trusty64 libvirt

Once you have Vagrant configured in your system, you will be able to run the scipt for creating the VM with:

vagrant up

The VM will get the IP 192.168.77.22. You can ssh using that IP and one of the created users, or using:

vagrant ssh

If you want to open the web servers, the following URLs (using xip.io) are configured to work:

etcaterva-deployment's People

Contributors

dnaranjo89 avatar mariocj89 avatar palvarez89 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.