Template for provisioning local OSX/Ubuntu machine for software development
- Go to "Sharing" and change the machine's name.
- Update the
group_vars/all.yml
accordingly.
- Install latest Xcode from App Store.
- Make sure latest command line tools are installed (run
xcode-select --install
). - Make sure Python is installed (usually bundled with OSX).
- Install pip
sudo easy_install pip
. - Install Ansible
sudo pip install ansible
. - Get this repo directory into the machine somehow.
- Run
ansible-playbook -v --ask-become-pass --skip-tags=osx -i local provision.yml
in this directory.
- Make sure you copied the priv/pub keys to the backup HD, together with all the other home files that you'll need.
- Install XCode from the AppStore.
- Install Chrome, Docker, Brave, Emacs and Spotify using the official sites.
- Install all other AppStore apps that you'll need.
- In OSX, open terminal and change default shell to
/bin/bash
. - Once XCode is installed run
xcode-select --install
. - Copy files from the backup HD.
- Clone this repo into
~/work
. - Copy SSH keys.
- Import GPG keys
- Build docker image to provision with ansible:
docker build -t ansible_provisioner -f Dockerfile.ansible .
- Create a container with this image and create a new ssh keypair.
docker run -it --rm -v=$(pwd):/app --workdir=/app ansible_provisioner /bin/bash # ... keygen
- Copy this key to the host
.ssh/authorized_keys
. - Run the ansible playbook:
ansible-playbook --skip-tags=ubuntu -i remote provision.yml
- Make sure you copied all backup files that you'll need to the home directory, including SSH keys.
- Install Docker and make sure it starts on boot.
- Instal the SSH server in the Ubuntu host machine:
sudo apt install -y ssh sudo systemctl enable --now ssh
- Build docker image to provision with ansible:
docker build -t ansible_provisioner -f Dockerfile.ansible .
- Create a container with this image and create a new ssh keypair.
docker run -it --rm -v=$(pwd):/app --workdir=/app ansible_provisioner /bin/bash # ... ssh-keygen
- Copy this key to the host
.ssh/authorized_keys
. - Run the ansible playbook:
ansible-playbook --skip-tags=osx -i remote provision.yml
- Install the following Gnome extensions:
- WinTile
- Application Menu
- Set the
numix
theme under settings. - Add the remapping keys script to the startup apps:
- Name: remap keys
- Command:
bash -c "xkbcomp /home/sborrazas/.xkbmap $DISPLAY"
- Change the local Wifi DNS to be
8.8.8.8,8.8.4.4
. - Run bleachbit cleanups (and continue to do so every couple of months).
If the remote host has a password to connect through SSH you should also append
the following parameters to the ansible-playbook
command: --ask-become
.
- Import the terminal config file located in the Desktop and set it as the default profile.
- Go into iTunes, on the menu "Store", "Authorize this computer" so you're able to download the songs.