Skip to content

Build and Deploy Automation

Hans Permana edited this page Mar 15, 2017 · 9 revisions

Background

There are two components in DeDop software: back-end/cli and front-end. The back-end component can be used by itself. It comprises mostly Python codebase and can be found in dedop-core. The frontend component, however, has a dependency on the back-end component. It is basically a frontend desktop application that uses Electron with multiple web technologies behind it. The codes are written in Typescript.

Automation

The target operating system for DeDop Software Windows, OSX, and Linux. Due to this multi-platform nature of the software, we want to ensure that build and deployment automation is in place. For this, we have utilised Travis CI and Appveyor for the builds. Deployment is done after each build (for the back-end element) to Anaconda Cloud.

Current Automation Status (02.03.2017)

  • back-end build Linux Build Status
  • back-end build OSX Build Status
  • back-end build Windows Build status
  • back-end conda upload Linux Anaconda-Server Badge
  • back-end conda upload OSX Anaconda-Server Badge
  • back-end conda upload Windows Anaconda-Server Badge
  • back-end installer upload Linux (FTP)
  • back-end installer upload OSX (FTP)
  • back-end installer upload Windows (FTP)
  • front-end installer build Linux Build Status
  • front-end installer build OSX Build Status
  • front-end installer build Windows Build status
  • front-end installer upload Linux (FTP)
  • front-end installer upload OSX (FTP)
  • front-end installer upload Windows (FTP)

Front-end installation workflow

There are two options:

Electron installer with bundled back-end

The back-end component is bundled into the front-end installer. The installation workflow is as follows:

  1. One click electron install
  2. Internally it will check if there is an existing DeDop back-end
    • if not, install back-end
  3. Start back-end component
  4. Start front-end

Advantages

  • there is only one installer - offline installation is possible
  • no need to download the extra component - faster installation

Disadvantages

  • installer is really fat (ca. 1GB) - takes longer to build and to download the installer, may also be a space issue in the Anaconda cloud
  • back-end component installation has to run under the same privilege as the front-end installation

Electron installer by itself

The back-end component is available as a separate component, so front-end installer will have purely front-end components.

  1. One click electron install
  2. Internally it will check if there is an existing DeDop back-end
    • if not, download back-end installer
    • after download is finished, install back-end
    • if not successful (eg. due to permission issue), then exit front-end installation
  3. Start back-end component
  4. Start front-end

Advantages

  • front-end installer is purely for front-end component - smaller in size

Disadvantages

  • first time installation will need to download the back-end installer

Front-end and back-end coordination

Front-end component needs to know which back-end component has been installed, to ensure it has the right version of back-end. This is done by creating a directory structure under .dedop directory with the version information and the path to the back-end executable. The directory is structured as follows:

~/.dedop
   |- workspaces
      |- default
   |- config.py
   |- dedop-prefs.json
   |- 0.5
      |- dedop.info
   |- 0.6
      |- dedop.info

In dedop-prefs.json file, which back-end version to be used can be configured. Inside the dedop.info file, the path to the dedop-webapi of the corresponding version is stated.