Options

Exporting / Importing Project

jochem4207jochem4207 Posts: 47
edited January 21, 2014 3:55AM in Deployment Manager
Dear Red Gate

Is it somehow possible to backup the variables and project steps? And later import them back.

Is there any planning for this uservoice:
http://redgate.uservoice.com/forums/176 ... -variables

With having about 30 variables. Things start to get real chaotic.

There are so many ways to do that makes it hard to find a real good way. My thought was to make the page/table editable (html/css).

Greetings Jochem

Comments

  • Options
    There are quite a few workarounds to this problem, but sadly backing up and restoring project steps + variables isn't supported directly. Feel free to add a new request on Uservoice for it.

    There are currently no plans for the request that you linked to on Uservoice. It conflates a lot of different things into one request, which naturally leads to a higher vote count than a Uservoice request for just one thing, so therefore we're going to wait for it to have more votes than it does at the moment.

    The workaround for backing up a project's steps + variables are:

    0. By hand. They're shown in the web browser and you can copy/paste them. This is a bit of a hassle so there's a few better options below:

    1. Copy project. There's a button in the Deployment Manager UI to copy a project. This copied project can then act as a backup. It does clutter the UI though with its presence.

    2. The underlying database. Deployment Manager stores the project's steps and variables in a database. If you remote desktop to the Deployment Manager server, and then visit http://localhost:10300/ in a web browser you'll be able to see the database. If you then go to the document for the project in question, you'll see the JSON containing the steps and variables. You can save this JSON away and restore it if ever needed.
  • Options
    Thank you for the quick reply. I've checked the JSON solution. Found everything I need so far there.
  • Options
    I was looking at a easier way to manage my variables then by hand.

    In the reply above you refer me to the database. There I found a JSON structure as you told me.

    If I go take a look in the variables array of a random project I find this:
    "Variables": [
        {
          "Id": "e5f08307-5fda-481d-8b42-b937ab8fe1cd",
          "Name": "abc",
          "CompletelyInsecureValueWhichShouldNeverEverBeShownToUserUnderAnyCircumstances": "abc",
          "Value": "abc",
          "Masked": false,
          "EnvironmentId": null,
          "StepId": "76a23b15-750f-469d-aa5d-1ec6beabc781",
          "Machine": null
        },
    
    ]
    

    If I put for example all my variables in excel. I've list of values I can fill in. The only thing that I cannot create myself is that ID. Is there anyway I can create a valid ID?

    If so I could create a json part and paste it in the raven database. And so create a easier way to fill in my variables when I need to do ~40 per project.


    Just a thing i noticed:
    CompletelyInsecureValueWhichShouldNeverEverBeShownToUserUnderAnyCircumstances
    
    Where is this for?

    Edit:
    Or is there a better way around this? The situation is that per customer we need different values for the same variables. Maybe I actually given my own answer here....

    If I set them once I can change the values offcourse and have a valid ID/other stuff.
  • Options
    csmithcsmith Posts: 138 Bronze 1
    Hi Jochem

    Thanks for your post. Can we confirm why you want backup the variables and project steps? It seems from your last post that you want to have different variables values (for the same variables) for different customers. Is this the case? If so, are you planning to have a separate project for each customer?

    Regarding the variable you spotted in that JSON, we're a bit embarassed that you've seen it! It holds the 'true' value of the variable, rather than the user-facing value, which will be masked with asterisks if the user has defined it as private.

    One of our developers gave it a silly name to make it much less likely that other developers would ever write code that displayed this value (as opposed to the masked value) to the user – We didn’t think we’d ever be explaining its function to a real user :oops:

    Needless to say we are going to be renaming this variable now and also ensuring that the 'true' value is concealed in the database if the user chooses to mark a variable as private.

    Best regards,
    Chris
    Divisional Development Lead
    Redgate Software
  • Options
    csmith wrote:
    Hi Jochem

    Thanks for your post. Can we confirm why you want backup the variables and project steps? It seems from your last post that you want to have different variables values (for the same variables) for different customers. Is this the case? If so, are you planning to have a separate project for each customer?

    Sorry for my slow response,

    Yes I am going to create a project for each customer. So the dashboard stays clean and we know which version of our software the customer has. I thought it wasn't but at this moment the built-in copy project function is all what I needed.

    csmith wrote:
    Regarding the variable you spotted in that JSON, we're a bit embarassed that you've seen it! It holds the 'true' value of the variable, rather than the user-facing value, which will be masked with asterisks if the user has defined it as private.
    Thank you for explaining that!

    csmith wrote:
    One of our developers gave it a silly name to make it much less likely that other developers would ever write code that displayed this value (as opposed to the masked value) to the user – We didn’t think we’d ever be explaining its function to a real user Embarassed

    Needless to say we are going to be renaming this variable now and also ensuring that the 'true' value is concealed in the database if the user chooses to mark a variable as private.
    This is a bit funny, I will remember that for later! Giving good names to variables like that :)
Sign In or Register to comment.