Giter Club home page Giter Club logo

homeinfra's Introduction

homeinfra

Home infrastructure (Ansible) for Louis's stuff.

Ansible Configuration Settings

Override the following settings in order to utilize the Ansible Collection and the associated roles, playbooks, etc.. Make sure to substitute /path/to/HOME with the actual, specific value for your environment (generally $HOME/.ansible).

[defaults]
collections_path = /path/to/HOME/.ansible/collections:./collections:/usr/share/ansible/collections"

Testing with Molecule

This project uses Molecule to perform integration tests against a "staging" virtual machine. This VM is intended to match closely with the production one, and is run locally on my MacBook using VMware Fusion.

To interact with VMware Fusion, this project uses the qsypoq.vmware_desktop Ansible collection as explained in this blog post. The Ansible plugins provided by this project require some configuration, which is provided (thru Molecule) as a series of environment variables in .env.yml. Please initialize the file in the top-level of the repository as follows:

HOMEINFRA_TEST_VMNAME: "<name of the VM>"
HOMEINFRA_TEST_VM_SNAPSHOT_NAME: "<name of the Base OS snapshot>"
HOMEINFRA_TEST_API_USERNAME: "<some username set during vmrest -C>"
HOMEINFRA_TEST_API_PASSWORD: "<some password>"
HOMEINFRA_TEST_API_URL: "http://127.0.0.1"
HOMEINFRA_TEST_API_PORT: "<some port # output by vmrest>"
HOMEINFRA_TEST_SSH_USER: "<username in the guest OS>"
HOMEINFRA_TEST_SSH_IDENTITY_FILE: "<id_rsa on the host; authorized in the guest>"
HOMEINFRA_TEST_BECOME_PASSWORD: "<root's password on the system>"

These variables are best understood by reading through this page, Use the VMware Fusion REST API Service. This can be initialized by running vmrest -C. While running Molecule tests, the vmrest program should be running somewhere in the background, and the URL (particularly the port number) which it displays should be substituted into the .env.yml file.

When destroying and recreating the environment, Molecule will call out to the vmrun binary to revert to a known-good snapshot. For some reason, this isn't available via the Rest API. The strategy, then, is to occasionally update the Base OS snapshot with new OS packages and nothing more --- let Ansible take care of everything else.

homeinfra's People

Contributors

liverwust avatar

Watchers

 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.