{"id":12667,"date":"2018-02-12T15:36:56","date_gmt":"2018-02-12T15:36:56","guid":{"rendered":"https:\/\/blog.jetbrains.com\/teamcity\/?p=6422"},"modified":"2018-04-08T07:00:42","modified_gmt":"2018-04-08T07:00:42","slug":"the-official-teamcity-azure-resource-manager-template","status":"publish","type":"teamcity","link":"https:\/\/blog.jetbrains.com\/fr\/teamcity\/2018\/02\/the-official-teamcity-azure-resource-manager-template","title":{"rendered":"The official TeamCity Azure Resource Manager template"},"content":{"rendered":"<p>We are happy to announce the <a href=\"https:\/\/github.com\/JetBrains\/teamcity-azure-template\" target=\"_blank\" rel=\"noopener\">Azure Resource Manager template<\/a> for TeamCity. You can now deploy TeamCity to Azure cloud services and save time on configuration tasks. <a href=\"https:\/\/www.jetbrains.com\/teamcity\/download\/#section=azure\" target=\"_blank\" rel=\"noopener\">Get ready to start using TeamCity<\/a> in several minutes!<\/p>\n<p><a href=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/02\/teamcity-teamcity_azure.png\" rel=\"attachment wp-att-6438\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-6438\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/02\/teamcity-teamcity_azure.png\" alt=\"teamcity_azure\" width=\"1958\" height=\"629\" \/><\/a><\/p>\n<h2>Deploy TeamCity to Azure Cloud Services<\/h2>\n<p>The template performs the following tasks:<\/p>\n<ul>\n<li>Setting up of an external database<\/li>\n<li>Creating a virtual machine for the TeamCity server<\/li>\n<li>Configuring the TeamCity server machine<\/li>\n<li>Installing the TeamCity server<\/li>\n<li>Installing a TeamCity build agent<\/li>\n<\/ul>\n<p>Depending on your team size, you can select the appropriate TeamCity <a href=\"https:\/\/github.com\/JetBrains\/teamcity-azure-template#installation-size\" target=\"_blank\" rel=\"noopener\">installation size<\/a> for evaluation or production usage:<\/p>\n<ul>\n<li>Small &#8211; suitable for small teams, typically 3 users, 100 builds\/day.<\/li>\n<li>Medium &#8211; suitable for medium sized teams, typically 5 users, 300 builds\/day.<\/li>\n<li>Large &#8211; is intended for large teams, typically 20 users, 1000 builds\/day.<\/li>\n<\/ul>\n<p>To get started, perform the following steps:<\/p>\n<ul>\n<li>Specify the resource group name<\/li>\n<li>Enter a <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/virtual-machines\/linux\/create-ssh-keys-detailed\" target=\"_blank\" rel=\"noopener\">public SSH key<\/a> for the TeamCity server machine<\/li>\n<li>Enter a password for the database<\/li>\n<li>Click <strong>Purchase<\/strong>.<\/li>\n<\/ul>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-6423\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/02\/teamcity-azure-template-deployment.png\" alt=\"azure-template-deployment\" width=\"1486\" height=\"1167\" \/><\/p>\n<p>Wait for about 10 minutes and you will be able to navigate to the TeamCity URL received from the template outputs:<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-6424\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/02\/teamcity-azure-template-outputs.png\" alt=\"azure-template-outputs\" width=\"1169\" height=\"481\" \/><\/p>\n<p>After opening the TeamCity page, you\u2019ll need to accept the license agreement and set the root account credentials. Now you are ready to use TeamCity.<\/p>\n<h2>Configure additional Azure integrations<\/h2>\n<p>Your TeamCity server comes with preinstalled plugins which can be used to configure tighter integration with Azure services:<\/p>\n<ul>\n<li><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/9260-azure-resource-manager-cloud-support\" target=\"_blank\" rel=\"noopener\">Azure Cloud Agents<\/a>\u00a0allows scaling the pool of TeamCity build agents by leveraging Azure virtual machines.<\/li>\n<li><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/9617-azure-artifact-storage\" target=\"_blank\" rel=\"noopener\">Azure Artifacts Storage<\/a>\u00a0allows storing build artifacts in Azure Cloud Storage Blobs.<\/li>\n<li><a href=\"https:\/\/plugins.jetbrains.com\/plugin\/9083-azure-active-directory\" target=\"_blank\" rel=\"noopener\">Azure Active Directory<\/a>\u00a0allows using Azure AD authentication in TeamCity.<\/li>\n<\/ul>\n<h2>How it works<\/h2>\n<p>During the deployment process, the service allocates a Linux virtual machine. The VM is powered by <a href=\"https:\/\/azuremarketplace.microsoft.com\/en-us\/marketplace\/apps\/CoreOS.CoreOS\" target=\"_blank\" rel=\"noopener\">CoreOS<\/a> with Docker support enabled. It exposes port 80 for the web access and 22 for maintenance in the network security group, so you\u2019ll be able to connect to it via SSH.<\/p>\n<p>Configuration and data files are stored on the disk attached to this VM. The TeamCity server and build agent are started from the <a href=\"https:\/\/blog.jetbrains.com\/teamcity\/2016\/06\/teamcity-on-docker-hub-its-official-now\/\">official Docker images<\/a>.<\/p>\n<p>An instance of the Azure database for MySQL is created with the <code>teamcitydb<\/code> schema. Network security rules are set to make the database accessible from the TeamCity server machine.<\/p>\n<p>In the virtual machine, the TeamCity operation is controlled by the following systemd services:<\/p>\n<ul>\n<li><code>teamcity-server.service<\/code>\u00a0controls the lifecycle of TeamCity server<\/li>\n<li><code>teamcity-agent.service<\/code>\u00a0controls the lifecycle of TeamCity build agent<\/li>\n<li><code>teamcity-update.service<\/code>\u00a0handles the TeamCity updates.<\/li>\n<\/ul>\n<h2>TeamCity upgrade<\/h2>\n<p>When a TeamCity VM is created, it has a <code>teamcity-version<\/code> tag. By updating its value, you can control the current version of the TeamCity server and build agent. After the update, you need to restart the VM entirely or restart the server and agent services via the following commands:<\/p>\n<p><code>&gt; sudo systemctl restart teamcity-server.service<\/code><br \/>\n<code>&gt; sudo systemctl restart teamcity-agent.service<\/code><\/p>\n<p><strong>Note<\/strong>: The update could take a few minutes to pull the new version of TeamCity Docker images.<\/p>\n<h2>How to diagnose problems<\/h2>\n<p>You can connect to the VM and use <a href=\"https:\/\/fedoraproject.org\/wiki\/How_to_debug_Systemd_problems\" target=\"_blank\" rel=\"noopener\">default systemd tools<\/a> to control TeamCity services. For instance, during the upgrade you can view the server log using the following command:<\/p>\n<p><code>&gt; sudo systemctl status teamcity-server.service<\/code><\/p>\n<h2>Feedback<\/h2>\n<p>Please feel free to leave a comment to this post or file an issue in the <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/TW\" target=\"_blank\" rel=\"noopener\">TeamCity issue tracker<\/a>.<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" href=\"https:\/\/goo.gl\/xkDVsX\" target=\"_blank\" rel=\"noopener\"><i class=\"download-icon\"><\/i>Run TeamCity on Azure<\/a><\/p>\n<p><em>Happy building in Azure Cloud!<\/em><\/p>\n","protected":false},"author":454,"featured_media":0,"comment_status":"open","ping_status":"open","template":"","categories":[808,11,89],"tags":[],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/teamcity\/12667"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/teamcity"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/types\/teamcity"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/users\/454"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/comments?post=12667"}],"version-history":[{"count":0,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/teamcity\/12667\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/media?parent=12667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/categories?post=12667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/tags?post=12667"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/fr\/wp-json\/wp\/v2\/cross-post-tag?post=12667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}