SlideShare a Scribd company logo
1 of 18
Download to read offline
INTERACTIVE REMOTE DEBUGGING AND
DEVELOPMENT WITH TRAMP MODE
EMACSCONF 2019
Greetings EmacsConf!

My name is Matt Ray, welcome to my session on Interactive Remote Debugging and Development with TRAMP Mode
GREETINGS
MATT RAY
▸ emacs@mattray.dev
▸ mattray IRC|GitHub|Slack|Twitter
▸ SoftwareDefinedTalk.com
▸ MattRay.dev
First, I'd like to thank the organizers of EmacsConf for allowing me to present. 

My name is Matt Ray and I've been using Emacs for about 20 years and figured it would be fun to share some of the ways I use Emacs in my day to day role.

I've been a developer and had various roles over the years.

I'm currently based in Sydney Australia, you can tell by my accent. I moved here about 3 years ago.

I'm 'mattray' on Twitter and Slack and GitHub and I co-host a rambling podcast called Software Defined Talk.

I blog from time to time about random tech stuff at MattRay.dev
EMACS
SHELL MODE
▸ Major mode for shell buffers
▸ M-x shell
▸ Bash
▸ Heavily customised PS1
▸ https://github.com/mattray/home-directory/
▸ .bashrc
▸ .emacs.d/init.el
I've been using M-x shell mode for probably 20 years, it's always been one of the killer features for me within Emacs.

The ability to capture everything I do in an editable shell has proven invaluable time and time again and frequently been a great way to get get people interested in
Emacs.

I'm still using Bash, newer shells like Zsh haven't really caught my eye because I've always gotten what I needed out of Shell mode.

<demo screen>

Within my .bashrc I set a couple of configuration settings, including setting more and less to cat so there's no weird pagination issues within shell mode.

My editor and git_editor shell variables are set for any commands that need to spawn an editor, and I use the emacs server to manage all of my emacs sessions within a
single window.

Shell history settings are there to optimise what's tracked, and I frequently grep my .bash_history file for anything not in the current shell session.
DEMO
M-X SHELL DEMO
▸ Start emacs
▸ M-x shell
▸ C-x 1
▸ M-+ 3x
▸ Cd emacsconf
▸ C-x C-f hello.sh
▸ Bash hello.sh
EMACS
TRAMP MODE
▸ Transparent Remote Access, Multiple Protocols
▸ Remote file editing over multiple protocols
▸ C-x C-f /[method/user@remotehost]/filename
▸ /ssh:cubert:/etc/hosts
▸ Sudo support
▸ /ssh:cubert|sudo@cubert:/etc/hosts
▸ /ssh:cubert|sudo:omnibus@cubert:~/
DEMO
EMACS
▸ C-x C-f /ssh:hyperchicken:/etc/hosts
▸ /ssh:hyperchicken|sudo:hyperchicken:/etc/
▸ Show off Dir-ed +1
▸ Edit /etc/motd
▸ Open iterm, ssh to the box to show off the MOTD
▸ Open up the hello.sh, write it remotely
BeagleBone black ARM box

I can open files on the remote system

I can sudo in and edit them as root

I can use DirEd to wander through the filesystem, poking around

I can also open a file locally, then write it to the remote system

I'll do that with my 'hello.sh'
EMACS
TRAMP MODE REMOTE SHELL
▸ C-u M-x shell
▸ Usually name the buffer after the host
▸ Default shell
▸ export PAGER=cat
Now editing files on a remote system is great and all, but I just showed off how I use Shell Mode.

I can use TRAMP to open a remote shell and run from there, just like on my local workstation.

I like to open a remote shell and name the buffer after the host, to make it easier to identify in my Buffer list
DEMO
EMACS
▸ C-u M-x shell
▸ Hostname
▸ /bin/bash
▸ Ls
▸ Ps
▸ whoami
▸ /tmp/hello.sh
Default shell

export PAGER=cat

