Содержание
VSTS setup
- Create a VSTS account if you don't have one
- Create a new user ( or use existing one)
- Create a Personal Access Token (PAT) http://roadtoalm.com/2015/07/22/using-personal-access-tokens-to-access-visual-studio-online/.
- Use Authorized Scopes as "All Scopes"
- Save PAT for the future use
- Create a VSTS pool
- Go to https://YourAccount.visualstudio.com/_admin/_AgentPool
- Press "New pool"
- Add the user you created the PAT token for to both
- Agent Pool Administrators (allows to register)
- Agent Pool Service Accounts (allows listening to build queue)
Chef setup
There are lots of ways to setup chef environment. This instruction will use 'Hosted Chef' and 'chefdk' on Windows. But others installations should work as well. (for more information check https://docs.chef.io/install_dk.html)
- Download chefdk from http://downloads.chef.io/chef-dk/
- Install chefdk
- Start cmd and run
chef verify
- Create a Chef account https://manage.chef.io/login
- Create an organization inside a chef account
- Go to https://manage.chef.io/organizations/YOUR_ORG/users/YOUR_ACCOUNT
- Press "Reset Key" in public key section
- Press "Download" and save key to %HOME%\.chef\YOUR_ACCOUNT.pem
- Where %HOME% is a local PC user profile directory
-
Create file %HOME%\.chef\knife.rb with next content
current_dir = File.dirname(FILE) log_level :info log_location STDOUT node_name "YOUR_ACCOUNT" client_key "#{current_dir}/YOUR_ACCOUNT.pem" chef_server_url "https://api.chef.io/organizations/YOUR_ORG"
10. To validate setup run ```knife node list```. If there is no any errors then setup is correct.
Now you need to install [Knife Azure](https://github.com/chef/knife-azure) plugin
1. Run ```chef gem install knife-azure```
2. Download a management cert from azure https://manage.windowsazure.com/publishsettings/index?client=xplat
3. Add next entry to a knife.rb file
knife[:azure_publish_settings_file] = "path/to/azure.publishsettings"
Этот файл содержит невидимые символы Юникода, которые могут быть отображены не так, как показано ниже. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы показать скрытые символы.