Dev-Staging-Prod Environment Guidelines

Slides:



Advertisements
Similar presentations
Implementing Tableau Server in an Enterprise Environment
Advertisements

Upgrading to SharePoint 2010 JUNE 2010 SANSPUG.ORG MEETING CHRIS GIVENS.
Presentation Heading – font Arial
CVS Selim Çıracı Ahmet Kara Metin Tekkalmaz. CVS – Open Source Version Control System Outline What are Version Control Systems? And why do we need them?
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
NETOP ONDEMAND What’s new in version 2.1? DECEMBER 09 NETOP ONDEMAND1.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
Module 2: Planning to Install SQL Server. Overview Hardware Installation Considerations SQL Server 2000 Editions Software Installation Considerations.
SharePoint is only an application so it has to run on top of Windows Server Windows 2008 R2 SP1 or Windows 2012 Standard, Enterprise, or Data Center Still.
Improving Software Quality with Continuous Integration
SubVersioN – the new Central Service at DESY by Marian Gawron.
Version Control with git. Version Control Version control is a system that records changes to a file or set of files over time so that you can recall.
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
Best Practices in Moodle Administration Best Practices in Moodle Administration A variety of topics from technical to practical Jonathan Moore Vice President.
DotNetNuke v4 on ASP.NET v2 Stan Schultes Stan Schultes Enterprise architect / application developer Enterprise architect / application developer Conference.
DONE-10: Adminserver Survival Tips Brian Bowman Product Manager, Data Management Group.
Copyright ®xSpring Pte Ltd, All rights reserved Versions DateVersionDescriptionAuthor May First version. Modified from Enterprise edition.NBL.
What you’ll take away: 1.Define team and schedule 2.Software and hardware specifications 3.Analysing 4.Configuration and migration 5.Validation and Test.
Web Infrastructure Team Our Services and our Hardware Owen Le Blanc.
SharePoint 2010 Development Environment A Guide to Setup SharePoint 2010 Development Environment on Windows 7 Machine.
Instant Messaging for the Workplace A pure collaborative communication tool that does not distract users from their normal activities.
Subversion (SVN) Tutorial for CS421 Dan Fleck Spring 2010.
Git (Get) it done right! Practical Applied Version Control for Drupal site developers Peter Chen - Stanford School of Engineering Technical Webmaster.
…using Git/Tortoise Git
BA372 Stored Procedures and Triggers Lab. What needs to be done to change a customer’s credit limit? Who am I? May I? Do it Log it Display A database.
CMS SEARCH | Web Tech Talk January 22, SERVER ADMINISTRATION (global database and file backups) UITS SYSTEM ( SOFTWARE ) ADMINISTRATION (patch/upgrades.
Module 14 Monitoring and Optimizing SharePoint Performance.
Partners’ Webinar 01/31/2013 Karol Jarkovsky Solution Architect Upgrading Kentico.
By: Anuj Sharma. Topics covered:  GIT Introduction  GIT Benefits over different tools  GIT workflow  GIT server creation  How to use GIT for first.
File sharing requirements of remote users G. Bagliesi INFN - Pisa EP Forum on File Sharing 18/6/2001.
Wordpress with Mina Automated Deployment Solution Jonathan Gravato DIG 4104c.
IPT – Getting Started June Online Resources Project Website Requirements Server Preparation Installation Running IPT Installation Demo Upgrade/Reinstall.
Adxstudio Portals Training
Version Control and SVN ECE 297. Why Do We Need Version Control?
Introduction to Linux Server Setup Jonathan Hood CSE 4000 Practical Issues in Software Engineering.
Mantis Bug Tracker. MantisBT features Open source web-based bug tracking system. Track software defects. Mantis is often configured by users to serve.
Virtual Lab Overview 5/21/2015 xxxxxxxxxx NWS/MDL/CIRA.
C Copyright © 2006, Oracle. All rights reserved. Oracle Secure Backup Additional Installation Topics.
How to use Drupal Awdhesh Kumar (Team Leader) Presentation Topic.
INFSO-RI Enabling Grids for E-sciencE Workshop WLCG Security for Grid Sites Louis Poncet System Engineer SA3 - OSCT.
OIS Progress on Drupal pilot service ENTICE meeting, 30 th September 2010 Jarosław (Jarek) Polok IT-OIS Operating systems and Internet services.
Common System Exploits Tom Chothia Computer Security, Lecture 17.
PKI & Web Services SPS Spotlight Series January 2015.
Stress Free Deployments with Octopus Deploy
Module Overview Installing and Configuring a Network Policy Server
Authentication & .htaccess
6/11/2018 8:14 AM THR2175 Building and deploying existing ASP.NET applications using VSTS and Docker on Windows Marcel de Vries CTO, Xpirit © Microsoft.
Development and Deployment
Building Applications with Windows Azure and SQL Azure
Andrew Pruski SQL Server & Containers
Storing, Sending, and Tracking Files Recitation 2
Lab 1 introduction, debrief
Software Version System Part1: Subversion at CERN
Site Deployment Module
INSTALLING AND SETTING UP APACHE2 IN A LINUX ENVIRONMENT
Chapter 27: System Security
Making PowerShell Useful
Getting Started with Git and Bitbucket
Security and File Permission
Informatica & ETL Testing
REDCap and Data Governance
ODP node monitoring and maintenance
Git CS Fall 2018.
Implementing Active Directory
Jerald Overstreet, GISP Server Portal SQL Manager Admin
Patrick Cozzi University of Pennsylvania CIS Fall 2012
The Future of Database Development (with containers)
Presentation transcript:

Dev-Staging-Prod Environment Guidelines Valentin GUIGNON September 2015

Example Implementation Summary Starter For Who? What is it all about? Guidelines Setup Example Implementation

Disclaimer

Starter

? For who? single developer vs. team 0, 1, 2 or more servers any admin control (DNS) people without deployment procedure ?

What is it all about? A time investment that can be profitable We are talking about websites To offer reliable services Reliable means user trust

What is it all about? Ever published a tool not working properly? How long to figure it out? How long to solve the problem? Ever needed to go back in time when some feature was working a certain way? Ever wanted to share improvements but continue developments at the same time? Ever shared a development space?

What is it all about? Still doing live changes?! live changes STOP DOING THIS! Please!

Guidelines

Guidelines Rule #1: Have automated backups development & prod files config files databases daily, weekly, monthly rsync is your friend

Guidelines Rule #2: Use versioning software Subversion (SVN), Mercurial, Git,… what can/should be versioned? use branching when to commit? is it compatible with a live site?

Guidelines Rule #3: Separate dev, staging and prod dev: can be broken staging: not public but stable, for testers prod: always fully functional dev physically separated from staging & prod staging & prod share the same environment

Guidelines Rule #4: Have cheat sheet system admin operations, command lines SQL queries pieces of code access codes did I say “access codes”? …Security!

Guidelines Rule #5: Write procedures transferring dev to staging, staging to prod, etc. rolling back update tools, modules, data …and stick to them!

Guidelines Rule #6: Log what you do use flat text files (with backup), with dates outside the servers, maybe on a shared space config changes file manipulations (mv, chmod,…) admin operations (install, update,…) error messages (c&p) and how solved basically everything you think is relevant don’t forget security (clear password, log access)

Guidelines Rule #7: Have automated tests run them as needed on dev run them before having a staging reviewed run them periodically on prod report by mail/RSS report both errors and success have a smart report management

Guidelines Rule #8: Use things the right way dev: for development staging: to let your reviewers test your work in a stable production environment prod: for live site, no hazardous changes!

Guidelines Rule #9: Use a project manager/bug tracker Redmine, JIRA, Mantis, GForge,… use tracker IDs for your branches/commits have a TODO list follow up on issues

Guidelines Rule #10: Don’t give up!

Setup

Setup – Dev server Dev server can be: your own dev station using a VM a development server shared between projects More than one on a same project? use virtual machines or different directories / host names / DBs /srv/projects/mgis/dev_valentin dev-val.crop-diversity.org tripal_mgis_dev_val /srv/projects/mgis/dev_alexis dev-alexis.crop-diversity.org tripal_mgis_dev_alexis

Setup About DNS: dev.server.com, dev-toto.server.com, staging.server.com, www.server.com,... You don’t need admins! System Administrator Windows: C:\Windows\System32\drivers\etc\hosts Linux: /etc/hosts Mac: /private/etc/hosts

Setup - Staging Share same environment as the prod server: validates production server settings external access for testers live conditions without being live developers have no access to staging file system / DB dev-to-staging should be done by an admin

Setup - Prod Production server: developers have no access to prod file system / DB staging-to-prod should be done by an admin switching old-prod / new-prod = symlink change

Implementation

Example Implementation Context: 4 (virtual) servers: dev: 1 web + 1 DB staging & prod: 1 web + 1 DB Several projects Drupal sites with common core

Example Implementation Dev server setup: www directory + www-writeable directory includes Drupal core (common) project directory includes dev* directories, tools, data, docs,… individual user accounts, project groups, project groups with web ex.: dubois banana banana-www chmod g+s, umask 002

Example Implementation srv ├── www │ └── drupal │ ├── *current  drupal-7.38 │ ├── drupal-7.37 │ ├── drupal-7.38 │ │ ├── *sites  ../sites │ │ … │ └── sites │ ├── *banana.com  /srv/projects/banana/dev/banana.com │ … ├── www-writeable │ └── banana │ ├── dubois │ │ ├── files │ │ └── private_files │ └── dupont ├── projects │ ├── banana │ │   ├── data │ │   ├── *dev  dev_dubois │ │   ├── dev_dubois │ │   │   ├── banana.com │ │   │   │   ├── *files  /srv/www-writeable/banana/dubois/files │ │   │   │   … │ │   │   └── others │ │   ├── dev_dupont │ │   ├── docs │ │   └── tools │ ├── coffee ... ... ... Dev server setup:

Example Implementation Dev server setup: # chown –R root:www /srv/www # chmod –R ug+rX,g-w,o-rwx /srv/www # chown –R www:banana-www /srv/www-writeable/banana # chmod –R ug+rwX,o-rwx /srv/www-writeable/banana # find /srv/www-writeable/banana –type d –exec chmod g+s \{\} \; # chgrp –R banana /srv/projects/banana # chmod –R ug+rwX,o-rwx /srv/projects/banana # find /srv/projects/banana –type d –exec chmod g+s \{\} \;

Example Implementation Staging & prod server setup: www directory + www-writeable directory includes Drupal core (common) project directory staging, prod_XXX, prod_YYY,… no developer or project accounts, only a drupal account with an ssh key file authentication use a key file because the server is exposed to outside and password-login should be forbidden the only way to transfer dev to staging is from dev because staging can not see dev

Example Implementation srv ├── www │ ├── *prod  prod_XXX │ ├── prod_XXX │ ├── prod_YYY │ ... │ └── staging │ └── drupal │ ├── *current  drupal-7.38 │ ... │ └── sites │ ├── banana.com │          │ ├── *files  /srv/www-writeable/banana/staging/files │ ... ... ├── www-writeable │ └── banana │ ├── prod_XXX │ ├── prod_YYY │ ... │ └── staging │ ├── files │ └── private_files ├── projects │ ├── banana │ │   ├── common │ │   ├── prod_XXX │ │   ├── prod_YYY │ │   ... │ │   └── staging │ │      ├── *www  /srv/www/staging/sites/banana.com │ │      ├── tools ... ... ... Prod server setup:

Example Implementation Prod server setup: # useradd –G www drupal # chown –R root:www /srv/www # chown –R drupal:www /srv/www/*/drupal # chmod –R ug+rX,g-w,o-rwx /srv/www # chown –R www:www /srv/www-writeable # chmod –R ug+rwX,o-rwx /srv/www-writeable

Example Implementation Workflows & use cases: dev  staging: when ready to be tested staging  prod: when staging validated prod  staging: when need to update prod prod  dev: when need to work on last data

Example Implementation What happens really? website = config + database + data files + code + tools + … dev side evolves but prod side also evolves! How to update/merge?! patches lock prod

Example Implementation Dev to staging process: prod data  staging (config changes  staging) dev code  staging dev additional data  staging automated tests on staging testers can test

Example Implementation Staging to prod process: lock prod dev to staging process automated tests on staging clone staging to prod_YYY prod symlink  prod_YYY automated tests on prod; if not ok, prod symlink  prod_XXX

Some little details how to tell if dev / staging / prod? database containing hardcoded serialized values files with absolute references (databases, path,…) optimizations & prod-only stuff (analytics, mails,…) shared core / modules (version issues) specificities (external tools, indexed data,…)

To Conclude

Conclusion quality approach to provide reliable tools simple in theory, complex in practice… but feasible time investment rewarding only really rewards if complete

THANK YOU/FINAL SLIDE

SearchReplaceDB script root-like chmod ssh key authentication