I'm now running my shell over SSH on a remote server, editing files and copying content between buffers, pretty cool.
INFRASTRUCTURE
TEST KITCHEN
▸ Testing harness to execute infrastructure code in
isolation
▸ VM plugins for Vagrant, Docker, public and private
clouds
▸ Infrastructure as code with Chef, Puppet, Ansible
▸ Test frameworks like InSpec, ServerSpec, Bats
▸ https://kitchen.ci
Apache v2 licensed Free Software
INFRASTRUCTURE
VAGRANT
▸ Developer testing tool for desktop virtual machines
▸ Virtualbox, Docker and other providers
▸ Simple configuration with SSH access
▸ Standardized 'bento' images from Chef for basic
machines
▸ https://vagrantup.com
▸ C-x C-f /ssh:vagrant@127.0.0.1#2222:/
DEMO
EMACS
▸ Kitchen status
▸ Kitchen create
▸ Open kitchen.yml
▸ C-x C-f /ssh:vagrant@127.0.0.1#2222:/
▸ C-u M-x shell
▸ Whom
INFRASTRUCTURE
INSPEC
▸ Compliance as Code
▸ Ruby DSL
▸ 100s of Resources for auditing machines,
databases, APIs, cloud platforms, etc.
▸ Local or remote scanning
▸ https://inspec.io
Translate compliance into Code

Clearly express statements of policy

Move risk to build/test from runtime

Find issues early

Write code quickly

Run code anywhere

Inspect machines, data and APIs

100+ built-in resources
DEMO
EMACS
▸ Look at hello/controls/example.rb
▸ Kitchen verify
▸ Chmod +x hello.sh
▸ Kitchen verify
▸ Let's check on the command output, paste it in to our matcher
▸ It fails, why?
▸ Fix, kitchen verify
▸ Kitchen destroy
▸ Kitchen verify, now it's gone and broken
INFRASTRUCTURE
CHEF
▸ Infrastructure as Code
▸ Ruby DSL
▸ Resources for configuring servers in standardised
libraries for easy reuse
▸ Client/server scales to 100s of thousands of machines
▸ https://chef.io
Configuration Management, 

▪ Managesdeployment and on-going automation

▪ Definereusableresources

and infrastructure state as code

▪ Scale elegantly from one to tens of thousands of managed nodes across multiple complex environments

▪ Community, Certified Partner, and Chef supported content available for all common automation tasks
DEMO
EMACS
▸ Let's ensure that our file is always there
▸ Add the file resource
▸ Kitchen converge
▸ Kitchen verify
▸ Permissions again
▸ Mode '0755'
▸ Kitchen converge
▸ Kitchen verify
▸ Kitchen test
DEBUGGING
PRY
▸ Interactive Ruby debugger
▸ Built into Chef and InSpec
▸ Drop breakpoints into code
▸ ~/.emacs.d/ruby.el
DEMO
EMACS
▸ Drop debug into control
▸ Kitchen verify
▸ Exit-program, edit to bash resource
▸ Kitchen verify
▸ But it's hard-coded, so let's make it more dynamic
▸ Ls
▸ Content
▸ sys_info
▸ sys_info.methods
▸ sys_info.fqdn
▸ sys_info.short
▸ expected = "Hello EmacsConf 2019 from root on #{sys_info.short}"
▸ Whereami
▸ C 1
▸ Ls
▸ described_class
▸ described_class.methods
▸ described_class.result
▸ described_class.result.stdout
▸ Exit
▸ "".match?(expected)
▸ Exit-program
▸ Update example.rb
▸ Kitchen verify
▸ Kitchen test
Combining TRAMP with Shell Mode and local desktop testing with Kitchen make for a very fast feedback loop.

I can test through the shell and through Ruby without leaving Emacs, going back and forth between my Chef infrastructure code and my InSpec compliance code.

You might not be using these tools, but this pattern of rapid development feedback should be available to you no matter what you're working with.

If you're a system administrator, you don't need to have screen or tmux anymore.

If you're a developer you can deploy your applications into VM and test their behaviour in a clean room environment, using the same configurations as production
environments.

