Develop Peek Platform¶
Warning
This document extends, Setup OS Requirements Windows or the Setup OS Requirements Linux depending on your OS.
Most development will be for the plugins, not platform, so these instructions are not high priority.
Synerty recommends the Atlassian suite of developer tools.
Bitbucket to manage and share your Git repositories
URL: | https://www.bitbucket.org |
---|
SourceTree to visually manage and interact with your Git repositories
URL: | https://www.sourcetreeapp.com |
---|
Bitbucket can be integrated with Jira (issue management) and Bamboo (continuous integration).
Note
The reader needs be familiar with, or will become familar with the following:
- GIT
- Python3.5+
- Python Twisted
- HTML
- CSS
- Bootstrap3
- TypeScript
- Angular (Angular2+, not AngularJS aka Angular1)
- NativeScript
Note
This a cross platform development guide, all commands are writen for bash.
Bash is installed by default on Linux.
Windows users should use bash from msys, which comes with git for windows, Setup Msys Git.
Development Setup Objective¶
This guide lists the synerty-peek repositories that can be cloned and how to clone. The document contains instructions for obtaining the dependencies, building the front end packages and Building synerty-peek for development or production.
There is assumed understanding of git, forking and committing.
Hardware Recommendation¶
- 32gb of ram (minimum 16gb)
Software Installation and Configuration¶
On a Windows machine the follow commands will be run using the bash shell, see Setup Msys Git.
synerty-peek Repositories¶
Synerty’s Repositories: | |
---|---|
https://bitbucket.org/account/user/synerty/projects/PEEK |
- synerty-peek
- peek-plugin-base
- peek-agent
- peek-client
- peek-mobile
- peek-platform
- peek-server
- peek-admin
- peek-worker
Clone Peek Repositories¶
Checkout repositories all in the same folder
https://bitbucket.org/synerty/synerty-peek.git
Use this script to insert individual peek modules. Update {gitAccount} and {repository} in the script below:
REPO="{repository}"
if [ ! -d ~peek/dev-peek ]; then
mkdir ~peek/dev-peek
cd ~peek/dev-peek/
git clone https://bitbucket.org/synerty/$REPO.git
cd ~peek/peek-mobile/$REPO
git config --unset core.symlink
git config --add core.symlink true
else
echo "ALERT: `pwd` directory already exists. Please investigate then retry."
fi
cd ~peek/dev-peek/
ls -l
Use this script to clone all repositories. Update {gitAccount} in the script below:
REPOS="synerty-peek"
REPOS="$REPOS peek-plugin-base"
REPOS="$REPOS peek-agent"
REPOS="$REPOS peek-client"
REPOS="$REPOS peek-mobile"
REPOS="$REPOS peek-platform"
REPOS="$REPOS peek-server"
REPOS="$REPOS peek-admin"
REPOS="$REPOS peek-worker"
if [ ! -d ~peek/dev-peek ]; then
mkdir ~peek/dev-peek
cd ~peek/dev-peek/
for REPO in ${REPOS[*]}
do
echo $REPO
git clone https://bitbucket.org/synerty/$REPO.git
cd ~peek/dev-peek/$REPO
git config --unset core.symlink
git config --add core.symlink true
cd ~peek/dev-peek/
done
else
cd ~peek/dev-peek/
echo "ALERT: `pwd` directory already exists. Please investigate then retry."
fi
ls -l
Note
core.symlink: If false, symbolic links are checked out as small plain files that contain the link text. The default is true, except git-clone or git-init will probe and set core.symlinks false if appropriate when the repository is created.
Install Front End Modules¶
Remove the old npm modules files and re-install for both client and server front and packages. Run the following commands:
cd ~peek/dev-peek/peek-mobile/peek_mobile/build-web
[ -d node_modules ] && rm -rf node_modules
npm install
cd ~peek/dev-peek/peek-mobile/peek_mobile/build-ns
[ -d node_modules ] && rm -rf node_modules
npm install
cd ~peek/dev-peek/peek-admin/peek_admin/build-web
[ -d node_modules ] && rm -rf node_modules
npm install
Install synerty-peek Dependencies¶
These steps link the projects under site-packages and installs their dependencies.
For synerty-peek, run the following commands:
cd ~peek/dev-peek/synerty-peek
./pip_uninstall_and_develop.sh
For repositories and plugins, run from their directory
python setup.py develop
Compile Front End Packages¶
Symlink the tsconfig.json and node_modules file and directory in the parent directory of peek-mobile, peek-admin and the plugins. These steps are run in the directory where the projects are checked out from. These are required for the frontend typescript compiler.
Run the following commands:
cd ~peek/dev-peek/peek-mobile/peek_mobile/build-web
ng build
cd ~peek/dev-peek/peek-admin/peek_admin/build-web
ng build
Develop¶
You are ready to develop synerty-peek services
What Next?¶
Refer back to the How to Use Peek Documentation guide to see which document to follow next.