- 1 Deployment Planning
- 2 Installation
- 3 Installation for RHEL/Centos 7.x
- 4 Installation for Ubuntu 14.04/16.04
- 5 Installer Kickoff
- 6 Post-Installation Steps
There are a few things to consider before installing DreamFactory Gold (DFG). The rest of this section will explain these considerations.
It goes without saying that if you are simply evaluating DFG, on a single instance, server and DNS planning are unnecessary. Skip ahead to the Installer Utility section.
DreamFactory Gold may now be installed on both Debian (Ubuntu 14.04/16.04) and RHEL/Centos (7.x). This installer has also been tested on Oracle Linux 7.2. The installer will automatically select the appropriate packages based on your distribution.
The installer utility installs DreamFactory Gold as an all-in-one package. A 64 bit Ubuntu or RHEL/Centos machine is required with a minimum of 8GB of RAM. For production environments, we recommend at least 16GB of RAM and at least 4 cores.
DFG 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 DFG 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 DFG Console, Dashboard, and/or the Reporting system.
- Database: Responsible for the databases of hosted instances
- Web: Responsible for (web) hosting the deployed instances
DFG operates each instance via virtual hosting on one or more web servers. As such, you must determine the fully qualified domain name of your DFG 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 DFG 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 DFG Console and Dashboard. These can be either
CNAME records. The final record is the wildcard 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.
One of the features of the installation system is that several entries will be added to the installation system's
/etc/hosts file. Here is an /etc/hosts file after the installer has completed:
127.0.0.1 localhost ip-10-10-2-40 console console.local dashboard dashboard.local console.zone.domain.com dashboard.zone.domain.com zone.domain.com ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
You'll notice after the
localhost entry, there are seven additional entries which reference the new DFG installation.
domain are gathered via the installation utility and are used here for exemplary purposes.
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. PHP is required to run this utility. To use this utility you must first install the required packages, which differs depending on your operating system.
Before installation, we recommend having as minimal distribution as possible. The installer will set up a full stack environment on your server and having a clean, minimal distribution will reduce the chance of any potential conflicts with existing packages during the install.
Installation for RHEL/Centos 7.x
$ sudo yum update -y
Install PHP7, Git, Puppet, composer, vim
Add Webtatic Repos RHEL/Centos versions 7.x
$ sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm $ sudo rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
Now install minimal packages:
$ sudo yum install php70w php70w-fpm git puppet composer -y
Disable Require TTY
Open the sudoers file and change the line:
$ sudo visudo Defaults requiretty
Put a "!" in front of requiretty so it reads
Save the file and quit.
We recommend disabling selinux permanently. This will require a reboot of the server.
$ sudo vim /etc/selinux/config
Change to selinux=disabled. Save, quit and then reboot the server.
$ sudo reboot now
After the reboot, ensure that selinux is disabled:
$ sudo getenforce Disabled
Installation for Ubuntu 14.04/16.04
Add PPA Apt Repository for PHP7
Do this for both Ubuntu 14 and 16 as well, as the installer is based on these packages.
$ sudo add-apt-repository ppa:ondrej/php $ sudo apt-get update
Install PHP, Puppet, Git
$ sudo apt-get install php7.0 puppet git -y
Here's how to install the utility at a high level. The following instructions apply to both Ubuntu and RHEL/Centos distributions:
1. Update the system packages and install pre-requisites (see above)
2. Clone the utility's GitHub repository
3. Start the installation utility
4. Open your browser and enter the configuration settings
At this point, fire up your browser and enter the public IP address of the installation system as follows:
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.
Here's what you should see in your browser:
This utility has all the installation options available. Once completed, the entries are written to a file called
.env-install in the
storage directory the installation root. This file is then read by the
./install.sh script. This script does all the heavy lifting and completes the installation.
Once you've run the utility and created the installation environment file, you're ready to run the installation script.
To do this, from the root of the installation directory, run the following:
[email protected]:~/dfe-installer$ sudo ./install.sh
It may take up to 10 to 30 minutes to fully complete. This depends on your network connection and the server's specifications.
If you have already configured your DNS to point to the new installation, then you can skip this part entirely.
If you're setting up DFE on a single system, or with test/faux DNS entries, you *must* add these entries to your own (client machine from which you are accessing DFG)
First, you must locate the public, or accessible, IP address of the system upon which DFE is installed. Once you have that, simply add a line to the end of your
public.ip.address.here console.zone.domain.com dashboard.zone.domain.com zone.domain.com test1.zone.domain.com test2.zone.domain.com
Replacing **zone**, **domain** with the zone and domain used when installing the system. The final two entries are to map instances you create to your faux DNS. They allow you to create two instances (test1 and test2). You can change the name to whatever you prefer or add more entries. It's up to you.
Here's an actual example:
184.108.40.206 console.dfe.3wipes.com dashboard.dfe.3wipes.com dfe.3wipes.com leela.dfe.3wipes.com bender.dfe.3wipes.com fry.dfe.3wipes.com
The order of the hosts in the list is not important. However, the fact that they are separated by spaces, is.