Giter VIP home page Giter VIP logo

chester-ansible-configs's Introduction

chester-ansible-configs

This project contains the configuration for my personal projects (which I automated in an effort to further explore Ansible, Vagrant and related tools), and published because:

  • Ansible exemples may be useful to someone else (despite being very specific to my stuff);
  • It keeps me honest (makes me write scripts that don't suck much, forces me not to have plaintext secrets, exposes security flaws, etc.);
  • Public github is free Not really a reason anymore 🎉

Feel free to use it (I'm licensing as MIT to ensure that) and to open issues or contact me if you find something awry.

If you want to learn Ansible, I strongly recommend Jeff Geerling's Ansible for DevOps. Several tasks here were based on tasks on his book or some of his tasks in Ansble Galaxy.

(Se você lê Português, veja também o Caixa de Ferramentas DevOps do Gleicon Moraes)

What does it configure?

cruzalinhas.com

An app that allows quickly finding public transportation routes in São Paulo. See source code or website for details. It shares she same nginx with the Toronto Transit (below).

Home automation Raspberry Pi

I used my RPi to add voice control to my lights and TV. I added plabooks to provision it and configure the apps, so I can tinker with confidence.

Toronto Transit for Pebble

Back-end for a Pebble app that finds the nearest bus/streetcar stops and shows how long it will take for the next vehicles to arrive.

miniTruco server [TODO]

This is a simple Java app that listens on the 6912 port, handling communication between miniTruco clients and spawning bot players to fill incomplete tables (a miniTruco table requires 4 players).

Quick setup (Mac OS X)

This will get you a VM capable of running any of those services:

brew update
brew install rbenv ansible
brew cask install virtualbox vagrant
vagrant up

To install one (or more) of the services on the virtual machine, run its playbook:

ansible-playbook <playbook name>.yml -i hosts,

(alternatively you can use -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory, but it will log in with the default user for Ubuntu provisioning, not the {{ admin_user }} defined on the global vars)

Run this script to enable development sites (it redirects ports - until reboot - and add entries to /etc/hosts; run it again to revert all changes):

sudo ./config-dev-environment

Now you can open, say, http://dev.chester.me.

Passwords vault

A few tasks (including the initial run of each playbook) require you to supply your own password vault. See the sample file for details.

Production provisioning

Initial server setup is done by running provisioning.yml with the root user (-u root) against the proper host (one of its tasks is to create the proper user, then disable root and password-based logins).

Once that is done, playbooks may be ran on the proper hosts. Currently I ran all of them on the same host, but they can theoretically live in different machines.

Maintenance tasks

Those are tagged on the playbooks, please check them for such tags and add to ansible-playbook. Examples:

  • To download new data from sptrans: --tags update_sptrans_data;
  • To deploy the latest version of cruzalinhas or toronto-transit-time: --tags update_app.

chester-ansible-configs's People

Contributors

chesterbr avatar thepont 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.