Automatically Connecting to UniAgents Using Custom Images
This section describes how to package images for connecting to UniAgents in the Linux and Windows environments. By using an image, you can purchase an Elastic Compute Server (ECS). A UniAgent will then be automatically installed on it.
Overview
An image is an ECS or Bare Metal Server (BMS) template that contains OS or service data and may also contain application software (such as database software) and proprietary software. Images are classified into public, private, Marketplace, and shared images.
Image Management Service (IMS) provides easy-to-use, self-service image management functions. You can use a public, private, or shared image to apply for ECSs. You can also create private images from existing ECSs or using external image files.
Packaging Methods
Packaging Method |
Description |
---|---|
Install a UniAgent, delete related configuration files, and then package a private image. |
|
Execute a built-in image script and then package a private image. Ensure that no UniAgent has been installed on the Linux server where the image is to be packaged. If a UniAgent has been installed, uninstall it. |
|
Install a UniAgent and then package a private image. |
Packaging an Image in the Linux Environment (Method 1)
- Create an ECS based on an image by referring to Elastic Cloud Server (ECS) Getting Started.
- Install a UniAgent on the ECS manually or remotely by referring to Installing UniAgents. (You can check whether the UniAgent is installed on the UniAgents page of AOM.)
- After confirming that the UniAgent is installed, run the following commands to stop the UniAgent and delete related configuration files:
service uniagentd stop && rm -f /etc/uniagentd/uniagentd.sn && rm -rf /usr/local/uniagentd/log /usr/local/uniagentd/tmp /usr/local/uniagentd/libexec /usr/local/uniagentd/conf/uniagentd.conf
- Locate the target ECS and choose More > Manage Image > Create Image in the Operation column to create a private image. For details, see Creating an Image.
- Configure image information as required.
Packaging an Image in the Linux Environment (Method 2)
- Create an ECS based on an image by referring to Elastic Cloud Server (ECS) Getting Started.
- Download the install_uniagentd_OS.sh script to the /root directory of the ECS:
Download command format: wget https://aom-uniagent-{region_id}.{obs_domain}/install_uniagentd_OS.sh
- Run the following command to set the install_uniagentd_OS.sh script to automatically execute upon system startup:
bash /root/install_uniagentd_OS.sh config
If the AOMInstall startup script exists in the /etc/init.d/ directory, your setting is successful.
- Delete the configuration script. Then create an image. Do not restart the Linux host before you create an image.
rm -f /root/install_uniagentd_OS.sh
- Locate the target ECS and choose More > Manage Image > Create Image in the Operation column to create a private image. For details, see Creating an Image.
- Configure image information as required.
Packaging an Image in the Windows Environment
- Create an ECS based on an image by referring to Elastic Cloud Server (ECS) Getting Started.
- On the ECS, download the installation package intended for the Windows environment by referring to Installing UniAgents, decompress the package, and click uniagentd.msi to install the UniAgent. (After the installation is complete, do not run the start.bat script.)
- Locate the target ECS and choose More > Manage Image > Create Image in the Operation column to create a private image. For details, see Creating an Image.
- Configure the private image information as required.
Follow-Up Operations
After the private image is packaged, you can use the image to purchase an ECS and a UniAgent will then be automatically installed on it. For details, see Purchasing an ECS Using a Private Image.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot