+ All Categories
Home > Self Improvement > Using the Corporate Geographic Data Model with Subversion

Using the Corporate Geographic Data Model with Subversion

Date post: 31-Oct-2014
Category:
Upload: debbie-wilson
View: 896 times
Download: 0 times
Share this document with a friend
Description:
 
Popular Tags:
48
Using the Corporate Geographic Data Model with Subversion Debbie Wilson Senior Geographic Information Architect [email protected] 16 th January 2014
Transcript
Page 1: Using the Corporate Geographic Data Model with Subversion

Using the Corporate Geographic Data Model with Subversion

Debbie Wilson

Senior Geographic Information Architect

[email protected]

16th January 2014

Page 2: Using the Corporate Geographic Data Model with Subversion

Version Control – Configuration Management

• Version control is the management of changes to resources.• OS Information Models are concurrently developed by a diverse

team• Need for formal management of change that supports:

• Concurrent editing (on-site/off-site environments)• Track changes• Roll-back changes• Create snapshots of individual model components (e.g.

releases or baselines)• Subversion is an open-source software for version control • Alternates are GitHub but only Subversion is supported by

Enterprise Architect

Page 3: Using the Corporate Geographic Data Model with Subversion

Version Controlling – Configuration Management

Further Reading:• Several internal resources for version control developed by IS

Software Configuration Management (SCM):• Subversion Quick Reference Guide

IS Subversion Training

Page 4: Using the Corporate Geographic Data Model with Subversion

Using the CGDM with Subversion

There are 4 steps required to set up the Corporate Geographic Data Model for use with Subversion:

1. Install Subversion Clients (complete)

2. Checkout local version of UML repositories

3. Create a local EAP file and configure version control settings

4. Get Data Model package(s)

5. Editing version controlled packages

6. Creating version controlled packages

Page 5: Using the Corporate Geographic Data Model with Subversion

Step 1: Install Subversion Clients

• Two clients are required for using and managing version controlled resources within Subversion:• Collabnet Subversion Command Line Client v1.7• Tortoise Subversion client v1.7

NOTE: The latest version of both Subversion clients is v1.8. However, this does not currently work with the public INSPIRE UML repository. As it forces a requirement to have user credentials which is not required in v1.7.

Page 6: Using the Corporate Geographic Data Model with Subversion

Accessing the repository without SVN client

• You can access as a read-only user without dedicated SVN clients

• All you need is a web browser and user credentials

http://svn/corp_geo_data_model/

Page 7: Using the Corporate Geographic Data Model with Subversion

What is contained within the repository?

• The Corporate Geographic Data Model repository has the standard subversion repository structure:

Page 8: Using the Corporate Geographic Data Model with Subversion

Subversion directories

• Trunk• This is directory containing the resources that are used for

the main line of development• Tags

• This directory contains folders that represent snapshots of the resources that have been tagged as notable revisions such as releases

• Branches• Branches are used when you are asked to “tweak” the

resource to meet the requirements of a specific user • But their requirements are not needed as part of the core

resource

Page 9: Using the Corporate Geographic Data Model with Subversion

Contents of the CGDM Trunk

Information Models:

• EA XMI files containing model elements

• Separated into 3 directories:

• Products

• Systems: MRDP, GDMS etc.

• Services: (future)

• Contains set of pre-defined model structures

Page 10: Using the Corporate Geographic Data Model with Subversion

Contents of the CGDM Trunk

Resources

• Contains supporting tools for modelling and creating schemas

• UML Profiles

• Document Templates

• MDA Transformations

• ShapeChange

Page 11: Using the Corporate Geographic Data Model with Subversion

Contents of the CGDM Trunk

schemas

• This directory shall contain the various implementation schemas for products, systems, services:

• GML schemas

• Ontologies

• Dictionaries/vocabularies

• DDLs

Page 12: Using the Corporate Geographic Data Model with Subversion

Contents of the CGDM Trunk

The CGDM is not limited to these resources. Can been extended. We all have full right privileges so anyone can

create new content.

Page 13: Using the Corporate Geographic Data Model with Subversion

Step 2: Checkout local version of repository

• The Corporate Geographic Data Model contains only the UML models created and managed by Ordnance Survey

• But Information models are built upon international standards developed by ISO TC211, OGC and INSPIRE Directive

• Therefore several UML repositories must be checked out to use the Corporate Geographic Data Model:

1. Corporate Geographic Data Model: http://svn/corp_geo_data_model/

2. ISO TC211: https://inspire-twg.jrc.ec.europa.eu/svn/iso or https://www.seegrid.csiro.au/mirrors/iso-harmonized-model/

3. INSPIRE: https://inspire-twg.jrc.ec.europa.eu/svn/inspire-model/branches/public

Page 14: Using the Corporate Geographic Data Model with Subversion

Step 2: Checkout Corporate Geographic Data Model

1. Create a directory to contain the UML repositories (e.g. C:\UML)

2. Open a cmd dialog window and set directory to be your UML repository

3. Use the subversion command line svn checkout to download a local copy of the Corporate Geographic Data Model

• You will be required to log in using your windows credentials

NOTE: this should only be required once

Page 15: Using the Corporate Geographic Data Model with Subversion

Step 2: Checkout Corporate Geographic Data Model

Page 16: Using the Corporate Geographic Data Model with Subversion

Step 2: Checkout INSPIRE and ISO TC211 repositories

INSPIRE repository

• You may get this message

• Accept the certificate permanently by typing the 'p' and press return.

Page 17: Using the Corporate Geographic Data Model with Subversion

Step 2: Checkout ISO TC 211and INSPIRE repositories

ISO TC 211 UML repository• Can check out ISO repository using Tortoise SVN client rather

than the command line client as don’t need to edit it or accept any certificates

• Within your UML repository directory in Windows Explorer right-click and select SVN Checkout…

TortoiseSVN is not a program you access from Start Menu. It’s

added a set of SVN tools to Windows Explorer

Page 18: Using the Corporate Geographic Data Model with Subversion

Step 2: Checkout ISO TC 211and INSPIRE repositories

• In Checkout dialog type URL for ISO TC211 UML Repository (can choose either INSPIRE or SEEGrid ISO mirror both same)

• Name the destination directory iso

Page 19: Using the Corporate Geographic Data Model with Subversion

Step 3: Create a local EAP file and configure version control settings • We will no longer be using a single corporate EAP file• Instead each of us shall use a local enterprise architect file

which shall either contain:• Full Corporate Geographic Data Model• Subset view of the Corporate Geographic Data Model (e.g.

Products only or MRDP)• User defined project made up of one or more packages from

model

Page 20: Using the Corporate Geographic Data Model with Subversion

What the benefits of moving to SVN?

1. Version controlled• Can track changes – know who made which change• Fully maintained history of all changes• Roll back any changes that may been made in error• Improve process for managing development/release – no

longer maintain archive packages in model

2. Can Work offline/off-site more effectively• Check out packages to work on when offline • On VPN - EA accesses local repository so responds as if in

office

3. Integrates with other tools• JIRA/Fisheye – trace changes to back tasks/bugs• GitHub – supports collaboration with Subversion so can

integrate with IS better in future

Page 21: Using the Corporate Geographic Data Model with Subversion

Step 3: Create a local EAP file and configure version control settings

1. Open Enterprise Architect and create a new project and save locally in preferred directory

2. Cancel Model Wizard dialog as importing existing models from repository

3. Right-click on the Root Model in Project Browser, select Package Control Version Control Settings

Page 22: Using the Corporate Geographic Data Model with Subversion

Insert protective marking - see QSP 032

Step 3: Configure version control settings

• In the Version Control Settings dialog need to configure subversion settings for the three UML repositories:• Corporate Geographic Data Model• ISO TC211 • INSPIRE

