Bonus: Speech Product Essay Challenge Waiting for You> HOT

Operation scenario

Cluster refers to the collection of cloud resource management, including resources such as virtual machines running applications. Clusters in TSF are divided into virtual machine clusters and container clusters. When using virtual machines or container computing resources, users need to import the virtual machine into the cluster in advance before deploying applications.
This article describes how to create a virtual machine cluster on the TSF console and manage the cluster.

Create cluster

one Sign in TSF console
two Click in the left navigation bar colony , select a region and click New cluster
three Set the basic information of the cluster.
Cluster type: select Virtual machine cluster
Cluster Name: fill in the cluster name, which can be up to 60 characters long. It can only contain lowercase letters, numbers and the separator ("-"), and cannot start or end with the separator.
Zone: select the zone where the cluster is located
Cluster network: Select the same VPC network as the existing ECS to ensure that the ECS imported into the cluster later belongs to the same VPC.
Label: used to manage resources by category; optional. See for details label
Note: The description of the cluster shall not exceed 200 characters.
Dataset: add the new cluster to the existing dataset. Not a required field. For dataset usage, see Dataset Management
four single click Submit , select in the pop-up window Import virtual machine , enter the import virtual machine page. If you select cancel In the cluster list, you can click Import virtual machine Re import the virtual machine.
five From the virtual machine list of the VPC where the cluster is located, select the virtual machine to be added to the cluster.
six single click next step , to configure the virtual machine.


Reinstall the system: This method will enable the root user to install the agent. After reinstallation, all data in the virtual machine system disk will be cleared and restored to the initial state. Please be careful!
Install Agent (only applicable to virtual machine clusters): This method supports the use of root and non root users to install agents. The machine will not be reinstalled when deploying using the installation agent. You can click the following tab to view the operation steps of the corresponding import method.
Reinstall the system
Installing the Agent
explain
CVM bidding instances do not support reinstalling the system.
one VM configuration
Import method: select Reinstall the system
Operating system: supports two different operating system options: Ubuntu 18.04 and CentOS 7.5.
Login Method: three corresponding login methods are provided.
Set password: Please set the corresponding password according to the prompt.
Associate key immediately: key pair is a pair of parameters generated by an algorithm, which is a more secure way to log in to virtual machine than conventional password. See for details SSH Key
Automatic password generation: The automatically generated password will be sent to you through the in station message, or you can log in to the CVM console to reset the password.


two single click Submit , the imported virtual machine will appear in the virtual machine name list. Wait a few minutes to refresh the list. Normally, the virtual machine status will change to running and the available status will change to "available".
one Import method selection Installing the Agent , click Submit , copy the agent installation script on the import result page. Later, you can also obtain the agent installation script by clicking * * Install Agent * * in the operation column of the virtual machine list.


two single click close , return to the virtual machine list, and the available status of the imported virtual machine displays "Unavailable". Select Sign in Log in to the virtual machine.
Root user installs agent: paste the script directly and execute it.
Non root user installs agent: it needs to be created by root user /data/tsf_apm/ and /var/log/tsf/ These two directories, and grant read-write permissions to the installation user of tsf agent. The installation user of the tsf agent is the startup user of the deployment application. Paste the script and execute it.
three The following figure shows the screenshots of the last few print logs of the terminal after the script is successfully executed.


four After the script is successfully executed, return to the virtual machine list, wait a moment, and the virtual machine will become available.


After importing the virtual machine, you can create and deploy applications in the virtual machine cluster service. See Create and deploy applications

common problem

For exception of importing virtual machine, see Frequently asked questions about resource management

Move out of virtual machine

be careful
Only when no application is running on the node can the node be removed from the cluster. To stop the application, you need to go to the instance list page of the deployment group. Please refer to Application management
one On the cluster list page, click the ID/cluster name , enter the virtual machine list page of the cluster.
two On the virtual machine node list page, select the virtual machine to be removed, and click delete
three In the pop-up prompt box, click determine Move the virtual machine out of the node.

Delete cluster

be careful
When there is a virtual machine in the cluster, the cluster cannot be deleted. You need to remove the virtual machine first.
The cluster cannot provide external services during deletion. Please prepare in advance to avoid impact.
one On the cluster list page, click delete
two In the pop-up prompt box, click determine Delete the cluster.