Deployment
After development is complete we can deploy the application to the Testing, Acceptance and Production servers.
Below are two types of deployment that where/are used to deploy the project to a server.
Rules
- Never deploy to live without a consent from the client and a project consultant.
- Always discuss with the team what needs to Go Live.
- Never deploy to live after 5 'o clock (hard limit).
- Never deploy to live on Friday (hard limit).
- After a live deployment make sure to update the
master
branch.
- Preferably deploy before lunch so there's time to fix before EOD.
- Don't promise clients same day issue solving on production (except P1).
- Never (!!) deploy to production directly, always test first.
- Stay consistent with versions, raise if needed, never downgrade major etc.
Projects before 2017
So deployments in this timeframe can be a little confusing since the deployment flow has changed a lot.
But in short it works as follows:
- Add a GIT tag on the commit you want to deploy.
- SSH onto the server(s) you need to deploy to.
cd
to the /var/git/dpdk_git_connector
folder.
- Here you will find a deployment script named:
deploy_projectname.sh
.
- Run the script as follows:
./deploy_projectname.sh $git_tag
where $git_tag
is your created GIT tag.
- This script will now run the full deployment. Please check the output of this script for error's since they are not handled automatically!.
Projects after 2017
This deployment is much simpler, and most likely everyone can do it.
- Add a GIT tag on the last commit you want to deploy.
- Open Jenkins.
- Find your project and click on
Build with Parameters
.
- Now select your just created GIT tag and click
Build
.
- After your build has finished successfully open Rundeck.
- In Rundeck locate your project.
- After opening the project you get an overview of tasks.
- Find the deploy task that fits with the environment you want to deploy to.
- Click on that task and select your tag then click
Run Job Now
.
- This will deploy your build to the server(s).
File Structure
Below an overview of the most important files that should exist after deployment:
Phalcon
- App structure: File based
- File rights: Group: www-data, User: www-data
- Config location:
app/config/config.php
, app/config/cli.php
, app/config/default.php
- Vendor files:
app/vendor
- Log files:
app/logs/web.log
, app/logs/cli.log
NodeJS
- App structure: Binary
- File rights: Group: www-data, User: www-data
- Config location:
build/config.json
- Log files:
build/log/$project_name.log
Drupal
- App structure: File based
- File rights: Group: www-data, User: www-data
- Config location:
public/cms/sites/default/settings.php
- Files symlink:
public/cms/sites/default/files
, public/assets
- Vendor files:
public/cms/vendor
, public/cms/core
Last modified | Monday, February 1, 2021, 11:39:05 AM UTC |
Last author | Glenn de Haan |
Commit ID | 00d5ed6 |