Page 23: Using the Corporate Geographic Data Model with Subversion

Step 3: Configure version control settings

1. Tick This model is private

2. In configuration details assign a unique id for the Corporate Geographic Data Model: CGDM

3. Select Subversion as type

4. Set working copy path to trunk directory of checked out repository: e.g. C:\UML\corp_geo_data_model\trunk

5. Set Subversion Exe Path to location of the Collabnet Subversion Client: e.g. C:\Program Files\CollabNet\Subversion Client\svn.exe

6. Save

NOTE: this only needs to be set once it will now be remembered.

Page 24: Using the Corporate Geographic Data Model with Subversion

Step 3: Configure version control settings

Repeat for ISO TC211 and INSPIRE

1. Select New

2. In configuration details assign the unique id: isotc211

3. Set type as Subversion

4. Set working copy path to trunk directory of checked out repository: e.g. C:\UML\iso

5. Save

Page 25: Using the Corporate Geographic Data Model with Subversion

Step 3: Configure version control settings

1. Select New

2. In configuration details assign the unique id: inspire-model

3. Set type as Subversion

4. Set working copy path to trunk directory of checked out repository: e.g. C:\UML\public\approved\latest

5. Save. You are now accessing models from 3 UML repositories

6. Close

Use this approach to add more repositories as required if working on systems (e.g. IS/1Spatial for MRDP)

Page 26: Using the Corporate Geographic Data Model with Subversion

Step 4: Get Package and import models

• Once the version control settings are configured you can import either:

1. Pre-defined model (focus of this section)

2. Set up your own model and import individual version controlled models from the Corporate Geographic Data Model, Foundation Schema or other external schema as required

Page 27: Using the Corporate Geographic Data Model with Subversion

Step 4: Import Pre-Defined Model

• Within the Corporate Geographic Data Model several pre-defined models have been configured:

1. Corporate Geographic Data Model: Provides a consolidated view of all models developed within OS for products, systems and services

2. Products: Contains the logical and implementation models for products

3. Systems: Contains |the various models (data models, business rules, requirements, use cases, data flows) for data maintenance and productions systems

Page 28: Using the Corporate Geographic Data Model with Subversion

Step 4: Import Pre-Defined Model

• Right click on the root Model package and select Package Control Get Package

Page 29: Using the Corporate Geographic Data Model with Subversion

Step 4: Get Package and import models

• In the Get Shared File dialog select CGDM from the Select a Version Control Configuration drop down list:

Page 30: Using the Corporate Geographic Data Model with Subversion

Step 4: Get Package and import models • Select one of the root model packages:

Page 31: Using the Corporate Geographic Data Model with Subversion

Step 4: Get Package and import models • Chose whether to import model as Root Model or under

selected package

• As we are importing a pre-defined model structure select Yes

NOTE: If you are creating a user-defined model structure you would select No - this will give you the option to move packages around as

you build the structure

Page 32: Using the Corporate Geographic Data Model with Subversion

Step 4: Get Package and import models

• Final Step is to import all models• Right-click on a package, select Package Control Get all

Latest Import changed files only

NOTE: This will take a long time the first time –

good time for a brew!

Page 33: Using the Corporate Geographic Data Model with Subversion

Corporate Geographic Data Model

• You have successfully set up Enterprise Architect to work with version controlled models

Page 34: Using the Corporate Geographic Data Model with Subversion

Importing INSPIRE/ISO TC211 models

Issue 1: Inconsistent use of Foundation Models• In past we have manually imported snapshots of the INSPIRE

and ISO models• While these models are pretty stable they do change• Required us to regularly manually check for changes and then

re-import models• Only parts of the ISO TC211 data modelling packages imported• Some aspects of the ISO TC211 models may have been

deleted – THIS IS A BIG NO NO!• INSPIRE models are imported on a package by package basis

as required. GCM containing common models not included!