This was just a quick dive into Shell Mode, TRAMP, Chef, InSpec and Pry but hopefully you can take some of these ideas into your own Emacs setup and day to day
workflow.
THANKS!https://github.com/mattray/emacsconf2019
emacs@mattray.dev
This was just a quick dive into Shell Mode, TRAMP, Chef, InSpec and Pry but hopefully you can take some of these ideas into your own Emacs setup and day to day
workflow.

I've put this demo up on GitHub, there's a link to my emacs and bash configuration there as well.

Thanks again for allowing me to present, I'm available in IRC for any questions you may have or you can email me at emacs@mattray.dev

More Related Content

What's hot

From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012Carlos Sanchez
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Puppet
 
Dockerfish-Tutorial
Dockerfish-TutorialDockerfish-Tutorial
Dockerfish-TutorialBrian Hood
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreChef Software, Inc.
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierCarlos Sanchez
 
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...Sebastian Neubauer
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012Carlos Sanchez
 
Meetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioMeetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioUilian Ries
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)Soshi Nemoto
 
Testing Your Automation Code (Docker Version)
Testing Your Automation Code (Docker Version)Testing Your Automation Code (Docker Version)
Testing Your Automation Code (Docker Version)Mischa Taylor
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefAntons Kranga
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)Soshi Nemoto
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Puppet
 
Usando o Cloud
Usando o CloudUsando o Cloud
Usando o CloudFabio Kung
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Carlos Sanchez
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package ManagerUilian Ries
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersNan Liu
 

What's hot (19)

From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
Continuous Infrastructure: Modern Puppet for the Jenkins Project - PuppetConf...
 
Dockerfish-Tutorial
Dockerfish-TutorialDockerfish-Tutorial
Dockerfish-Tutorial
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and more
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
 
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
6 Years of Docker: The Good, the Bad and Python Packaging at PyCon.DE&PyData ...
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012
 
Meetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.ioMeetup C++ Floripa - Conan.io
Meetup C++ Floripa - Conan.io
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
 
Vagrant
VagrantVagrant
Vagrant
 
Testing Your Automation Code (Docker Version)
Testing Your Automation Code (Docker Version)Testing Your Automation Code (Docker Version)
Testing Your Automation Code (Docker Version)
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
 
Usando o Cloud
Usando o CloudUsando o Cloud
Usando o Cloud
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
 
體驗 Hhvm
體驗 Hhvm體驗 Hhvm
體驗 Hhvm
 
Conan a C/C++ Package Manager
Conan a C/C++ Package ManagerConan a C/C++ Package Manager
Conan a C/C++ Package Manager
 
Trust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker ContainersTrust, but verify | Testing with Docker Containers
Trust, but verify | Testing with Docker Containers
 

Similar to EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode

Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksGlen Ogilvie
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy Systemadrian_nye
 
Testing Your Automation Code (Vagrant Version)
Testing Your Automation Code (Vagrant Version)Testing Your Automation Code (Vagrant Version)
Testing Your Automation Code (Vagrant Version)Mischa Taylor
 
Testing your-automation-code (vagrant version) v0.2
Testing your-automation-code (vagrant version) v0.2Testing your-automation-code (vagrant version) v0.2
Testing your-automation-code (vagrant version) v0.2Sylvain Tissot
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
Chef basics - write infrastructure as code
Chef basics - write infrastructure as codeChef basics - write infrastructure as code
Chef basics - write infrastructure as codestevaaa
 
Stop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareLaura Frank Tacho
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
What is Test Kitchen
What is Test KitchenWhat is Test Kitchen
What is Test KitchenBenoit Caron
 
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherAzure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherKarim Vaes
 
Capistrano, Puppet, and Chef
Capistrano, Puppet, and ChefCapistrano, Puppet, and Chef
Capistrano, Puppet, and ChefDavid Benjamin
 
Red Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerRed Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerJustin Bui
 
Be a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeBe a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeNicola Paolucci
 
