Go Live Deployments With Global Repositories
Introduction
[edit]For some clients, we already have "global" repositories that are used for collating multiple project-specific repositories for going live on live servers.
Please note: folder structure of the project-specific repositories must adhere to the mandatory rules set out here: https://wiki.parasol-island.com/Interactive_Development_Folder_Structure otherwise deployment will fail.
Example: PENNY Markt
[edit]As you can see below, we have one single global repository and many child repositories for each project.
|-- penny (global repository)
|---- penny16_int01 (project repository)
|---- penny16_int02 (project repository)
|---- penny16_int03 (project repository)
Going Live
[edit]To go live, you need to checkout the global repository and add the project repository as a "submodule" and then head over to deploybot.com and manually press the "Deploy" button for the global repository.
The process is like so:
- Checkout the global repository (e.g. ssh://git@git.parasol-island.com/penny)
- Jump into the local repository on your machine (e.g. /Users/your_name/Sites/penny)
- Execute: git submodule add ssh://git@git.parasol-island.com/project_identifier project_identifier
- Commit and push the change to the git repository with a message such as "add project_identifier as a submodule"
- Upon successful deployment, a special post-deployment script will be triggered which will create the necessary symlink from the server's webroot to the "htdocs" directory of each deployment project.
Clients using Automatic Deployments
[edit]The following clients are already using the automatic deployment process:
- PENNY (live only)
- app.parasol-island.com (including. Spotify) (stage and live)
- toom Baumarkt (coming July 2016)
Special Note for PENNY
[edit]As the deployment process was devised and implemented after many PENNY projects were already running on the live server, there are currently two webroots to take into consideration. They are:
The old webroot (to be deleted before end of July 2016): /var/www/app.penny.de/htdocs
The new webroot (to be used for all new projects): /var/www/de/penny/app/htdocs
The old webroot will be deprecated as soon as all/most of the active projects located inside are over and the new webroot will take precedence. However, in the meantime, this means that live deployments for PENNY projects will have one extra step because there must be a symlink created within the old webroot that points to the new webroot.
The commands look like this:
$ cd /var/www/app.penny.de/htdocs
$ ln -s ../../de/penny/app/htdocs/project_identifier project_identifier
After which, you should be able to access the project at https://app.penny.de/project_identifier
Questions?
[edit]Feel free to contact David Smith (-125 david.smith@parasol-island.com)