Jump to content

Suggested Dev/Deployment Workflow


dst81
 Share

Recommended Posts

Hi,

I'm a System Administrator responsible for DevOps in our Company. We're trying PW in a single client project atm and experience some glitches with DevOps-/Workflow.

We have a small team of developers that need to work with the same code base. They all need to be able to develop locally and deploy to a preview/staging environment.

Our Toolstack contains git for versioning, chef/vagrant or docker for local development/testing and Jenkins for building assets and automatic deployment to the staging-site.

There's several challenges / glitches in this process that makes me think that ProcessWire hadn't been developed for a use case like ours and is much more intended to be used by single developers that work right on the production system.

Can you advise me on a suitable workflow?

There's problems with the assets/files dir that must be shared between the staging website and local environments of our developers.

We're right now working with symlinks on the staging system that helps to preserve the direcory when deploying from the master branch. but now we tend to use nfs-shares so devs can collaborate with a shared directory.

The local docker containers can use the same target (the nfs) from inside the containers. But is that the way it needs to be done? Really?

There's so much work that needs to be done to fit ProcessWire in a DevOps Workflow that we tend to decide to switch to another CMS.
 

Any suggestions or hints that i might have missed. Am I wrong or is PW really not meant to be used this way. I

  • Like 1
Link to comment
Share on other sites

This is no different from using a CMS like WordPress or Drupal given their architecture.

I'd recommend looking at the approach of Roots.io.  More specifically reading their Twelve-Factor WordPress App series and adapting it accordingly with your preferred set of tools:
https://roots.io/twelve-factor-wordpress/

#6 addresses file uploads:
https://roots.io/twelve-factor-06-processes/

Relevant module:

Hope this helps!

  • Like 6
Link to comment
Share on other sites

19 hours ago, dst81 said:

There's several challenges / glitches in this process that makes me think that ProcessWire hadn't been developed for a use case like ours and is much more intended to be used by single developers that work right on the production system.

Hi dst81 and welcome to the forum :)

I think you are spot on with this. Ryan built PW mostly because he was not satisfied with other systems for his own work. This has some benefits (we all know why we love it), but i think you just found one drawback, because as far as I know Ryan mostly works on his own and so maybe collaboration with other devs was and is not the highest priority. Maybe it's similar to the situation that Wordpress can be bend to a CMS, and maybe Processwire can also be bend to a team/staging/dev workflow?

I have to admit, though, that I'm also a single dev working mostly on my own or with a partner for the frontend (where a hacky ftp setup is sufficient for the time). So I have no experience how it could/would professionaly be done... So I'm just thinking loud here and that's no way ment to be an expert satement :) 

But nevertheless there is the Migrations Module that you should definitely have a look at! https://processwire.com/blog/posts/introduction-migrations-module/

35 minutes ago, dst81 said:

Thx for your answers! I will go through those topics and see if I helps me and report back

Would be very interested to hear your results and see which road you took :)

Good luck.

  • Like 1
Link to comment
Share on other sites

On 12/12/2017 at 3:33 AM, dst81 said:

Hi,

There's several challenges / glitches in this process that makes me think that ProcessWire hadn't been developed for a use case like ours and is much more intended to be used by single developers that work right on the production system.

You got me thinking. I do work as a single developer, but increasingly I'm finding I want to deploy solutions I've developed for one project to another, and just copying and pasting via the admin isn't ideal.

I was having a look at Silverstripe recently, as I have a possible project where Processwire, though I'm sure can do the job, might meet some resistance, whereas Silverstripe will almost certainly be accepted as it's mandated as the CMS of choice by government here (NZ).

What struck me is that you can do far more with Processwire with less coding, but in some cases defining data structures via coding rather than via an admin UI may be more appropriate for sharing code between projects or in the case of a team between team members.

Processwire is perfectly capable of doing this as the admin UI is just a layer on top of the API, so there's no reason why fields and templates can't be defined programmatically in modules that are subject to version control.

I notice that some of the existing modules actually consist of several dependant sub-modules, bundled in a common folder, so it would be easy to set up something like this with git version control. Silverstripe automatically rebuilds database schema by using a /build URL, however it doesn't remove unneeded fields or tables after a schema change, whereas the Processwire API makes it fairly easy to both add and remove fields via a module.

Processwire will detect changes to a module version, and run any update process automatically, so even though it bypasses the ease of use of the admin UI, developing your database schema programmatically in modules might ease collaborative development.

  • Like 8
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...