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:
- DAC DesignTime (DT) — A local development environment where you can create, edit, test and deploy your applications to Predix.
- DAC RunTime (RT) — Cloud environment that can be executed both locally in the DevBox and/or in Predix.
- 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.
|Linux CentOS 7||PostgreSQL 9.4 and psql utilities||Apache Tomcat 7|
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.
|4 GB of RAM||Oracle VirtualBox 5.1|
|8 GB of disk space||HashiCorp 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:
- Download and install Virtualbox.
- Download and install Vagrant.
- Create a new folder in your system called “DACDevbox”.
- Download DAC Vagrant file and save it to the DACDevbox folder.
- Open a terminal or command prompt, navigate to the DACDevbox folder and execute the command
- 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.
- Log in to the DevBox with the credentials:
- 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
- Click here to download the DevBox
- Move the “DACDevbox_v1.0.box” file into the DACDevbox folder.
- Open a command prompt or a terminal, move to the DACDevbox directory and run:
- 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:
- In the DAC DevBox, go to Applications -> System Tools -> Terminal
- Then change the directory by typing:
- Run the following shell:
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.
- Open the command line or terminal and go to the folder C:\DACDevbox.
- Execute command
- Execute command
vagrant box remove [your specific DevBox name]
- Run the command
vagrant box listto ensure you will no longer have “DACDevbox”.
- Delete the old vagrant file (or overwrite it with a new one see section 1.3)
- Execute command
2. DAC Login & Predix Space Connection
2.1 Log in to DAC Using Your Predix Credentials
- 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
- After a few seconds, your VM starts and the following prompt displays:
- Use “appcomposer” as your password.
- Double click on the “Decisyon App Composer” icon on the desktop to open the DAC DesignTime window:
- 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.
- Click on the “Add New” button at bottom left corner of the Decisyon Connection dialog box.
- Insert the “name” for the connection.
- Enter the Predix URL endpoint. To select the appropriate URL, please refer to this article on Predix.io.
- Enter your Predix username and password and click on “Next”.
- Select one of the organizations listed in the menu. The list is retrieved from Predix, based on your account authorization.
- Select one of the spaces that belong to the selected organization.
- 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.
- 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.