DivvyCloud Legacy Installation

This documentation focuses on prior installations of DivvyCloud that do not employ Docker for deployment. If you are installing an older version of DivvyCloud, please feel free to reach out to us at support@divvycloud.com to help you upgrade.

Provision Resources

See Server and Network Recommendations to provision the recommended resources for DivvyCloud’s front end and back end services.

Configure MySQL

Configure MySQL with the required databases and access persmissions by using the code snippet below. Note that you will need to replace <DivvyCloud.ip.range.here> with the IP address block which will be assigned to your DivvyCloud nodes.

CREATE DATABASE divvy;
CREATE DATABASE divvykeys;
GRANT ALL PRIVILEGES on divvy.* to 'divvy'@'<DivvyCloud.ip.range.here>' IDENTIFIED BY 'divvy';
GRANT ALL PRIVILEGES on divvykeys.* to 'divvy'@'<DivvyCloud.ip.range.here>' IDENTIFIED BY 'divvy';
GRANT RELOAD ON *.* TO 'divvy'@'<DivvyCloud.ip.range.here>' IDENTIFIED BY 'divvy';
FLUSH PRIVILEGES;

Install System Prerequisites

On each instance, you need to install the relevant system prerequisites.

For Ubuntu Distributions

sudo apt-get update
sudo apt-get upgrade -yq
sudo apt-get -y install libssl-dev libxml2-dev libxslt1-dev python-dev gcc libldap2-dev libsasl2-dev libssl-dev libffi-dev libyaml-dev lib32z1-dev zlib1g-dev libmysqlclient-dev libmysqlclient-dev git make

For CentOS Distributions

sudo yum -y install openssl-devel python-devel gcc libxml2-devel libxslt-devel libffi-devel openldap-devel libyaml-devel libmysqlclient-devel git

Configure Python on DivvyCloud Nodes

To ensure you are running Python 2.7.12, we leverage pyenv to avoid interfering with the version of Python that ships with your OS distribution.

The snippet below downloads the git executable, clones the pyenv repository, and sets up a dedicated virtual environment. We recommend doing this as a dedicated user such as divvy.

git clone https://github.com/yyuu/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
exec $SHELL
source ~/.bash_profile
pyenv install 2.7.12
pyenv local 2.7.12

Once you’ve completed the installation, if you type python your prompt should look similar to the output below:

[divvy@ip-172-31-3-245 ~]$ python
Python 2.7.12 (default, May  8 2017, 14:29:12)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Download & Run DivvyCloud Packages

Now you are ready to download and install DivvyCloud. Again, we recommend doing this as the dedicated user such as divvy and we recommend using /home/divvy/divvycloud as your installation directory. Run the commands below on each node from the installation directory.

pip install virtualenv
virtualenv divvycloud
cd divvycloud ; source bin/activate
export INSTALL_URL='http://packages.divvycloud.com/packages'
easy_install --upgrade -f ${INSTALL_URL} divvycloud divvycloudprocessmanager

Configuration File

By default, a configuration file is written to disk which assumes that all backend processes run on localhost. You can update these values by running the following command from the installation directory:

source bin/activate
divvyadmin configure

You can validate your configuration by running the following from the installation directory:

source bin/activate
divvyadmin validate_config

Run Backend Migration Scripts

The commands below need to be run only one time on a single system from the installation directory. They will run the necessary migration scripts.

source bin/activate
divvyadmin upgrade_database

Register License

On a single node, you need to register a new license. Registering will grant you a 30-day license. Please contact us at info@divvycloud.com to extend it.

divvyadmin register --company_name "Company Name Here" --contact_email "contactemail@acmecorp.com" --contact_name "Contact Name"

Start The Suite

You should now be ready to go. You can start the suite up by running the following command from the installation directory:

source bin/activate
divvycloud --start

Scaling Up

Should you need to scale the suite, you can add instances and then assign specific processes to those instances by modifying your config/divvy.json file. If look under the section divvycloudprocessmanager, there is a key/value pair named system_type. Update the values accordingly on each instance. Valid values are:

fullsuite => Run all processes
web => Run only the interface (web) server
worker => Run only the worker/harvest processes
scheduler => Run only the job scheduler

Legacy Upgrade Instructions

Each of these commands requires the virtual environment to be activated. Do so by running this command and then stop DivvyCloud.

cd </home/divvy/divvycloud> ; source bin/activate
./stop.sh

For simplicity, export the package server url.

export INSTALL_URL='http://packages.divvycloud.com/packages'

For the latest version run this command:

easy_install --upgrade -f ${INSTALL_URL} divvycloud divvycloudprocessmanager

If you need to identify a specific version of DivvyCloud to which you are upgrading. You can do that by browsing our repository at http://packages.divvycloud.com/simple/divvycloud to see the egg files for DivvyCloud with the most recent release at the bottom.

export DIVVY_VERSION='<major.minor.point | e.g., 17.03.33>'
easy_install --upgrade -f ${INSTALL_URL} divvycloud==${DIVVY_VERSION} divvycloudprocessmanager==${DIVVY_VERSION}

Using the ‘divvyadmin’ command, run the migration processes.

divvyadmin upgrade_database

Restart DivvyCloud

./start.sh