How to use the taskcluster-client.AwsProvisioner function in taskcluster-client

To help you get started, we’ve selected a few taskcluster-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github taskcluster / taskcluster-tools / src / aws-provisioner / workertypeeditor.jsx View on Github external
if (obj && obj.UserData) {
    obj.UserData = new Buffer(JSON.stringify(obj.UserData)).toString('base64');
  }
};
const decodeUserData = obj => {
  if (obj && obj.UserData) {
    obj.UserData = JSON.parse(new Buffer(obj.UserData, 'base64').toString());
  }
};
/* eslint-enable no-param-reassign */

const WorkerTypeEditor = React.createClass({
  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        awsProvisioner: taskcluster.AwsProvisioner,
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl: 'https://aws-provisioner.taskcluster.net/v1',
        },
      },
      reloadOnProps: ['definition', 'workerType'],
    }),
  ],

  propTypes: {
    // Callback to be called with workerType operated on as parameter
    updated: React.PropTypes.func.isRequired,
    // WorkerType to update, null of none
    workerType: React.PropTypes.string,
    definition: React.PropTypes.object.isRequired,
github taskcluster / taskcluster-tools / aws-provisioner / workertypeedit.jsx View on Github external
],
  "regions": [
    {
      "region": "us-west-2",
      "overwrites": {
        "ImageId": "ami-abcdefg"
      }
    }
  ]
};

var WorkerTypeEdit = React.createClass({
  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        awsProvisioner: taskcluster.AwsProvisioner,
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl:      'https://taskcluster-aws-provisioner2.herokuapp.com/v1'
        }
      }
    }),
  ],
  getInitialState: function() {
    var worker = this.props.value || defaultWorkerType;
    console.log(worker);

    function decodeUD(str) {
      return JSON.parse(new Buffer(str, 'base64').toString());
    }
github taskcluster / taskcluster-tools / aws-provisioner / awsprovisioner.jsx View on Github external
selectWorkerType={that.props.selectWorkerType}
                      reload={that.reload} />;
          })
        }
        
      
    );
  },
});

var WorkerTypeRow = React.createClass({
  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        queue: taskcluster.Queue,
        awsProvisioner: taskcluster.AwsProvisioner
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl: 'https://taskcluster-aws-provisioner2.herokuapp.com/v1'
        }
      }
    }),
  ],

  propTypes: {
    workerType: React.PropTypes.string.isRequired,
    awsState: React.PropTypes.shape({
      running: React.PropTypes.arrayOf(React.PropTypes.object),
      pending: React.PropTypes.arrayOf(React.PropTypes.object),
      spotReq: React.PropTypes.arrayOf(React.PropTypes.object),
    }).isRequired,
github taskcluster / taskcluster-tools / src / aws-provisioner / workertypetable.js View on Github external
import React from 'react';
import {OverlayTrigger, ProgressBar, Tooltip, ButtonToolbar, Button, Glyphicon, Table} from 'react-bootstrap';
import * as utils from '../lib/utils';
import taskcluster from 'taskcluster-client';
import _ from 'lodash';
import WorkerTypeView from './workertypeview';
import WorkerTypeEditor from './workertypeeditor';
import './aws-provisioner.less';

const WorkerTypeRow = React.createClass({
  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        queue: taskcluster.Queue,
        awsProvisioner: taskcluster.AwsProvisioner,
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl: 'https://aws-provisioner.taskcluster.net/v1',
        },
      },
      reloadOnProps: [
        'provisionerId',
        'workerType',
      ],
    }),
  ],

  propTypes: {
    provisionerId: React.PropTypes.string.isRequired,
    workerType: React.PropTypes.shape({
github taskcluster / taskcluster-tools / aws-provisioner / awsprovisioner.jsx View on Github external
var bs                = require('react-bootstrap');
var utils             = require('../lib/utils');
var taskcluster       = require('taskcluster-client');
var _                 = require('lodash');
var format            = require('../lib/format');
var ConfirmAction     = require('../lib/ui/confirmaction');
var WorkerTypeEdit    = require('./workertypeedit');
var WorkerTypeDetail  = require('./workerdetail');

const PROVISIONER_ID = 'aws-provisioner-v1';

var WorkerTypeTable = React.createClass({
  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        awsProvisioner: taskcluster.AwsProvisioner,
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl: 'https://taskcluster-aws-provisioner2.herokuapp.com/v1'
        }
      }
    }),
  ],

  propTypes: {
    selectWorkerType: React.PropTypes.func.isRequired,
  },

  getInitialState: function() {
    return {
      workerTypes: [],
github taskcluster / taskcluster-tools / aws-provisioner / workertypetable.js View on Github external
var React             = require('react');
var bs                = require('react-bootstrap');
var utils             = require('../lib/utils');
var taskcluster       = require('taskcluster-client');
var _                 = require('lodash');
var format            = require('../lib/format');
var WorkerTypeView    = require('./workertypeview');
var WorkerTypeEditor  = require('./workertypeeditor');

var WorkerTypeRow = React.createClass({
  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        queue:          taskcluster.Queue,
        awsProvisioner: taskcluster.AwsProvisioner
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl:      'https://aws-provisioner.taskcluster.net/v1'
        }
      },
      reloadOnProps: [
        'provisionerId',
        'workerType'
      ]
    })
  ],

  propTypes: {
    provisionerId: React.PropTypes.string.isRequired,
    workerType: React.PropTypes.shape({
github taskcluster / taskcluster-tools / aws-provisioner / workertypetable.js View on Github external
}
  ],
  "userData": {},
  "launchSpec": {
  },
  "secrets": {},
  "scopes": []
};


/** Table of workerTypes */
var WorkerTypeTable = React.createClass({
  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        awsProvisioner: taskcluster.AwsProvisioner,
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl:      'https://aws-provisioner.taskcluster.net/v1'
        }
      },
      reloadOnProps: [
        'provisionerId'
      ]
    }),
    utils.createLocationHashMixin({
      keys:           ['selected'],
      type:           'string'
    })
  ],
github taskcluster / taskcluster-tools / src / aws-provisioner / workertypeview.jsx View on Github external
{pending * instTypeDef.capacity} ({pending} instances)
        
        
          {spotReq * instTypeDef.capacity} ({spotReq} instances)
        
      
    );
  },
});

const WorkerTypeView = React.createClass({
  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        queue: taskcluster.Queue,
        awsProvisioner: taskcluster.AwsProvisioner,
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl: 'https://aws-provisioner.taskcluster.net/v1',
        },
      },
      reloadOnProps: [
        'workerType',
        'provisionerId',
      ],
    }),
    utils.createLocationHashMixin({
      keys: ['currentTab'],
      type: 'string',
    }),
  ],
github taskcluster / taskcluster-tools / src / aws-provisioner / workertypetable.js View on Github external
},
  ],
  userData: {},
  launchSpec: {},
  secrets: {},
  scopes: [],
};

/** Table of workerTypes */
export default React.createClass({
  displayName: 'WorkerTypeTable',

  mixins: [
    utils.createTaskClusterMixin({
      clients: {
        awsProvisioner: taskcluster.AwsProvisioner,
      },
      clientOpts: {
        awsProvisioner: {
          baseUrl: 'https://aws-provisioner.taskcluster.net/v1',
        },
      },
      reloadOnProps: [
        'provisionerId',
      ],
    }),
    utils.createLocationHashMixin({
      keys: ['selected'],
      type: 'string',
    }),
  ],