Page 35: Using the Corporate Geographic Data Model with Subversion

Importing INSPIRE/ISO TC211 models

Issue 2: Maintenance of EA identifiers• Can run into issues when sharing models that use manual

imports of foundation models: • Foundation Model elements may have different EA

identifiers so “disappear” from the model• By using formal models within repository ensure that same EA

identifiers are used• Ensure our models can be integrated with INSPIRE/OGC/ISO

models by users

Now – we shall all use the same Foundation Schema to ensure modelling consistency

Page 36: Using the Corporate Geographic Data Model with Subversion

Editing version controlled packages

• Lots of packages now have lock icons• Not allowed to make any changes to any element in the

package• To make edits to a model you need to checkout the package

from the version control repository

Right-click on package to edit Package Control Check Out

Page 37: Using the Corporate Geographic Data Model with Subversion

Editing version controlled packages

• When you check out a package, EA checks against the central repository whether the version is the model is the latest

• If it is the latest version select Accept current package

NOTE: EA only supports exclusive check out• i.e. package is locked to one user only• Can only edit package once its been checked back in

Page 38: Using the Corporate Geographic Data Model with Subversion

Editing version controlled packages

• Select a package to edit – make sure its not the same package as someone else

• Test that you can move items on diagram and add/edit classes

Page 39: Using the Corporate Geographic Data Model with Subversion

Editing version controlled packages

• To check in edits, Right-click on the package Package Control Check In

• Before the check-in is committed you will be prompted to add a Check-in comment

• This should be short description

of edits made (+ JIRA task id)

Page 40: Using the Corporate Geographic Data Model with Subversion

Insert protective marking - see QSP 032

Editing version controlled packages

• By adding comments it makes it easier to understand what changes occurred by whom and when

• Allows traceability when viewing history

Page 41: Using the Corporate Geographic Data Model with Subversion

Viewing history

• You can view history of changes to a package either within EA or using TortoiseSVN

• To view history in EA, select package Right click Package Control File History

Page 42: Using the Corporate Geographic Data Model with Subversion

Viewing history

• You can view history of changes to a package either within EA or using TortoiseSVN

• To view history in EA, select package Right click Package Control File History

Page 43: Using the Corporate Geographic Data Model with Subversion

Viewing history

• Using TortoiseSVN, select xmi representing package Right-click TortoiseSVN Show log

Page 44: Using the Corporate Geographic Data Model with Subversion

Editing version controlled packages

• There may be times when you check out a package but make no edits or do not want the edits to be committed

• EA allows you to Undo Check Out

• Undo Check Out for the package you checked out earlier

Page 45: Using the Corporate Geographic Data Model with Subversion

Adding packages to Subversion

• We will need to continually add new model packages to Subversion • Restructure large models for easier management• May need to move packages around• Create new models

• Thankfully this is relatively easy and involves 3 steps:

1. Export package as XMI 1.1 and save to respective directory in your local SVN directory

2. Add the file to the central repository and commit

3. Delete exported package from model and Get Package from repository

Page 46: Using the Corporate Geographic Data Model with Subversion

Adding packages to Subversion

Step 1: Export Package as XMI 1.1 and save to SVN • Right-click on package Select Import/Export Export to

Package to XML…• Export as XMI 1.1

Page 47: Using the Corporate Geographic Data Model with Subversion

Adding packages to Subversion

Step 2: Add file to central repository and commit• Navigate to output directory in Window Explorer• Select exported XMI file Right-click TortoiseSVN Add

• Commit file to central SVN Repository

Page 48: Using the Corporate Geographic Data Model with Subversion

Adding packages to Subversion

Step 3: Replace original package with version controlled package• Delete the exported package from the Project Browser

NOTE: If the package is contained within another package may need to check-out parent package, if version controlled• Right-click on parent package Package Control Get

Package• Select the CGDM• Select the exported XMI

file from list• Check in parent package


Recommended