/devops-workstation

Configuration for devops workstation. Push out .screenrc, .bashrc, .vimrc files using ansible to user account using ansible

Primary LanguageShellApache License 2.0Apache-2.0

DevOps Workstation

Ansible playbook to configure your desktop with all the tools a DevOps could possibly need.

  • docker
  • postman
  • gitKraken
  • viscode
  • terraform
  • kops
  • minikube
  • kubectl
  • helm
  • virtualbox
  • vagrant
  • powershell
  • pycharm, phpstorm, goland
  • kvm
  • chromium
  • calible book reader

Also, implements a handy shell prompt that displays:

  • current git branch and commit hash
  • current aws assumed role
  • current terraform workspace
  • current python virtenv
  • current nvm
  • current k8s context

Optionally, if you really want to treat your servers as pets. You can push out bash profiles to the servers you manage with all your favourite aliases included:

  • .basrhc aliases and settings
  • .vimrc configuration
  • .screenrc settings (specific to each host -todo )

bootstrap

How to boot strap for the first time

apt install ansible git
echo 'localhost ansible_host=127.0.0.1 ansible_connection=local' | sudo tee /etc/ansible/hosts

ansible-playbook -l localhost deploy.yml --ask-become

bootstrap.yml is included to help you setup servers that aren't configured for ansible playbooks to be deployed to.

Linting

If you want to make code changes, take advantage of pre-commit linting

git config --global user.name "User Name" $ git config --global core.editor "vi"
git config --global user.email user@email.com
pre-commit install
pre-commit autoupdate
pre-commit run --all-files

.bashrc

Example

$ . ./devops-bashrc
[rails-project]
[ruby-head@rails]

taurus:PROJECTS danny$ workon HPC-Scripts
[HPC-Scripts]
[ruby-head@rails]
[master= 25cfc86]
taurus:devops-workstation danny$

NOTES:

Git

global git ignore

git config --global core.excludesfile ~/.gitignore

recommended vscode extensions

cat vscode.extensions | xargs -l1 code --install-extension