You are here

MSDN Blogs

Subscribe to MSDN Blogs feed
Get the latest information, insights, announcements, and news from Microsoft experts and developers in the MSDN blogs.
Updated: 4 min 12 sec ago

In case you missed us at //build/…

Thu, 04/14/2016 - 12:00

Microsoft's annual developer conference, //build/, was held March 30th to April 1st in San Francisco. During the conference, we unveiled a new version of Microsoft Translator API that adds real-time speech translation capabilities to the existing text translation API.

Powered by Microsoft's state-of-the-art artificial intelligence technologies, speech translation has been available in Skype or over a year, and in the Microsoft Translator apps for iOS and Android since late 2015. Now, businesses will be able to add speech translation capabilities, including speech to speech and speech to text, to their applications or services to offer more natural and effective user experiences to their customers and staff.

In case you weren't able to attend the conference in person, we wanted to give you a chance to view some of the presentations that you may have missed and give you a sneak peek into how the new API works. In the videos you can also view some of the great demonstrations from our partner companies, Tele2 and ProDeaf, that tested the API and integrated into their own apps.

//build/ 2016: Harry Shum presents speech translation by Microsoft Translator

Executive Vice President, Dr. Harry Shum, the head of Microsoft's Technology and Research introduces Microsoft Translator and two demo apps from our partners, Tele2 and ProDeaf.

View Dr. Shum's full, unedited presentation here. //build/ 2016: Adding Microsoft Translator's new speech API to an app

This session at //build/ walks you through adding translation to an app built with other APIs from Microsoft's Cognitive Services.

View the full, unedited presentation here. Microsoft Translator: Speech Translation Made Easy

Take a look under the hood of an app using the new speech translation API. Microsoft Translator's Group Program Manager, Chris Wendt, and Program Manager Kelly Altom walk you through the code of an iOS designed to add multi-language support to information centers.

The full app is available open source on GitHub.

To get started with the new Microsoft Translator Speech API, just sign up for a free 2 hour trial aka.ms/TranslatorADMSpeech.


Microsoft Translator Technical References:

DOM size management

Wed, 04/13/2016 - 17:00

In HTML, sometimes we need get, set or adapt the size from or to an element by script. Following are often used.

  • Gets or sets the size of a DOM.
  • Gets the size of the window.
  • Gets the size of the HTML document.
  • Binds the width of a DOM to the one of window or another DOM.
  • Binds the height of a DOM to the one of window or another DOM.

I will introduce the implementation in Type Script for them here.

Get size

Firstly, we need define an interface for size information.

export interface SizeContract {     width: number;     height: number; }

And we want to implement the function to get following types of element.

  • Document.
  • Window.
  • DOM in body.

So the function should be like this way.

