Installation
Deployment Planning
There are a few things to consider before installing DreamFactory Enterprise™ (DFE). The rest of this section will explain these considerations.
Servers
DFE is a distributed system. Each component can operate and scale independently of each other. Conversely, the entire system can be contained on a single server. Therefore, the best server layout fully depends on your usage and needs. If you're just testing out DFE and not ready to deploy a production system, installing everything on a single server is the way to go (as it's mostly automated).
The servers required are:
- Application: Responsible for hosting/running the DFE Console, Dashboard, and/or the Reporting system.
- Database: Responsible for the databases of hosted instances
- Web: Responsible for (web) hosting the deployed instances
DNS
DFE operates each instance via [virtual hosting](https://en.wikipedia.org/wiki/Virtual_hosting) on one or more web servers. As such, you must determine the fully qualified domain name of your DFE installation before installing. **The system cannot be used fully until the DNS is in place**. Generally, clients will create a new subdomain within their DNS domain. This is the recommended practice. Using a new domain will eliminate any issues with DNS cross-contamination if troubleshooting an issue.
There are three records that need to be created for the DFE installation. These are:
- console.sub.domain.com (A/CNAME)
- dashboard.sub.domain.com (A/CNAME)
- *.sub.domain.com (A/CNAME)
The first two are straightforward. These point to the DFE Console and Dashboard. These can be either `A` or `CNAME` records. The final record is the [wildcard](https://en.wikipedia.org/wiki/Wildcard_DNS_record) entry. This allows all instances deployed on a server to share a single, common document root. For more information on how to set up your DNS with a wildcard record, please consult your DNS provider's documentation. Each provider has a different method for creating these records.
Please note that you cannot add a wildcard DNS entry to your local `/etc/hosts` file. It does not work.
Installer Utility
To help with installation, a utility may be downloaded and run. This utility gathers the necessary information that then feeds into the main installation system, which is written using [Puppet](https://en.wikipedia.org/wiki/Puppet_(software)). Here's how to install the utility:
1. Clone the utility's GitHub repository 2. Update composer dependencies 3. Start the installation utility 4. Open your browser and enter the configuration settings
Example:
ubuntu@server:/opt/dreamfactory/dfe $ git clone https://github.com/dreamfactorysoftware/dfe-installer.git
ubuntu@server:/opt/dreamfactory/dfe $ cd dfe-installer
ubuntu@server:/opt/dreamfactory/dfe/dfe-installer $ composer update
ubuntu@server:/opt/dreamfactory/dfe/dfe-installer $ php -S 0.0.0.0:8000 -t public/
Port `8000` is used in the above example. You may use any port you prefer. However, you must ensure that whichever port you choose (including 8000!) is open to your browser from wherever the server is hosted. This is a temporary usage, so there will be no need for permanent port changes.
This utility has all the installation options available. Once completed, the entries are written to a file called `.env-install` in the root of the repository. This file is then read by the `install.sh` script also in the root directory. This script does all the heavy lifting.
Installation
Once you've run the utility and created the installation environment file, you're read to run the actual installation script. To do this, from the root of the installation directory, run the following:
ubuntu@server:/opt/dreamfactory/dfe/installer $ sudo ./install.sh
It may take up to 10 minutes depending on your network connection and server capacity.