Jump to content
dst81

Suggested Dev/Deployment Workflow

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

Share this post


Link to post
Share on other sites

Hi @dst81,

Welcome to ProcessWire and the forums. 

I don't have a direct answer to your queries. I have found some topics though, that may be of interest to you.

Deployment

 

 

Docker

 

Git

Quote from ryan

 

 

  • Like 8

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By gnanasekar
      Hello All,
      Hope all doing good, I am a newbie to processwire. I have an issue please help me out!!!
      Here is my question:
      I have two usernames with one email apparently. when rebuilding my Jenkins server, I get a failed to authenticate and now I cannot reset the password of the other account. Any help would be appreciated.
      Thanks
    • By thmsnhl
      Hi everybody,
      we started our first Processwire driven project in my new company and for the first time, I was working on one site with more than 2 colleagues on the same site.
      It didn't take long for us to stumble across some problems when multiple developers work at the same time, conflicts with updating the database on vagrant machines, like duplicate entries for page IDs, errors when setting up fields and stuff like this. We ended up working on a dedicated database server, that we linked to our vagrant machines and most of the problems were gone, but the performance of this constellation is really bad compared to our first approach with database running on vagrant machines.
      I already tried to find a solution in the forums but I couldn't find anyone with problems like this.
      So I was wondering: how do you manage projects with multiple developers on vagrant machines in a git-based workflow?
    • By louisstephens
      I was going to start working on a new site for myself and wife (a new hobby we have taken up), and had decided to try out Runcloud and Digital Ocean. I got my drop set up on digital ocean, as well as setting up various hooks/databases etc between github and run cloud. However, now I have hit a wall. 
      I cloned my "blank" repository into my local host (managed through MAMP) and dropped in a fresh install of PW, but now I have no idea of how to move forward. Is it best to just work locally, and then push this into a branch, and when ready, change branches and commit all to run cloud? Run cloud gives me an IP address to use for the database, but I can't get my localhost setup to recognize (I just get "Connection refused"). I am also unsure how to actually get my commits to push to run cloud, and handling the new set up.
      I am probably in over my head, but I thought I would try something new as a good learning experience. However, now I am just drowning  . Hopefully someone has some ideas on how to approach this, as I am very eager to get under way.
    • By Barry
      I'm attempting to deploy my site via GIT from bitbucket through Runcloud. I've managed to connect the repo via a webhook and I'm able to pull whenever I commit from local, but I keep getting a "Targetted directory /home/runcloud/webapps/domainname is not a GIT directory inside Web Application thedjcompany"
      I've always deployed via a GUI but we've moved servers and I'm very experienced with GIT, nor do I have any experience with Runcloud, so I'm hoping someone here has some info and can point me in the right direction?
      I'm guessing that I have to initiate the GIT folder within the webapp folder itself but I wouldn't know the command line to get that started.
      Any info/advise would be very appreciated
    • By gebeer
      Hello everyone,
      I've been fiddling around a lot lately with docker containers for my local development on a linux machine. Tried many different options, also readily available processwire images and tutorials from the forum. But never got it right. Mainly because of permission issues with docker volumes. That is a tricky part on linux machines whereas on OSX it doesn't seem to be an issue.
      Then I discovered http://www.wordpressdocker.com/. And the setup with nginx as a proxy that routes requests to separate containers with the actual site install appealed to me. The whole thing sits on top of alpine linux containers which are really lightweight. So I decided to give it a try.
      And, first time since experimenting with docker, I got a running PW install. Rewriting was not working until I adjusted the nginx config. Now I have a fairly complex PW site running in a container. Everything is working, image upload/editing etc.
      So I'm really exited, especially since the dev site is now blazing fast compared to my old vagrant virtualbox vm setup.
      Honestly, I don't really understand everything that is happening behind the scene. But I managed to adjust the original files and build a new image that works with PW and doesn't have all the WP stuff.
      The nginx config I took from https://github.com/elasticweb/nginx-configs/blob/master/configs/processwire-2.conf
      Not sure if it covers everything for PW3 as well. I would very much appreciate if someone who is more in the know than me could take a look.
      All files for building the docker image are here https://github.com/gebeer/alpine-php-processwire
      A working image here: https://hub.docker.com/r/gebeer/alpine-php-processwire/
      Documentation is kind of lacking. I took over quite a lot from the original project. But following the github README and the original documentation should get people started who have a little experience with docker already.
      If someone needs a more in depth step by step tutorial for setting things up, let me know and I'll put something together.
×
×
  • Create New...