This playbook installs most of the software that I use on my dev machine for web and software development.
Meant to be used on a fresh install of Pop!_OS 22.04, but should work on existing installs of the OS (be sure to configure only what you need). It will probably work on Ubuntu if flatpak is installed, but that hasn't been tested so your mileage may vary.
You will need pip
and ansible
installed on your machine which can be done with the following commands:
sudo apt install python3-pip
pip install --user ansible
export PATH=$PATH:~/.local/bin
Download or clone this repository to your local drive.
git clone https://github.com/crbanman/popos-dev-playbook.git
cd popos-dev-playbook
Install dependencies:
ansible-galaxy install -r requirements.yml
-
Make a copy of
default.config.yml
with the nameconfig.yml
and change the configurations you want to use. -
Run the playbook with the command and enter your user account password when prompted:
ansible-playbook main.yml --ask-become-pass
-
Restart your machine.
There are some things that I haven't been able to automate yet.
Download and set currently used node
version with nvm
. This should theoretically be handled by the playbook, but it doesn't.
nvm install --lts
nvm use --lts
Yarn can be installed once npm (from setting the node version).
npm install --global yarn
Add ssh keys. For better or worse I backup my keys, so I need to copy them to ~/.ssh/
and add them to the ssh-agent
.
-
Set the the appropriate file permissions for each key:
chmod 400 ~/.ssh/id_ed25519
-
Start the ssh agent
eval "$(ssh-agent -s)"
-
For each key run
ssh-add
ssh-add ~/.ssh/id_ed25519
Toolbox needs to be run once from the command line so the system can register the AppImage.
/opt/jetbrains-toolbox
Add docker image caching to avoid hitting the docker pull limit.
Note: This solution is probably overkill, but I have run into the limit a couple of times in the past when working on some docker stuff. Just signing in to docker hub will double your pulls from 100 pull to 200 pulls every 6 hours.
-
Pull and run the registry image on port
6000
docker run -d -p 6000:5000 \ -e REGISTRY_PROXY_REMOTEURL=https://registry-1.docker.io \ --restart always \ --name registry registry:2
Note: This container will automatically restart when docker is restarted (i.e. system bootup)
-
Create the file
/etc/docker/daemon.json
{ "registry-mirrors": ["http://localhost:6000"] }
-
Restart the docker service
sudo systemctl restart docker
-
Test that the mirror is working
- Pull an image you don't already have locally
docker pull node
- Curl the local registry
Expected result:
curl http://localhost:6000/v2/_catalog
{"repositories":["library/node"]}
- Pull an image you don't already have locally
This project was created by Cody Banman (originally inspired by geerlingguy/mac-dev-playbook and staticdev/linux-developer-playbook)