backdrop-ops / backdropcms.org

Issue tracker for the BackdropCMS.org website
https://backdropcms.org
25 stars 21 forks source link

Workflow tutorial for BD update on Pantheon #237

Open jwalling opened 8 years ago

jwalling commented 8 years ago

I am new to BD and Pantheon. It would be helpful if there was a workflow tutorial for getting BD updates working from dev to test to live. I pinged Jen on Twitter and she responded "Can do ;)"

I made some false steps trying to update from 1.3.4 to 1.3.5

I used Pantheon one-click install for 1.3.4 -- I didn't know how to use Git to update dev to 1.3.5 so I used SFTP instead. I got dev working on 1.3.5 but I crashed test with, I think, a bad config. (see message below) Fortunately, I backed up test files before updating it so I restored it back to 1.3.4. Pending: I will attempt to restore test config after another push from dev to test before running update.php.

Also, I am not clear on how to get a live database pushed back to test or dev without another snafu.

Here is the message I saw when I crashed test.

ConfigStorageReadException: The configuration file "system.core" is not properly formatted JSON. in ConfigFileStorage->read() (line 898 of /srv/bindings/73e1f8556b804b7aa265fbfc1725adb4/code/core/includes/config.inc).

herbdool commented 8 years ago

I think it's best to wait for the 1.3.5 commit to show up in the Backdrop upstream in the Pantheon dashboard. I haven't seen it yet.

herbdool commented 8 years ago

Part of this is knowing the Pantheon workflow better. I suggest starting here: https://pantheon.io/docs/required-reading/

Without seeing it I can only guess, but if you're copying a live db to dev then it would be best to also have the config files also copied from live to dev. Or even better to export/import the config from live to dev.

Note that you can also set the git repo to a previous commit if you made a bad commit. If you used SFTP but didn't yet commit then you can just switch it to Git and it'll wipe away any uncommitted changes on dev.

jwalling commented 8 years ago

@herbold Thanks for the tips. The required reading is not specific enough for BD update work-flow which is what I'm requesting. edit One of my confusions is about moving config between environments. You suggest moving config from live to test. If looks like config goes with a database move (live->test) but not with files update (dev->test). A BD Workflow description would cover that. Intuitively, I would think moving config around would conflict with database credentials.

herbdool commented 8 years ago

Your question involves not just BD but also how to use Pantheon. For the latter the best location to get info is from Pantheon. For BD specific info: https://drupalwatchdog.com/volume-5/issue-1/build-it-backdrop http://www.jenlampton.com/blog/managing-backdrop-cms-config-files-git

Note that it depends where you've put the config files, under files where they're not under version control or in code where they are.

To me it seems you're not just looking for a tutorial on the website but also fix an error now.

jwalling commented 8 years ago

I am using my problem as an example of how BD workflow needs its own description. Getting my situation resolved is just a bonus ;-)

jwalling commented 8 years ago

I followed the config procedure (as I understood it) from Managing Backdrop CMS config files in Git

  1. Exported config from dev and loaded it into test
  2. Cloned 1.3.5 files from dev to test
  3. Staged dev config into test
  4. Ran update on test --> produced the same error as before:

ConfigStorageReadException: The configuration file "filter.format.filtered_html" is not properly formatted JSON. in ConfigFileStorage->read() (line 898 of /srv/bindings/73e1f8556b804b7aa265fbfc1725adb4/code/core/includes/config.inc).

I repeated the process again after restoring test and got to step 3

The following configuration files could not be parsed, synchronization cannot proceed. filter.format.filtered_html user.role.authenticated

I'm over my head. I'm switching my focus to a different host.
I might get inspired and come back to Pantheon.

jenlampton commented 7 years ago

@jwalling I think you might have encountered a bug that has nothing to do with the update procedure or pantheon. If your config file is not proper JSON format (that's what the error above is saying) that is going to be an issue on any web host, and weather you are updating a site or not.

To answer your question about updating though, here's what I do on pantheon:

1) When Pantheon tells me there is a new upstream ready, I click the button provided in the yellow box on the dev environment to update my code (this may work only in Git mode, I have not tried in SFTP). 2) I then run update.php manually on the DEV site through the Backdrop interface (the button on the Pantheon interface does not work yet) - and test that everything is okay afterward. 3) I then deploy my code to test, as usual, using the Pantheon UI. 4) I then copy my database AND THE FILES from live to test. ** This is important on Backdrop sites because the config is stored in the files directory, and it's not safe to copy the database without the config. 5) I then run update.php manually from the Backdrop UI on the TEST site - and test again that everything is okay afterward. 6) I then deploy my code to live, as usual, using the Pantheon UI. 7) I then run update.php manually from the Backdrop UI on the LIVE site - and test again that everything is okay afterward.

I agree we should add this info somewhere on the Backdrop site, but I'm not sure where. Perhaps with the Installation instructions? Here: https://backdropcms.org/upgrade

jenlampton commented 7 years ago

I've added some new tags to this issue queue for people who are working on content. I think this topic would be great for a video or a docs page, so I've tagged it as both :)

jenlampton commented 7 years ago

@tomgrandy I assigned this to you :) Would you be willing to add this as a section to the https://backdropcms.org/upgrade page?

tomgrandy commented 7 years ago

@jenlampton - Sure! No problem.

tomgrandy commented 7 years ago

@jenlampton - Not that familiar with Pantheon. Did you want me to repurpose the step-by-step you outlined above in the https://backdropcms.org/upgrade page or is there more to the process? I can easily use your instructions with screenshots, but if this requires a better understanding, then I'm not much help here.

jenlampton commented 7 years ago

Not that familiar with Pantheon

You might be the perfect test subject :)

Did you want me to repurpose the step-by-step you outlined above in the https://backdropcms.org/upgrade page

Yep, that's all. You may have a hard time getting screenshots since you'll need an out-of-date pantheon site. But if you set up a site nowish, and then wait until the 31st, you'll have one! :)

jenlampton commented 7 years ago

@tomgrandy I just re-read https://backdropcms.org/upgrade, and on further inspection I think we should create a child-page for this page, that is specifically for Pantheon. I don't think we should mix up the general Backdrop docs with Pantheon specific docs, on the same page. That is likely to confuse the people who are not using Pantheon.

Do you want to do some cleanup on this post, instead? :) https://backdropcms.org/user-guide/backdrop-updates-pantheon