[amd] novel use of perforce for software auto-updates and file transfer

Post on 21-May-2015

430 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Learn about an end-to-end solution that takes a pre-submitted code change and pumps it through an accelerated build system.

TRANSCRIPT

1  

Novel Use of Perforce for Software Auto-updates and File Transfer

Xavier Galvez Senior Engineer

2  

DEV  

DEV’S  COMPUTER  

3  

DEV  

DEV’S  COMPUTER  

4  

DEV  

DEV’S  COMPUTER  

BUILD  FARM  

5  

DEV  

DEV’S  COMPUTER  

BUILD  FARM  

6  

Pre-submit Developer Build (PSDB)

1)  Takes a code change before check-in

7  

Pre-submit Developer Build (PSDB)

1)  Takes a code change before check-in 2)  Overlays changes on the last-known-good

8  

Pre-submit Developer Build (PSDB)

1)  Takes a code change before check-in 2)  Overlays changes on the last-known-good 3)  Performs the build

9  

Pre-submit Developer Build (PSDB)

1)  Takes a code change before check-in 2)  Overlays changes on the last-known-good 3)  Performs the build 4)  Runs tests and generates a report

10  

DEV  

DEV’S  COMPUTER  

BUILD  FARM  

PSDB  

11  

DEV  

DEV’S  COMPUTER  

BUILD  FARM  

PSDB  

12  

DEV  

DEV’S  COMPUTER  

BUILD  FARM  

PSDB  

13  

DEV  

DEV’S  COMPUTER  

BUILD  FARM  

PSDB  

ACC  BUILD  FARM  

14  

DEV  

DEV’S  COMPUTER  

BUILD  FARM  

PSDB  

ACC  BUILD  FARM  AUTOMATED  TESTS  

15  

DEV  

DEV’S  COMPUTER  

BUILD  FARM  

PSDB  

ACC  BUILD  FARM  AUTOMATED  TESTS  

16  

DEV  

DEV’S  COMPUTER  

BUILD  FARM  

PSDB  

ACC  BUILD  FARM  AUTOMATED  TESTS  

17  

DEV’S  COMPUTER  

PSDB  

18  

First Attempt: Two Codebases

§  Perforce vs. SVN

19  

First Attempt: Two Codebases

§  Perforce vs. SVN §  Windows® file share

20  

First Attempt: Two Codebases

§  Perforce vs. SVN §  Windows® file share §  Windows: Robocopy

21  

First Attempt: Two Codebases

§  Perforce vs. SVN §  Windows® file share §  Windows: Robocopy §  Linux: rsync + headaches

22  

First Attempt: Two Codebases

§  Perforce vs. SVN §  Windows® file share §  Windows: Robocopy §  Linux: rsync + headaches §  No FTP or SCP

23  

Keep It Super Simple

24  

Keep It Super Simple

§  Quick, easy installation

25  

Keep It Super Simple

§  Quick, easy installation §  Minimize number of actions

26  

Keep It Super Simple

§  Quick, easy installation §  Minimize number of actions §  Clean visual validation

27  

Keep It Super Simple

§  Quick, easy installation §  Minimize number of actions §  Clean visual validation §  Verbose yet readable log

28  

Keep It Super Simple

§  Quick, easy installation §  Minimize number of actions §  Clean visual validation §  Verbose yet readable log §  Single codebase

29  

Using P4 for File Transfers

30  

Uploading Files

1)  Create new workspace on pre-submit depot

31  

“Allwrite” is All Right

32  

Uploading Files

1)  Create new workspace on pre-submit depot 2)  Create pending changelist and populate

33  

Uploading Files

1)  Create new workspace on pre-submit depot 2)  Create pending changelist and populate 3)  Submit pending changelist and trigger PSDB

34  

Benefits

§  Single codebase

35  

Benefits

§  Single codebase §  Write-once/run-on-all OSes

36  

Benefits

§  Single codebase §  Write-once/run-on-all OSes §  No need for separate database

37  

Benefits

§  Single codebase §  Write-once/run-on-all OSes §  No need for separate database §  Leverages an existing framework

38  

Benefits

§  Single codebase §  Write-once/run-on-all OSes §  No need for separate database §  Leverages an existing framework §  Eliminate race conditions

39  

Shortcomings

§  No un-numbered default pending changelists

40  

Shortcomings

§  No un-numbered default pending changelists §  Pre-submit depot fills quickly

41  

Shortcomings

§  No un-numbered default pending changelists §  Pre-submit depot fills quickly §  No pre-submit for virtual integrations

42  

Shortcomings

§  No un-numbered default pending changelists §  Pre-submit depot fills quickly §  No pre-submit for virtual integrations §  Perforce is overkill for file server

43  

Shortcomings

§  No un-numbered default pending changelists §  Pre-submit depot fills quickly §  No pre-submit for virtual integrations §  Perforce is overkill for file server §  Local client is needed

44  

Using P4 for Software Auto-updates

45  

Why Auto-update?

§  Users get the newest features and fixes

46  

Why Auto-update?

§  Users get the newest features and fixes §  Deployment is overhead

§  Packaging, announcing, enforcing

47  

Why Auto-update?

§  Users get the newest features and fixes §  Deployment is overhead

§  Packaging, announcing, enforcing

§  Not all solutions are like web apps

48  

Why Auto-update?

§  Users get the newest features and fixes §  Deployment is overhead

§  Packaging, announcing, enforcing

§  Not all solutions are like web apps §  Provide seamless experience for the user

49  

Components Needed For Auto-update

50  

Components Needed For Auto-update

1)  Centralized version-control system

51  

Components Needed For Auto-update

1)  Centralized version-control system 2)  The “caller”

52  

Components Needed For Auto-update

1)  Centralized version-control system 2)  The “caller” 3)  The “client”

53  

DEV  DEV’S  

COMPUTER  

caller  

client  v1  

54  

DEV  DEV’S  

COMPUTER  

caller  

client  v1   client  v1  

55  

DEV  DEV’S  

COMPUTER  

caller  

client  v1   client  v1  

56  

DEV  DEV’S  

COMPUTER  

client  v2  

AUTHOR  

caller  

client  v1  

57  

DEV  DEV’S  

COMPUTER  

client  v2  

caller  

client  v1  

58  

DEV  DEV’S  

COMPUTER  

client  v2  

caller  

client  v2  

59  

Benefits

§  Leverages an existing Perforce set-up

60  

Benefits

§  Leverages an existing Perforce set-up §  Latest “client” is always used

61  

Benefits

§  Leverages an existing Perforce set-up §  Latest “client” is always used §  Tracking

62  

Benefits

§  Leverages an existing Perforce set-up §  Latest “client” is always used §  Tracking §  Improved quality of service

63  

Shortcomings

§  Full package is not updated

64  

Shortcomings

§  Full package is not updated §  Perforce calls are done via shell

65  

Putting It All Together

66  

Windows Installer

67  

Adding to P4V

68  

Right-click on Pending Changelist

69  

Right-click on Pending Changelist

70  

Listing Modified Files

71  

Listing Modified Files

72  

Visual Validation

73  

In Conclusion Novel Use of Perforce for Software Auto-updates and File Transfer in a Multi-OS Environment

74  

Questions?

75  

Thank you! xavier.galvez@amd.com

top related