Be a Happier Developer with Docker: Tricks of the Trade
Be a Happier Developer with Docker: Tricks of the TradeBe a Happier Developer with Docker: Tricks of the Trade
Be a Happier Developer with Docker: Tricks of the TradeDocker, Inc.
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?AFUP_Limoges
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushPantheon
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...Sébastien Morel
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Systems
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environmentbocribbz
 

Similar to EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode (20)

Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Testing Your Automation Code (Vagrant Version)
Testing Your Automation Code (Vagrant Version)Testing Your Automation Code (Vagrant Version)
Testing Your Automation Code (Vagrant Version)
 
Testing your-automation-code (vagrant version) v0.2
Testing your-automation-code (vagrant version) v0.2Testing your-automation-code (vagrant version) v0.2
Testing your-automation-code (vagrant version) v0.2
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Chef basics - write infrastructure as code
Chef basics - write infrastructure as codeChef basics - write infrastructure as code
Chef basics - write infrastructure as code
 
Stop Being Lazy and Test Your Software
Stop Being Lazy and Test Your SoftwareStop Being Lazy and Test Your Software
Stop Being Lazy and Test Your Software
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
What is Test Kitchen
What is Test KitchenWhat is Test Kitchen
What is Test Kitchen
 
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with RancherAzure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
Azure Bootcamp 2016 - Docker Orchestration on Azure with Rancher
 
Capistrano, Puppet, and Chef
Capistrano, Puppet, and ChefCapistrano, Puppet, and Chef
Capistrano, Puppet, and Chef
 
Red Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift MessengerRed Teaming macOS Environments with Hermes the Swift Messenger
Red Teaming macOS Environments with Hermes the Swift Messenger
 
Be a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the tradeBe a happier developer with Docker: Tricks of the trade
Be a happier developer with Docker: Tricks of the trade
 
Be a Happier Developer with Docker: Tricks of the Trade
Be a Happier Developer with Docker: Tricks of the TradeBe a Happier Developer with Docker: Tricks of the Trade
Be a Happier Developer with Docker: Tricks of the Trade
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
Lean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and DrushLean Drupal Repositories with Composer and Drush
Lean Drupal Repositories with Composer and Drush
 
Docker Starter Pack
Docker Starter PackDocker Starter Pack
Docker Starter Pack
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
eZ Platform Cloud and eZ Launchpad: Don’t Host, Don’t Deploy, Don’t Install—J...
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 

More from Matt Ray

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...Matt Ray
 
HashiTalks 2020 - Chef Tools & Terraform: Better Together
HashiTalks 2020 - Chef Tools & Terraform: Better TogetherHashiTalks 2020 - Chef Tools & Terraform: Better Together
HashiTalks 2020 - Chef Tools & Terraform: Better TogetherMatt Ray
 
Wellington DevOps: Bringing Your Applications into the Future with Habitat
Wellington DevOps: Bringing Your Applications into the Future with HabitatWellington DevOps: Bringing Your Applications into the Future with Habitat
Wellington DevOps: Bringing Your Applications into the Future with HabitatMatt Ray
 
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...Matt Ray
 
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...Matt Ray
 
Compliance as Code Everywhere
Compliance as Code EverywhereCompliance as Code Everywhere
Compliance as Code EverywhereMatt Ray
 
DevOpsDays Jakarta: State of DevOps 2018
DevOpsDays Jakarta: State of DevOps 2018DevOpsDays Jakarta: State of DevOps 2018
DevOpsDays Jakarta: State of DevOps 2018Matt Ray
 
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and KubernetesDevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and KubernetesMatt Ray
 
Infrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateInfrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateMatt Ray
 
Cooking Up Windows with Chef Automate
Cooking Up Windows with Chef AutomateCooking Up Windows with Chef Automate
Cooking Up Windows with Chef AutomateMatt Ray
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeDevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeMatt Ray
 
DevOpsDays Singapore Habitat Ignite
DevOpsDays Singapore Habitat IgniteDevOpsDays Singapore Habitat Ignite
DevOpsDays Singapore Habitat IgniteMatt Ray
 
