Copied to clipboard

Flag this post as spam?

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


  • Saied 349 posts 674 karma points
    Sep 02, 2016 @ 13:43
    Saied
    1

    General Questions on uSync?

    I have uSync, uSync.ContentEdition, and uSync.Snapshots installed.

    1. If I deploy from local website to the stage website, will usync import the changes at startup? I saw that if I had snapshots installed, I could just use
    2. snapshots instead of the normal usync imports?
    3. Is it possible to cherry pick certain templates (or in more general content) to be updated or is it all in?
    4. Can I disable certain content from be updated? (I really only care about the properties on nodes, for example, I may have a google analytics code that I created locally when I deploy to stage, I want the property to be created and the value to be filled in). I don't care about updating templates.
    5. If I make a snapshot, is that similar to making a backup so in case something went wrong, I can just roll back to a certain snapshot?
    6. Is there a way to disable usync for certain users?
    7. Is the TemplateHandler what handles content updates for templates or is that the ContentTypeHandler? For example, if I create a new property on a home document type called FirstName? What handler is responsible for creating that?
  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Sep 02, 2016 @ 14:08
    Alex Skrypnyk
    0

    Hi Saied,

    Just few my answers:

    1. If I deploy from local website to the stage website, will usync import the changes at startup? I saw that if I had snapshots installed, I could just use

    Yes, uSync can make import on startup.

    3. Is it possible to cherry pick certain templates (or in more general content) to be updated or is it all in?

    Yes, you have to disable automatic import and do it manually and check each imported file

    6. Is there a way to disable usync for certain users?

    You can hide developers section for certain users and disable automatic import.

    Best,

    Alex

  • Saied 349 posts 674 karma points
    Sep 02, 2016 @ 14:29
    Saied
    0

    Hi Alex,

    Do you know which handler actually handles updating the content on the website? If Content Managers are updating content, I don't want to wipe out their content. I got uSync set to manual, but as far as content updates, all I care about is updating property values on document types.

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Sep 02, 2016 @ 14:33
    Alex Skrypnyk
    0

    Hi Saied,

    Usually with our team we are working locally, nobody makes changes on the dev or stage - so we neve had such problems.

    Because all changes are moving to one direction - from local machine to dev and to live.

    Another quote about uSync - it doesn't remove properties, so if you create property, move it from local to dev, than remove locally - it will not remove it.

    You have to remove properties manually.

    Thanks,

    Alex

  • Saied 349 posts 674 karma points
    Sep 02, 2016 @ 14:38
    Saied
    0

    So, if I understood you correctly, if a content manager adds a property, it won't be deleted on import?

    What about content? if you are using the uSync.Content edition and you change the content on your side, won't that overwrite what a content manager might have put on stage for example?

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Sep 02, 2016 @ 14:40
    Alex Skrypnyk
    0

    So, if I understood you correctly, if a content manager adds a property, it won't be deleted on import?

    Yes.

    What about content? if you are using the uSync.Content edition and you change the content on your side, won't that overwrite what a content manager might have put on stage for example?

    Sorry, didn't use content edition yet.

    Thanks,

    Alex

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Sep 02, 2016 @ 14:52
    Kevin Jump
    100

    Hi

    Just to add to this

    1. Snapshots Snapshots offers a diffrent way of working with uSync, it makes the creation of the files more manual, but you might prefere that way of applying changes, it's a personal preference thing really.

    But if you are using snapshots, i wouldn't also use uSync out of the box, i would suggest turning off ExportOnSave because you don't want to confuse your imports.

    1. if you use snapshots you can always go into a folder and remove things you don't want to sync. but usync mainly is an all or nothing system

    2. backups, uSync syncs are not completely destructive in terms of settings - so going back to a snapshot won't necessarily get you back to the same place.

    uSync completly syncs elements it does know about (e.g a doctype or mediatype) removing additional properties and or settings from them, but if you have a new doctype on the target that isn't on the source, it will not be touched.

    1. Content is managed by the Content Handler (which is added as part of content edition). It is called when ever content is saved (if ExportOnSave = true)

    in terms of content on dev/stage/live - i would be inclined not to sync the content files from a dev machine (turn the content handlers off for devs) then content doesn't go from a dev machine to stage or live.

    there is more nuanced things you can now do with HandlerGroups and HandleActions- where you have things on for import but not for save. that would feasibly be a good way to do it, but you will have to make sure you manage your uSyncBackOffice.config files between setups to get all the right bits of config (transforms might be the way to go - it's all dependent on your setup really)

  • Saied 349 posts 674 karma points
    Sep 02, 2016 @ 15:02
    Saied
    0

    After installing snapshots. These are some of my settings:

      <Import>true</Import> 
    
      <!-- export everything to disk at startup -->  
      <ExportAtStartup>false</ExportAtStartup>
    
      <!-- when a user saves something, write it to disk -->  
      <ExportOnSave>false</ExportOnSave> 
    
      <!-- watch the usync folder, and if something changes, import it-->  
      <WatchForFileChanges>false</WatchForFileChanges> 
    

    Should I keep import set to true?

    I also set these like this, but all I really care about is not automatically updating content where it would overwrite a content managers content, so not sure if this is correct:

      <Handlers Group="default" EnableMissing="true">
        <HandlerConfig Name="uSync: DataTypeHandler" Enabled="true" />
        <HandlerConfig Name="uSync: TemplateHandler" Enabled="true" />
        <HandlerConfig Name="uSync: ContentTypeHandler" Enabled="true" />
        <HandlerConfig Name="uSync: MediaTypeHandler" Enabled="true" />
        <HandlerConfig Name="uSync: LanguageHandler" Enabled="true" />
        <HandlerConfig Name="uSync: DictionaryHandler" Enabled="true" />
        <HandlerConfig Name="uSync: MacroHandler" Enabled="true" />
        <HandlerConfig Name="uSync: DataTypeMappingHandler" Enabled="true" />
        <HandlerConfig Name="uSync: MemberTypeHandler" Enabled="false" />
      </Handlers>
    

    What I really want to achieve is that if I create a property on my local machine with a value in it. Once I deploy that to another environment, I want the property to be created and the value to be set. Similar to how courier does it. What do you recommend?

    I'm still on the fence between using snapshots or not. What is the biggest benefit to using snapshots rather than just using uSync by itself?

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Sep 02, 2016 @ 15:29
    Kevin Jump
    1

    hi

    I would add these two line on the dev machines

    <HandlerConfig Name="uSync: ContentHandler" Enabled="false">
    <HandlerConfig Name="uSync: MediaHandler" Enabled="false">
    

    This will effectively turn content edition off on the devs

    if you want your devs to get the content you could alter this too

    <HandlerConfig Name="uSync: ContentHandler" Enabled="false" Actions="Import">
    <HandlerConfig Name="uSync: MediaHandler" Enabled="false" Actions="Import">
    

    Which will mean they will get content imported but none of there changes will go the other way.

    how you manage the differences between dev and live configs isn't something that is yet fully sorted (but there is an open issue for it if you have suggestions).

    In general uSync is a full sync tool, so it's there to keep two sites as similar as possible. if you make changes on one, they will be reflected on the other site.

    Some people have been looking at create only syncing for example there is one for dictionary Items - if you wanted this for something else, then that might be the path to follow.

    Snapshots - is good if you do release based changes, you can wrap up a few weeks of work into a snapshot, you see what you are getting and you can push it up to the server.

    uSync on its own is a bit more continuous developmenty. All you work gets saved to disk, and when you copy it over (or deploy) you are getting a close to the same as practically possible.

    im my experience all the problems come when devs don't keep their own builds in sync (via source control) or people make loads of changes on live servers and don't sync them back to anything.

  • Saied 349 posts 674 karma points
    Sep 02, 2016 @ 16:11
    Saied
    0

    Hi Kevin,

    This helped. For now I am just playing around with uSync. I commit changes all day and it goes through a deployment process. We all point to the same db for dev, so if one dev creates a property, I will see it on my side. With that being said, it seems like snapshots is not something I currently need.

    I am a little confused by this part:

    <HandlerConfig Name="uSync: ContentHandler" Enabled="false" Actions="Import">
    <HandlerConfig Name="uSync: MediaHandler" Enabled="false" Actions="Import">
    

    Which will mean they will get content imported but none of there changes will go the other way.

    I don't care about media, so I guess I would just have this disabled and not even allow import. Regarding content, what exactly do you mean by changes only going one way?

    For example, when I commit my changes, it deployed to a dev website? The cshtml files are not updated only content for properties on the nodes, right?

    Is there a way to exclude certain nodes from being updated, for example, let' say I have a blog with a rich text editor and I don't want that section to be updated because content managers have updated it with more content.

    Thanks for all the help, Saied

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Sep 02, 2016 @ 16:20
    Kevin Jump
    0

    Hi

    yes - with that setup actions="import" means that the handler will only run during any imports (so at startup, or via the dashboard) so settings will get imported, but nothing will happen if you run an export or save a change to umbraco.

    This means if you have a uSync folder being copied between your sites any site with the settings like above will import things from the folder but not write them back out. So changes flow in but not out of that site.

    In terms of content yes, content is stored in the DB, nothing changes on disk from an umbraco point of view - uSync will write out a content.config file to the relevant folder in usync\data\content with any changes (if you have it set up to do that) but this doesn't affect doctype settings, or templates or anything like that. they are separate from content.

    one thing that might be confusing is that Document Types are actually called Content Types inside Umbraco - so the Content Type Handler manages what you thing off as document types - while the content handler manages content

    At the moment there is no ignore this field stuff inside usync - it will sync everything it can get its hands on.

  • Saied 349 posts 674 karma points
    Sep 02, 2016 @ 16:36
    Saied
    0

    Does the actions="import" have to change in the config between sites. If I made a change to a value on a property, I would want to write it out or is this not possible or would I have to do an export?

    I will give an example of how I want it to work and that might help:

    Here is a screen shot of a blog post I created on local:

    enter image description here

    On the other environments, this blog post already exits with content that was created by Content Managers, so when I deploy, I don't want to overwrite any of this content.

    However, if I create some other property that Content Managers don't touch, maybe it is something internal that I am using, I want to update that content (like an api key, for example)

    Thanks

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Sep 02, 2016 @ 16:42
    Kevin Jump
    0

    Yeah

    At the moment usync won't selectively update values inside content :(

    if you were using the import setting, it would need to change between sites depending on what behavior you wanted where. This could be done with xml transforms - but it's something i am looking making easier at with this issue.

Please Sign in or register to post replies

Write your reply to:

Draft