Developing USING A cloud DESKTOP

Drupal Barcamp Munich 26. - 28.4. 2019

#dcmuc19

@drubb

About me

  • Boris Böhne
  • a.k.a drubb
  • Freelancer
  • Drupal since 2006
  • Located near Stuttgart
  • Currently working for arocom and Reinblau

#dcmuc19

@drubb

My dirty little secret?

I'm still using Windows!

#dcmuc19

@drubb

What I've done for years

+

  • slow
  • resource consuming (RAM, Disk)
  • get off my device!

#dcmuc19

@drubb

What if We Could move this to the cloud?

#dcmuc19

@drubb

SURE, What DO WE NEED?

  • VPS (>= 4 GB RAM, >= 2 vCores, Ubuntu 18.04)
  • Monthly costs from 5 €
  • Desktop Environment
  • Remote Access
  • Applications & Tools

#dcmuc19

@drubb

Linux Desktop environment

(MATE DESKTOP)

apt install ubuntu-mate-deskop -y

@drubb

#dcmuc19

Remote Access

(Microsoft Remote desktop client + (X)RDP)

  • Windows
  • MacOS
  • IOS
  • Android
  • Linux (3rd party, e.g. Remmina)

#dcmuc19

@drubb

Remote DESKTOP PROTOCOL

(Installation)

apt install xrdp xorgxrdp xrdp-pulseaudio-installer
xrdp-build-pulse-modules
sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh

Linux (VPS):

Windows / Mac / IOS / Android:

  • MS Remote Desktop Client from App Store

#dcmuc19

@drubb

Now, let's look at my stack!

(First Some basic stuff)

#dcmuc19

@drubb

  • Git
  • Curl
  • Midnight Commander
  • ZSH / OH-MY-ZSH (powered by Antigen, http://antigen.sharats.me/)
apt install curl git mc zsh
curl -L git.io/antigen > antigen.zsh

Applications: Snaps FTW!

  • easy installation / removal
  • automatic updates
  • version selection / switching
snap install <package> [--channel=<version>] [--classic]

Examples:

snap install phpstorm --channel=edge --classic

snap install gimp

#dcmuc19

@drubb





The snap command lets you install, configure, refresh and remove snaps.
Snaps are packages that work across many different Linux distributions,
enabling secure delivery and operation of the latest apps and utilities.

Usage: snap <command> [<options>...]

Commands can be classified as follows:

         Basics: find, info, install, list, remove
        ...more: refresh, revert, switch, disable, enable
        History: changes, tasks, abort, watch
        Daemons: services, start, stop, restart, logs
       Commands: alias, aliases, unalias, prefer
  Configuration: get, set, wait
        Account: login, logout, whoami
    Permissions: connections, interfaces, interface, connect, disconnect
      Snapshots: saved, save, check-snapshot, restore, forget
          Other: version, warnings, okay, ack, known
    Development: run, pack, try, download, prepare-image

For more information about a command, run 'snap help <command>'.
For a short summary of all commands, run 'snap help --all'.

Text

Text

#dcmuc19

@drubb

Some Common snaps I'm Using

  • PhpStorm (IDE)
  • Visual Studio Code (IDE)
  • LibreOffice (Office)
  • Gimp (Graphics)
  • Insomnia (REST Client)
  • NodeJS (JS Runtime)
  • LXD (Containers)
  • Termius (SSH/SFTP-Client)

#dcmuc19

@drubb

Development Runtime Environment

(Docker & LANDO)

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
wget https://github.com/lando/lando/releases/download/v3.0.0-rc.14/lando-v3.0.0-rc.14.deb
dpkg -i lando-v3.0.0-rc.14.deb

https://docs.devwithlando.io/

#dcmuc19

@drubb

[Demo Time]

Remote Drupal Development using Lando

#dcmuc19

@drubb

Cross Browser Testing

(LOCALTUNNEL)

  • Making development sites accessible from outside
  • Edge, IE, mobile devices, ...
npm i -g localtunnel
lt --port 80
your url is: https://horrible-crab-3.localtunnel.me

https://www.npmjs.com/package/localtunnel

#dcmuc19

@drubb

Cloud Storage & Backups

(RClone & Restic)

curl https://rclone.org/install.sh | bash
snap install restic

https://rclone.org/

https://restic.net/

#dcmuc19

@drubb

Cloud Storage & Backups

(RClone & Restic)

  • Mount cloud storage (Google Drive, OneDrive, S3, SFTP, WebDAV, ...)
  • Easy mounting, copying, syncing, backups
  • Optionally automated using cron
Examples:

rclone mount gdrive/images /home/drubb/images

rclone copy hetzner:/ onedrive:/ -P

restic -r rclone:hetzner:Desktop backup /home/drubb

#dcmuc19

@drubb

What about security?

...the usual suspects!

  • no root logins
  • no ssh logins using password identification
  • port obfuscation (mostly useless, but...)
  • firewall with open ports for ssh and xrdp only
  • fail2ban
  • hardened rdp protocol (TLS 1.2)
  • unattended security upgrades
  • ssh tunneling

#dcmuc19

@drubb

Benefits

  • Fast environment (given a decent VPS or Root server)
  • Very good network connectivity (backups, large downloads, ...)
  • Runs around the clock (eg. for nightly jobs like updates or backups)
  • Multi-Device support (Desktop, Tablet, Chromebook, Phone, ...)

Caveats

  • Slow video / graphics transfer
  • Monthly costs
  • Internet connection needed
  • Basic Linux knowledge needed

So, is it worth the hassle?

#dcmuc19

@drubb

Thanks to our Sponsors!

Thanks To The amazing local Community!

and of course

Thanks TO YOU FOR LISTENING!

QueSTions anyone?

https://slides.com/drubb

#dcmuc19

@drubb

Developing using a Cloud Desktop

By Boris Böhne

Developing using a Cloud Desktop

How I moved my complete Drupal development environment to a cloud desktop. Presentation at Drupal Barcamp Munich, April 2019

  • 394