Bladeren bron

mejoras menores

Luciano Andrade 7 jaren geleden
bovenliggende
commit
c596fd014d

+ 43 - 4
statsd/grafana/lib/plugins/grafana-simple-json-datasource/README.md

@@ -11,12 +11,22 @@ Your backend needs to implement 4 urls:
  * `/query` should return metrics based on input.
  * `/annotations` should return annotations.
 
+## Installation
+
+To install this plugin using the `grafana-cli` tool:
+```
+sudo grafana-cli plugins install grafana-simple-json-datasource
+sudo service grafana-server restart
+```
+See [here](https://grafana.com/plugins/grafana-simple-json-datasource/installation) for more
+information.
+
 ### Example backend implementations
 - https://github.com/bergquist/fake-simple-json-datasource
 
 ### Query API
 
-Example request
+Example `timeserie` request
 ``` javascript
 {
   "panelId": 1,
@@ -35,15 +45,15 @@ Example request
   "interval": "30s",
   "intervalMs": 30000,
   "targets": [
-     { "target": "upper_50", refId: "A" },
-     { "target": "upper_75", refId: "B" }
+     { "target": "upper_50", "refId": "A", "type": "timeserie" },
+     { "target": "upper_75", "refId": "B", "type": "timeserie" }
   ],
   "format": "json",
   "maxDataPoints": 550
 }
 ```
 
-Example response
+Example `timeserie` response
 ``` javascript
 [
   {
@@ -63,6 +73,25 @@ Example response
 ]
 ```
 
+If the metric selected is `"type": "table"`, an example `table` response:
+```json
+[
+  {
+    "columns":[
+      {"text":"Time","type":"time"},
+      {"text":"Country","type":"string"},
+      {"text":"Number","type":"number"}
+    ],
+    "rows":[
+      [1234567,"SE",123],
+      [1234567,"DE",231],
+      [1234567,"US",321]
+    ],
+    "type":"table"
+  }
+]
+```
+
 ### Annotation API
 
 The annotation request from the Simple JSON Datasource is a POST request to
@@ -141,6 +170,16 @@ This plugin requires node 6.10.0
 
 ### Changelog
 
+1.3.5
+- Fix for dropdowns in query editor to allow writing template variables (broke due to change in Grafana).
+
+1.3.4
+- Adds support for With Credentials (sends grafana cookies with request) when using Direct mode
+- Fix for the typeahead component for metrics dropdown (/search endpoint).
+
+1.3.3
+ - Adds support for basic authentication
+
 1.2.4
  - Add support returning sets in the search endpoint
 

+ 33 - 4
statsd/grafana/lib/plugins/grafana-simple-json-datasource/dist/README.md

@@ -16,7 +16,7 @@ Your backend needs to implement 4 urls:
 
 ### Query API
 
-Example request
+Example `timeserie` request
 ``` javascript
 {
   "panelId": 1,
@@ -35,15 +35,15 @@ Example request
   "interval": "30s",
   "intervalMs": 30000,
   "targets": [
-     { "target": "upper_50", refId: "A" },
-     { "target": "upper_75", refId: "B" }
+     { "target": "upper_50", "refId": "A", "type": "timeserie" },
+     { "target": "upper_75", "refId": "B", "type": "timeserie" }
   ],
   "format": "json",
   "maxDataPoints": 550
 }
 ```
 
-Example response
+Example `timeserie` response
 ``` javascript
 [
   {
@@ -63,6 +63,25 @@ Example response
 ]
 ```
 
+If the metric selected is `"type": "table"`, an example `table` response:
+```json
+[
+  {
+    "columns":[
+      {"text":"Time","type":"time"},
+      {"text":"Country","type":"string"},
+      {"text":"Number","type":"number"}
+    ],
+    "rows":[
+      [1234567,"SE",123],
+      [1234567,"DE",231],
+      [1234567,"US",321]
+    ],
+    "type":"table"
+  }
+]
+```
+
 ### Annotation API
 
 The annotation request from the Simple JSON Datasource is a POST request to
@@ -141,6 +160,16 @@ This plugin requires node 6.10.0
 
 ### Changelog
 
+1.3.5
+- Fix for dropdowns in query editor to allow writing template variables (broke due to change in Grafana).
+
+1.3.4
+- Adds support for With Credentials (sends grafana cookies with request) when using Direct mode
+- Fix for the typeahead component for metrics dropdown (/search endpoint).
+
+1.3.3
+ - Adds support for basic authentication
+
 1.2.4
  - Add support returning sets in the search endpoint
 

+ 22 - 12
statsd/grafana/lib/plugins/grafana-simple-json-datasource/dist/datasource.js

@@ -44,6 +44,11 @@ System.register(['lodash'], function (_export, _context) {
           this.q = $q;
           this.backendSrv = backendSrv;
           this.templateSrv = templateSrv;
+          this.withCredentials = instanceSettings.withCredentials;
+          this.headers = { 'Content-Type': 'application/json' };
+          if (typeof instanceSettings.basicAuth === 'string' && instanceSettings.basicAuth.length > 0) {
+            this.headers['Authorization'] = instanceSettings.basicAuth;
+          }
         }
 
         _createClass(GenericDatasource, [{
@@ -58,17 +63,16 @@ System.register(['lodash'], function (_export, _context) {
               return this.q.when({ data: [] });
             }
 
-            return this.backendSrv.datasourceRequest({
+            return this.doRequest({
               url: this.url + '/query',
               data: query,
-              method: 'POST',
-              headers: { 'Content-Type': 'application/json' }
+              method: 'POST'
             });
           }
         }, {
           key: 'testDatasource',
           value: function testDatasource() {
-            return this.backendSrv.datasourceRequest({
+            return this.doRequest({
               url: this.url + '/',
               method: 'GET'
             }).then(function (response) {
@@ -93,7 +97,7 @@ System.register(['lodash'], function (_export, _context) {
               rangeRaw: options.rangeRaw
             };
 
-            return this.backendSrv.datasourceRequest({
+            return this.doRequest({
               url: this.url + '/annotations',
               method: 'POST',
               data: annotationQuery
@@ -103,17 +107,15 @@ System.register(['lodash'], function (_export, _context) {
           }
         }, {
           key: 'metricFindQuery',
-          value: function metricFindQuery(options) {
-            var target = typeof options === "string" ? options : options.target;
+          value: function metricFindQuery(query) {
             var interpolated = {
-              target: this.templateSrv.replace(target, null, 'regex')
+              target: this.templateSrv.replace(query, null, 'regex')
             };
 
-            return this.backendSrv.datasourceRequest({
+            return this.doRequest({
               url: this.url + '/search',
               data: interpolated,
-              method: 'POST',
-              headers: { 'Content-Type': 'application/json' }
+              method: 'POST'
             }).then(this.mapToTextValue);
           }
         }, {
@@ -128,6 +130,14 @@ System.register(['lodash'], function (_export, _context) {
               return { text: d, value: d };
             });
           }
+        }, {
+          key: 'doRequest',
+          value: function doRequest(options) {
+            options.withCredentials = this.withCredentials;
+            options.headers = this.headers;
+
+            return this.backendSrv.datasourceRequest(options);
+          }
         }, {
           key: 'buildQueryParameters',
           value: function buildQueryParameters(options) {
@@ -140,7 +150,7 @@ System.register(['lodash'], function (_export, _context) {
 
             var targets = _.map(options.targets, function (target) {
               return {
-                target: _this.templateSrv.replace(target.target),
+                target: _this.templateSrv.replace(target.target, options.scopedVars, 'regex'),
                 refId: target.refId,
                 hide: target.hide,
                 type: target.type || 'timeserie'

File diff suppressed because it is too large
+ 1 - 1
statsd/grafana/lib/plugins/grafana-simple-json-datasource/dist/datasource.js.map


+ 6 - 2
statsd/grafana/lib/plugins/grafana-simple-json-datasource/dist/partials/query.editor.html

@@ -10,8 +10,12 @@
 
     <div ng-if="!ctrl.target.rawQuery">
       <div class="gf-form">
-        <metric-segment-model property="ctrl.target.target" get-options="ctrl.getOptions()" on-change="ctrl.onChangeInternal()"
-          css-class="tight-form-item-xxlarge"></metric-segment-model>
+        <gf-form-dropdown model="ctrl.target.target"
+          allow-custom="true"
+          lookup-text="true"
+          get-options="ctrl.getOptions($query)"
+          on-change="ctrl.onChangeInternal()">
+      </gf-form-dropdown>
       </div>
     </div>
   </div>

+ 4 - 4
statsd/grafana/lib/plugins/grafana-simple-json-datasource/dist/plugin.json

@@ -13,8 +13,8 @@
   "info": {
     "description": "simple json datasource",
     "author": {
-      "name": "Raintank Inc.",
-      "url": "http://raintank.io"
+      "name": "Grafana Labs",
+      "url": "https://grafana.com"
     },
     "logos": {
       "small": "img/simpleJson_logo.svg",
@@ -24,8 +24,8 @@
       {"name": "GitHub", "url": "https://github.com/grafana/simple-json-datasource"},
       {"name": "MIT License", "url": "https://github.com/grafana/simple-json-datasource/blob/master/LICENSE"}
     ],
-    "version": "1.3.1",
-    "updated": "2017-01-30"
+    "version": "1.3.5",
+    "updated": "2017-09-21"
   },
 
   "dependencies": {

+ 3 - 5
statsd/grafana/lib/plugins/grafana-simple-json-datasource/dist/query_ctrl.js

@@ -61,13 +61,12 @@ System.register(['app/plugins/sdk', './css/query-editor.css!'], function (_expor
       _export('GenericDatasourceQueryCtrl', GenericDatasourceQueryCtrl = function (_QueryCtrl) {
         _inherits(GenericDatasourceQueryCtrl, _QueryCtrl);
 
-        function GenericDatasourceQueryCtrl($scope, $injector, uiSegmentSrv) {
+        function GenericDatasourceQueryCtrl($scope, $injector) {
           _classCallCheck(this, GenericDatasourceQueryCtrl);
 
           var _this = _possibleConstructorReturn(this, (GenericDatasourceQueryCtrl.__proto__ || Object.getPrototypeOf(GenericDatasourceQueryCtrl)).call(this, $scope, $injector));
 
           _this.scope = $scope;
-          _this.uiSegmentSrv = uiSegmentSrv;
           _this.target.target = _this.target.target || 'select metric';
           _this.target.type = _this.target.type || 'timeserie';
           return _this;
@@ -75,9 +74,8 @@ System.register(['app/plugins/sdk', './css/query-editor.css!'], function (_expor
 
         _createClass(GenericDatasourceQueryCtrl, [{
           key: 'getOptions',
-          value: function getOptions() {
-            return this.datasource.metricFindQuery(this.target).then(this.uiSegmentSrv.transformToSegments(false));
-            // Options have to be transformed by uiSegmentSrv to be usable by metric-segment-model directive
+          value: function getOptions(query) {
+            return this.datasource.metricFindQuery(query || '');
           }
         }, {
           key: 'toggleEditorMode',

File diff suppressed because it is too large
+ 1 - 1
statsd/grafana/lib/plugins/grafana-simple-json-datasource/dist/query_ctrl.js.map


+ 16 - 16
statsd/grafana/lib/plugins/grafana-simple-json-datasource/package.json

@@ -22,29 +22,29 @@
   },
   "engineStrict": true,
   "devDependencies": {
-    "babel": "~6.5.1",
+    "babel": "^6.23.0",
     "chai": "~3.5.0",
-    "grunt": "~0.4.5",
+    "grunt": "^1.0.1",
     "grunt-babel": "~6.0.0",
     "grunt-cli": "^1.2.0",
-    "grunt-contrib-clean": "~0.6.0",
-    "grunt-contrib-copy": "~0.8.2",
-    "grunt-contrib-uglify": "~0.11.0",
-    "grunt-contrib-watch": "^0.6.1",
+    "grunt-contrib-clean": "^1.1.0",
+    "grunt-contrib-copy": "^1.0.0",
+    "grunt-contrib-uglify": "^2.3.0",
+    "grunt-contrib-watch": "^1.0.0",
     "grunt-execute": "~0.2.2",
-    "grunt-mocha-test": "~0.12.7",
-    "grunt-systemjs-builder": "^0.2.5",
-    "jsdom": "~3.1.2",
-    "load-grunt-tasks": "~3.2.0",
-    "prunk": "~1.2.1",
-    "q": "~1.4.1"
+    "grunt-mocha-test": "^0.13.2",
+    "grunt-systemjs-builder": "^1.0.0",
+    "jsdom": "~9.12.0",
+    "load-grunt-tasks": "^3.5.2",
+    "prunk": "^1.3.0",
+    "q": "^1.5.0"
   },
   "dependencies": {
     "babel-plugin-transform-es2015-for-of": "^6.6.0",
-    "babel-plugin-transform-es2015-modules-systemjs": "^6.5.0",
-    "babel-preset-es2015": "^6.5.0",
-    "lodash": "~4.0.0",
-    "mocha": "^2.4.5"
+    "babel-plugin-transform-es2015-modules-systemjs": "^6.24.1",
+    "babel-preset-es2015": "^6.24.1",
+    "lodash": "^4.17.4",
+    "mocha": "^3.2.0"
   },
   "homepage": "https://github.com/grafana/simple-json-datasource#readme"
 }

+ 3 - 14
statsd/grafana/lib/plugins/grafana-simple-json-datasource/spec/datasource_spec.js

@@ -9,7 +9,6 @@ describe('GenericDatasource', function() {
         ctx.backendSrv = {};
         ctx.templateSrv = {};
         ctx.ds = new Datasource({}, ctx.$q, ctx.backendSrv, ctx.templateSrv);
-
     });
 
     it('should return an empty array when no targets are set', function(done) {
@@ -89,7 +88,7 @@ describe('GenericDatasource', function() {
             return data;
         }
 
-        ctx.ds.metricFindQuery({target: 'search'}).then(function(result) {
+        ctx.ds.metricFindQuery('search').then(function(result) {
             expect(result).to.have.length(3);
             expect(result[0].text).to.equal('search_0');
             expect(result[0].value).to.equal('search_0');
@@ -117,7 +116,7 @@ describe('GenericDatasource', function() {
             return data;
         }
 
-        ctx.ds.metricFindQuery({target: ''}).then(function(result) {
+        ctx.ds.metricFindQuery('').then(function(result) {
             expect(result).to.have.length(3);
             expect(result[0].text).to.equal('metric_0');
             expect(result[0].value).to.equal('metric_0');
@@ -145,7 +144,7 @@ describe('GenericDatasource', function() {
             return data;
         }
 
-        ctx.ds.metricFindQuery({}).then(function(result) {
+        ctx.ds.metricFindQuery().then(function(result) {
             expect(result).to.have.length(3);
             expect(result[0].text).to.equal('metric_0');
             expect(result[0].value).to.equal('metric_0');
@@ -157,16 +156,6 @@ describe('GenericDatasource', function() {
         });
     });
 
-    it ('should throw error when args are undefined', function(done) {
-        global.assert.throw(ctx.ds.metricFindQuery, Error, "Cannot read property 'target' of undefined");
-        done();
-    });
-
-    it ('should throw error when args are null', function(done) {
-        global.assert.throw(function() { ctx.ds.metricFindQuery(null); }, Error, "Cannot read property 'target' of null");
-        done();
-    });
-
     it ('should return the metric target results when the args are a string', function(done) {
         ctx.backendSrv.datasourceRequest = function(request) {
             var target = request.data.target;

+ 0 - 2
statsd/grafana/lib/plugins/grafana-simple-json-datasource/spec/test-main.js

@@ -13,8 +13,6 @@ prunk.mock('app/plugins/sdk', {
 // Required for loading angularjs
 global.document = jsdom('<html><head><script></script></head><body></body></html>');
 global.window = global.document.parentWindow;
-global.navigator = window.navigator = {};
-global.Node = window.Node;
 
 // Setup Chai
 chai.should();

+ 21 - 12
statsd/grafana/lib/plugins/grafana-simple-json-datasource/src/datasource.js

@@ -9,6 +9,11 @@ export class GenericDatasource {
     this.q = $q;
     this.backendSrv = backendSrv;
     this.templateSrv = templateSrv;
+    this.withCredentials = instanceSettings.withCredentials;
+    this.headers = {'Content-Type': 'application/json'};
+    if (typeof instanceSettings.basicAuth === 'string' && instanceSettings.basicAuth.length > 0) {
+      this.headers['Authorization'] = instanceSettings.basicAuth;
+    }
   }
 
   query(options) {
@@ -19,18 +24,17 @@ export class GenericDatasource {
       return this.q.when({data: []});
     }
 
-    return this.backendSrv.datasourceRequest({
+    return this.doRequest({
       url: this.url + '/query',
       data: query,
-      method: 'POST',
-      headers: { 'Content-Type': 'application/json' }
+      method: 'POST'
     });
   }
 
   testDatasource() {
-    return this.backendSrv.datasourceRequest({
+    return this.doRequest({
       url: this.url + '/',
-      method: 'GET'
+      method: 'GET',
     }).then(response => {
       if (response.status === 200) {
         return { status: "success", message: "Data source is working", title: "Success" };
@@ -52,7 +56,7 @@ export class GenericDatasource {
       rangeRaw: options.rangeRaw
     };
 
-    return this.backendSrv.datasourceRequest({
+    return this.doRequest({
       url: this.url + '/annotations',
       method: 'POST',
       data: annotationQuery
@@ -61,17 +65,15 @@ export class GenericDatasource {
     });
   }
 
-  metricFindQuery(options) {
-    var target = typeof (options) === "string" ? options : options.target;
+  metricFindQuery(query) {
     var interpolated = {
-        target: this.templateSrv.replace(target, null, 'regex')
+        target: this.templateSrv.replace(query, null, 'regex')
     };
 
-    return this.backendSrv.datasourceRequest({
+    return this.doRequest({
       url: this.url + '/search',
       data: interpolated,
       method: 'POST',
-      headers: { 'Content-Type': 'application/json' }
     }).then(this.mapToTextValue);
   }
 
@@ -86,6 +88,13 @@ export class GenericDatasource {
     });
   }
 
+  doRequest(options) {
+    options.withCredentials = this.withCredentials;
+    options.headers = this.headers;
+
+    return this.backendSrv.datasourceRequest(options);
+  }
+
   buildQueryParameters(options) {
     //remove placeholder targets
     options.targets = _.filter(options.targets, target => {
@@ -94,7 +103,7 @@ export class GenericDatasource {
 
     var targets = _.map(options.targets, target => {
       return {
-        target: this.templateSrv.replace(target.target),
+        target: this.templateSrv.replace(target.target, options.scopedVars, 'regex'),
         refId: target.refId,
         hide: target.hide,
         type: target.type || 'timeserie'

+ 6 - 2
statsd/grafana/lib/plugins/grafana-simple-json-datasource/src/partials/query.editor.html

@@ -10,8 +10,12 @@
 
     <div ng-if="!ctrl.target.rawQuery">
       <div class="gf-form">
-        <metric-segment-model property="ctrl.target.target" get-options="ctrl.getOptions()" on-change="ctrl.onChangeInternal()"
-          css-class="tight-form-item-xxlarge"></metric-segment-model>
+        <gf-form-dropdown model="ctrl.target.target"
+          allow-custom="true"
+          lookup-text="true"
+          get-options="ctrl.getOptions($query)"
+          on-change="ctrl.onChangeInternal()">
+      </gf-form-dropdown>
       </div>
     </div>
   </div>

+ 4 - 4
statsd/grafana/lib/plugins/grafana-simple-json-datasource/src/plugin.json

@@ -13,8 +13,8 @@
   "info": {
     "description": "simple json datasource",
     "author": {
-      "name": "Raintank Inc.",
-      "url": "http://raintank.io"
+      "name": "Grafana Labs",
+      "url": "https://grafana.com"
     },
     "logos": {
       "small": "img/simpleJson_logo.svg",
@@ -24,8 +24,8 @@
       {"name": "GitHub", "url": "https://github.com/grafana/simple-json-datasource"},
       {"name": "MIT License", "url": "https://github.com/grafana/simple-json-datasource/blob/master/LICENSE"}
     ],
-    "version": "1.3.1",
-    "updated": "2017-01-30"
+    "version": "1.3.5",
+    "updated": "2017-09-21"
   },
 
   "dependencies": {

+ 3 - 6
statsd/grafana/lib/plugins/grafana-simple-json-datasource/src/query_ctrl.js

@@ -3,19 +3,16 @@ import './css/query-editor.css!'
 
 export class GenericDatasourceQueryCtrl extends QueryCtrl {
 
-  constructor($scope, $injector, uiSegmentSrv)  {
+  constructor($scope, $injector)  {
     super($scope, $injector);
 
     this.scope = $scope;
-    this.uiSegmentSrv = uiSegmentSrv;
     this.target.target = this.target.target || 'select metric';
     this.target.type = this.target.type || 'timeserie';
   }
 
-  getOptions() {
-    return this.datasource.metricFindQuery(this.target)
-      .then(this.uiSegmentSrv.transformToSegments(false));
-      // Options have to be transformed by uiSegmentSrv to be usable by metric-segment-model directive
+  getOptions(query) {
+    return this.datasource.metricFindQuery(query || '');
   }
 
   toggleEditorMode() {

+ 14 - 13
tools/playbook.yml

@@ -38,17 +38,6 @@
         login_password: "{{ lookup('env', 'MYSQL_PASSWORD') }}"
         state: present
 
-    - copy:
-        src: "{{ playbook_dir }}/mysql_scripts.sql"
-        dest: /tmp/mysql_scripts.sql
-
-    - name: Run SQL commands against DB to create table
-      mysql_db:
-        login_password: "{{ lookup('env', 'MYSQL_PASSWORD') }}"
-        state: import
-        name: fd_session
-        target: "/tmp/mysql_scripts.sql"
-
     - name: Create database base
       mysql_db:
         name: fd3_base
@@ -91,6 +80,17 @@
         login_password: "{{ lookup('env', 'MYSQL_PASSWORD') }}"
         state: present
 
+    - copy:
+        src: "{{ playbook_dir }}/mysql_scripts.sql"
+        dest: /tmp/mysql_scripts.sql
+
+    - name: Run SQL commands against DB to create table
+      mysql_db:
+        login_password: "{{ lookup('env', 'MYSQL_PASSWORD') }}"
+        state: import
+        name: fd_session
+        target: "/tmp/mysql_scripts.sql"
+
     - name: Create user iksop
       mysql_user:
         name: 'iksop'
@@ -122,7 +122,7 @@
         timeout: 600
 
     - name: Doctrine schema update
-      shell: "bin/console doctrine:schema:update --force"
+      shell: "eval $(ssh-agent) ; ssh-add keys/bitbucket.id_rsa ; composer install"
 
     - name: Load redirections
       set_fact:
@@ -153,6 +153,7 @@
       fetch:
           src: /opt/base/oauth.data.log
           dest: /tmp/
+          flat: yes
 
 - name: Configure oauth data for other container. Tag=configure_oauth
   hosts: 127.0.0.1
@@ -160,7 +161,7 @@
   tags: configure_oauth
   tasks:
     - name: "Add outh client id"
-      shell:  "cp /tmp/{{ lookup('env', 'DOMAIN') }}_base_1/opt/base/oauth.data.log {{ item }}.oauth.env"
+      shell:  "cp /tmp/oauth.data.log {{ item }}.oauth.env"
       args:
         executable: /bin/bash
       with_items: "{{ lookup('env', 'MODULES_INSTALL').split(',') }}"

+ 8 - 8
tools/readme.md

@@ -49,16 +49,16 @@
     # --build-arg: es la forma de pasarle parámetros al docker.
     # -t: es el nombre que tendrá el contenedor.
     # .: indica que el fuente se descargará en el directorio actual.
-    # para más información de los parámetros ejecutar "docker build --help"
+    # para más información de los parámetros ejecutar "docker build --he
 
-####. Instalamos con composer elementos adicionales.
-    docker run -it -v $(pwd):$(pwd) -v /root/galvez:/root/galvez -v /var/run/docker.sock:/tmp/docker.sock dind composer install     
+####. Instalamos con composer elementos adicionales. 
+    docker run -it -v $(pwd):$(pwd) -v /var/run/docker.sock:/tmp/docker.sock dind composer install     
     # --build-arg: es la forma de pasarle parámetros al docker.
     # -t: es el nombre que tendrá el contenedor.
     # para más información de los parámetros ejecutar "docker build --help"
 
 ####. Crear los archivos necesarios para la instalción. Dentro del directorio actual se crea un nuevo directorio con el nombre de la empresa. 
-    docker run -it -v $(pwd):$(pwd) -v /root/galvez:/root/galvez -v /var/run/docker.sock:/tmp/docker.sock dind make:install galvez --domain=galvez
+    docker run -it -v $(pwd):$(pwd) -v /var/run/docker.sock:/tmp/docker.sock dind make:install $(pwd)/$CLIENT --client=$CLIENT
     # docker run: ejecuta un comando sobre el contenedor.
     # -it: significa que voy a tener un tty interativo.
     # -v $(pwd):$(pwd): monta como un volumen el directorio actual, en el contenedor bajo el mismo directario.
@@ -70,7 +70,7 @@
     # para mas informacion ejecutar "docker run -it -v $(pwd):$(pwd) -v /var/run/docker.sock:/tmp/docker.sock dind make:install --help"
 
 ####. Obtener los fuentes desde bitbucket
-    docker run -it -v $(pwd):$(pwd) -v /root/galvez:/root/galvez -v /var/run/docker.sock:/tmp/docker.sock dind get:source galvez/git.ini
+    docker run -it -v $(pwd):$(pwd) -v /var/run/docker.sock:/tmp/docker.sock dind get:source $(pwd)/git.ini --timeout=120
     # docker run: ejecuta un comando sobre el contenedor.
     # -it: significa que voy a tener un tty interativo.
     # -v $(pwd):$(pwd): monta como un volumen el directorio actual, en el contenedor bajo el mismo directario.
@@ -81,7 +81,7 @@
     # para mas informacion ejecutar "docker run -it -v $(pwd):$(pwd) -v /var/run/docker.sock:/tmp/docker.sock dind get:source --help"
 
 ####. Renombramos los archivos innecesarios para el nginx.    
-    docker run -it -v $(pwd):$(pwd) -v /root/galvez:/root/galvez -v /var/run/docker.sock:/tmp/docker.sock dind fix:nginx galvez
+    docker run -it -v $(pwd):$(pwd) -v /var/run/docker.sock:/tmp/docker.sock dind fix:nginx $(pwd)
     # docker run: ejecuta un comando sobre el contenedor.
     # -it: significa que voy a tener un tty interativo.
     # -v $(pwd):$(pwd): monta como un volumen el directorio actual, en el contenedor bajo el mismo directario.
@@ -91,10 +91,10 @@
     # galvez: nombre de la empresa que estoy instalando.            
 
 ####. Entramos al docker para correr ansible y terminar la configuración
-    docker run -it -v $(pwd):$(pwd) -v /root/galvez:/root/galvez -v /var/run/docker.sock:/tmp/docker.sock dind bash
+    docker run -it -v $(pwd):$(pwd) -v /var/run/docker.sock:/tmp/docker.sock dind bash
     # docker run: ejecuta un comando sobre el contenedor.
     # -it: significa que voy a tener un tty interativo.
-    # -v $(pwd):$(pwd): monta como un volumen el directorio actual, en el contenedor bajo el mismo directario.
+    # -v $(pwd):$(pwd): monta como un volumen el directorio actual, en el contenedor bajo el mismo directorio.
     # -v /var/run/docker.sock:/tmp/docker.sock: comparte el docker.sock entre los docker's.
     # dind: es el nombre que le pusimos anteriormente al contenedor.
     # bash: significa que se ejecutará un bash.