Code Monkey home page Code Monkey logo

env-setup's Introduction

env-setup

A workstation provisioner powered by Ansible / Homebrew for either macOS or Linux.

Quickstart

Get started with env-setup:

  1. Init: bash <(curl -sL jig.io/env-setup)
  2. Config: env-setup -c
  • none: You want an empty config.
  • mini: You want a minimum config.
  • default: You want a workable default config.
  • most: You want it all.
  • custom: You want a new config.yml config started.
  1. Run: env-setup

Usage

Init

The initialize command will verify you have git & a SSH key to retrieve this repo. You'll need to allow a new SSH key in GitHub if not already set. It will install the tool in your home dir under env-setup.






Config

The configuration yml file (config.yml) contains a manifest of Ansible variables that define what should be installed in your environment. You can change the values in config.yml to fit what your environment setup needs.

env-setup has a few starter config templates from these starter scenarios:

  • none: You don't need an environment setup, but you want the env-setup tool for later use.
  • mini: You want a environment setup with only the basic functionality (scripts, Homebrew, & Ansible).
  • default: You workable default environment setup that will be used semi-often.
  • most: You want it all in a environment setup that you'll use often.
  • custom: You want a custom config.yml that you'll specify on your own (see an example config.yml)

Run

When env-setup is first run it will verify you have Ansible. After that, you'll be prompted to select an Ansible playbook to run. Optionally, you can specify what playbook to run directly (e.g. env-setup 01-config will run the config playbook directly, env-setup all will run all playbooks in sequential order)






Updating

Running env-setup -u will update the installed repo alongside the installed dotfiles repo.

Playbooks

An Ansible playbook is a series of tasks that need to run to get to your wanted setup. env-setup has 8 main playbooks with other optional ones based on your needs.

  • 01-config: Configure your dotfiles for your app & CLI configuration (defaults to env-setup-dotfiles if not overridden)
  • 02-cli: Install CLI tools via Homebrew formulas
  • 03-apps: Install GUI applications via Homebrew casks & other means (e.g., Linux package manager & App Store via mas)
  • 04-packages: Install common programming language (Go/Node/PHP/Ruby/Rust/Python) dependencies for development tooling.
  • 05-repos: Clones Git repos used for active development (projects) or reference (vendors).
  • 06-os: Configure the OS settings.
  • 07-cloud: Configure the host for cloud file sync.
  • 08-prefs: Configure any other app settings.

See custom playbook section for adding other playbooks as needed.

Task Info

If you like a list of what tasks in a playbook will do, run env-setup -i with the playbook name (e.g. env-setup -i 03-apps). It will print an ordered task list, with a description and tags that describe what the playbook will do.

Skipping Tasks

If you'd like to skip tasks in a playbook, each task have tags associated with them. You can select tags with the -t option or skip tags with the -s option. You can specify multiple tags by comma-delimiting. For example:

  • env-setup -t node,python 04-packages: Install only Node & Python packages.
  • env-setup -s php 04-packages: Install all packages, except PHP packages.

Custom Playbook

To get started with a custom playbook:

  • run ./scripts/add-playbook 09-my-playbook

This will setup the directory structure in the ansible dir and make it selectable in the env-setup tool.

From there, you can edit:

  • ansible/*/09-my-playbook/main.yml to add your playbook tasks
  • ansible/*/09-my-playbook/requirements.yml to add any ansible-galaxy dependencies for the playbook.

Development

See the development README.

env-setup's People

Contributors

shawnconn 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.