Moving into Devops Moving into Devops

July 27, 2020

debian bash devops ansible

In my last contract role, I spent more time working with the Devops team than the frontend team. I really enjoyed it and now feel that this is a better path for me. I have been using the command line to build, manage and test servers for many many years and feel this is somewhere I can offer more to companies in the future.

I was on twitter and I found this article about alternative career paths from freecodecamp and the Devops idea was one most appealing to me.

I have spent a lot of the last few months learning more and more about linux and the Command line. Including learning Bash Scripting and Python.


create a ssh key and copy it to the raspberry pi:

root@linuxtechi:~# ssh-keygen
root@linuxtechi:~# ssh-copy-id root@

This allows you to ssh into the machine without a password.

Bash Cheat sheet

Back in the days as an Apple Mac user, i really like Applescript. With these little scripts you could get stuff done quickly and easily. Laravel also provides a need way to write command line scripts which allow me to download and process the data.

Bash scripting is similar, i now have scripts to create new posts for this blog, build the css/js with webpack, deploy the site to github and many more.

To help, I have added a Bash Cheat cheet to this blog.


Ansible is a tool to software provisioning, configuration management, and application-deployment tool. wikipedia intro to ansible

I do like learning from videos and I found this series of videos Ansible with Jeff Geerling


Now i can setup a hosts file like so:

[raspberrypi] ansible_ssh_user=pi hostname=raspberrypi

Once i set up the ssh login (see above), i can now test the server connection with

ansible -i hosts -m ping raspberrypi

i have setup a new github repo which i run like this:

ansible-playbook site.yml -i hosts

Vagrant and Virtualbox

With Laravel there is Homestead which provides an easy vagrant box with all the linux tools to run a website. I have also used Virtualbox for years to run debian boxes from around the time of Debian 6.

vagrant up
vagrant halt
vagrant ssh


Docker takes the whole Vagrant VM forward and makes an entire container which you can deploy as the finished website. I have used it before in my last contract role and found it very powerful.

Kickass Laravel Development with Docker - David McKay - Laracon EU 2018 Amsterdam


Jenkins is a Continuous Integration and testing environment which allows you to test your code as it is pushed to Github.

PHP UK Conference 2018 - Michael Heap - Zero to Jenkins: Automatic builds + deploys

I am installing Jenkins on my Raspberry Pi using this tutorial from

To install jenkins add this to the playbook

    - name: ensure the jenkins apt repository key is installed
      apt_key: url= state=present
      become: yes

    - name: ensure the repository is configured
      apt_repository: repo='deb binary/' state=present
      become: yes

    - name: ensure jenkins is installed
      apt: name=jenkins update_cache=yes
      become: yes

    - name: ensure jenkins is running
      service: name=jenkins state=started

If you would like to contact me you can either use this form on or via Twitter @andylondon