Exporting / Importing Project

Automated deployment for web applications and databases

Exporting / Importing Project

Postby jochem4207 » Tue Jan 07, 2014 4:47 pm

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
Last edited by jochem4207 on Thu Jan 16, 2014 3:58 pm, edited 2 times in total.
jochem4207
 
Posts: 34
Joined: Fri Dec 06, 2013 2:27 pm
Location: Netherlands

Postby DavidSimner » Tue Jan 07, 2014 6:35 pm

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.
DavidSimner
 
Posts: 54
Joined: Thu Feb 04, 2010 6:05 pm

Postby jochem4207 » Wed Jan 08, 2014 9:43 am

Thank you for the quick reply. I've checked the JSON solution. Found everything I need so far there.
jochem4207
 
Posts: 34
Joined: Fri Dec 06, 2013 2:27 pm
Location: Netherlands

Postby jochem4207 » Thu Jan 16, 2014 3:57 pm

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:
Code: Select all
"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:
Code: Select all
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.
jochem4207
 
Posts: 34
Joined: Fri Dec 06, 2013 2:27 pm
Location: Netherlands

Postby csmith » Thu Jan 16, 2014 4:48 pm

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
Chris Smith
Project Manager
SQL Lighthouse
csmith
 
Posts: 120
Joined: Thu Jun 30, 2011 2:15 pm
Location: Cambridge

Re:

Postby jochem4207 » Tue Jan 21, 2014 9:55 am

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 :)
jochem4207
 
Posts: 34
Joined: Fri Dec 06, 2013 2:27 pm
Location: Netherlands


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests