We are currently developing tooling to allow us to deploy Views into various environments. We had hoped to use the .NET CouchbaseCluster management API
specifically, the CreateDesignDocument method, but it appears that this can only be used to deploy views using the Adminstrator credentials for the cluster (?) Unfortunately, our operations team aren’t keen to hand out this password for our prod environments due to it’s one-size-fits-all’ nature.
I believe that the CouchbaseCluster API is really just a wrapper around the REST management API. The docs for this state that you can use the bucket credentials to deploy a view.
Can anyone clarify if it is possible to deploy a design document via the .NET API without the admin credentials. If so, how?
To answer your question, No you have to be admin to make views.
You could develop a tool for view management and pushes to production by some type of chain management and approval, then you can also have version control of you doc views to revert back … hmmmm sounds like a good github project.
I have found it best for Admin to do the final production push on views as a good admin can spot a bad map/reduce job before it fills up your hard drive. I would recommend that you set up a separate cluster for the apps/devs and you XDCR data to it i.e. master->slave. That way the apps/dev will have real data in real time data. So if they break the slave cluster with “Bad” view its ok.
It would be great in the future to have in the Developer view be able to do an estimate of how long a view will take & how much HD space with production data.
Thanks for getting back to me.
FYI, it does appear to be possible to use bucket credentials to deploy a view. I’ve updated our deployment tool to use the REST API directly instead of the .NET API.
You are hitting a bug, that is logged here: