Giter Site home page Giter Site logo

svaksha / yaksha Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 5.0 30.43 MB

Personal linux automation for ansible playbooks, dockerfiles, dotfiles, scripts and random daemons!

Home Page: http://svaksha.github.io/yaksha

License: Other

Shell 39.91% Python 4.70% Julia 1.04% Vim Script 54.17% Less 0.18%
shell dotfiles debian automation bash bashrc-configs ubuntu linux julia julia-config

yaksha's Introduction

YAKSHA

The term YAKSHA, is used to refer to "fairies", "demons" and "spirits" in Sanskrit; i.e. my automated daemons to save me from mundane Yak-Shaving the OS with DEVEL installation & management that should "just work", irrespective of cross-platform *nix OS, with multiple programming languages, updates, backups, bash scripts, dockerfiles, playbooks, dotfiles and configuration files!

Ofcourse, automating my development environment across multiple machines helps me keep track of packages, dep-hell and redundancy; unlike manual customization that was not only time-consuming but error-prone too. Wrestling with my OS was a huge time-sink that resulted in discrepancies with machines that worked differently, programs ran differently or broke unexpectedly and worse, dependency-hell. Hours wasted on a kaput OS can be very frustrating!

Initially, I had started with bash-shell scripts to manage the apt-get install process but over the years there are newer devops methods, so its time to port these bash scripts and (slowly?) retire them. I am in the process of porting some parts of the installation to manage my dev environments to ansible, an agentless distro-agnostic tool. You can find this repo on galaxy-ansible too. PS: The old shell/ bash scripts work, but are unsupported & unmaintained. Eg. many packages changed between Ubuntu 18.04 and 20.04 LTS, so was impractical to maintain individual scripts for multiple OS'es.

The standard disclaimer applies: Read the License & Disclaimer No warranty and/or guarantee for any particular use, express or implied and YOU USE ALL CONTENTS IN YAKSHA AT YOUR OWN RISK AND LIABILITY!


INSTALL

Installation processes have constantly evolved over the years, so there may be some legacy code that needs pruning or still needs to be ported to ansible. Hence, the constant CRUD sandbox status may break your dev machine (NB: currently used for all my DEV machines, not tested for production servers).

DEV Installation-Bash

If you have NOT set the PATH environment variable for running Bash scripts from anywhere on your system, then:

$ cd yaksha/ubuntu    #change directory into the ubuntu dir in the yaksha repo.

$ chmod +x /yaksha/ubuntu/apt-install.sh   # give it executable perms, if not already given.
 

Since . refers to the current directory and as apt-install.sh in the current directory, you can easily run it with:

$ ./apt-install.sh  

DEV Installation-Ansible

  1. At the outset, your Ubuntu machine should have Ansible and Git intalled.
sudo apt update && sudo apt install ansible git

You can also use pip to install ansible but I prefer the apt-get package. Note that if you have a standalone machine this step is a manual process, else automated for the network installation.

  1. Then, clone Yaksha. For SSH, use the URL [email protected]:svaksha/yaksha.git via the clone command:
git clone ssh://github.com/svaksha/yaksha.git

Alternatively, Github offers HTTPS (replace the ssh with https in the above command) as transfer protocols and the repo can be downloaded as a zip-file (latest 'master' branch).

  1. Then, to run all the ansible playbooks sequentially, run the following commands in your terminal:
$ cd yaksha    # change directory into yaksha

$ ansible-playbook -b -C -K -v yaksha.yaml    # runs all Playbooks.

The above command runs all the playbooks listed in the yaksha.yaml file. However, if you want to individually run specific playbooks, e.g. install only Ubuntu package-deps via apt, then run the ansible playbooks inside the /ubuntu folder, with a specific command, e.g.:

ansible-playbook -b -K ubuntu/ansible-imaging.yaml   # install packages for OCR and imaging tasks.

Install Python3 scientific packages (via pip3) using ansible

The Python package (PyPI) installation deserves a longer rant, especially for Data Science. Pip3 is nice, but Anaconda (& no-frills miniconda) came by so now DS/ scientific python has multiple dep-installation methods, via 'apt' or 'pip/pip3' or 'conda' or the timeless 'source' installation. IMPO, while Conda made it easier to install all the scientific AI/ML packages it is its own beast with tons of unnecessary "pre-packaged" packages that I dont need. It works as a parallel PKG manager system to pip3, but for DS, but I have some qualms about 'an OS inside an OS' that only handles packages of ONE programming language and wonder if I need the extra packages. Why isnt dep hell as simple as Julia? TL;DR, I will stick to 'apt + pip3' here:

ansible-playbook -b -K python/main.yaml

COPYRIGHT-LICENSE

  • COPYRIGHT© 2005-Now SVAKSHA. This repository is licensed and distributed under the AGPLv3 License and ALL references, citations, copies and forks of this work must retain the Copyright, Licence (LICENSE.md file), this permission notice and attribute credit. Copyrights for code when referenced, and/or attributed to other people, repos and/or entities, belongs to them as licensed by them.

Contribute-Feedback

All feedback and suggestions for improvements are welcome via BR's!

Stargazers

Stargazers over time

References

List of references and a list of people (repo'S) that have inspired me to learn and improve Yaksha over time. It is amazing how much one can learn from other peoples code so lets share the credits:

yaksha's People

Contributors

svaksha avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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