Index: openacs-4/packages/acs-core-docs/www/maintenance-deploy.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maintenance-deploy.html,v diff -u -r1.24.2.22 -r1.24.2.23 --- openacs-4/packages/acs-core-docs/www/maintenance-deploy.html 18 Jun 2017 09:08:35 -0000 1.24.2.22 +++ openacs-4/packages/acs-core-docs/www/maintenance-deploy.html 20 Jun 2017 07:16:41 -0000 1.24.2.23 @@ -2,7 +2,7 @@ Staged Deployment for Production Networks

Staged Deployment for Production Networks

($Id$)

By Joel Aufrecht

OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

This section describes two minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)

Method 1: Deployment with CVS

With this method, we control the files on a site via +

This section describes two minimal-risk methods for deploying changes on a production network. The important characteristics of a safe change deployment include: (THIS SECTION IN DEVELOPMENT)

Method 1: Deployment with CVS

With this method, we control the files on a site via CVS. This example uses one developmental server (service0-dev) and one production server (service0). Depending on your needs, you can also have a staging server for extensive testing before you go @@ -67,4 +67,4 @@ cvs up -Pd index.adp

If you make changes that require changes to the database, test them out first on service0-dev, using either -create.sql or upgrade scripts. Once you've tested them, you then update and - run the upgrade scripts from the package manager.

The production site can run "HEAD" from cvs.

The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...

Method 2: A/B Deployment

The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.

This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.

Simple A/B Deployment: Database is not changed

Figure 6.2. Simple A/B Deployment - Step 1

Simple A/B Deployment - Step 1

Figure 6.3. Simple A/B Deployment - Step 2

Simple A/B Deployment - Step 2

Figure 6.4. Simple A/B Deployment - Step 3

Simple A/B Deployment - Step 3

Complex A/B Deployment: Database is changed

Figure 6.5. Complex A/B Deployment - Step 1

Complex A/B Deployment - Step 1

Figure 6.6. Complex A/B Deployment - Step 2

Complex A/B Deployment - Step 2

Figure 6.7. Complex A/B Deployment - Step 3

Complex A/B Deployment - Step 3

+ run the upgrade scripts from the package manager.

The production site can run "HEAD" from cvs.

The drawback to using HEAD as the live code is that you cannot commit new work on the development server without erasing the definition of 'working production code.' So a better method is to use a tag. This guarantees that, at any time in the future, you can retrieve exactly the same set of code. This is useful for both of the characteristics of safe change deployment. For control, you can use tags to define a body of code, test that code, and then know that what you are deploying is exactly that code. For rollback, you can use return to the last working tag if the new tag (or new, untagged changes) cause problems. .... example of using tags to follow ...

Method 2: A/B Deployment

The approach taken in this section is to always create a new service with the desired changes, running in parallel with the existing site. This guarantees control, at least at the final step of the process: you know what changes you are about to make because you can see them directly. It does not, by itself, guarantee the entire control chain. You need additional measures to make sure that the change you are making is exactly and completely the change you intended to make and tested previously, and nothing more. Those additional measures typically take the form of source control tags and system version numbers. The parallel-server approach also guarantees rollback because the original working service is not touched; it is merely set aside.

This approach can has limitations. If the database or file system regularly receiving new data, you must interrupt this function or risk losing data in the shuffle. It also requires extra steps if the database will be affected.

Simple A/B Deployment: Database is not changed

Figure 6.2. Simple A/B Deployment - Step 1

Simple A/B Deployment - Step 1

Figure 6.3. Simple A/B Deployment - Step 2

Simple A/B Deployment - Step 2

Figure 6.4. Simple A/B Deployment - Step 3

Simple A/B Deployment - Step 3

Complex A/B Deployment: Database is changed

Figure 6.5. Complex A/B Deployment - Step 1

Complex A/B Deployment - Step 1

Figure 6.6. Complex A/B Deployment - Step 2

Complex A/B Deployment - Step 2

Figure 6.7. Complex A/B Deployment - Step 3

Complex A/B Deployment - Step 3