Skip to content

Instantly share code, notes, and snippets.

@jeroenbourgois
Last active April 2, 2019 07:25
Show Gist options
  • Save jeroenbourgois/8ed33c64a22c41636e817fb28b0331c8 to your computer and use it in GitHub Desktop.
Save jeroenbourgois/8ed33c64a22c41636e817fb28b0331c8 to your computer and use it in GitHub Desktop.
Setting up our jackjoe server as dev machine

Dev machine setup

This sets up a dev machine to work on. It is setup with the following:

  • Ubuntu (to get more cutting edge versions more easily)
  • openVPN
  • base packages (git, curl, ...)
  • node
  • Elixir/Erlang
  • nginx
  • MySQL
  • PostgreSQL
  • nvim
  • termieter
  • mkcert

Installation

Base is a Digital Ocean Ubuntu box (18.04). Always start with an update:

sudo apt-get update
sudo apt-get upgrade

openVPN

Based on this article. There was a bug when sourceing the openvpn vars file, inside it the backticks around the KEY_CONFIG variable where obsolote, deleting them got rid of the 'Permission denied' error:

export KEY_CONFIG=$EASY_RSA/openssl-1.0.0.cnf

NVIM

Termieter is installed and thus nvim is setup. But on debian there is no XDG_CONFIG_HOME set during installation.

This was then setup manually:

Create the config folder:

mkdir ~/.config

Add the env var to termieter:

export XDG_CONFIG_HOME="$HOME/.config"

Web base

Add the default www folder and chmod it (could be a site in the ansible book?)

cd /var/www
mkdir chino.jackjoe.be/public
sudo chown -R www-data:www-data chino.jackjoe.be

Update the nginx config to have a set of upstreams ready at common ports (4444, 4040, 3000, 5050, 5555)

Also install elixir

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang
sudo apt-get install elixir

Obviously

Add Chino:

<iframe src="https://giphy.com/embed/TSIq1GIbny9R6" width="480" height="270" frameBorder="0" class="giphy-embed" allowFullScreen></iframe><p><a href="https://giphy.com/gifs/deftones-chino-moreno-crosses-TSIq1GIbny9R6">via GIPHY</a></p>

mkcert

On Linux, first install certutil.

sudo apt install libnss3-tools
    -or-
sudo yum install nss-tools
    -or-
sudo pacman -S nss

Then you can install using Linuxbrew

brew install mkcert
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment