Resources

Quickstart with DevBox

Welcome to DAC for Predix!

This guide was written to help you get started with DAC, the fastest and most powerful way to created both prototypes and applications on Predix. Before starting the following step-by-step procedures, please make sure you are already a Predix.io registered user.

1. Downloading and Setting up the DAC DevBox

1.1 DAC DevBox for Predix

The DAC DevBox is a local development environment that allows users to visually drag & drop widgets and services to create their own IIoT app. You can download DAC DevBox and log in to its DesignTime and RunTime environment by using your Predix credentials.

DAC DevBox contains the following:

  1. DAC DesignTime (DT) — A local development environment where you can create, edit, test and deploy your applications to Predix.
  2. DAC RunTime (RT) — Cloud environment that can be executed both locally in the DevBox and/or in Predix.
  3. DAC Demo — A ready-to-navigate demo app that you can use as a reference to understand how DAC works. This demo application requires that you use a specific data model structure and that you ingest specific tags in your Time Series service. Please read the chapter "Decisyon Reference App" to configure the demo app appropriately.
OSDatabaseBackendIDE
Linux CentOS 7PostgreSQL 9.4 and psql utilitiesApache Tomcat 7
Java
Pyt
PgAdmin4
LibreOffice

1.2 Minimum Software & Hardware Requirements

The following table shows the minimum hardware and software requirements to run the DAC DevBox in your notebook/desktop.

Hardware (Minimum)Software
4 GB of RAMOracle VirtualBox 5.1
8 GB of disk spaceHashiCorp Vagrant (1.8.6 for Windows/Linux and 1.8.1 for Mac)

Important Note: The size of the DevBox package is 4GB. However, 8 GB of space is necessary to create the installation and the associated image.

1.3 Installing and Running DAC DevBox

Please follow these steps to install the DAC DevBox:

  1. Download and install Virtualbox.
  2. Download and install Vagrant.
  3. Create a new folder in your system called “DACDevbox”.
  4. Download DAC Vagrant file and save it to the DACDevbox folder.
  5. Open a terminal or command prompt, navigate to the DACDevbox folder and execute the command vagrant up.
  6. The DevBox starts downloading. Depending on your internet connection, after a few minutes, the virtual machine will be automatically launched and you will have your virtual machine up and running.
  7. Log in to the DevBox with the credentials:
    username: appcomposer
    password: appcomposer
  8. On the DevBox desktop you will find a “readme” file with the information and credentials about the DAC DevBox.

Important Note on downloading Vagrant on MAC or behind a proxy server:

If you are a Mac user or behind a proxy server, you might experience problems when Vagrant tries to download the “DevBox”. If you are unable to get the DAC DevBox using the “vagrant up” command, please use the following steps to download the box manually and add it to your Vagrant instance

  1. Click here to download the DevBox
  2. Move the “DACDevbox_v1.0.box” file into the DACDevbox folder.
  3. Open a command prompt or a terminal, move to the DACDevbox directory and run:
    vagrant box add DACDevbox_v1.0.box --name DACDevbox
  4. Now you should be able to run “vagrant up” again.

1.4 Updating the DAC DevBox

When a new version of the DAC DevBox is available, you will be automatically notified by a popup message.

If you click on “Ok” the update procedure will start automatically and you will see the following downloading info.

Otherwise, you can use the manual process:

  1. In the DAC DevBox, go to Applications -> System Tools -> Terminal
  2. Then change the directory by typing:cd /opt/DesignTime
  3. Run the following shell:./dac_devbox_remote_update.sh

1.5 Getting a New Version of DAC DevBox

If you need to get a completely new virtual machine, you need to take the following steps:

Note: When you destroy the virtual machine, you will lose all your data and applications built inside that VM.

  1. Open the command line or terminal and go to the folder C:\DACDevbox.
  2. Execute command vagrant destroy
  3. Execute command vagrant box remove [your specific DevBox name]
  4. Run the command vagrant box list to ensure you will no longer have “DACDevbox”.
  5. Delete the old vagrant file (or overwrite it with a new one see section 1.3)
  6. Execute command vagrant up

2. DAC Login & Predix Space Connection

2.1 Log in to DAC Using Your Predix Credentials

  1. You can start the virtual machine by clicking on the VM icon, or manually by opening a command/terminal, then moving to the DACDevbox folder and executing the command vagrant up
  2. After a few seconds, your VM starts and the following prompt displays:
  3. Use “appcomposer” as your password.
  4. Double click on the “Decisyon App Composer” icon on the desktop to open the DAC DesignTime window:
  5. Configure your initial connection using your Predix credentials.

2.2 Create a New Connection Login

To log in to DAC, you need to insert a number of parameters, such as username, password, endpoint, organization, space, etc. You can insert all the required information in the DAC login screen and then you can save the connection parameters, so that you do not have to insert them again in the following working sessions. The list of saved connections is available on the left of the login screen.

 

  1. Click on the “Add New” button at bottom left corner of the Decisyon Connection dialog box.
  2. Insert the “name” for the connection.
  3. Enter the Predix URL endpoint. To select the appropriate URL, please refer to this article on Predix.io.
  4. Enter your Predix username and password and click on “Next”.
  5. Select one of the organizations listed in the menu. The list is retrieved from Predix, based on your account authorization.
  6. Select one of the spaces that belong to the selected organization.
  7. Select “Local” in the “Metadata DB” section. You can select “Remote” only if you want to use the metadata stored in a different virtual machine for working on the same app with other developers simultaneously. Please refer to the DAC-DT Manual for further information.
  8. Click on the “Save” button and then click on the “Connect” button.

If you want to edit an existing connection, you can first select the connection and then click the “Edit” button.

You can also log in using the “Quick Connection”: in this case, the parameters you enter are not saved and you are not allowed to use a remote metadata source.