1 / 10

Wordpress with Mina

Wordpress with Mina. Automated Deployment Solution Jonathan Gravato DIG 4104c. What is Mina?. Ruby gem Fast deployer and server automation tool Creates Mina tasks (shell script) preset to Create new directory Make symbolic to common resources Point public directory to new directory

kalil
Download Presentation

Wordpress with Mina

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Wordpress with Mina Automated Deployment Solution Jonathan Gravato DIG 4104c

  2. What is Mina? • Ruby gem • Fast deployer and server automation tool • Creates Mina tasks (shell script) preset to • Create new directory • Make symbolic to common resources • Point public directory to new directory • Clean up old data • Uploads to server & executes from local • Requires • SSH connection • Git repository • Permission to change server config.

  3. Alternatives • Capistrano • Remote server automation tool • Heavy on Ruby/Rails related features • Large learning curve • Capistrano • Vlad • Similar to Mina • Vlad the Deployer

  4. What’s the difference? • Capistrano and Vlad • Each command run separately on their own SSH sessions • Mina • Entire procedure generated as remote run Bash script • Only one SSH session created for whole shell • Reduces SSH connection overhead Mina should be faster to deploy Requires less Ruby knowledge to implement.

  5. Why Automated Deployment? • Saves time • Minimizes downtime during deployment • Reduces human mistakes • Missing files • Uploading wrong files • Shared between multiple developers in a team • Usually tied to source code control system

  6. Why Automated Deployment? • Deploying with Git Hooks? • Git generates URL in reference to PHP script to perform tasks • Hole exposed due to URL • URL can be used to deploy files manually using PHP • Cleanup, roll back and lock cmds need to be created • All tasks handled in a simple Rake file tutorial link Mina task example

  7. Case Study: Knights Capital • Lost $172,000+ per second for 45 minutes • 2700 seconds in 45 minutes • $465 million loss • Went bankrupt in 2012 due to failed deployment and cleanup procedures • New code deployed to 7 of 8 servers • New deploy did not remove old code • 8th server utilized old code • errors prompted warning messages to developers but were ignored • No one reviewed deployment records

  8. Steps for Deploying with Mina • Prepare Server Layout • New three directory layout required for Mina (example) • Releases, Shared and Current directories created • Change Document Root to point to current directory • Location of symlink which references newest version and shared files • Install Mina • $ gem install mina • Setup Mina with Wordpress • Git repository with Wordpress source code • Generate config/deploy.rb shell script • Cleanup unnecessary lines of code • Configure server/login info • Configure Setup, Deploy and Rollback task

  9. Steps for Deploying with Mina • SSH to server • Create new directory featuring your domain (root access) • Set ownership of new directory to user (vs server) • Create Mina directory structure on local machine • $ mina setup • Deploy current release (version) of code • Update code • Commit change • Push to repo • $ mina deploy • To roll back • $ mina rollback

  10. Questions • What is Mina? • Deployer & server automation tool that uses a shell script to handle tasks. • What is a Rake file? • A rake file is the shell script which holds tasks or blocks of code to be run in Ruby. • What is one benefit to using automated deployment? Explain this benefit. • More secure • Saves time • Minimizes downtime • Reduces human mistakes

More Related