Upgrade to Pro — share decks privately, control downloads, hide ads and more …

An introduction to automated development enviro...

An introduction to automated development environment and Laravel Homestead

In this presentation, I explain what DevOps is, and how infrastructure as code can be used as a tool to improve your development environment. In the second part, I explain the advantages of Vagrant and show how easy you can get started with Homestead.

Jens Segers

July 31, 2014
Tweet

More Decks by Jens Segers

Other Decks in Programming

Transcript

  1. #!/bin/bash echo "$HOSTNAME" > /etc/hostname hostname -F /etc/hostname apt-get install

    -y ntp sed -i "s/Port 22/Port $SSHPORT/g" /etc/ssh/sshd_config useradd -s /bin/bash -m -d /home/$USER -U -p $PASS $USER
  2. File Attributes: - filename - content - permissions - owner

    Operations: - create - modify - delete Abstract class/interface
  3. 1. Infrastructure documentation 2. Software tools 3. Versioning 4. Platform

    independent 5. Idempotent/self-healing 6. Testing & development ...
  4. +

  5. Example Vagrantfile Vagrant.configure("2") do |config| config.vm.box = 'precise32' config.vm.box_url =

    'http://files.vagrantup.com/precise32.box' # Port forwarding config.vm.network "forwarded_port", guest: 80, host: 8000 # Shared folder config.vm.synced_folder "src/", "/var/www/website" end
  6. Boot the virtual machine vagrant up SSH to the virtual

    machine vagrant ssh Shutdown and remove the VM vagrant destroy
  7. - Ubuntu 14.04 - PHP 5.5 - Nginx - MySQL

    - Postgres - Node (Bower, Grunt & Gulp) Homestead base image - Redis - Memcached - Beanstalkd - Laravel Envoy - Fabric + HipChat Extension
  8. 2. Add the Homestead box vagrant box add laravel/homestead ==>

    box: Loading metadata for box 'laravel/homestead' box: URL: https://vagrantcloud.com/laravel/homestead ==> box: Adding box 'laravel/homestead' (v0.1.7) for provider: virtualbox
  9. 3. Clone the Homestead repository git clone https://github.com/laravel/homestead.git Homestead Cloning

    into 'Homestead'... remote: Reusing existing pack: 154, done. remote: Total 154 (delta 0), reused 0 (delta 0)
  10. Homestead advantages 1. Uniform development environment 2. Made for Laravel

    3. Easy for beginners 4. Disposable virtual machines Homestead disadvantages 1. Different from production 2. Not “DevOps”