This document discusses building a simple automated deployment platform with PHP and Linux. It describes taking a website offline for manual upgrades, which is time-consuming and error-prone. The document then outlines techniques for automating the deployment process, including exporting code from version control, applying file permissions and configuration changes, backing up and patching databases, running unit tests, and using symlinks to swap environments. It emphasizes the need for rollback capabilities and managing multiple environments like staging and production. The goal is to provide techniques for small teams and startups to continuously and reliably deploy updates.
Patterns and Tools for Database Versioning, Migration, Data Loading and Test ...Alan Pinstein
Talk given at CodeWorks PHP Conference in Atlanta on 9/29/2009.
Covers MP "migrations for php" project as well as other best-practices for managing database migrations for PHP projects.
Patterns and Tools for Database Versioning, Migration, Data Loading and Test ...Alan Pinstein
Talk given at CodeWorks PHP Conference in Atlanta on 9/29/2009.
Covers MP "migrations for php" project as well as other best-practices for managing database migrations for PHP projects.
I made a simple SVN (Subversion) tutorial for my co-workers and just wanted to share it with you. It is based on other lectures and practical experience I had in the past.
Some ideas also come from the GIT world, which is still too far and new for everyone, but which I already love and embrace fully :)
Largely based on Vishnu Gopal's presentation http://www.slideshare.net/vishnu/basic-source-control-with-subversion
Used for a quick SVN introduction in a Software Engineering course at Massey University.
Maven is basically a system for compiling code, packing code and publishing packed code, but the flexibility of plugins allows it to carry out a wide selection of tasks. Most often, these tasks are very developer-centric, assisting in the development- and deployment process. We have successfully implemented a plugin that extend the build system to also handle configuration management of various test-environments, nightly deployment of new versions from CI with a single parameter and easy, centrally controlled configuration of developers environments.
Even though the implementation is bound to our choice of infrastructure, the ideas and experiences should apply to a wide range of configurations.
What is svn?
how svn works ?
diagram of SVN ?
Merging with SVN ?
Conflict With SVN ?
Checkout and Checkin ,update ,branch , tags ?
what is version control "?
SVN file directory ?
Directories locked in Tags ?
I made a simple SVN (Subversion) tutorial for my co-workers and just wanted to share it with you. It is based on other lectures and practical experience I had in the past.
Some ideas also come from the GIT world, which is still too far and new for everyone, but which I already love and embrace fully :)
Largely based on Vishnu Gopal's presentation http://www.slideshare.net/vishnu/basic-source-control-with-subversion
Used for a quick SVN introduction in a Software Engineering course at Massey University.
Maven is basically a system for compiling code, packing code and publishing packed code, but the flexibility of plugins allows it to carry out a wide selection of tasks. Most often, these tasks are very developer-centric, assisting in the development- and deployment process. We have successfully implemented a plugin that extend the build system to also handle configuration management of various test-environments, nightly deployment of new versions from CI with a single parameter and easy, centrally controlled configuration of developers environments.
Even though the implementation is bound to our choice of infrastructure, the ideas and experiences should apply to a wide range of configurations.
What is svn?
how svn works ?
diagram of SVN ?
Merging with SVN ?
Conflict With SVN ?
Checkout and Checkin ,update ,branch , tags ?
what is version control "?
SVN file directory ?
Directories locked in Tags ?
When it comes to email marketing, email deliverability in particular, there is a lot of misinformation floating around out there. Some of this is simply due to the fact that email is a moving target. As soon as you think you’ve got it figured out, the ISPs(i.e. Gmail, Hotmail/Outlook, etc.) change the game. There’s also a vested interest on the part of many email service providers to perpetuate some of these myths for personal gain. So let’s debunk some of these myths!
End of Year Tax Reporting—Make sure your credit union is prepared! (Webinar S...NAFCU Services Corporation
Overwhelmed about tax reporting for Individual Retirement Accounts, Coverdell ESAs, or Health Savings Accounts? Then, this timely webinar is just what you need. If you haven’t started planning for tax reporting season, it’s not too late. Whether you’re new to tax reporting, or need to freshen up your understanding of the regulations, this webinar will help you make sure your credit union is prepared. In this webinar, you will learn basic tax reporting information on these accounts and more. This webinar will cover IRA, ESA, HSA tax forms and due dates. You will learn to identify due dates for tax forms to account owners and the IRS, and to determine which tax forms are needed for each account type. Learn more at www.nafcu.org/ascensus
Learn how Google can give you what you need to use Social Media to position your company to increase profitable connections and make sales.
Some information provided by SEOMoz.org - a great free resource for SEO learning.
This presentation walks you through the process of performing an upgrade from SharePoint 2007 to SharePoint 2010. It covers what you can do today to get ready, the prerequisites for the upgrade, the support upgrade approaches and concludes with an upgrade demonstration.
Migrating to SharePoint 2013 - Business and Technical PerspectiveJohn Calvert
Many organizations still run versions of SharePoint prior to 2013, but the appetite and pressure to upgrade is increasing as business and IT better understand the new features and capabilities of SharePoint 2013 / Online combined with its sister products Office 2013 and Exchange 2013, or alternately Office 365. Drawing on experience from real client engagements in this presentation we examine the business and technical roadmap, and challenges in planning and executing a migration to SharePoint 2013.
Schema migration (DB migration) with PhinxHadi Ariawan
Schema migration (DB migration) with Phinx.
What is schema migration? Why you should use schema migration? How you do schema migration using phinx, written on PHP.
WordPress Architecture for Tech-Savvy ManagersMario Peshev
A technical training going over the WordPress platform from a technical standpoint - the WordPress core model, hooks (actions and filters), the WordPress load cycle, themes and plugins, and an overview of the stability, security, and performance impact.
SharePoint Upgrade (WSS 2.0 to WSS 3.0 and SPS 2003 to MOSS 2007) by Joel Ole...Joel Oleson
Upgrade and Migration guidance to SharePoint Server 2007. Various methods, customizations and migration are considered. Prescriptive guidance delivered by Joel Oleson and Shane Young.
SynapseIndia Drupal development
SynapseIndia Ecommerce development
SynapseIndia Sharepoint development
SynapseIndia PHP development
SynapseIndia Dotnet development
SynapseIndia Magento development
SynapseIndia MS Dynamic CRM
SynapseIndia Complaints
SynapseIndia Reviews
How long does it really take to install and configure IBM Connections - 99% of your time is taken up by waiting for things to install.
In this 45 minute presentation everything you need to know about installing and configuring your first connections install
SoCalCodeCamp Upgrade Microsoft Office SharePoint Server 2007 to SharePoint S...Ivan Sanders
Upgrade your Server farm SharePoint 2007 to a new version, or migrate content to a new SharePoint 2010 environment. This presentation helps you plan and perform the upgrade.
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDocker, Inc.
Jeanie Schwenk, Jireh Semiconductor
Jireh Semiconductor bought the Hillsboro fab and its contents including the manufacturing tools, servers, and software running the fab. The previous company had been winding down for years so server and software upgrades had not been on the radar for some time. In 2011 Jireh became the proud owner of the building, the tools, and its legacy software running on servers that weren’t even made any more.
That's when I started my adventure with Jireh in September 2016 with a charter to modernize the applications running the manufacturing facility process and move them into VMs with no impact to manufacturing. That led me down a path of exploration and questions. “What’s the goal?”
The goal wasn't to move to VMs. It was to become independent of the aging PA-RISC architecture, bring forward the ~230 java 1.4.2 applications (10-15 years old), scale to allow increased the load on the software and hardware in order to ramp the factory output to numbers never seen previously. And do it without manufacturing downtime.
The solution included a transition from waterfall and silo development to agile scrum. Rather than simply migrating to VMs, it became obvious the lynch pin for a successful software transition with the required uptime, flexibility, and scalability was Docker Enterprise.
Join me for this session where I'll talk about my journey modernizing 15+ year old applications and infrastructure at Jireh.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Automated Deployment
1. Automated Deployment Building a simple automated deployment platform with PHP and Linux Michael Peacock@michaelpeacockmichaelpeacock.co.uk
2. whois? Senior / Lead Web Developer Zend Certified Engineer Published Author PHP 5 Social Networking, PHP 5 E-Commerce development & more
3. Deployment: (an) old style approach Take website offline / put into maintenance mode Backup everything Upload new files - FTP Upgrade database Put online, and hope for the best Do it twice: once for staging and once for deployment
5. The problem Down time for upgrades Manual process FTP takes time; forgot to CHMOD? Clients want to see progress now! Bugs and issues can lie dormant for some time
6. What about... Many existing solutions are geared towards large projects What about... the little guy; the small agency the web app start up on an entry level VPS?
7. What's in store? A few simple techniques, scripts and ideas that we currently use to make deployment easy
8. Deployment: the basics Get your latest code from version control, and stick it online Keep a central record of all the CHMOD / CHOWNing that you need to do Swap around your database connection details and other suitable configuration files
9. SVN Export Start with a simple svn export Store the date/time in a variable Create two folders, named with the current date/time. One within the web root, one outside of it Two exports: public and private (or one export, and some moving around of folders – up to you!)
11. SVN Export Keep your servers svn client happy! It will ask what to do with the svn password, and nobody will listen – so tell it! sudonano /var/www/.subversion/servers store-plaintext-passwords = no
13. Autonomy When the latest code is checked out, tests have been run, uploads imported, configuration changed and database patched we need to swap this into place instantly The answer: symlinks
14. #!/bin/bash DATE=`date +%H-%M-%e-%m-%y` ... rm /home/user/public_html/ ln –s /var/www/staging/$DATE/ /home/user/public_html/ Sadly, you can’t edit a symlink, hence rm
16. User contributed files Store them elsewhere? On a content delivery network? On a sub-domain Symlink them Copy them in post svn export? A bit nasty and takes time, and what about new user uploads during the copying process?
18. Photo of database table not found, or mysql gone away error message http://www.flickr.com/photos/meandmybadself/165846637/
19. Database changes: patches For database changes to apply on deploy, you need some deploy aware code in your project. Multi-query patch processing Schema compare; its easy to forget a database patch! Backup database before applying patches
20. public function updateDatabase( $patchID, $some=false ) { // look for the next patch if( file_exists( FRAMEWORK_PATH . '../database/patches/' . ++$patchID . '.php' ) ) { $sql = file_get_contents( FRAMEWORK_PATH . '../database/patches/' . $patchID . '.php' ); // apply the changes from the patch mysqli_multi_query( $sql ); // lather, rinse and repeat $this->updateDatabase( $patchID, true ); } else if( $some ) { // All done? Update patch ID in database mysqli_query(“UPDATE settings SET `value`=” . $patchID-1 . “ WHERE `key`=‘database-patch-id’ ” ); exit(); } } Apply your database patches
22. Compare your patched database to what you expected http://joefreeman.co.uk/blog/2009/07/php-script-to-compare-mysql-database-schemas/
23. Databases: Test Database If you are applying changes to your database structure, you will need another test database Changes are first applied to the test database Comparisons run against it Unit testing run against code working with that database When all is clear, the live database can be patched and upgraded
24. Ask the audience Database integration, patching, testing and deployment is probably the weakest link in this deployment chain
25. Unit testing While its good practice to only commit code which passes unit tests, sometimes a commit can break existing code if you are a lazy svn updater Run the unit tests against sandboxed code before pushing the deployment live Did the deployment fail?
26. Unit testing Both PHPUnit and PHP SimpleTest have command line interface Options: Parse the output and look for errors; then continue once its done Store a report, and require manual approval before continuing with deployment phpunit –testdox-text somefile.txt MyTests *this isn’t a stage I’ve actually implemented in our deployment pipeline, just something I’m working on
27. The problem with including Unit Tests Running unit tests take time We need to log deployment attempts, and try and deploy them once the tests have been run We need a central deployment system
28. Photo of USB “kill switch” http://www.flickr.com/photos/stevendepolo/3517227492/
30. PHP Deploy as Root Edit the sudoers file Sudovisudo Create an alias for your deployment scripts Cmnd_Alias DPLY = /var/deploy/script1, /var/deploy/script2 Let the webserver execute as root, without requiring a password www-data ALL=(ALL) NOPASSWD: DPLY
31. Automating deployment Cron Postcommit hooks Do this for your bleeding edge staging area; its good to continually test code in its live server environment Scheduled deployments
32. Deployment Infrastructure Deploying projects across multiple servers? Send your commands over SSH to a remote server Implement a skeleton deployment system on each server, called from a central deployment area
33. Build a deployment platform Projects Deployment areas: Bleeding Staging Production Configurations, reports and deployment schedules
34. Recap Export your repository Apply your permission changes Swap in/out the appropriate configuration files Backup your (test) database Patch your database Unit test validation Swap in/out your configuration files Pull in user contributed files Backup your environment database Patch your live database Update your symlinks
35. Rolling back Shit! That last deployment didn’t go as planned! Symlinks let you keep copies Database backup before patches were applied – just incase Database patch rollback files – allows you to keep new data but undo structural changes Make an undo button in your deployment platform; if you don’t you will need it – if you do, you wont*! * OK, I lied, you probably will at some point
37. Caveats Some useful pointers when having multiple versions online (bleeding, staging and production) Keep robots out (robots.txt meta_robots) You don’t want search engines taking your users to the staging environment, nor do you want to be peanalised for duplicate content Keep unwanted users out (.htaccess or limited user database) Make it clear that the environment is non-production – in case a production user stumbles upon staging!
38. Conclusion Deployment needs to take into account a lot of things Small and simple home-brew scripts, processes and techniques should help you out Look at pulling them together into a simple web-based deployment centre
39. Deploy your projects quickly! @michaelpeacock mkpeacock@gmail.com michaelpeacock.co.uk http://slidesha.re/phpdeploy http://www.flickr.com/photos/jurvetson/4853963652/sizes/m/in/photostream/
Editor's Notes
Store expected schema, and generate schema array from applied patches.