Website deployment is a tedious and intricate task that lends itself to human error (oops, did I forget to update the DB schema?). Using Phing in conjunction with deployment techniques can greatly reduce the risk of human error and increase productivity. The presentation will cover using Phing to sync files, run tasks, migrate databases, target configuration, and other deployment techniques.
Building and Deploying PHP apps with PhingMichiel Rook
Slides of the talk that I gave during PHP Johannesburg 2014
https://joind.in/talk/view/10411
Manually creating builds and running deployments can be scary, tedious, error-prone, boring, stressful (check all that apply). What you need is a tool that helps automate the necessary steps to build, test, package and deploy your app.
During this talk you will be introduced to the workings of Phing, it's rich set of out-of-the-box tasks and easy extensibility. Step by step, you will learn how to write a comprehensive deployment script. A number of demonstrations will cover testing, packaging, database migration, continuous integration, multi-server deployments and other real-world use cases.
Deploying an application can be tedious and error-prone. Using Phing’s rich set of tasks, easy extension points and simple XML build files to handle the packaging, deploying and testing of your application can help you save time and increase quality. After this talk you will know how to use Phing and how to tailor it to your specific situation. A number of demonstrations will help illustrate transformation, file synchronization, database migration and other real-world use cases.
The focus of the presentation is on organizing your PHP app build process, employing continuous testing, JS testing, automatic documentation, software metrics and other tools. The end result is expected to be a more stable, reliable, documented and healthy code base.
Building and deploying PHP applications with PhingMichiel Rook
Slides for my talk at the PHP UK Conference 2012.
Some of the examples discussed during the talk can be found at http://www.touchdownconsulting.nl/conferences/phing-phpuk2012-examples.tgz
If you attended, please leave me some feedback at http://joind.in/4954 - thanks!
Once you're done coding, the project is all but finished. There are lots of tools to keep control over your code outside your IDE. Especially continuous integration tools are really helpfull for this purpose. Under the hood of a CI, or at commandline, Phing can be used for lots of PHP specific tasks that are usually executed within a CI. Phing is a sort of PHP version of the Apache Ant tool, which is neatly integrated with some handy PEAR packages. During this presentation you'll get a basic understanding about Phing and its features. We will walk through some examples and screens, so you get some basic knowledge about phing and in what type of fields it can be really usefull.
Building and Deploying PHP apps with PhingMichiel Rook
Slides of the talk that I gave during PHP Johannesburg 2014
https://joind.in/talk/view/10411
Manually creating builds and running deployments can be scary, tedious, error-prone, boring, stressful (check all that apply). What you need is a tool that helps automate the necessary steps to build, test, package and deploy your app.
During this talk you will be introduced to the workings of Phing, it's rich set of out-of-the-box tasks and easy extensibility. Step by step, you will learn how to write a comprehensive deployment script. A number of demonstrations will cover testing, packaging, database migration, continuous integration, multi-server deployments and other real-world use cases.
Deploying an application can be tedious and error-prone. Using Phing’s rich set of tasks, easy extension points and simple XML build files to handle the packaging, deploying and testing of your application can help you save time and increase quality. After this talk you will know how to use Phing and how to tailor it to your specific situation. A number of demonstrations will help illustrate transformation, file synchronization, database migration and other real-world use cases.
The focus of the presentation is on organizing your PHP app build process, employing continuous testing, JS testing, automatic documentation, software metrics and other tools. The end result is expected to be a more stable, reliable, documented and healthy code base.
Building and deploying PHP applications with PhingMichiel Rook
Slides for my talk at the PHP UK Conference 2012.
Some of the examples discussed during the talk can be found at http://www.touchdownconsulting.nl/conferences/phing-phpuk2012-examples.tgz
If you attended, please leave me some feedback at http://joind.in/4954 - thanks!
Once you're done coding, the project is all but finished. There are lots of tools to keep control over your code outside your IDE. Especially continuous integration tools are really helpfull for this purpose. Under the hood of a CI, or at commandline, Phing can be used for lots of PHP specific tasks that are usually executed within a CI. Phing is a sort of PHP version of the Apache Ant tool, which is neatly integrated with some handy PEAR packages. During this presentation you'll get a basic understanding about Phing and its features. We will walk through some examples and screens, so you get some basic knowledge about phing and in what type of fields it can be really usefull.
Phing - A PHP Build Tool (An Introduction)Michiel Rook
PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.
These are slides from my talk during the Unconference at the Dutch PHP 2011 Conference (Amsterdam). During this talk I gave an overview of the features and how to use, adapt and extend Phing.
Best Practices in PHP Application DeploymentShahar Evron
An overview of the challenges in managing the web application development lifecycle and how a correct deployment system can help. A few common deployment techniques are reviewed. In addition, some info on an upcoming Zend Server deployment feature.
When pushes to production fail the "blame game" starts between developers and devops, then everyone scurries to figure out what happened...fast! Adam Culp will show how a PHP application can be deployed flawlessly using Jenkins. Then see how "Dev" and "Ops" are supported by a system if the application breaks and the nightmare happens.
An introduction to Zend Framework 1.8 using Zend_Tool, Zend_Application, a simple DAO and a very simple model that uses that DAO.
In the end you have a fully working application
Php Dependency Management with Composer ZendCon 2016Clark Everetts
A deep-dive for beginners into Composer, the dependency manager for PHP. Learn how Composer helps you obtain the components your applications depend upon, installs them into your project, and controls their update to newer versions.
Zend con 2016 bdd with behat for beginnersAdam Englander
Learn the basics of behavioral driven development (BDD) with Behat to build high quality and well documented applications. You'll learn how BDD can help you deliver greater business value more efficiently while accurately documenting the functionality of your application along the way. You'll learn how to utilize Behat as your BDD tool. With Behat, you'll create tests for the features in your application by utilizing a natural language syntax called Gherkin backed by PHP code to execute the steps executed in the feature's scenarios.
This will be a hands-on tutorial. You'll learn how to implement BDD for a web application. This will include utilizing Selenium WebDriver for real world multi-browser testing including introductions to Selenium Grid and hosted integration services utilizing Selenium.
Developers need to be able to run an application on an environment as closely matched to production as possible. We can already do this through Vagrant.The problem with Vagrant is that it is slow and takes a lot of resources both in cpu and space. Docker doesn't have this problem and gives you a tool to create hundreds of different application environments on the same machine and distribute them through a registry. As Git replaced SVN, so has Docker replaced vagrant for application environment setups.Leave the future behind, own today (like a boss).
With Composer as an integral part of Laravel 4 PHP framework, PHP programmers finaly have a way to break the complex projects into smaller independent units (Laravel Packages) that can later easily be used in any other project. This brings code reusibilty to a completely new level. Lecture describes the proccess of creating a simple Laravel package with Facade and Artisan CLI support. Detailed walkthorugh is available as a github project as well: https://github.com/orangehill/Laravel-Workbench-Walkthrough
Modulesync- How vox pupuli manages 133 modules, Tim MeuselPuppet
Managing a single Puppet module isn't easy, especially if you want to stay up-to-date with current best practices, modern testing, and the Puppet-DSL guidelines. This becomes even more difficult when maintaining multiple modules. Modulesync is the open source tool to change this! Learn from Vox Pupuli how we manage over 130 modules with no overhead and how we lowered the bar for newcomers in the open source world to more easily contribute.
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...Puppet
Automate your Windows environment faster with Puppet + Chocolatey. Together, Puppet and Chocolatey bring faster and more secure deployments to your Windows environments. By using Chocolatey for package management and Puppet to automate and guarantee the desired state of your Windows infrastructure, your teams can securely deploy applications faster than ever.
Join us for a live code demonstration of creating a PHP/Hack app and integrating it with Chatter via Force.com Canvas. We will provide a process and framework to rapidly prototype Canvas apps within minutes, rather than days or months. In the session, we'll show you how we built prototypes based on ideas from the Salesforce Ideas site such as real-time translation to voice memos. At the end of the session, we will provide the prototyping framework for download.
Fighting Fear-Driven-Development With PHPUnitJames Fuller
This talk was designed for PHP developers with limited or no experience in unit testing. I focus on describing the problem of fear-driven-development, and how test-driven-development can be used to improve the quality of your code.
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerJohn Anderson
Hello, unfrozen Paleolithic Perl programmers! Welcome to 2015!
First, let’s start with the good news: yes, we’re still programming in Perl5 in 2015 (and yes, we think that’s good news). Indeed, most of the code you wrote in the past, before that unfortunate "Big Giant Hole in Ice" incident, will likely still work just fine on the current release of Perl5 -- even if you originally wrote it against Perl 4 or even Perl 3.
Here’s the bad news: there’s been an incredible amount of innovation in not only Perl5-the-language, but also in Perl5-the-community and what the community considers to be accepted best practices and the right way to do things. It can be very frightening and confusing!
But wait, there’s more good news: if you come to this talk, you’ll get a guided tour of my (reasonably opinionated) views on what the consensus best practices are around issues such as which version of Perl5 to use, system Perl versus non-system Perl, Perl5 installation management packages, new language features and libraries to use, old language features and libraries to avoid, modern tooling, and even more!
Makefiles in 2020 — Why they still matterSimon Brüggen
Make was created in 1976 by Stuart Feldman at Bell Labs to help build C programs. But how can this 40+ year old piece of software help us develop and maintain our ever-growing amount of cloud-based microservices?
Some might think Docker is for developers only, but this is not really the case.Docker is here to stay and we will only see more of it in the future.
In this session learn what Docker is and how it works.This session will be covering core areas such as volumes, but also stepping it up to a few tips and tricks to help you get the most out of your Docker environment.The session will dive into a few examples of how to create a database environment within just a few minutes - perfect for testing,development, and possibly even production systems.
Phing - A PHP Build Tool (An Introduction)Michiel Rook
PHing Is Not GNU make; it's a PHP project build system or build tool based on Apache Ant.
These are slides from my talk during the Unconference at the Dutch PHP 2011 Conference (Amsterdam). During this talk I gave an overview of the features and how to use, adapt and extend Phing.
Best Practices in PHP Application DeploymentShahar Evron
An overview of the challenges in managing the web application development lifecycle and how a correct deployment system can help. A few common deployment techniques are reviewed. In addition, some info on an upcoming Zend Server deployment feature.
When pushes to production fail the "blame game" starts between developers and devops, then everyone scurries to figure out what happened...fast! Adam Culp will show how a PHP application can be deployed flawlessly using Jenkins. Then see how "Dev" and "Ops" are supported by a system if the application breaks and the nightmare happens.
An introduction to Zend Framework 1.8 using Zend_Tool, Zend_Application, a simple DAO and a very simple model that uses that DAO.
In the end you have a fully working application
Php Dependency Management with Composer ZendCon 2016Clark Everetts
A deep-dive for beginners into Composer, the dependency manager for PHP. Learn how Composer helps you obtain the components your applications depend upon, installs them into your project, and controls their update to newer versions.
Zend con 2016 bdd with behat for beginnersAdam Englander
Learn the basics of behavioral driven development (BDD) with Behat to build high quality and well documented applications. You'll learn how BDD can help you deliver greater business value more efficiently while accurately documenting the functionality of your application along the way. You'll learn how to utilize Behat as your BDD tool. With Behat, you'll create tests for the features in your application by utilizing a natural language syntax called Gherkin backed by PHP code to execute the steps executed in the feature's scenarios.
This will be a hands-on tutorial. You'll learn how to implement BDD for a web application. This will include utilizing Selenium WebDriver for real world multi-browser testing including introductions to Selenium Grid and hosted integration services utilizing Selenium.
Developers need to be able to run an application on an environment as closely matched to production as possible. We can already do this through Vagrant.The problem with Vagrant is that it is slow and takes a lot of resources both in cpu and space. Docker doesn't have this problem and gives you a tool to create hundreds of different application environments on the same machine and distribute them through a registry. As Git replaced SVN, so has Docker replaced vagrant for application environment setups.Leave the future behind, own today (like a boss).
With Composer as an integral part of Laravel 4 PHP framework, PHP programmers finaly have a way to break the complex projects into smaller independent units (Laravel Packages) that can later easily be used in any other project. This brings code reusibilty to a completely new level. Lecture describes the proccess of creating a simple Laravel package with Facade and Artisan CLI support. Detailed walkthorugh is available as a github project as well: https://github.com/orangehill/Laravel-Workbench-Walkthrough
Modulesync- How vox pupuli manages 133 modules, Tim MeuselPuppet
Managing a single Puppet module isn't easy, especially if you want to stay up-to-date with current best practices, modern testing, and the Puppet-DSL guidelines. This becomes even more difficult when maintaining multiple modules. Modulesync is the open source tool to change this! Learn from Vox Pupuli how we manage over 130 modules with no overhead and how we lowered the bar for newcomers in the open source world to more easily contribute.
Easily Manage Patching and Application Updates with Chocolatey + Puppet - Apr...Puppet
Automate your Windows environment faster with Puppet + Chocolatey. Together, Puppet and Chocolatey bring faster and more secure deployments to your Windows environments. By using Chocolatey for package management and Puppet to automate and guarantee the desired state of your Windows infrastructure, your teams can securely deploy applications faster than ever.
Join us for a live code demonstration of creating a PHP/Hack app and integrating it with Chatter via Force.com Canvas. We will provide a process and framework to rapidly prototype Canvas apps within minutes, rather than days or months. In the session, we'll show you how we built prototypes based on ideas from the Salesforce Ideas site such as real-time translation to voice memos. At the end of the session, we will provide the prototyping framework for download.
Fighting Fear-Driven-Development With PHPUnitJames Fuller
This talk was designed for PHP developers with limited or no experience in unit testing. I focus on describing the problem of fear-driven-development, and how test-driven-development can be used to improve the quality of your code.
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerJohn Anderson
Hello, unfrozen Paleolithic Perl programmers! Welcome to 2015!
First, let’s start with the good news: yes, we’re still programming in Perl5 in 2015 (and yes, we think that’s good news). Indeed, most of the code you wrote in the past, before that unfortunate "Big Giant Hole in Ice" incident, will likely still work just fine on the current release of Perl5 -- even if you originally wrote it against Perl 4 or even Perl 3.
Here’s the bad news: there’s been an incredible amount of innovation in not only Perl5-the-language, but also in Perl5-the-community and what the community considers to be accepted best practices and the right way to do things. It can be very frightening and confusing!
But wait, there’s more good news: if you come to this talk, you’ll get a guided tour of my (reasonably opinionated) views on what the consensus best practices are around issues such as which version of Perl5 to use, system Perl versus non-system Perl, Perl5 installation management packages, new language features and libraries to use, old language features and libraries to avoid, modern tooling, and even more!
Makefiles in 2020 — Why they still matterSimon Brüggen
Make was created in 1976 by Stuart Feldman at Bell Labs to help build C programs. But how can this 40+ year old piece of software help us develop and maintain our ever-growing amount of cloud-based microservices?
Some might think Docker is for developers only, but this is not really the case.Docker is here to stay and we will only see more of it in the future.
In this session learn what Docker is and how it works.This session will be covering core areas such as volumes, but also stepping it up to a few tips and tricks to help you get the most out of your Docker environment.The session will dive into a few examples of how to create a database environment within just a few minutes - perfect for testing,development, and possibly even production systems.
DCEU 18: Developing with Docker ContainersDocker, Inc.
Laura Frank Tacho - Director of Engineering, CloudBees
Wouldn't it be great for a new developer on your team to have their dev environment totally set up on their first day? What about having the confidence that your dev environment mirrors testing and prod? Containers enable this to become reality, along with other great benefits like keeping dependencies nice and tidy and making packaged code easier to share. Come learn about the ways containers can help you build and ship software easily, and walk away with two actionable steps you can take to start using Docker containers for development.
.NET Conf 2019 Tel-Aviv Israel
There are cases where bugs are discovered only after the product is shipped and used by the end-users. The main reason for these bugs that appear only in the production environment is the use of real user scenarios with real user data. Production debugging is about solving customer-facing issues that aren't easily reproducible in the development or testing environments. When it comes to a cloud-hosted application, production debugging becomes even harder. The code is running on multiple hosts, a business flow can span many services. A remote debugging session with the cloud is dangerous and may introduce side effects to the currently running software, such as performance degradation, interruption of service, and data correctness issues.
In this lecture, we will see how we can remote debug our cloud staging environment, and how we can use Visual Studio Snapshot debugger to set Snapshots and Log points in our production environment.
To get even more insights, the audience will see a revolutionary tool and approach for a collaborative production debugging – OzCode Debugging as a Service (DaaS), where the DevOps and the Dev team can solve production problems together!
You will learn:
1. The difficulties of debugging a modern cloud-hosted application
2. Methods and tools for capturing the state and debugging cloud-hosted services
Using Apache Brooklyn to manage your application stack. Brooklyn is a cloud agnostic orchestrator that can deploy an application to any cloud (including the creation of infrastructure) without changing the blueprint.
Slides for an introductory Amazon Web Services Elastic Compute Cloud (AWS EC2) tutorial. The video (in Russian) is available here: https://youtu.be/w1hQFbHa9PQ
Comment améliorer le quotidien des Développeurs PHP ?AFUP_Limoges
Conférence présentée lors du summer meetup de l'AFUP à Limoges le 19 juin 2018. Son objectif est de présenter plusieurs outils permettant de gagner rapidement en efficacité au quotidien.
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxkarlhennesey
Part 4: Scripting and Virtualization (due Week 7)Objectives
1. To learn scripting on Windows and Linux
2. To add virtualization with a Linux distributionStepsPart 1—Windows Scripting
Basic Script: Scripting is useful for small programming projects or quick tasks. Often, these programs are short and meant for small problems. Unlike compiled programming languages, scripting languages are generally interpreted. Batch files or scripts are created to automate tasks and may contain several commands in one file. Scripts can be created in Notepad. These are short files that run each command in sequence at file execution. The windows command-line interface can be used to run scripts.
Below are some commands.
Echo = Displays a message in the batch file
Echo. displays a blank line
@command turns off the display of the current command
@echo off = does not echo back text
cls = clears your screen
:: = Adds comments to your code; this line will not be displayed
Start = used to start a windows application
Creating a Basic Script
cls
@echo off
::Your Name
echo "Creating a data dump file"
ipconfig /all > C:\Scripts\config_info.txt
echo end of script
Open Notepad by going to Start-> All Programs -> Accessories-> Notepad.
Type the above script into Notepad.
Create a directory named Scripts on the C:\ drive. Save this file in the C:\Scripts folder as myscript.cmd.
Do not close your Notepad file. To run, open a command prompt by typing cmd in the Search Programs and Files box when you click the Start button or search for cmd.
Change directory to the C:\Scripts folder by typing the following.
cd c:\Scripts
Then type in the following.
myscript.cmd
The script should run and will create a file.
Use the dir command to see what files are created.
Keep both the Notepad file and the command prompt open for the next step.
You can also shut down a computer from a script. This is helpful for remote shutdown in a networking situation. Add the following commands to your script and save it in Notepad. (Note: The ping command, though normally used for networking, here waits 4 seconds.)
shutdown /s /t 60 /c "Local shutdown in 1 minute!"
ping -w 1000 0.0.0.0 > nul
shutdown /a
echo "Shutdown has been aborted"
Click back to the command prompt.
Type in myscript.cmd to run the script.
You should see the script attempt to shut down, then abort the shutdown.
Keep both your Notepad and command prompt open.
Environment variables are built-in system variables available for all Windows processes describing users, paths, and so on.
Some common environment variables are as follows.
%PATH% = contains a list of directories with executable files, separated by semicolons. To add a path:
SET PATH = %PATH%;C:\Windows\Eclipse
%DATE% and %TIME% = current date and time
%RANDOM% = returns a random number between 0 and 32767
%WINDIR% = points to the windows directory C:\Windows
%PATHEXT% = displays executable file extensions ie .com, .exe, .bat, .cmd, .vbs, .vbe, ...
Learn in-depth Zend_Form techniques to automate and power your applications forms, with or without using Zend Framework. Learn everything from setup of a form to custom elements and organizational best practices.
NOSQL101, Or: How I Learned To Stop Worrying And Love The Mongo!Daniel Cousineau
Lets learn the philosophy NOSQL takes (from a developer's standpoint), the changes you'll (not) have to take, discuss mongo, and see some practical examples!
These are my first revision of this talk and will be making some organizational improvements late.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
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.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
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.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Automated Deployment With Phing
1. Automated Deployment With Phing Or: How I Will Replace You With A Very Small Shell Script ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 1
2. Who Daniel Cousineau Senior Software Applications Developer Texas A&M University Division of Student Affairs Department of IT http://www.toosweettobesour.com/ @dcousineau ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 2
3. The Problem ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 3
4. Human beings make mistakes ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 4
5. We aren’t as accurate each repetition ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 5
6. Machines don’t have this problem ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 6
7. They do the same thing every time (supposedly) ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 7
8. At Any Given Time New Code New Configuration New Database Schema New Static Files ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 8
9. A Lot To Remember Did you remember to upload ALL new files? Did you remember to update your DB? Did you remember to correct your config? ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 9
10. Even Worse Did you clear your caches? Did you delete that old file/plugin? In the upload process, was your configuration overwritten? Did you upload ALL the changed files? When did you last upload? ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 10
11. The Solution ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 11
12. Automation! Build scripts! We are programmers after all… ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 12
13. ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 13 Don’t Do More Work Than You Have To!
15. What is Automation? Automated deployment means a single command Locks your live site Uploads changed files Clears caches and temporary files Updates the database schema Runs other cron tasks Unlocks your live site ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 15
16. Why Do We Automate? Deployment is tricky Repetition degrades quality She sells sea shells by the sea shore ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 16
17. When Is Automation Used? All the time! Staging Live Probably best to use it on your dev box too! ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 17
18. The Basics ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 18
19. Tools of the Trade Build System Phing Apache ANT Capastrano Plain PHP or BASH or BAT Files File Transfer Rsync (*NIX Environments) Xcopy (Windows Environments) Configuration Management Database Migration DBDeploy Doctrine ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 19
20. Phing Philosophy Build scripts contains "Targets" Targets should be small and specialized. Example Targets: clean Clear temporary and cached files copy Copy files to their intended destination migrate Upgrade the database schema ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 20
21. Phing Philosophy Targets can have dependencies Target "live" can depend on clean, copy, and migrate Meaning, when we run the "live" target, it first runs clean, copy, then migrate And any tasks they depend on ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 21
22. Installing Phing pear channel-discover pear.phing.info pear install phing/Phing Want all the little dependencies? pear config-set preferred_state alpha pear install –alldepsphing/Phing pear config-set preferred_state stable ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 22
23. Running Phing $> phing –v Lists Phing version Phing expects to find a file "build.xml" in the current directory build.xml defines the targets You can use the "-f <filename>" flag to specify an alternate build file like $> phing -f build-live.xml ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 23
24. Syntax XML If you don’t already know it, you have bigger problems Variables ${variablename} Conventions Psuedo-Namespaces using periods ${namespace.variable.name} ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 24
25. Basic Conventions build.xml Central repository of your top-level tasks build-*.xml Can be included into build.xml. Usually for grouping by target (dev, staging, live) or task (migrate, test, etc.) build.properties Technically an INI file that contains variables to be included by build files. ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 25
28. File Transfer ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 28
29. Techniques Built in Phing Copy Task Cross Platform Slow Not over network Version Control Checkout/Update Syncs deleted files User created files usually ignored Rsync Great for *NIX environments. Almost guaranteed to be installed on Linux, BSD, Mac OSX Can be installed on Windows Xcopy Good for Windows environments Faster than Phing Copy Not over network ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 29
30. Pitfalls Cleanup Deleted Source Files Usually only a problem when you have * include patterns ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 30
31. Pitfalls User created files are a HUGE pitfall /htdocs/images/upload Sync programs usually will delete content your deployment machine doesn’t have What if user upload are mixed in with files you want to manage? Solutions Keep user created content completely separated. The further up the file tree and consolidated the better. Separate static file server, Amazon S3, or other style CDNs ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 31
32. Executing External Tools Nearly all file transfer tools will be external commands For this we need the Exec task ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 32 <exec command="cp file1 file2" />
33. Rsync So many different options you’re best off finding your own tutorials or reading MAN pages rsync -aCvz -e 'ssh -i /path/to/ssh-key' ${project.basedir}/src user@domain: ${staging.deployment.directory}/ ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 33
34. Rsync Options Of Note -a archive-mode Recursive copy, preserve everything, etc. -C cvs-exclude Ignore .cvs, .svn, and other version control artifacts -v verbose Know EXACTLY what’s going on -z compress Compress information transmitted -e alternative remote shell Use a custom SSH command (namely use key-pair) ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 34
35. Xcopy Best when your live deployment process involves copying to a network share on Windows machines xcopy ${project.basedir}${source.directory} ${staging.deployment.directory} /D /I /Y /S /E /Exclude:${project.basedir}taging.deployment.exclude ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 35
36. Xcopy Options Of Note /d Update only those files that are different (timestamps) /i Creates target directories if they don’t exist /y Do not prompt /s Copy all directories and sub-directories… /e …Even if the directories are empty /exclude Exclude files based on glob patterns ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 36
37. Xcopy Exclude File Example ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 37 mpbr />ploadsbr />
39. Techniques Check incoming domain www.domain.com means load production configuration localhost/domain.com means load development configuration Check for an environment file Contents of DOCUMENT_ROOT/.env determine configuration Copy over during deployment ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 39
40. Check Incoming Domain Pros No chance for error Cons Detection is a weak link Especially when development, staging, and live have different web servers (e.g. Apache to IIS) ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 40
41. Check for an Environment File Pros Consistent regardless of Server or OS changes Easy to repair Quick FTP or SSH Easy Testing Just swap file contents Cons Forget to copy changes? ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 41
42. Copy Over During Deployment Pros Images and CSS now manageable Reduce redundancy Simple to repurpose regular push command Cons Difficult to manage Forget to copy changes? ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 42
43. Which one to choose? Depends on your application architecture Depends on your environment You’ll know what’s best for your project I use a combination of Environment File and Copy Over During Deployment ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 43
45. Database Deployment Philosophy “Versions” often referred to as “Deltas” Each Delta has an UP and a DOWN script UP makes the changes DOWN reverts the changes Each change should be a non-destructive schema change Unless of course you need data alteration ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 45
46. DBDeploy Philosophy Each delta is 2 native SQL scripts Separated by --//@undo Database version is stored in a special table Version X was applied at TIMESTAMP… Beware corruption! ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 46
47. DBDeploy Under The Hood Connect to the database, read from changelog table, get the most current revision installed Retrieve all delta files newer that the current revision Revision numbers are based off of alphabetic sorting, name your files accordingly Pull all the “UP” changes and concatenate them to a migration script Up to YOU to run the migration script ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 47
48. Installing DBDeploy Is Phing already installed? Great! So is DBDeploy… Create the changelog table Track the current version of your DB ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 48 CREATE TABLE changelog ( change_number BIGINT NOT NULL, delta_set VARCHAR(10) NOT NULL, start_dt TIMESTAMP NOT NULL, complete_dt TIMESTAMP NULL, applied_by VARCHAR(100) NOT NULL, description VARCHAR(500) NOT NULL ); ALTER TABLE changelog ADD CONSTRAINT Pkchangelog PRIMARY KEY (change_number, delta_set);
49. Basic Delta: 01_init.sql ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 49 --// CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) unsigned NOT NULL auto_increment, `handle` varchar(25) NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `users_handle_index` (`handle`) ) ENGINE=InnoDB DEFAULT; --//@UNDO DROP TABLE IF EXISTS `users`; --//
50. Run Migration First add a task to your Phing build file ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 50 <target name="migrate"> </target>
51. Run Migration Generate the SQL migration file ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 51 <target name="migrate"> <dbdeploy url="mysql:host=${db.host};dbname=${db.name}" userid="${db.user}" password="${db.pass}" dir="${project.basedir}/db/deltas" outputfile="${project.basedir}/up.sql" undooutputfile="${project.basedir}/down.sql" /> </target>
52. Run Migration Execute the SQL script ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 52 <target name="migrate"> <dbdeploy url="mysql:host=${db.host};dbname=${db.name}" userid="${db.user}" password="${db.pass}" dir="${project.basedir}/db/deltas" outputfile="${project.basedir}/up.sql" undooutputfile="${project.basedir}/down.sql" /> <exec command="/usr/bin/mysql -h${db.local.host} -u${db.local.user} -p ${db.local.pass} ${db.local.name} < ${project.basedir}/up.sql" dir="${project.basedir}" checkreturn="true"> </target>
53. Pitfalls Make sure you have a good CLI app for loading a SQL file /usr/bin/mysql mysql.exe Build script travelling across operating systems? Write your own Phing task to execute the migration output? Was the changelog table created in the first place? ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 53
54. Doctrine Database Migrations Integrated into the Doctrine CLI tool ./doctrine migrate Same philosophies BUT, deltas are PHP objects that contain an UP and a DOWN method Run using the Phing exec task ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 54
55. Other Database Migration Tools http://www.liquibase.org/ ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 55
57. Further Resources The people around you More people than you know automate their deployment There are many, many different techniques My techniques may suck for your particular setup #phpcon freenode Many of the speakers hang out there Many smart people hang out there I HANG OUT THERE! Therefore I am smart ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 57
58. Further Resources Blogs http://phpdeveloper.org Documentation http://phing.info http://dbdeploy.com Google Experimentation Pushing to a local directory Pushing to a virtual machine ZendCon '09 Automated Deployment With Phing - Daniel Cousineau 58