...
Terms used with Version Control Systems
- RepositoryRepositories
- Repositories are logical units in a Version Control System to store Branches of objects that can be assigned permissions for access by different users and groups..
- Working Copy
- Working Copies are local copies of files from a Repository. Modifications are applied to files in a Working Copy that later on can be Comitted to the Repository.
- BranchBranches
- A Branch corresponds to the current status of the job-related objects that have been added to the repository Repository by Commit operations.
- Only one Branch at a time should be used for job deployment. Multiple branches are frequently used to organize the contributions of a number of developers who work in parallel on the same sources. It is not a recommended scenario for job development to have multiple engineers work in parallel on the same jobs.
- Branches can be tagged, e.g. assigned a Release number.
- CommitCommits
- Commits include to submit a fully functional and deployable copy of job-related objects from a Working Copy to a Repository.
- Commits are not intended for backup of working copies Working Copies for job-related objects.
- ReleaseReleases
- Releases are tagged Branches that are not modified after deployment.
- Release numbers can be applied according to individual conventions. Semantic Versioning is a frequently used standard for release numbering (Major.Minor.Patch).
...
- Initial creation of a repository with the configuration items of a JobScheduler instance.
- Configuration items are stored in the
live
folder. - These items should become part of the repository.
- The
live
folder should be a checked out version of the configuration.
- Configuration items are stored in the
- Initial Deployment
- Initially deploy a release to an integration or production environment.
- Update Management
- Deploy a maintenance release to an existing environments.
- Existing job-related objects will be replaced.
- Dropped job-related objects will be removed.
- Existing configuration items should be considered and maintained.
Rollback to a previous release
- Identify the release to which you want to fall back.
- With Subversion/Git operations get the files of the desired release.
- Deploy the desired release as stated with the "Update Management"
...
- When carrying out the deployments it is possible that parameter values are not applicable to target environments, e.g. the names of files, folders, printers etc.
- In a first step users should clearly separate all configuration items that are specific for an environment from job-related objects and configuration items that can be applied to all environments without changes.
Examples for differences in the configuration items that should be considered include
- host names for process classes
- Solution: Having a set of process classes in each environment that will not be part of the deployment procedure. This configuration will be handled directly in the specific environment.
- directories for file order sources
- Solution: Having different file order sources in each environment that will not be part of the deployment procedure. This configuration will be handled directly in the respective environment.
- values for parameters, e.g. database connection strings
- Solution: Make use of include files.
- Solution: Make use of environment variables that will be substituted at run time.
- host names for process classes
...
- Discipline
- Due to the possible sharing of tasks between job development and integration testing a test manager might not know exactly what files are included with the delivery of a release, i.e. he or she cannot check the completeness of deployed objects.
- Therefore the discipline of the job developer is vital to to commit complete and accurate jobs and job dependencies is vital to the deployment process.
- Quality of the development environment
When managing test configuration files in the development environment you should take care not to commit them to the repository. To achieve this, no
add
command should be executed on these files. You also can add these do not add such files to the repository. Typically you can add such files to an ignore list (available with Git and Subversion). You should take into account that each configuration item that has been committed to the repository will be deployed to the integration or production environments some time later.
...
The deployments from development to integration and production environments make use of the following steps:
- Development Environment:
- add the job files and configuration
- do not copy the files that are used exclusively for testing in your respective environment
- do not copy mock files
...
- files to the repository.
- do not add files to the repository that are used exclusively for testing in this environment, e.g. mock files.
- Integration Environment
- Update a local working copy from the development branch of the repository. Do not use the
live
folder directly but a separate folder outside of the JobScheduler installation for updating. - Manage configuration files for this environment in a separate folder and add them to the integration branch of the repository.
- Update the integration environment, i.e. the
live
folder, first from the working copy for the development branch 1) and then from the working copy for configuration files from the integration branch 2).
- Update a local working copy from the development branch of the repository. Do not use the
- Production Environment
- Apply the same local working copies and deployment steps as for the integration environment.
Deployment Operations with Subversion and Git
The following table describes the deployment operations with Subversion and Git.
Subversion | Git | |||||
---|---|---|---|---|---|---|
Prerequisites | Subversion Server | Git Server | ||||
Find the Subversion server documentation from http://svnbook.red-bean.com/en/1.5/ | The complete Git server documentation can be found from https://git-scm.com/documentation | |||||
Subversion Repository Find the documentation „how to install a subversion server“ e.g. from http://svnbook.red-bean.com/en/1.8/svn.serverconfig.html | Git Repository You can create a central repository by:
| |||||
Subversion Client | Git Client | |||||
Install the Subversion Client on the computer where JobScheduler is located | Install the Git Client on the computer where JobScheduler is located | |||||
Subversion Working Copy | Git Working Copy | |||||
Create a working copy in your
| Create a working copy in your | |||||
Please note that after the import the |
| |||||
| The files are now in the Subversion repository. You can verify this with the command:
| The files are now in the Git repository. You can verify this by cloning the repository to another folder:
| ||||
Delete the files from the Execute the command
| ||||||
Creating Working Copies | You can have several working copies of the The following commands are available to synchronize changes to the working copy with the repository: | You can have several working copies of the The following commands are available to synchronize changes to the working copy with the project folderrepository: | ||||
Read Retrieve the current version from the repository ( The
| Read Retrieve the current version from the repository (
| |||||
The Please note that before committing changes it is recommended to perform an
| The push command writes committed changes from the working copy to the repository:
| |||||
Making Changes | Changes are applied to the working copy by use of JOE or a text editor. With all changes for a certain feature being developed and functionally tested the changes can be committed to the repository. Before carrying out the
| Changes are applied to the working copy by use of JOE or a text editor. Use this sequence of commands:
| ||||
Deploying Objects | There are two possible architectures to organize the deployment:
| |||||