Chef Automate - Azure Sydney User Group
Chef Automate - Azure Sydney User GroupChef Automate - Azure Sydney User Group
Chef Automate - Azure Sydney User GroupMatt Ray
 
Automating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyAutomating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyMatt Ray
 
Automating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native MeetupAutomating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native MeetupMatt Ray
 
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec Matt Ray
 
Chef Automate - Infracoders Canberra August 8, 2017
Chef Automate - Infracoders Canberra August 8, 2017Chef Automate - Infracoders Canberra August 8, 2017
Chef Automate - Infracoders Canberra August 8, 2017Matt Ray
 
OpsWorks for Chef Automate - Auckland AWS
OpsWorks for Chef Automate - Auckland AWS OpsWorks for Chef Automate - Auckland AWS
OpsWorks for Chef Automate - Auckland AWS Matt Ray
 

More from Matt Ray (20)

Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
 
HashiTalks 2020 - Chef Tools & Terraform: Better Together
HashiTalks 2020 - Chef Tools & Terraform: Better TogetherHashiTalks 2020 - Chef Tools & Terraform: Better Together
HashiTalks 2020 - Chef Tools & Terraform: Better Together
 
Wellington DevOps: Bringing Your Applications into the Future with Habitat
Wellington DevOps: Bringing Your Applications into the Future with HabitatWellington DevOps: Bringing Your Applications into the Future with Habitat
Wellington DevOps: Bringing Your Applications into the Future with Habitat
 
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
 
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
 
Compliance as Code Everywhere
Compliance as Code EverywhereCompliance as Code Everywhere
Compliance as Code Everywhere
 
DevOpsDays Jakarta: State of DevOps 2018
DevOpsDays Jakarta: State of DevOps 2018DevOpsDays Jakarta: State of DevOps 2018
DevOpsDays Jakarta: State of DevOps 2018
 
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and KubernetesDevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
 
Infrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef AutomateInfrastructure and Compliance Delight with Chef Automate
Infrastructure and Compliance Delight with Chef Automate
 
Cooking Up Windows with Chef Automate
Cooking Up Windows with Chef AutomateCooking Up Windows with Chef Automate
Cooking Up Windows with Chef Automate
 
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as CodeDevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
 
DevOpsDays Singapore Habitat Ignite
DevOpsDays Singapore Habitat IgniteDevOpsDays Singapore Habitat Ignite
DevOpsDays Singapore Habitat Ignite
 
Chef Automate - Azure Sydney User Group
Chef Automate - Azure Sydney User GroupChef Automate - Azure Sydney User Group
Chef Automate - Azure Sydney User Group
 
Automating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyAutomating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North Sydney
 
Automating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native MeetupAutomating Applications with Habitat - Sydney Cloud Native Meetup
Automating Applications with Habitat - Sydney Cloud Native Meetup
 
Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec Automating AWS Compliance with InSpec
Automating AWS Compliance with InSpec
 
Chef Automate - Infracoders Canberra August 8, 2017
Chef Automate - Infracoders Canberra August 8, 2017Chef Automate - Infracoders Canberra August 8, 2017
Chef Automate - Infracoders Canberra August 8, 2017
 
OpsWorks for Chef Automate - Auckland AWS
OpsWorks for Chef Automate - Auckland AWS OpsWorks for Chef Automate - Auckland AWS
OpsWorks for Chef Automate - Auckland AWS
 

Recently uploaded

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 

EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode

  • 1. INTERACTIVE REMOTE DEBUGGING AND DEVELOPMENT WITH TRAMP MODE EMACSCONF 2019 Greetings EmacsConf! My name is Matt Ray, welcome to my session on Interactive Remote Debugging and Development with TRAMP Mode
  • 2. GREETINGS MATT RAY ▸ emacs@mattray.dev ▸ mattray IRC|GitHub|Slack|Twitter ▸ SoftwareDefinedTalk.com ▸ MattRay.dev First, I'd like to thank the organizers of EmacsConf for allowing me to present. My name is Matt Ray and I've been using Emacs for about 20 years and figured it would be fun to share some of the ways I use Emacs in my day to day role. I've been a developer and had various roles over the years. I'm currently based in Sydney Australia, you can tell by my accent. I moved here about 3 years ago. I'm 'mattray' on Twitter and Slack and GitHub and I co-host a rambling podcast called Software Defined Talk. I blog from time to time about random tech stuff at MattRay.dev
  • 3. EMACS SHELL MODE ▸ Major mode for shell buffers ▸ M-x shell ▸ Bash ▸ Heavily customised PS1 ▸ https://github.com/mattray/home-directory/ ▸ .bashrc ▸ .emacs.d/init.el I've been using M-x shell mode for probably 20 years, it's always been one of the killer features for me within Emacs. The ability to capture everything I do in an editable shell has proven invaluable time and time again and frequently been a great way to get get people interested in Emacs. I'm still using Bash, newer shells like Zsh haven't really caught my eye because I've always gotten what I needed out of Shell mode. <demo screen> Within my .bashrc I set a couple of configuration settings, including setting more and less to cat so there's no weird pagination issues within shell mode. My editor and git_editor shell variables are set for any commands that need to spawn an editor, and I use the emacs server to manage all of my emacs sessions within a single window. Shell history settings are there to optimise what's tracked, and I frequently grep my .bash_history file for anything not in the current shell session.
  • 4. DEMO M-X SHELL DEMO ▸ Start emacs ▸ M-x shell ▸ C-x 1 ▸ M-+ 3x ▸ Cd emacsconf ▸ C-x C-f hello.sh ▸ Bash hello.sh
  • 5. EMACS TRAMP MODE ▸ Transparent Remote Access, Multiple Protocols ▸ Remote file editing over multiple protocols ▸ C-x C-f /[method/user@remotehost]/filename ▸ /ssh:cubert:/etc/hosts ▸ Sudo support ▸ /ssh:cubert|sudo@cubert:/etc/hosts ▸ /ssh:cubert|sudo:omnibus@cubert:~/
  • 6. DEMO EMACS ▸ C-x C-f /ssh:hyperchicken:/etc/hosts ▸ /ssh:hyperchicken|sudo:hyperchicken:/etc/ ▸ Show off Dir-ed +1 ▸ Edit /etc/motd ▸ Open iterm, ssh to the box to show off the MOTD ▸ Open up the hello.sh, write it remotely BeagleBone black ARM box I can open files on the remote system I can sudo in and edit them as root I can use DirEd to wander through the filesystem, poking around I can also open a file locally, then write it to the remote system I'll do that with my 'hello.sh'
  • 7. EMACS TRAMP MODE REMOTE SHELL ▸ C-u M-x shell ▸ Usually name the buffer after the host ▸ Default shell ▸ export PAGER=cat Now editing files on a remote system is great and all, but I just showed off how I use Shell Mode. I can use TRAMP to open a remote shell and run from there, just like on my local workstation. I like to open a remote shell and name the buffer after the host, to make it easier to identify in my Buffer list
  • 8. DEMO EMACS ▸ C-u M-x shell ▸ Hostname ▸ /bin/bash ▸ Ls ▸ Ps ▸ whoami ▸ /tmp/hello.sh Default shell export PAGER=cat I'm now running my shell over SSH on a remote server, editing files and copying content between buffers, pretty cool.
  • 9. INFRASTRUCTURE TEST KITCHEN ▸ Testing harness to execute infrastructure code in isolation ▸ VM plugins for Vagrant, Docker, public and private clouds ▸ Infrastructure as code with Chef, Puppet, Ansible ▸ Test frameworks like InSpec, ServerSpec, Bats ▸ https://kitchen.ci Apache v2 licensed Free Software
  • 10. INFRASTRUCTURE VAGRANT ▸ Developer testing tool for desktop virtual machines ▸ Virtualbox, Docker and other providers ▸ Simple configuration with SSH access ▸ Standardized 'bento' images from Chef for basic machines ▸ https://vagrantup.com ▸ C-x C-f /ssh:vagrant@127.0.0.1#2222:/
  • 11. DEMO EMACS ▸ Kitchen status ▸ Kitchen create ▸ Open kitchen.yml ▸ C-x C-f /ssh:vagrant@127.0.0.1#2222:/ ▸ C-u M-x shell ▸ Whom
  • 12. INFRASTRUCTURE INSPEC ▸ Compliance as Code ▸ Ruby DSL ▸ 100s of Resources for auditing machines, databases, APIs, cloud platforms, etc. ▸ Local or remote scanning ▸ https://inspec.io Translate compliance into Code Clearly express statements of policy Move risk to build/test from runtime Find issues early Write code quickly Run code anywhere Inspect machines, data and APIs 100+ built-in resources
  • 13. DEMO EMACS ▸ Look at hello/controls/example.rb ▸ Kitchen verify ▸ Chmod +x hello.sh ▸ Kitchen verify ▸ Let's check on the command output, paste it in to our matcher ▸ It fails, why? ▸ Fix, kitchen verify ▸ Kitchen destroy ▸ Kitchen verify, now it's gone and broken
  • 14. INFRASTRUCTURE CHEF ▸ Infrastructure as Code ▸ Ruby DSL ▸ Resources for configuring servers in standardised libraries for easy reuse ▸ Client/server scales to 100s of thousands of machines ▸ https://chef.io Configuration Management, ▪ Managesdeployment and on-going automation ▪ Definereusableresources and infrastructure state as code ▪ Scale elegantly from one to tens of thousands of managed nodes across multiple complex environments ▪ Community, Certified Partner, and Chef supported content available for all common automation tasks
  • 15. DEMO EMACS ▸ Let's ensure that our file is always there ▸ Add the file resource ▸ Kitchen converge ▸ Kitchen verify ▸ Permissions again ▸ Mode '0755' ▸ Kitchen converge ▸ Kitchen verify ▸ Kitchen test
  • 16. DEBUGGING PRY ▸ Interactive Ruby debugger ▸ Built into Chef and InSpec ▸ Drop breakpoints into code ▸ ~/.emacs.d/ruby.el
  • 17. DEMO EMACS ▸ Drop debug into control ▸ Kitchen verify ▸ Exit-program, edit to bash resource ▸ Kitchen verify ▸ But it's hard-coded, so let's make it more dynamic ▸ Ls ▸ Content ▸ sys_info ▸ sys_info.methods ▸ sys_info.fqdn ▸ sys_info.short ▸ expected = "Hello EmacsConf 2019 from root on #{sys_info.short}" ▸ Whereami ▸ C 1 ▸ Ls ▸ described_class ▸ described_class.methods ▸ described_class.result ▸ described_class.result.stdout ▸ Exit ▸ "".match?(expected) ▸ Exit-program ▸ Update example.rb ▸ Kitchen verify ▸ Kitchen test Combining TRAMP with Shell Mode and local desktop testing with Kitchen make for a very fast feedback loop. I can test through the shell and through Ruby without leaving Emacs, going back and forth between my Chef infrastructure code and my InSpec compliance code. You might not be using these tools, but this pattern of rapid development feedback should be available to you no matter what you're working with. If you're a system administrator, you don't need to have screen or tmux anymore. If you're a developer you can deploy your applications into VM and test their behaviour in a clean room environment, using the same configurations as production environments. This was just a quick dive into Shell Mode, TRAMP, Chef, InSpec and Pry but hopefully you can take some of these ideas into your own Emacs setup and day to day workflow.
  • 18. THANKS!https://github.com/mattray/emacsconf2019 emacs@mattray.dev This was just a quick dive into Shell Mode, TRAMP, Chef, InSpec and Pry but hopefully you can take some of these ideas into your own Emacs setup and day to day workflow. I've put this demo up on GitHub, there's a link to my emacs and bash configuration there as well. Thanks again for allowing me to present, I'm available in IRC for any questions you may have or you can email me at emacs@mattray.dev