You are not logged in.
Pages: 1
Dear Tim and Forum Colleagues:
After careful research we set our hearts on BigTreeCMS. We studied the code in our team, played around with several things, and then went ahead developing a low-risk web site. Normally we work with a development, QA, and production environment (all strictly separate and individual), but this time around only a dev and prod server. All files get committed into GIT. Except the obvious /custom/settings.php and /custom/environment.php. We further set up a mySQL data sync protocol, to sync source=dev to target=prod. All sounds logical, I hope.
JUST FOR YOUR INFO, OUR PROBLEM SCENARIO (FEEL FREE TO SKIP AND SCROLL DOWN TO MY GENERAL QUESTION)
For some internal reason, we first made a copy of dev to prod (manually via SFTP and a database copy process). This brought us to a more or less empty dev web site and 100% identical production web site. Both running nicely, including /admin areas.
Next thing that happens? We continue development on dev, and then complete development on dev > commit to Git > deploy to production > sync mySQL (sourceDEV to targetPROD), and??? dev and prod are not the same.
CSS differs
Images missing
How is this possible??
I do the CTO tasks in my team but was not around when our two engineers worked on this. But they do consistently experienced development work with all our development components (incl. version control).
MY GENERAL QUESTION
What is the recommended protocol to work with BigTreeCMS in a version controlled environment across several independent server instances (dev, qa, prod)?
What files/dirs to keep out of GIT?
What tables to sync?
What to also do and not forget?
How about this CSS compilation? Anything particularly to keep in mind when pushing/deploying BigTreeCMS across servers?
Hope to learn from you :-)
With warm regards,
Hans
PS.
Since posting my original question, our own research culminated in the following. Please correct and/or add your wisdom. Your input is much appreciated.
Keep the following files outside of Version Control
/custom/environmental.php
/custom/settings.php
Syncing mySQL
You can safely sync the BigTree mySQL data across different servers: Development; QA; Production.
Apache File Permissions
We experienced that without file permissions 775, releasing new GIT versions would render old contents (previous to current new release) onto the browser, unless we set the file permissions to 775.
Last edited by dynaread (August 22, 2014 1:23pm)
Offline
I'll try to address this piece by piece -- first, your issue with images and CSS:
- I'm not sure how you'd have images missing if you have them in git and have synced them down. As far as the CSS, if you're using BigTree's dynamic CSS it may be an issue with file modification dates differing on the two servers. BigTree looks for a newer file modification time on the individual pieces of CSS and checks if they're newer than the combined CSS file. If they are, it regenerates the combined file.
General questions --
"What is the recommended protocol to work with BigTreeCMS in a version controlled environment across several independent server instances (dev, qa, prod)?"
We normally work with independent local installs for each developer on a project (you can consider these "dev" instances), a QA/public test server for clients and project managers to review changes, and a live environment. All three environments generally share a git repository but have their own MySQL instances that aren't synced.
"What files/dirs to keep out of GIT?"
Our .gitignore file usually looks like this:
cache/*
core
custom/environment.php
site/files
We keep BigTree's /core/ folder outside of git and usually git clone bigtree in a "bigtree" directory and sym-link /bigtree/core/ to /core/. We ignore cache/ because we want other environments to regenerate their own caches and we ignore /site/files/ because it is mostly used for files uploaded via the CMS (and since we keep the databases separate it doesn't make sense to sync their related files). We ignore custom/environment.php since it contains URLs and database connection parameters. We DO include custom/settings.php because it generally has configuration variables that are the same across dev/live.
"What tables to sync?"
We don't keep any MySQL tables in sync across the production cycle. If we do self contained modules/templates on development we will often package them up in development and use BigTree's package manager to install them to QA and live (as it's easier than moving rows manually).
For your other questions, I don't think there's to much extra to know. We generally just commit from development to GitHub, pull down changes onto the QA server for project managers/clients to review and then pull down to live once they are approved. CSS compilation should be fine as long as /cache/ is writable by "apache" on the servers. If you're running PHP as FastCGI you can avoid world writable permissions and just make sure all the file ownerships are set to your shell user.
Offline
Thank you, Tim, for this detailed and well-motivated reply. I'm sure other users will benefit from this as well. Many thanks!
Offline
Pages: 1