What are server tags and how do they work?

Tagging allows you to tag cloud infrastructure resources in any organizational pattern that you choose for better organization, control, and reporting of your cloud resources.

Cherry Servers API users can tag their servers with meta data. Every tag is simply a user's chosen mark in a key-value format that makes managing your cloud infrastructure easier.

This feature is handy when you are creating your cloud solution architecture. You can mark your testing servers with, for instance, environment=stage tag, or you can mark your database node with, let's say, type=db tag. Infrastructure tagging is also very helpful when you are creating a multi-cloud environment where you have to integrate services of different cloud vendors into a single system.

Currently this functionality can be used through Cherry Servers API only. For further information please check our official API documentation:

https://api.cherryservers.com/doc/#tag/Servers

CherryGO library

Server tagging is also available for cherrygo library, where you can set your preferred tags when deploying new servers or modify tags for your existing servers. cherrygo library can be reached via the following link:

https://github.com/cherryservers/cherrygo

CherryCTL program

The easiest way to assign and modify server tags is through cherryctl tool. The example goes as follows:

 

cherryctl add server -s tags-test.test.com  -i 'Ubuntu 16.04 64bit' -l 92 -p 79813 -g EU-East-1 --tags "env=dev,name=super server 1"

or

cherryctl update server -s 215337 --tags "env=prod,name=super server 6"

 

You can check currently active tags on the server:

cherryctl list server -s 215323

server-tags-cherryctl

The newest cherryctl version can be downloaded from the following repository:

http://downloads.cherryservers.com/other/cherryctl/

 

cherryctl docoumentation is available here:

https://github.com/cherryservers/cherryctl

TERRAFORM module

Cherry Servers Terraform module also supports tag directives. Server tags can be set as per the example below:

server-tags-terraform

If you set up server tags, tf module will be able to react to them when making required infrastructure changes.

 

The newest Cherry Servers Terraform module can be found here:

http://downloads.cherryservers.com/other/terraform/

 

You can compile Cherry Servers Terraform module yourself, if you wish:

https://github.com/cherryservers/terraform-provider-cherryservers