Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Alexander Falk 1 post 21 karma points
    Apr 16, 2020 @ 06:46
    Alexander Falk
    0

    uSync export, init, export in Azure DevOps after build

    Hi all,

    I have a question regarding uSync and the beta version of the command line options: Import / Export.

    We have one application using Umbraco as a CMS system, and it is version controlled through Git. The developers are locally expanding customizing Umbraco. Before changes are pushed and accepted in a Pull Request, an export is initiated through uSync.

    We have a CI/CD pipelines setup in Azure DevOps, where the application is being built, and shipped as an artifact ready to be deployed.
    After the application containing Umbraco is deployed to the respective server, we want to import the exported configurations. We are aware Umbraco has to be setup before doing so, and we assume, this can be done manually the first time or through uSync init.

    The problem is: uSync init do not work. It keeps replying with BootFailed error. This means, the uSync import never starts, because it needs uSync init.
    We have tried with manually setup Umbraco through the Web interface and then manually clicking the uSync import button. This seems to work, and it is confusing, since we assume the CLI and the button works the same way - atleast calling the same libraries and functions.

    My question is: What are we doing wrong? Why can we setup Umbraco through the Web interface but not through the uSync CLI? It works on local machines.

    Two side notes: (1) the SQL connection has been tested, so we know it can connect. (2) the uSync.Console keeps crashing, when we fire any command. No logs have provided good information on why this is happening.

    I hope anyone out there can help us, since we are time pressured, and this has taken up too much time.

    Best regards Alexander

  • Kevin Jump 1867 posts 11859 karma points MVP 4x c-trib
    Apr 16, 2020 @ 08:46
    Kevin Jump
    0

    Hi Alexander,

    I've had a quick look, I think this happens when both the UmbracoVersion and UmbracoDBDSN are set in the web.config - because Umbraco tries to boot as if it's setup and the failure is within the boot code :(

    (you do actually get a log of this in the App_Data/Logs/ folder)

    for uSync Init to work as a command either the UmbracoVersion or the UmbracoDBDSN (or both) need to be blank (or the db itself can be missing)

    because in these states, Umbraco does successfully boot into an Installing state and then uSync Init can take it from there and install the site.

    so for azure I think you might need the UmbracoVersion number to be blank on the first boot, then uSync init can take it from there.

    I understand this might be a bit of a pain, because how do you know its the first boot and you want the process to work for all installs,

    Thinking out loud:

    You could work something into it that checks to see if the init command results in bootfails and if so wipe the UmbracoVersion from the web.config and try again ? (this could be built into the console app maybe?)

    but! If the boot fails because of another reason, You won't want your uSync Init command to try and reinstall the site? (that might not be a big issue, because if the site is failing then blanking the version number won't fix it.)

    Maybe a marker file somewhere to say the site has been booted (e.g text file in app_data) - if that isn't there blank the UmbracoVersion and uSync.Init? and then write the marker file at the end?

    again just ideas not 100% sure what will work - depends a lot on your situation i suppose.

    Kevin

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies