Using Teamcity and Anka Build Cloud
The Anka TeamCity plugin provides a quick way to integrate Anka Build Cloud with TeamCity for iOS/macOS CI workflows. This enables TeamCity jobs to dynamically provision specific macOS VM instances on Anka Build Cloud for job execution. The VMs are deleted after every successful job execution. New job request starts a brand new VM instance on the Anka Build Cloud.
Preparing the VM Template
- Install openJDK 8 in your macOS VM Template.
- Create Teamcity User(required for ssh based connectivity from Teamcity to Anka VMs). Make sure remote login is enabled for this user. You can also use default
ankauser. - Enable port forwarding (required for ssh based connectivity from Teamcity to Anka VMs).
- Download TeamCity agent executable in the Vm under the newly created TeamCity user.
- Go to
BuildAgent/conf/buildagent.propertiesunder Teamcity user in the VM and check all the settings. Make sure that server url pointing to your Teamcity server IP asserverUrl=http://xx.xxx.xx.xxxis correct. - Start the Teamcity agent service inside the VM with
sh BuildAgent/bin/mac.launchd.sh load. - Connect to this VM from Teamcity, wait for few minutes for Teamcity to connect and authorize the VM agent instance. It will show up under the connected tab in Agents in TeamCity.
- Suspend the VM with
anka suspend VMName. - Push it to anka registry.
Configure the TeamCity Plugin
Install the Anka Build Cloud Plugin - Browse to
Administration > Plugins List. Upload the anka-build-tc-XX.zip.Create Cloud profile for the project and select
Anka Build Cloudfor Cloud Type.Edit the Cloud profile to complete configuration.
For Additional terminate conditions, select
after first build.For Controller URL, enter Anka Build Cloud controller IP and port. Default port is 80.
Image Name will show all VM templates from the Registry. Select the one you want to use for build/test for this project.
Image Tag will show all tags for the selected VM template in the Image Name field. Select the one you want to use for your build/test. Leave it to latest to always select the latest one.
For Group (optional), if you want VMs for this definition provisioned on a specific group defined in your Anka Build Cloud (Available only in Enterprise and Enterprise Plus Tiers).
SSH User and SSH Password are the VM Teamcity user ssh credentials.
Agent Path Select is the path to TeamCity agent location in the VM.
Select a Node Group if you want VMs for this definition provisioned on a specific group defined in your Anka Build Cloud (Available only in Enterprise and Enterprise Plus Tiers).
Enter Priority for Vm provisioning (Available only in Enterprise and Enterprise Plus tiers).
Save the settings.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.