-
Notifications
You must be signed in to change notification settings - Fork 45
Developing Scale
After cloning the Scale repo locally run one of the operating system specific setup scripts found in /scale/environment
for your platform.
Scale development requires a local Postgres database with PostGIS extensions installed. The easiest way to get started on most platforms is with a Docker container and all the bootstrap configurations described, except Cloud9, use this method. The following are the baseline prerequisites for Scale development:
- Running Docker Community Edition 1.11+ Engine (use Docker for Windows or Mac on those platforms)
- Python 2.7.x The core Scale team uses JetBrains PyCharm or Cloud9 IDE for development. These are in no way required but are our preferred choices.
Cloud9 and Codeanywhere come with built in support for Postgres / PostGIS databases, making development of Scale both portable and quick to start using a hosted cloud environment. Cloud9 requires an AWS account, while Codeanywhere can be used without providing any payment information. Both providers offer a hosted workspace option that are built with Ubuntu containers and our init script will get you up and running quickly. Once your workspace has initialized, open the terminal and enter the following commands to initialize for development:
# Change to Python code directory
cd scale
# Initialize database and install Scale Python packages.
sudo sh environment/cloud-init.sh
Virtual environments have not been used for cloud IDE providers as workspaces are already sandboxed eliminating the need to isolate dependencies per project.
Platform specific prerequisites:
- Root access on CentOS7 / RHEL7 Linux OS From a fresh clone of Scale run the following commands to initialize your environment:
# Change to Python code directory
cd scale
# Initialize database and install native dependencies.
sudo sh environment/cent7-init.sh
# Activate virtualenv
source environment/scale/bin/activate
Going forward, anytime you need to develop Scale, just activate your virtualenv and you're ready:
# Activate virtualenv
source environment/scale/bin/activate
Platform specific prerequisites:
- Homebrew
- Docker for Mac 1.17 installed and running From a fresh clone of Scale run the following commands to initialize your environment:
# Change to Python code directory
cd scale
# Initialize database and install native dependencies.
sh environment/mac-init.sh
# Activate virtualenv
source environment/scale/bin/activate
Going forward, anytime you need to develop Scale, just activate your virtualenv and you're ready:
# Activate virtualenv
source environment/scale/bin/activate
Platform specific prerequisites:
- Python 2.7 installed and included in PATH
- Virtualenv installed and included in PATH (Usually installed to
C:\Python27\Scripts\virtualenv.exe
) - OSGeo4W install of GDAL, GEOS and PROJ included in PATH (https://docs.djangoproject.com/en/1.11/ref/contrib/gis/install/#modify-windows-environment)
- Docker for Windows 1.17 installed and included in PATH From a fresh clone of Scale run the following commands to initialize your environment:
REM Change to Python code directory
cd scale
REM Initialize database and configure Scale to point to it.
environment\win-init.bat
REM Activate virtualenv
environment\scale\Scripts\activate.bat
Going forward, anytime you need to develop Scale, just activate your virtualenv and you're ready:
REM Activate virtualenv
environment\scale\Scripts\activate.bat
- Home
- What's New
-
In-depth Topics
- Enable Scale to run CUDA GPU optimized algorithms
- Enable Scale to store secrets securely
- Test Scale's scan capability on the fly
- Test Scale's workspace broker capability on the fly
- Scale Performance Metrics
- Private docker repository configuration
- Setting up Automated Snapshots for Elasticsearch
- Setting up Cluster Monitoring
- Developer Notes