Coder Social home page Coder Social logo

puppet-ws's Introduction

puppet-ws Build Status

Puppet to set up my personal workstations.

Install

Right now some of the steps depend on my dotfiles being present so you might get errors if you run it in a virtual or somewhere testing. I will try to set up Hiera properly to take care of configurable arguments.

apt-get update && apt-get install -y curl && curl -fsSL https://raw.githubusercontent.com/Fuco1/puppet-ws/master/bootstrap | bash

Building from sources

The majority of applications is pulled in as packages but for some I prefer building from sources. To build applications reliably I use docker to isolate the build dependencies from the environment. I have "invented" a simple standard way to set up these build projects and a corresponding puppet module to pull, build & install.

Inspiration

This setup was mostly inspired by https://github.com/EtiennePerot/pupfiles and https://github.com/vincentbernat/puppet-workstation; go and check it out!

puppet-ws's People

Contributors

fuco1 avatar dependabot[bot] avatar

Stargazers

Gabriel Cavalari avatar

Watchers

James Cloos avatar  avatar  avatar

puppet-ws's Issues

Install http://psysh.org/ instead of borisrepl

Config

<?php

// Automatically load project vendor if found
call_user_func(function () {

    $chunks = explode('/', getcwd());
    while (!empty($chunks)) {
        $path = implode('/', $chunks);

        if (is_file($path . '/composer.json')) {
            if (is_file($path . '/vendor/autoload.php')) {
                require_once $path . '/vendor/autoload.php';
            }

            return;
        }

        array_pop($chunks);
    }

});

Setup git credential store

https://askubuntu.com/a/959662 (requires git 2.11+)

gnome-credential-helper is now deprecated.

Instead, use libsecret. If it's not already buil-in your ubuntu, use the following procedure:

  1. You can install libsecret and the development libraries with:

    sudo apt-get install libsecret-1-0 libsecret-1-dev

  2. Then you need to build the credential manager

    cd /usr/share/doc/git/contrib/credential/libsecret

    sudo make

  3. Finally, you should point git to the newly created file in your config:

    git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret

More details on https://stackoverflow.com/a/40312117/2017781

Add `inplace` option to `build::install`

This should build inside the repository provided as the source and ignore the tags/revisions. Basically, just build whatever is checked out.

I'm not yet sure how to detect if we want to run the rebuild or not (see also #18)

Configure `updatedb` to ignore useless files

On ubuntu there is a config file in /etc/updatedb.conf where we can set the env variable PRUNENAMES.

This is what I use at my workstation in the office

PRUNENAMES=".git .bzr .hg .svn .cache Trash .mozilla _cacache"

Seems to work really well.

  • _cacache comes from nvm/npm

Reduced around 5400 hits for 000 to about 870.

Maybe we could further ignore directories such as .cask and .stack and similar where packages are installed.

Update build::install paths

We should at least include these ['/bin', '/usr/bin', '/usr/local/bin', "${xmonad::home}/.local/bin"] (ref to home instead xmonad home) and the "current" directory as well.

build::install should clone into temp and not mess with local dev repository

Ideally we should be able to provide tag/revision we want to build. This might mess with local changes, so we should clone into /tmp and run the process there to make sure we are isolated. We can cache the repositories for repeated builds no problem...

There should be an option to override this and use the local repo though (useful for testing)

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.