export function getSize(element: HTMLElement | string | Window | Document)     : SizeContract {     if (!element) return null;     // ToDo: Implement it.     return null; }

If the argument element is an identifier string, we need get its element.

if (typeof element === "string")     element = document.getElementById(element as string); if (!element) return null;

To get the size of a DOM, window or document, we can test which element type user passed to us. For document, we can check if there is any of following properties.

  • body
    A property of HTML document object.
  • documentElement
    A property of XML document object.

Following is code.

if (!!(element as any as Document).body     || !!(element as any as Document).documentElement) {     var bodyWidth = !!document.body         ? document.body.scrollWidth         : 0;     var documentWidth = !!document.documentElement         ? document.documentElement.scrollWidth         : 0;     var bodyHeight = !!document.body         ? document.body.scrollHeight         : 0;     var documentHeight = !!document.documentElement         ? document.documentElement.scrollHeight         : 0;     return {         width: bodyWidth > documentWidth             ? bodyWidth             : documentWidth,         height: bodyHeight > documentHeight             ? bodyHeight             : documentHeight     } }

For window, it contains a parent property to point to the parent window.

if (!!(element as any as Window).parent) {     return {         width: document.compatMode == "CSS1Compat"             ? document.documentElement.clientWidth             : document.body.clientWidth,         height: document.compatMode == "CSS1Compat"             ? document.documentElement.clientHeight             : document.body.clientHeight     }; }

Otherwise, it should be a DOM in body. And we can get its offset width and height.

return {     width: (element as HTMLElement).offsetWidth,     height: (element as HTMLElement).offsetHeight };

So we can use this function to get the size of the element now.

Set size

To set the size to an HTML element is very simple. The function has 3 arguments, one is the element to set, others are width and height. It returns the size of the element.

export function setSize(     element: HTMLElement | string,     width?: number | string,     height?: number | string)     : SizeContract {     if (!element) return null;     // ToDo: Implement it.     return null; }

Of course, we need get its element if the argument is a string for the identifier.

var ele = typeof element === "string"     ? document.getElementById(element)     : element; if (!element) return null;

Then we can set its width in inline style. We need add the unit px if it is a number.

if (width != null)     ele.style.width = typeof width === "string"         ? width         : (width.toString() + "px");

And set its height.

if (height != null)     ele.style.height = typeof height === "string"         ? height         : (height.toString() + "px");

And return the size after setting.

return {     width: ele.offsetWidth,     height: ele.offsetHeight };

Next, we need add some functions to make it adaptive to parent container, window or other reference object.

Adapt width

To bind the width to a target, we need pass these two elements to the function, and an additional compute function for width convertor. It should return a disposable object so that we can release the listening event anywhere.

export function adaptWidth(     element: HTMLElement,     target?: HTMLElement | Window,     compute?: (width: number) => number)     : { dispose(): void } {     // ToDo: Implement it.     return null; }

Firstly. we need check if the arguments of source element or target element is null.

if (!element || !target) return {     dispose: () => { } };

And we need implement a handler to set the width as same as the one of the target element.

  1. Check if the target is a window.
  2. Get its width.
  3. Convert the width if there is a compute function.
  4. Set the width.

Following is the code.

var setWidth = () => {     var width = !!(target as Window).parent         ? (window.innerWidth ? window.innerWidth : document.body.clientWidth)         : (target as HTMLElement).offsetWidth;     if (!!compute) width = compute(width);     setSize(element, width, null); };

Then we need call this handler.

setWidth();

This will be called only once. But we need call this every time when the target element has resized. So we need add an event listener to do so.

target.addEventListener("resize", (ev) => {     setWidth(); }, false);

And return a disposable object for removing the event listener.

return {     dispose: () => {         target.removeEventListener("resize", (ev) => {             setWidth();         }, false);     } };

So we have implemented width binding.

Adapt height

Just like to adapt width, we modify something so that we can get following code for binding height.

export function adaptHeight(     element: HTMLElement,     target?: HTMLElement | Window,     compute?: (height: number) => number)     : { dispose(): void } {     // Test arguments.     if (!element || !target) return {         dispose: () => { }     };     // A function to set height as same as target.     var setHeight = () => {         var height = !!(target as Window).parent             ? (window.innerHeight ? window.innerHeight : document.body.clientHeight)             : (target as HTMLElement).offsetHeight;         if (!!compute) height = compute(height);         setSize(element, null, height);     };     // Call the function to set height.     setHeight();     // Add event listener for the target resizing to set height.     target.addEventListener("resize", (ev) => {         setHeight();     }, false);     // Return a disposable object.     return {         dispose: () => {             target.removeEventListener("resize", (ev) => {                 setHeight();             }, false);         }     }; }

Now we can manage the size of any element in HTML now.

Scaling and scale monitoring SQL Data Warehouse via T-SQL

Wed, 04/13/2016 - 12:23

One of the key value propositions for the Azure SQL Data Warehouse service is the ability to re-size the compute power of the database very quickly. A common pattern is to re-size the cluster before a data load to decrease load and aggregation time, then re-size again to save costs when running report/analytic workloads. The operations are all supported via T-SQL code but the process is asynchronous. Being able to monitor when the database is available is key in making this work. 

Given that we're all database developers, let's look at how we can scale a database up or down via T-SQL code and then monitor when the database is scaled. 

Viewing the current Service Level Objective (SLO)

A Service Level Objective (SLO) is a fancy title for defining how much compute power you have assigned to your SQL DW database. For SQL DW, we quantify this in terms of  Data Warehouse Units (DWU) - a blend of the cores, memory, local storage, and network per compute node. To see the current setting for your database(s), Azure SQL provides a catalog view (sys.database_service_objectives) which returns the service tier and performance level for all databases on a logical Azure SQL Server. You can simply connect to the Master database on your logical server and run the following T-SQL to get the name and service_objective for your data warehouse databases:

SELECT
db.[name] AS [Name],
ds.[service_objective] AS [ServiceObject]
FROM
sys.database_service_objectives ds
JOIN sys.databases db ON ds.database_id = db.database_id
WHERE
1=1
AND ds.edition = 'DataWarehouse';

You should see a two column result with the name of your database and the current service objective.


Re-sizing your data warehouse

To change the size of your data warehouse, you can issue a T-SQL call to modify the service objective simply using the ALTER DATABASE statement and specifying the new service_objective. This is an asynchronous call - the T-SQL will return immediately but the process of resizing the cluster is happening behind the scenes.

Note:You will need to be connected to a different database than the one be re-sized. I've chosen the logical MASTER database.

ALTER DATABASE DemoDw MODIFY
(
service_objective = 'DW100'
); Monitoring the Change Request

Now that we have the database scaling, we want to be able to monitor the operation so we can resume any tasks (say a loading operation). Using some T-SQL ingenuity, we can simply poll the sys.dm_operation_status Dynamic Management View (DMV). The sys.dm_operation_status DMV returns operations performed on databases in Azure databases (both SQL Database and SQL Data Warehouse).

You can simply just use the WAITFOR DELAY T-SQL syntax, we can just poll the DMV for the current status. Below is a sample script that polls every 5 seconds for status. 

WHILE
(
SELECT TOP 1
state_desc
FROM
sys.dm_operation_status
WHERE
1=1
AND resource_type_desc = 'Database'
AND major_resource_id = 'DemoDW'
AND operation = 'ALTER DATABASE'
ORDER BY
start_time DESC
) = 'IN_PROGRESS'
BEGIN
PRINT 'Scale operation in progress';
WAITFOR DELAY '00:00:05';
END PRINT 'Complete';

This resulting output shows a log of the polling of the status:

  Integration

If you're using SSIS, you could implement this as an Execute T-SQL Statement Task as the beginning of your ETL/ELT job to re-size the service, execute your load and transform, and then scale right back down for low cost dashboard/analytic consumption. Look for another blog post on this pattern in an upcoming blog. 

Next Steps

Visit the SQL Data Warehouse Overview to learn more about Microsoft's scale out relational data warehouse.

Instant Translations from Cortana Are Now Available in French, German, Italian, and Spanish

Tue, 04/12/2016 - 16:00
Deutsch - English - Español - Français - Italiano

Microsoft is announcing that Cortana now supports instant translations for its French, German, Italian, and Spanish versions of Windows 10. When you are using Windows 10 in these languages and need a quick translation of a phrase, you can now just ask Cortana and you'll get your translation in an instant. You can also type the phrase into the Cortana toolbar in case you're in a place where you can't speak it out loud.

Microsoft Translator's mission is to break the language barrier by providing translation whenever and wherever you need it. In addition to being integrated into Cortana, you can also download the Translator app for Windows 10 to get translations from your webcam or to translate when you are not connected to the internet. Microsoft Translator apps are also available for iPhone and Apple Watch, Android phones and watches, and it is integrated into a number of products such as Microsoft Office, Bing, and Skype Translator.

Just like the English release of instant translation last September, you can ask Cortana to translate for you to get an answer right away. Currently, for instance, you can say in English, "Hey Cortana, translate where is the nearest taxi stand in Polish" (or any supported languages) and receive the translated phrase from Microsoft Translator right within Cortana. Now, this is also possible in these localized versions of Windows 10. Here are few examples of how you can ask for these translations in these languages:

French German Italian Spanish Traduis où est le restaurant le plus proche en Suédois. Übersetze ‚Wo befindet sich das nächstliegende Restaurant?' ins Schwedische. Traduci dov'è il ristorante più vicino in svedese. Traduce ¿Dónde está el restaurante más cercano? al Sueco. Comment dit-on où est l'hôtel le plus proche en Thaï? Wie sagt man ‚Wo ist der nächste Hotelladen' in Thailändisch? Come si dice dov'è l’albergo più vicino in cinese? ¿Cómo se dice dónde está el hotel más cercano en Tailandés?

Want to know if Cortana can translate into the language you need? Here is a list of the languages you can translate to:

Bosnian
Bulgarian
Catalan
Chinese (Simplified)
Chinese (Traditional)
Croatian
Czech
Danish
Dutch
English
Estonian
Finnish
French
German
Greek
Haitian Creole
Hebrew
Hindi Hmong Daw
Hungarian
Indonesian
Italian
Japanese
Kiswahili
Klingon
Klingon (plqaD)
Korean
Latvian
Lithuanian
Malay
Maltese
Norwegian
Persian
Polish
Portuguese
Querétaro Otomi Romanian
Russian
Serbian (Cyrillic)
Serbian (Latin)
Slovak
Slovenian
Spanish
Swedish
Thai
Turkish
Ukrainian
Urdu
Vietnamese
Welsh

Sometimes, if Cortana misunderstands you or does not have the translation, it will open up a web page after performing a web search for it.

Next time you want to know the translation of a word or phrase, just ask Cortana and she will lend you a hand!

For more Windows 10 resources, don't forget to check out the Windows 10 help, tips, and tricks page. Or if you have any questions, you can always post to Windows 10 Forums at Windows Central for more help.


Apps Powered by Microsoft Translator:

Connecting a Linked Server to Azure SQL Data Warehouse

Tue, 04/12/2016 - 12:04

With such a diversity of components to a data workloads, it is common for customers to use SQL Server linked servers to connect to their Azure SQL Data Warehouse. Setting this up and executing queries from SQL Server to SQL DW is pretty straight forward. I'm using SQL Server 2016 RC2 (get it here) for this sample but this has been tried on SQL Server 2012 and 2014 successfully. 

First, the limitations section:

  1. SQL Data Warehouse cannot be used to make an outgoing linked server connection
  2. SQL statements must be submitted using the linked server EXECUTE statement. Using the EXECUTE statement avoids using four-part names for objects, which is not supported by SQL DW. For example:

    Use this: 
    EXEC ( 'INSERT DemoDW.dbo.DimCustomers (CustomerId, Name) VALUES (4, ''Matt'')' ) AT [CloudDW];

    Don’t use this: 
    INSERT [CloudDw].DemoDW.dbo.DimCustomers (CustomerId, Name) VALUES (4, 'Matt')
     
  3. Other linked server functionality is not supported. For more information about using linked servers see Linking Servers on MSDN.
  4. The linked server provider must be run using the AllowInProcess option. The AllowInProcess option can be set in Management Studio by using the Properties dialog box for the provider.

AllowInProcess Setting

The first step is to ensure the AllowInProcess setting on the SQL Native Client library is set to true. This setting allows the provider to be instantiated as an in-process server. This is the default setting in SQL Server however you can enable it by running the following command:

USE [master];
GO

EXEC master.dbo.sp_MSset_oledb_prop N'SQLNCLI11', N'AllowInProcess', 1;
GO

Creating the Linked Server

Next, we'll create the actual linked server. There are a set of options that are specific to the configuration to enable SQL Server to connect with SQL Data Warehouse. Below are the statements you'll execute to configure this correctly (again run from your SQL Server VM). Please note I have variables in place for the <server>, <database>, user (########) and password (########) that you will need to replace. You can also change the remote server name (I’ve used CLOUDDW) to a value of your choice. You can read about these options in the Linked Server Properties pages (here). 

USE [master];
GO

EXEC master.dbo.sp_addlinkedserver @server = N'CLOUDDW', @srvproduct=N'SQLDW', @provider=N'SQLNCLI11', @datasrc=N'<server>.database.windows.net', @provstr=N'Server=<server>.database.windows.net;Database=<database>;Pooling=False', @catalog=N'<database>';
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'CLOUDDW',@useself=N'False',@locallogin=NULL,@rmtuser=N'########',@rmtpassword='########';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'collation compatible', @optvalue=N'false';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'data access', @optvalue=N'true';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'dist', @optvalue=N'false';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'pub', @optvalue=N'false';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'rpc', @optvalue=N'true';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'rpc out', @optvalue=N'true';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'sub', @optvalue=N'false';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'connect timeout', @optvalue=N'0';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'collation name', @optvalue=NULL;
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'lazy schema validation', @optvalue=N'true';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'query timeout', @optvalue=N'0';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'use remote collation', @optvalue=N'true';
EXEC master.dbo.sp_serveroption @server=N'CLOUDDW', @optname=N'remote proc transaction promotion', @optvalue=N'false';
GO

Executing Queries

Now that you've established connectivity, you can simply run some sample statements to verify connectivity. I've copied a couple of different variants below for you to try.

Note: If you change the remote server name above (from CLOUDDW to something else), you would need to change the value in the statement below to match.

 EXEC ( 'INSERT DemoDW.dbo.DimCustomers (CustomerId, Name) VALUES (1, ''Matt'')' ) AT [CloudDW];

 EXEC ( 'UPDATE DemoDW.dbo.DimCustomers SET Name = ''Matt Usher'' WHERE CustomerId = 1' ) AT [CloudDW];

 EXEC ( 'SELECT * FROM DemoDW.dbo.DimCustomers' ) AT [CloudDW];

 EXEC ( 'DELETE DemoDW.dbo.DimCustomers WHERE CustomerId = 1' ) AT [CloudDW];

Note: You can also use the OpenQuery syntax when executing queries (Thanks Sid!).

SELECT
*
FROM OPENQUERY(CloudDW,'SELECT * from DemoDW.dbo.DimCustomers');


Next Steps

Visit the SQL Data Warehouse Overview to learn more about Microsoft's scale out relational data warehouse.

DBCC PAGE

Tue, 04/12/2016 - 05:00

Continuando a série dos comandos históricos, vamos falar sobre o famoso DBCC PAGE. Esse é o quarto artigo da série: já comentei sobre o SET STATISTICS IO, DBCC DROPCLEANBUFFERS e DBCC SHOWCONTIG.

Vou recriar o ambiente do LOJADB:

Em seguida, quero me certificar que está funcionando tudo corretamente.

Antes de continuar, algumas pessoas desconfiaram da forma como construi a tabela. Estou usando o tipo de dados CHAR(800) ao invés do tradicional VARCHAR. Por isso, vou mudar o tipo de coluna. Por ser um tipo variável, vou trocar para VARCHAR(1000).

A tabela foi alterada para a nova coluna VARCHAR.

Rodei o sp_spaceused antes de começar os testes para validar a quantidade de registro e o tamanho da tabela. Curiosamente, não lembro da tabela ocupar 20MB, parece que está maior.

Vamos fazer o teste de desempenho. Começarei limpando o cache e depois habilitando o SET STATISTICS TIME e SET STATISTICS IO.

Apenas para manter a consistência dos testes, vou desabilitar o read-head usando o Trace Flag global 652. Limpando o cache e executando novamente:

Consegui bater o recorde do tempo! Agora a query está rodando em 2659ms.

 

Investigação usando o DBCC PAGE

Por algum motivo houve um aumento significativo no número de logical reads (7502), assim como nas leituras físicas (2506). Por isso, comecei olhando as páginas em memória do Buffer Pool. Encontrei exatamente 2509 páginas pertencentes ao LOJADB. No entanto, o que me chamou a atenção foi existir páginas com 8 registros e outras, com apenas 4.

A investigação continua com a ajuda do DBCC PAGE.

Esse comando está disponível desde os primórdios do SQL Server e deve ser usado em conjunto com o Trace Flag 3604.

DBCC PAGE (SQL 6.5)
https://support.microsoft.com/en-us/kb/83065

A sintaxe é simples:

DBCC PAGE(dbid, file_id, page_id, opt)

Vamos investigar a página 26057, que possui 4 registros.

Cabeçalho:

A resposta está no tipo de registro armazenado! Esses 4 registros são FORWARDED_RECORD.

Rodando o DBCC PAGE nas páginas com 8 registros, encontro os ponteiros FORWARDING_STUB:

O mistério está resolvido. Ao executar o comando ALTER TABLE - ALTER COLUMN, os registros foram “expulsos” da página para uma página externa usando os mecanismos de “forwarded records”.

Existe uma boa explicação disso no livro “Inside SQL Server”. Também encontrei esse artigo do Paul Randal:

Inside the Storage Engine: Anatomy of a record
http://www.sqlskills.com/blogs/paul/inside-the-storage-engine-anatomy-of-a-record/

 

Conclusão

Ao mudar o tipo de dado da coluna, forçamos a ocorrência de Forwarded Records e causamos a fragmentação de dados em disco. Esse problema ocorreu porque a tabela está organizado como Heap e não estamos trabalhando com Clustered Index.

No próximo artigo, vou mostrar um comportamento muito curioso das Heaps. Ainda preciso pensar no título.

Test New Post

Sun, 04/10/2016 - 23:13

原文发表地址:Lightweight C++ Installation in Visual Studio “15”

发表时间:2016/04/01 Gabriel Ha

最近,在//开发者研讨会上我们宣布了Visual Studio的一个新的预览版安装体验,让你更专注你需要的工具的子集,并且把对您的计算机影响减小到最小。在这次新的安装中(它从Visual Studio “15“ 预览版全部安装中分离),我们在为从根本上改善之前的安装方式做准备,使大多数开发人员能够更快的安装,并使像多个版本并行的诸如这样的状况运行更加畅快。

下载安装程序试试吧!

C++的安装体验

新安装的经验提供了一个针对于”C++桌面应用开发“的包含所有浏览,智能感应,编译及调试功能,在你所期望的Visual Studio的C++工具上,然而会占用更小的空间,看看我们的GoingNative一个快速的视频演示。

是的,这是下载的大小,然后就看你的你的计算机以多快的速度解压提取这些文件。更重要的是,等这些都文件解压完毕,安装也就完成了。除了几个组件之外,这种安装方式并不像传统的方式那样安装时还需要修改注册表或拷贝内容到不同的文件夹下。

因此,尽管这仍然取决于你的下载速度和您计算机的配置,我们已经听到了有人运行它不到五分钟的报告(参见GoingNative演示证明。更重要的是,今天快试试吧)。

这通常是你看到一些星号指向我们的试验发布的限制和这样的一些描述”你的安装时间有可能有所不同。”当然,可以自己先算算,”C++桌面开发“和1.XGB两者都不可能会考虑每一个VS 支持的C++场景。但新的安装程序不支持所有MFC和/或 ATL和/或对于Android和iOS的跨平台的 移动开发者,我们正往那个方向计划,这些可不是在诱售。

因此,kick the tires,请参考下面列表已知的限制,也可以直接在gaha@microsoft.com联系我, 我很乐意和你交流。让你的评论和反馈来影响一个伟大的安装体验吧。

最好的问候,

Gabriel Ha Visual C++ 团队

已知限制

想要了解那些状况是被支持的和关注的,,请看看C++里的新项目工程向导:

 

目前预览版还不支持本地的命令提示符工具

C++/CLI和Win10 SDK未安装,但您可以设置手动下载组件(如果你安装.NET,C++/CIL将会正常工作)。

如果你想要完整的C++经验,您可以安装完整Visual Studio “15” Preview[下载|发行说明|已知问题]

Interactive Mode no Build Agent vNext

Sun, 04/10/2016 - 15:58

Ao instalar o novo modelo de Builds do VSTS ou TFS 2015, é possível instala-lo como serviço no Windows. Para quem não configurou essa opção e gostaria que o Build sempre fosse iniciado assim que o Windows iniciasse de forma interativa, seguem as opções:

  1. Entre nas configurações de contas de usuário do Windows e desative a opção “Users must enter a user name and password to use this computer”


  2. Preencha o usuário e senha que será utilizado para efetuar login automaticamente clique em ok.
  3. Agora vamos criar um atalho para iniciar automaticamente nosso build agent no Startup do Windows:
    • Windows + R
    • Digite Shell: Startup e aperte Enter
    • Crie um novo atalho (botão direito na pasta –> novo –> atalho) com o caminho onde estão seus arquivos do Agent
      • Ex.: C:\Windows\System32\cmd.exe /c c:\agent1\agent\vsoagent.exe
  4. Pronto. Ao abrir esse atalho o Agent será executado em modo interativo. Mantenha-o executando e verifique seu status no portal do VSTS/TFS.

Obs.: Gostaria de lembrar que essas configurações vão permitir que o Windows faça login automaticamente com esse usuário, sendo assim essas configurações devem ser utilizadas com cuidado.

Instalando Build Agents em um servidor de Build

Sun, 04/10/2016 - 15:20

Para quem já trabalha com o TFS a algum tempo, sabe como dava certo trabalho para instalar uma topologia de TFS com Builds Agents e Build Controller, entender como funcionavam, escolher uma Collection por Controller, etc. No entanto agora para o VSTS/TFS 2015 não será mais necessária a instalação de um controller, somente dos Build Agents, pois o próprio VSTS/TFS 2015 fazem a orquestração dos Agents (não estamos falando de XAML build aqui, ok?).

  1. Abra o endereço de seu VSTS/TFS. Ex.: https://url.visualstudio.com/DefaultCollection/TeamProject
  2. Clique na engrenagem no canto superior direito para abrir a área de administração


  3. Selecione o Control Panel
  4. Clique na aba Agent pools
  5. Clique no link Download agent


  6. Salve o arquivo em uma pasta de sua preferencia
  7. Clique com o botão direito no arquivo agent.zip
  8. Selecione as propriedades do arquivo
  9. Verifique se o arquivo está desbloqueado


  10. Extraia o arquivo para a pasta onde ele será instalado e configurado
  11. Eu continuo instalando um agent por Core, por isso vou nomear a pasta como Agent1
  12. Execute o arquivo ConfigureAgent.cmd com privilégios elevados


  13. Preencha as informações requeridas ou se for o caso aperte “enter” para as opções default apresentadas:
    • Nome do Agent
    • URL do VSTS/TFS. Ex.: https://url.visualstudio.com/DefaultCollection
    • Preencha o Agent Pool do Agent
    • Preencha a work folder do Agent
    • Preencha Y/N para instalar o Agent como serviço ou não.
    • Caso escolha executar como serviço, preencha também o nome do usuário com que será executado
    • Uma janela para inserir o usuário e senha será apresentada.

  14. Após isso o agent está configurado e irá exibir as mensagens abaixo:


  15. Verifique no portal se seu novo Build Agent está instalado e funcionando

Por hoje é isso! Até a próxima!

Pages

Drupal 7 Appliance - Powered by TurnKey Linux