jetbrains / teamcity-azure-template Goto Github PK
View Code? Open in Web Editor NEWARM template to deploy TeamCity on Azure
License: Apache License 2.0
ARM template to deploy TeamCity on Azure
License: Apache License 2.0
Hi!
I see that the template had been updated in 543d1d0 to support 2019.1.4 - However, the template used in Azure is out of date and it only allows installations up to 2018.2:
During database converters execution upgrade may fails with the following exception:
Feb 12 11:26:05 teamcity docker[2043]: [2019-02-12 11:26:05,092] ERROR - jetbrains.buildServer.STARTUP - Exception UnknownUpgradeError in stage UPGRADE: Upgrading error: Could not connect to MySQL server: SQL error when doing 'Connection.setAutoCommit(false)': com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 936,932 milliseconds ago. The last packet sent successfully to the server was 936,935 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. Caused by: java.net.SocketException: Connection reset
Feb 12 11:26:05 teamcity docker[2043]: jetbrains.buildServer.maintenance.exceptions.UnknownUpgradeError: Upgrading error: Could not connect to MySQL server: SQL error when doing 'Connection.setAutoCommit(false)': com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 936,932 milliseconds ago. The last packet sent successfully to the server was 936,935 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. Caused by: java.net.SocketException: Connection reset
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor.doUpgrade(StartupProcessor.java:1000)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor.access$1400(StartupProcessor.java:1039)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor$3.call(StartupProcessor.java:13)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:91)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStage(StartupProcessor.java:568)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor.processConcreteStageSafe(StartupProcessor.java:569)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor.processTeamCityLifecycle(StartupProcessor.java:769)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor.access$000(StartupProcessor.java:869)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor$1.run(StartupProcessor.java:3)
Feb 12 11:26:05 teamcity docker[2043]: at java.lang.Thread.run(Thread.java:748)
Feb 12 11:26:05 teamcity docker[2043]: Caused by: jetbrains.buildServer.serverSide.db.DatabaseIsNotReachableException: Could not connect to MySQL server: SQL error when doing 'Connection.setAutoCommit(false)': com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 936,932 milliseconds ago. The last packet sent successfully to the server was 936,935 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem. Caused by: java.net.SocketException: Connection reset
Feb 12 11:26:05 teamcity docker[2043]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Feb 12 11:26:05 teamcity docker[2043]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
Feb 12 11:26:05 teamcity docker[2043]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Feb 12 11:26:05 teamcity docker[2043]: at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Feb 12 11:26:05 teamcity docker[2043]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
Feb 12 11:26:05 teamcity docker[2043]: at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
Feb 12 11:26:05 teamcity docker[2043]: at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3746)
Feb 12 11:26:05 teamcity docker[2043]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2509)
Feb 12 11:26:05 teamcity docker[2043]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
Feb 12 11:26:05 teamcity docker[2043]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2480)
Feb 12 11:26:05 teamcity docker[2043]: at com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4811)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.serverSide.db.DBFunctions.setAutoCommit(DBFunctions.java:1088)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverter(ConvertPerformer.java:108)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.serverSide.versioning.ConvertPerformer.runConverters(ConvertPerformer.java:87)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.serverSide.versioning.VersionManager.upgradeIt(VersionManager.java:381)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor$UpgradePerformer.doUpgrade(StartupProcessor.java:3)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor.lambda$doUpgrade$7(StartupProcessor.java:882)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager$3.run(TeamCityDatabaseManager.java:942)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager$3.run(TeamCityDatabaseManager.java:937)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withMaintenanceDBF(TeamCityDatabaseManager.java:921)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.serverSide.db.TeamCityDatabaseManager.withMaintenanceDBF(TeamCityDatabaseManager.java:937)
Feb 12 11:26:05 teamcity docker[2043]: at jetbrains.buildServer.maintenance.StartupProcessor.doUpgrade(StartupProcessor.java:554)
Feb 12 11:26:05 teamcity docker[2043]: ... 9 more
Feb 12 11:26:05 teamcity docker[2043]: Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 936,932 milliseconds ago. The last packet sent successfully to the server was 936,935 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
Feb 12 11:26:05 teamcity docker[2043]: ... 31 more
Feb 12 11:26:05 teamcity docker[2043]: Caused by: java.net.SocketException: Connection reset
Feb 12 11:26:05 teamcity docker[2043]: at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
Feb 12 11:26:05 teamcity docker[2043]: at java.net.SocketOutputStream.write(SocketOutputStream.java:155)
Feb 12 11:26:05 teamcity docker[2043]: at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
Feb 12 11:26:05 teamcity docker[2043]: at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
Feb 12 11:26:05 teamcity docker[2043]: at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:3728)
Feb 12 11:26:05 teamcity docker[2043]: ... 24 more
It could be enabled like that: https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/qs-configure-template-windows-vm
MSI samples: https://github.com/rashidqureshi/MSI-Samples
I have tried deploying the template a couple of times. It fails with this error:
{ "code": "DeploymentFailed", "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.", "details": [ { "code": "BadRequest", "message": "{\r\n \"error\": {\r\n \"code\": \"RoleAssignmentUpdateNotPermitted\",\r\n \"message\": \"Tenant ID, application ID, principal ID, and scope are not allowed to be updated.\"\r\n }\r\n}" } ] }
In commit 9c8b769, it appears the curl
command was partially deleted in azuredeploy.json
and the cat
command was partially deleted in cloud-config.yaml
.
This is causing the TeamCity server to fail to start. The resources can deploy successfully but the TeamCity server is not configured correctly and will fail to start.
Is there any guidance for enabling SSL using this setup? There seems to be much more involved than just opening the firewall rule for HTTPS for the VM.
According to the docs:
Use it like this in your template.. Replace wait_timeout with max_allowed_packet. It should work. Change 123 to your value you want wait_timeout to be. Update the
dependsOn
to match your servers/servername value.
{
"name": "wait_timeout",
"type": "configurations",
"apiVersion": "2017-04-30-preview",
"dependsOn": [
"[concat('Microsoft.DBforMySQL/servers/', parameters('serverName'))]"
],
"properties": {
"value": "123",
"source": "user-override"
}
}
To get data could be used following method:
https://docs.microsoft.com/en-us/rest/api/mysql/configurations/listbyserver
Currently it expose HTTP endpoint which is not secure, so we need to find a way to implement automatic HTTPS endpoint creation.
Relates to #2
See details: 52df4a7#commitcomment-28065032
The security center recommendations mandate installing an MMA on each VM.
After enabling the agent is inactive with "Agent not responsive or missing ID"
Trying to manully install agent via steps at https://docs.microsoft.com/en-us/azure/azure-monitor/learn/quick-collect-azurevm or https://docs.microsoft.com/en-us/azure/azure-monitor/learn/quick-collect-linux-computer doesn't work since there is no rpm manager in CoreOS
How to we add monitoring and security on the teamcity VM?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.