![]() To get security credentials and cloud image details could be used. It general, it is possible to write a custom service/daemon for a guest OS that will update build agent properties on the machine start. One can change the buildAgent.properties file in a running virtual machine (guest OS) from a host machine to publish properties that will help to match a build agent to a cloud image. Build agents are matched according to the machine instanceId provided as build agent custom properties. The plugin fetches Amazon Instance metadata (including Amazon EC2 instanceId) and publishes the metadata to build agent custom properties. In TeamCity Amazon EC2 integration this is done from the build agent plugin. This parameter can be checked on the server to match build agents with CloudInstances. You can set a special property in the buildAgent.properties file on the build agent started inside the cloud. How to associate a build agent with a cloud instance? This interface is required for CloudImages and CloudInstances. is the cloud client interface that has to be implemented in the plugin. You do not have to implement this interface. Each profile contains the cloud type and holds user-configurable parameters. is the cloud profile interface describing settings. is the cloud image interface describing a kind of image for virtual machines to start. The cloud system has reported that the machine is stopped Use this status for instances that have just been requested to stopĪ stop command was sent to the cloud system ![]() The cloud system has reported a machine as running, i.e. The cloud system has reported a machine as starting Use this status for a newly created instance If the implementation fails to determine the status A known cloud instance is a cloud image.Īn instance has one of the following states: is the interface describing an instance that is detected in the cloud. TeamCity maintains mapping between CloudInstances and registered build agents. This method should work as fast as possible. This method is called by TeamCity to find a running CloudInstance for the registered build agent. If false is returned, TeamCity will plan to call the startNewInstance method. This method is called to check whether it is possible to start one mode instance of the provided image. Returns current communication error(s) if any canStartNewInstance(CloudImage image) Returns a list of all images that are registered for the cloud client getErrorInfo() The clouds UI will show 'Loading' while this method returns false. It may take some time for plugins to initialize. This method is used to restart a virtual machine. This method is used to stop a cloud instance. terminateInstance(CloudInstance instance) CloudInstanceUserData contains properties to be set into a build agent that is started in the virtual machine. If staring takes a long time, it is recommended to implement this interface asynchronuously. This method returns CloudInstance object in the SCHEDULED_TO_START, or STARTING, or RUNNING state. It is normal for the implementation to have its own thread/thread pool to:Īction methods startNewInstace(CloudImage image, CloudInstanceUserData tag) TeamCity assumes that all implemented methods work quite fast. All action methods are declared in the interface. This interface has a base interface called with read-only operations. ![]() You can get an instance of the CloudRegistrar interface in the constructor of your plugin's spring bean. Register the implemented CloudClientFactory in.createNewClient: this factory method creates a new cloud client instance from cloud profile parameters. TeamCity creates one client per profile.If true is returned, TeamCity will create a CloudClient and query it for details. canBeAgentOfType: this method is called to check whether an agent is running on some instance of this could.getPropertiesProcessor returns form values validator.getInitialParameterValues returns default values for form fields if any.getEditProfileUrl returns a context-path to the controller that will provide the cloud profile settings fields for the form.getDisplayName returns a user-friendly name of the plugin.getCloudCode returns the cloud plugin id with maximum length of 5 chars, i.e. ![]() How to implement a plugin for cloud support
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |