background preloader

Migration and deployment

Facebook Twitter

Getting Started with CodeIgniter Migrations » Zachary Flower. CodeIgniter ( is, without a doubt, my favorite PHP framework.

Getting Started with CodeIgniter Migrations » Zachary Flower

While it has its flaws, I love all of the potential it has. In my opinion, however, the biggest detractor against CodeIgniter is the documentation. There are so many features that CodeIgniter sports that are either poorly documented, or entirely undocumented. One of these features is CodeIgniter Migrations. While there is simple enough documentation for Migrations, the explanation of how they work isn’t enough, in my opinion. What Are Migrations? Migrations are a fantastic way to manage database schema changes across multiple development environments, as well as provide a way to roll back poorly executed schema changes without having to manually run MySQL table alters, creations, etc. Enabling CodeIgniter Migrations Enabling CodeIgniter Migrations is as simple as turning them on in the appropriate config file.

Your First Migration Class Name Up and Down Database Forge Creating Columns Creating Keys Creating The Table current() latest() 12 scp command examples to transfer files on Linux. Secure copy Scp (Secure Copy) is a command line tool to copy or transfer files across hosts.

12 scp command examples to transfer files on Linux

It uses the same kind of security mechanism like the ssh program. Infact it uses an ssh connection in the background to perform the file transfer. scp refers both to the "protocol" that defines how secure copy should work and the "program" (command) which is installed as a part of OpenSSH suite of tools. In this quick tutorial we shall look at a few examples the scp command and how it can be used to transfer files securely. Installing scp Scp is generally installed by default on most linux distros as a part of openssh packages.

. $ dpkg -L openssh-client | grep scp /usr/bin/scp /usr/share/man/man1/scp.1.gz Its the OpenSSH package that provides the ssh, scp, sftp programs along with many other tools. Using scp The basic syntax of scp is very simple to memorize. . $ scp source_file_path destination_file_path $ scp ~/my_local_file.txt user@remote_host.com:/some/remote/directory. Jay mabazza : Using Rsync to deploy a website. Easy one liner command. Updated August 2014 Below is a basic script to deploy files on a target server and directory. in a nutshell, rsync eliminates the need to manually copy modified files onto a server.

jay mabazza : Using Rsync to deploy a website. Easy one liner command

It works even better if you have your public key installed on your target server. Tutorial: Use rsync on Linux based servers to move/launch your websites. Project files move around several times during the development process.

Tutorial: Use rsync on Linux based servers to move/launch your websites

A standard cycle includes: Development environment – usually someone’s laptop/desktop or a private area of a web serverStaging environment – usually on the web but password protected or not indexed by search enginesProduction/Live environment – this is ultimately where the website resides, usually accessible by a domain name Sometimes one or more of the environments are on the same computer, but they’re often on different computers. We like to use source control like git to roll out sites when possible, but whenever we need a quick migration or the clients’ server does not support git but has SSH access, we prefer the trusty rsync command. Deployments Best Practices   Introduction This guide is aimed to help you better understand how to better deal with deployments in your development workflow and provide some best practices for deployments.

Deployments Best Practices  

Sometimes a bad production deployment can ruin all the effort you invested in a development process. Having a solid deployment workflow can become one of the greatest advantages of your team. Before you start, I recommend reading our Developing and Deploying with Branches guide first to get a general idea of how branches should be setup in your repository to be able to fully utilize tips from this guide. How To Use Rsync to Sync Local and Remote Directories on a VPS. Hello World · GitHub Guides. The Hello World project is a time-honored tradition in computer programming.

Hello World · GitHub Guides

It is a simple exercise that gets you started when learning something new. Let’s get started with GitHub! You’ll learn how to: Create and use a repository Start and manage a new branch Make changes to a file and push them to GitHub as commits Open and merge a pull request What is GitHub? GitHub is a code hosting platform for version control and collaboration. This tutorial teaches you GitHub essentials like repositories, branches, commits, and Pull Requests. No coding necessary To complete this tutorial, you need a GitHub.com account and Internet access. Tip: Open this guide in a separate browser window (or tab) so you can see it while you complete the steps in the tutorial. Developing and Deploying with Branches   Introduction Getting started with Version Control can be an eye-opening experience.

Developing and Deploying with Branches  

You may have already said to yourself, “How did I work without this?”. Now that you’ve got the basics of Version Control down, you want to start getting really productive by continuing to improve your workflow. Your next step is learning to code in branches. Coding in branches is a simple practice that keeps you and your work more organized.