In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
The concept and application of Metadata Service, many novices are not very clear, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
To customize instance, cloud-init (or cloudbase-init) is only half the story, and metadata service is the other half of the story. The division of the two is: metadata service provides custom configuration data for cloud-init, and cloud-init completes the configuration work.
Metadata Service
The previous discussion of some cloud-init and cloudbase-init-related experience, received a lot of feedback, you are very interested in how to complete the custom configuration process when instance startup, I would like to talk about it systematically. This topic is indeed very important, there are many practical application scenarios, and it is indeed necessary to discuss it systematically as a supplement to existing tutorials.
Instance is deployed through image, and image contains the operating system (such as Ubuntu 16.04), the most commonly used software (such as SSH), and the most common configuration (such as eth0 dhcp). However, when creating instance, we often want to make some additional configuration for instance, such as installing some packages, opening some services, adding SSH keys, configuring hostname, and so on.
There are several ways to do this:
1. Put all these things into image.
This scheme can be realized, but it is not realistic. Image should be seen as a template for storing general-purpose content. Adding personalized configuration to image either makes image very complex, or results in a large number of image, which is not easy to manage.
2. After the instance is deployed, the personalized configuration is completed manually.
Due to the need for manual operation, the workload will surge when the number of instance is large, and it is easy to make mistakes.
3. Recommended solution: OpenStack Metadata Service provides configuration information for instance (collectively referred to as metadata). When instance starts, it requests from Metadata Service and gets its own cloud-init (or cloudbase-init) of metadata,instance to complete the personalized configuration work according to metadata.
The advantage of this scheme is that there is no need to modify the basic image, which ensures the stability of image and realizes the automatic personality configuration of instance.
The application of the highest frequency
Add ssh public key to instance.
First create the Key Pair in "Project-> Compute-> Access & Security".
OpenStack will create a pair of ssh pulbic key and private key,public key to store in the OpenStack database, and private key will be downloaded automatically when we click the "Create Key Pair" button.
Now "cloudman" >
After instance starts, you can see that the public key of this cloudman has been saved to .ssh / authorized_keys.
This allows us to log in to instance directly using cloudman's private key.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.