bash-dev-env

NOTE: Documentation is best viewed on github-pages

TIP: Checkout related projects of this suite

GitHubLicense CI/CD ProjectStatus DeepSource DeepSource AverageTimeToResolveAnIssue PercentageOfIssuesStillOpen

1. Excerpt

Allows to install, upgrade, configure and automatically maintain main softwares used by developers. You can use this script under wsl or virtualbox ubuntu based images.

Follow these indications to Install & Configure. You can see a non exhaustive list of features provided by this tool in this chapter Features presentation.

This is a collection of several bash installation scripts using bash tools framework allowing to easily install several softwares on ubuntu based image (under wsl or virtual box or native installation).

2. Install & Configuration

2.1. Windows (Recommended)

TODO

2.2. Virtualbox

TODO

2.3. Dev-env install

please follow Dev-env Installation instructions

3. Features presentation

This project will install, update and configure these non exhaustive dependencies:

  • Awsume (alternative to Saml2Aws)

  • AwsCli

    • Awscli with default ck configuration
  • BashProfile with

    • pre configured aliases
    • default variables PATH, ...
    • completions
    • customized git prompt
    • fasd jump easily to directories/files
    • Kubectx + Kubeps1
  • BashTools provides some useful bash tools:

    • cli -- tool to easily connect to your containers
    • dbImport -- tool to import database from aws or Mizar
    • dbQueryAllDatabases -- tool to execute a query on multiple databases
    • ...
  • CodeCheckers

  • Composer

    • php
    • php-curl
    • php-mbstring
    • php-xml
  • ComposerDependencies

    • squizlabs/php_codesniffer
    • phpmd/phpmd
    • friendsofphp/php-cs-fixer
  • ZshProfile: instead of using BashProfile, you can use Zsh shell with

    • pre configured aliases
    • default variables PATH, ...
    • completions
    • very powerful and efficient prompt powerlevel10k
    • oh-my-zsh plugins/themes manager
    • Fzf (search history)
  • Fortune (display help message at each bash/zsh login based on the installed softwares)

  • Fzf - fzf is a general-purpose command-line fuzzy finder. It's an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostNames, bookmarks, git commits, etc. Fzf configuration comes with fd, fd is a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find. While it does not aim to support all of find's powerful functionality, it provides sensible (opinionated) defaults for a majority of use cases.

  • Git (default ~/.gitconfig with main branch, email, name, default aliases, ...)

  • GitHook

    • configure pre-commit to provide default commit linter
    • hook for default commit message prefix based on branch name
  • Hadolint (docker linter)

  • Java dependency needed by Plantuml

  • Kubernetes

  • MandatorySoftwares

    • build-essential
    • curl
    • dos2unix
    • jq
    • mysql-client
    • parallel
    • putty-tools
    • pv
    • unzip
    • vim
    • vim-gui-common
    • vim-runtime
    • wget
  • MLocate (command locate + indexing configuration) -

    • Mlocate deprecated in favor of fd (installed with Fzf dependency of BashProfile and ZshProfile) contrary to Mlocate, fd does not need to maintain a db of files
  • Node (install n + nodejs)

  • NodeDependencies

    • hjson
    • npm-check-updates
    • prettier
    • sass-lint
    • stylelint
  • OpenVpn

  • Oq

  • Plantuml

  • Python dependency for Awsume

  • Saml2Aws (alternative to Awsume)

  • VsCodeExtensionProfiles

    • install some useful extensions
    • configure VsCode with extensions profiles that can be activated independently in VsCode
      • Mandatory
      • Bash-Bats-Shellcheck-jq
      • Design API-UML
      • Python
      • Jenkinsfile-Docker-Helm
      • PHP-HTML-JS-twig-Vue
      • SQL
  • Xvfb (not used in any profile for now, used to launch headless chrome by aws cli)

  • Dependencies for WSL only

    • Anacron ability to run cron asynchronously (useful for wsl that has no systemd)
      • configured with a default weekly cron to run this install script for updating softwares
    • Dns (use with caution, beta version, use it if dns not working anymore on wsl)
    • DockerWslConfig (mainly configure /etc/wsl.conf)
    • Font install fonts that allows to displays special icons in zsh/bash prompts
    • Note VsCode is not needed in wsl, it has to be installed on windows and then accessible via code command from wsl prompt.
    • WslProfile (currently deactivated) - ability to configure windows terminal
  • Dependencies for virtual box only

    • Chrome
    • Docker
    • DockerCompose
    • Firefox
    • JetbrainsToolbox (allows to install phpstorm)
    • LXDE
    • Terminator
    • VsCode

3.1. Periodical updates

install script has been designed to be executed several times over the time. Anacron dependency configures a periodical execution of this script.

3.2. config files backup

install script can update or completely rewrite config files that can be personal like .bashrc but don't worry these files are backed up in the backup directory of this project.

4. Additional documentation

5. github page

The web page uses Docsify to generate a static web site.

It is recommended to install docsify-cli globally, which helps initializing and previewing the website locally.

npm i docsify-cli -g

Run the local server with docsify serve.

docsify serve pages

Navigate to http://localhost:3000/

6. Acknowledgements

This project is using bash-tpl in order to compile several bash files into one files.

Like so many projects, this effort has roots in many places.

I would like to thank particularly Bazyli Brzóska for his work on the project Bash Infinity. Framework part of this project is largely inspired by his work(some parts copied). You can see his blog too that is really interesting