fazlearefin / ubuntu-dev-machine-setup Goto Github PK
View Code? Open in Web Editor NEWConfigure your Ubuntu 18.04, 20.04, 22.04, 24.04 Desktop as a development workstation for DevOps or DevSecOps
Configure your Ubuntu 18.04, 20.04, 22.04, 24.04 Desktop as a development workstation for DevOps or DevSecOps
hosts
file use and referencesansible.cfg
(inventory and ssh_connection)Remove powerline packages (powerline, fonts-powerline) and use tmux-plugin-manager with updated .tmux.conf
file
Remove installation of xclip
package in favor of xsel
Remove line source "/usr/share/powerline/bindings/tmux/powerline.conf"
from .tmux.conf
Update the tmux screenshot in README
Probably will go with boostnote, because of the popularity and the github stars:
Install https://github.com/bulletmark/libinput-gestures to enable 3 finger swipe for various actions like workspace switch in macOS
Also install https://gitlab.com/cunidev/gestures
Distro repo often contains older versions of virtualbox. Using the Virtualbox official repo installs the latest version of virtualbox
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib"
sudo apt update && sudo apt install virtualbox
Oracle tries to make sure you read and agree to their awesome license agreement before installing the package. This makes it difficult for automated installs. Sample code below needs to be integrated in the playbooks:
- block:
- name: accept licence virtualbox ext pack
debconf:
name: "virtualbox-ext-pack"
question: "virtualbox-ext-pack/license"
value: "true"
vtype: "select"
- name: install virtualbox ext pack
apt:
name: "virtualbox-ext-pack"
when: not virtual_machine_mode
Add these packages:
snap packages are a pain to load even on modern systems. Even a simple utility like calculator takes several seconds to load. Get rid of snap altogether.
https://lothiancaleysweb.co.uk/how-to-remove-snap-from-ubuntu
https://fazlearefin.blogspot.com/2020/02/remove-snap-snapd-from-ubuntu.html
Since this can break other things, removing snaps will be optional and can only be enabled by passing in an extra Ansible variable.
Get nerd fonts from https://github.com/ryanoasis/nerd-fonts
Changing fonts will also require updating https://github.com/fazlearefin/ubuntu-dev-machine-setup/blob/master/roles/terminal_customizations/files/tilix.dconf
Journal files can take up disk space over time. This can be automatically removed by setting SystemMaxUse={{size}}
in /etc/systemd/journald.conf
.
Current space used by journals can be found by journalctl --disk-usage
Ref: https://unix.stackexchange.com/questions/139513/how-to-clear-journalctl
The default editor is set to nano
. Update this to point this to vim
using the following:
sudo update-alternatives --config editor
and select vim
Sample playbook:
---
- hosts: all
become: yes
tasks:
- name: Install required dependencies
apt:
name:
- openjdk-11-jre
state: present
update_cache: yes
- name: Download Burp Suite Community Edition
get_url:
url: https://portswigger.net/burp/releases/download?product=community&type=linux
dest: /tmp/burpsuite_community_linux.sh
mode: 0755
- name: Install Burp Suite Community Edition
command: /tmp/burpsuite_community_linux.sh --prefix=/opt/burpsuite
- name: Create symbolic link for Burp Suite
file:
src: /opt/burpsuite/burpsuite_community.sh
dest: /usr/local/bin/burpsuite
state: link
- name: Create Burp Suite desktop entry
copy:
content: |
[Desktop Entry]
Name=Burp Suite Community Edition
Exec=/opt/burpsuite/burpsuite_community.sh
Terminal=false
Type=Application
Categories=Development;
dest: /usr/share/applications/burpsuite.desktop
mode: 0644
Install foliate package in Ubuntu 24.04 for .epub, .mobi, .azw, and .azw3 file formats
Instead of cloning from the github repo, install the deb package zsh-antigen
Install https://github.com/emre/storm for managing ~/.ssh/config in style
This is a placeholder to install the following tools for cloud security and IaC:
Fresh Install Ubuntu 20.04.01
The command I use:
ansible-playbook main.yml -e "{ laptop_mode: False }" -e "{ virtual_machine_mode: False }" -e "local_username=$(id -un)" -K
Errors
TASK [Gathering Facts] *********************************************************
ok: [localhost]
TASK [base : clear the existing /tmp dir (1/5)] ********************************
changed: [localhost]
TASK [base : copy systemd file (2/5)] ******************************************
ok: [localhost]
TASK [base : create dir /etc/systemd/system/tmp.mount.d (3/5)] *****************
ok: [localhost]
TASK [base : create tmp.mount custom options file (4/5)] ***********************
ok: [localhost]
TASK [base : start and enable tmp.mount on boot (5/5)] *************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Service is in unknown state", "status": {}}
PLAY RECAP *********************************************************************
localhost : ok=5 changed=1 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0```
Anything I should do first?
go directory in ~
is created with wrong ownership. Should be user:user
instead of root:root
In vim setup, consider removing indentLine plugin as the repo has been archived.
Install https://github.com/wagoodman/dive
Very handy tool for inspecting docker images
(Currently crappy installation procedure: single standalone deb file install)
Provide an option during ansible playbook run to enable additional apparmor profiles
Manual installation is as follows:
sudo apt install apparmor-profiles apparmor-utils
sudo aa-enforce /etc/apparmor.d/*
# verify
sudo aa-status
Update the README as well
Janus vim distribution is not actively maintained anymore. Use https://github.com/amix/vimrc instead
(Update README.md
)
Privacy mode will install tor packages including tor browser.
Helpful source: https://linuxconfig.org/install-tor-on-ubuntu-18-04-bionic-beaver-linux
Note: Find a way to install tor browser in silent mode, if possible.
Others include:
apt install mat2
apt install ptpython
Newer versions of SourceCodePro are available from https://github.com/adobe-fonts/source-code-pro/releases
This will let the user run docker commands without sudo
Install rclone Cloud-rsync utility in 20.04
apt install zsh-antigen
instead of cloning the repo
Do not install any python 2 related packages in Ubuntu 20.04
Add a default .tmux.conf
which, when tmux is invoked, will:
(Update README.md
)
poetry config virtualenvs.in-project true
Switching to bash should give an exciting shell to work with. And that's where https://github.com/ohmybash/oh-my-bash comes in
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.