Skip to content

Intro to P6 Sync

P6 Sync (p6sync) is a small utility that is designed for the Platform 6 developers. It can extract configuration (Scripts, Routes, Data Models, etc.) from a P6 instance and represent them as file(s) on a developer’s desktop filesystem. Furthermore, a developer can make changes to this configuration in their file system and ‘push’ the changes back to a P6 instance.

Once the configuration of a P6 instance is represented as files in a file system, it can be version controlled like any other development source.

The latest release of P6 Sync can be downloaded from here:

Warning

SSO authentication is not available for this application. Your are required to define a password by editing your profile here before being able to login.

P6 Sync icon

The ‘6’ icon in the notification area of your Task bar (on Windows) or in your Menu bar (on Mac) provides quick access links

  • “Login…” leads to a login page where you shall initially enter your platform6 credentials
  • “Show status” leads to a page displaying four areas:

    1. Status - provides statuses regarding Internet connectivity and login
    2. Login - leads you to the login page (it is greyed when already logged in)
    3. Log Files - allows you to display P6 Sync log and error logs
    4. Quit - well… speaks for itself!
  • “Open P6 Portal…” leads you to the Portal

  • “Quit P6 Sync”

The browser interface

The browser interface is started automatically after first installation. Once a developer has logged in (to access their P6 instances), it is no longer required that P6 Sync should continue running in this mode. Feel free to quit the browser UI once login is complete.

Folder usage

During execution, P6 Sync automatically creates a folder structure on your computer, with a parent folder named “platform6”

On Windows, the “platform6” folder is created on C: in the root (“/”) folder

On OS X, the “platform6” folder is under your user folder (so the path is “/Users/[Your OS X user]/platform6”)

User Permissions

A developer user must have permission sync=read to perform ‘pull’ operations and requires sync=edit permissions to ‘push’

Using the Command Line Interface (CLI)

Once you have logged in, the CLI can be used to control how files are ‘pulled’ and pushed’ from/to your P6 instances.

You can configure the command lines as ‘external commands’ in your favourite IDE and trigger the file synchronisation via IDE keyboard shortcuts.

To enable CLI access the p6sync install folder must be on your PATH.

Warning

On MacOS you have to manually add the following you your .bashrc/.profile file:

export PATH="/Applications/P6 Sync.app/Contents/MacOS:$PATH"

On Windows the user who installs P6 Sync will automatically have p6sync added to their PATH. Other users of Windows must extend their on PATH as follows

PATH="C:\Program Files (x86)\Amalto\p6sync;%PATH%"

Once on the PATH you can invoke the CLI to get help:

$ p6sync -help

Usage of p6sync:

   -app string
         Restrict all operations to a single p6 application         
   -approot string
         Only valid when used together with -app and -instance.  A fixed folder location for a single instance app
   -console
         Enable console logging
   -debug
         Enable debug level logging
   -headless
         Running without a desktop UI
   -history
         Legacy history tool usage -> export all then exit
   -home string
         Location of root folder (default "/Users/simont/platform6/projects")
   -ignoretlserrors
         Ignore TLS/SSL related errors
   -instance value
         [Optional and can repeat] Instance names to target
   -logsyncerrors
         Log sync related errors to file
   -mode string
         Application mode (default "dev")
   -nowarn
         Do not display warning confirmation messages
   -p6noproxy
         Bypass the Platform6 Proxy
   -p6proxyoverride string
         Platform6 Proxy override
   -port string
         Web server localhost listen port, 0 = auto assigned (default "0")
   -pull string
         Pull operation behaviour ( new | update )
   -push string
         Push operation behaviour ( validate | update | force )
   -version
         Print version information

Configuring defaults

The browser UI provides access to a ‘configuration’ screen where a developer can configure a number of defaults to save having to re-type them each time on the command line.